[[[
Added new JavaHL tests and changed default repository type to fsfs.

* javahl/tests/SVNAdminTests.java
  Changed the default repository type to fsfs

* javahl/tests/BasicTests.java
  Added two new tests:
  
  testBasicDAVMerge - does a merge from the SVN repository.  This test
  demonstrated a stack overflow problem that existed in 1.2 RC.

  testSSLTemporary - this test simply makes two requests to an SSL
  repository.  If the certificate has not already been accepter permanently
  then this test will tell JavaHL to accept it temporary.  At the time of
  this test creation, the second server request will incorrect fail.
 
* javahl/tests/SVNTests.java
  Changed the default repository type to fsfs
  
  Aded an implementation of PromptUserPassword3 so that SSL certificates can
  be accepted temporary in support of the testSSLTemporary test.
  
]]]

Index: src/org/tigris/subversion/javahl/tests/SVNAdminTests.java
===================================================================
--- src/org/tigris/subversion/javahl/tests/SVNAdminTests.java	(revision 15144)
+++ src/org/tigris/subversion/javahl/tests/SVNAdminTests.java	(working copy)
@@ -58,7 +58,7 @@
      */
     public void testCreate() throws Throwable
     {
-        testee.create("testrep", false, false, null, SVNAdmin.BDB);
+        testee.create("testrep", false, false, null, SVNAdmin.FSFS);
         assertTrue("repository exists", new File("testrep").exists());
         removeRepository("testrep");
         assertFalse("repository deleted", new File("testrep").exists());
Index: src/org/tigris/subversion/javahl/tests/BasicTests.java
===================================================================
--- src/org/tigris/subversion/javahl/tests/BasicTests.java	(revision 15144)
+++ src/org/tigris/subversion/javahl/tests/BasicTests.java	(working copy)
@@ -1433,5 +1433,61 @@
                       true), 5);
  
     }
+    
+    /**
+     * test the basic SVNClient.merge functionality via ra_dav
+     * @throws Throwable
+     * @since 1.2
+     */
+    public void testBasicDAVMerge() throws Throwable
+    {
+        // build the test setup
+        OneTest thisTest = new OneTest();
+        
+        
+        
+        String wc = thisTest.getWCPath() + "/raDAV_test";
+        
+        String baseURL = "http://svn.collab.net/repos/svn";
+        String branchURL = baseURL + "/branches/1.1.x/subversion/libsvn_fs_fs";
+        String modsURL = baseURL + "/branches/1.1.x-r14063/subversion/libsvn_fs_fs";
+        Revision pegRev = new Revision.Number(14554);
+        Revision fromRev = new Revision.Number(14121);
+        Revision toRev = new Revision.Number(14122);
+        
+        // checkout svn 1.1.x libsvn_fsfs module @ r14544
+        client.checkout(branchURL, wc, pegRev, pegRev, true, true);
+        
+        // test --dry-run of 1.1.x-r14063 branch
+        client.merge(modsURL, pegRev, fromRev, toRev, wc, false, true, false, true);
 
+        // now do the real merge of 1.1.x-r14063 branch
+        client.merge(modsURL, pegRev, fromRev, toRev, wc, false, true, false, false);
+ 
+    }
+    
+    /**
+     * test the accept temporary SSL feature
+     * @throws Throwable
+     * @since 1.2
+     */
+    public void testSSLTemporary() throws Throwable
+    {
+        // build the test setup
+        OneTest thisTest = new OneTest();
+        
+        String sslURL = "https://svn.collab.net/repos/svn";
+        Revision fromRev = new Revision.Number(15135);
+        Revision toRev = new Revision.Number(15135);
+
+        // get a commit message from an SSL server.  The certificate
+        // will be accepted temporary
+        LogMessage lm[] = client.logMessages(sslURL, fromRev, toRev);
+        assertEquals("Failed to retrieve first log message", 1, lm.length);
+        // try to get it again -- this tests that the accept temporary
+        // worked
+        LogMessage lm2[] = client.logMessages(sslURL, fromRev, toRev);
+        assertEquals("Failed to retrieve second log message", 1, lm2.length);
+ 
+    }
 }
Index: src/org/tigris/subversion/javahl/tests/SVNTests.java
===================================================================
--- src/org/tigris/subversion/javahl/tests/SVNTests.java	(revision 15144)
+++ src/org/tigris/subversion/javahl/tests/SVNTests.java	(working copy)
@@ -214,6 +214,7 @@
         client = new SVNClient();
         client.notification2(new MyNotifier());
         client.commitMessageHandler(new MyCommitMessage());
+        client.setPrompt(new MyPrompter());
         client.username("jrandom");
         client.password("rayjandom");
         client.setConfigDirectory(conf.getAbsolutePath());
@@ -224,7 +225,7 @@
         greekRepos = new File(localTmp, "repos");
         greekDump = new File(localTmp, "greek_dump");
         admin.create(greekRepos.getAbsolutePath(), true,false, null,
-                SVNAdmin.BDB);
+                SVNAdmin.FSFS);
         addExpectedCommitItem(greekFiles.getAbsolutePath(), null, null,
                 NodeKind.none, CommitItemStateFlags.Add);
         client.doImport(greekFiles.getAbsolutePath(), makeReposUrl(greekRepos),
@@ -588,7 +589,7 @@
             removeDirectoryWithContent(repos);
             // create and load the repository from the default repository dump
             admin.create(repos.getAbsolutePath(), true, false,
-                    conf.getAbsolutePath(), SVNAdmin.BDB);
+                    conf.getAbsolutePath(), SVNAdmin.FSFS);
             admin.load(repos.getAbsolutePath(), new FileInputer(greekDump),
                     new IgnoreOutputer(), false, false, null);
             return repos;
@@ -735,4 +736,43 @@
         {
         }
     }
+
+    class MyPrompter implements PromptUserPassword3
+    // This class provides the username/password when needed.
+    // The main thing it does is only accept SSL certificates
+    // temporary, so that feature can be tested.
+    
+    {
+
+        public String askQuestion(String realm, String question,
+                boolean showAnswer, boolean maySave) {
+            return null;
+        }
+        public boolean prompt(String realm, String username, boolean maySave) {
+            return true;
+        }
+        public boolean userAllowedSave() {
+            return false;
+        }
+        public int askTrustSSLServer(String info, boolean allowPermanently) {
+            return PromptUserPassword3.AcceptTemporary;
+        }
+        public String askQuestion(String realm, String question,
+                boolean showAnswer) {
+            return null;
+        }
+        public boolean askYesNo(String realm, String question,
+                boolean yesIsDefault) {
+            return true;
+        }
+        public String getPassword() {
+            return "rayjandom";
+        }
+        public String getUsername() {
+            return "jrandom";
+        }
+        public boolean prompt(String realm, String username) {
+            return true;
+        }
+    }
 }
