Permalink
Browse files

Merge branch 'feature/test-libs-update' into develop

  • Loading branch information...
2 parents 180c155 + b4b5d24 commit dca9b61b01a855595c5005c4e5e185bf83593ac0 @adamretter adamretter committed Jan 24, 2014
Showing with 546 additions and 690 deletions.
  1. +5 −5 .classpath
  2. +0 −3 eXist.ipr
  3. +164 −377 eXist.iws
  4. BIN extensions/fluent/lib/hamcrest-core-1.1.jar
  5. BIN extensions/fluent/lib/hamcrest-library-1.1.jar
  6. BIN extensions/fluent/lib/hamcrest-library-1.3.jar
  7. BIN lib/test/easymock-2.5.2.jar
  8. BIN lib/test/easymock-3.2.jar
  9. BIN lib/test/easymockclassextension-2.5.2.jar
  10. BIN lib/test/easymockclassextension-3.2.jar
  11. BIN lib/test/hamcrest-core-1.3.jar
  12. BIN lib/test/junit-4.11.jar
  13. BIN lib/test/junit-4.8.2.jar
  14. +13 −12 nbproject/project.properties
  15. +9 −7 test/src/org/exist/dom/SymbolTableTest.java
  16. +1 −1 test/src/org/exist/http/RESTServiceTest.java
  17. +1 −1 test/src/org/exist/security/RestApiSecurityTest.java
  18. +1 −1 test/src/org/exist/security/XMLDBSecurityTest.java
  19. +1 −1 test/src/org/exist/security/XmldbApiSecurityTest.java
  20. +1 −1 test/src/org/exist/soap/CopyMoveTest.java
  21. +1 −1 test/src/org/exist/soap/XQueryTest.java
  22. +10 −10 test/src/org/exist/storage/AbstractUpdateTest.java
  23. +4 −6 test/src/org/exist/storage/AppendTest.java
  24. +10 −15 test/src/org/exist/storage/CollectionTest.java
  25. +38 −20 test/src/org/exist/storage/CopyCollectionTest.java
  26. +62 −35 test/src/org/exist/storage/CopyResourceTest.java
  27. +24 −26 test/src/org/exist/storage/MoveResourceTest.java
  28. +1 −1 test/src/org/exist/storage/NodePathTest.java
  29. +25 −16 test/src/org/exist/storage/RecoverBinaryTest.java
  30. +25 −15 test/src/org/exist/storage/RecoverBinaryTest2.java
  31. +29 −23 test/src/org/exist/storage/RecoveryTest.java
  32. +5 −6 test/src/org/exist/storage/RemoveTest.java
  33. +5 −6 test/src/org/exist/storage/RenameTest.java
  34. +5 −6 test/src/org/exist/storage/ReplaceTest.java
  35. +29 −25 test/src/org/exist/storage/ResourceTest.java
  36. +10 −16 test/src/org/exist/storage/ShutdownTest.java
  37. +5 −5 test/src/org/exist/storage/UpdateAttributeTest.java
  38. +29 −16 test/src/org/exist/storage/UpdateRecoverTest.java
  39. +5 −5 test/src/org/exist/storage/UpdateTest.java
  40. +1 −1 test/src/org/exist/storage/XIncludeSerializerTest.java
  41. +3 −3 test/src/org/exist/validation/ValidationFunctions_DTD_Test.java
  42. +3 −3 test/src/org/exist/validation/ValidationFunctions_Node_Test.java
  43. +1 −1 test/src/org/exist/validation/ValidationFunctions_XSD_Test.java
  44. +1 −1 test/src/org/exist/xmldb/BinaryResourceUpdateTest.java
  45. +1 −1 test/src/org/exist/xmldb/ContentAsDOMTest.java
  46. +1 −1 test/src/org/exist/xmldb/CopyMoveTest.java
  47. +1 −1 test/src/org/exist/xmldb/DOMTest.java
  48. +2 −2 test/src/org/exist/xmldb/DOMTestJUnit.java
  49. +2 −2 test/src/org/exist/xmldb/RemoteCollectionTest.java
  50. +2 −2 test/src/org/exist/xmldb/RemoteDatabaseImplTest.java
  51. +1 −1 test/src/org/exist/xmldb/ShutdownTest.java
  52. +2 −2 test/src/org/exist/xmldb/StorageStressTest.java
  53. +1 −1 test/src/org/exist/xmldb/TestEXistXMLSerialize.java
  54. +1 −1 test/src/org/exist/xmlrpc/MoveResourceTest.java
  55. +2 −2 test/src/org/exist/xmlrpc/XmlRpcTest.java
  56. +1 −1 test/src/org/exist/xquery/SAXStorageTest.java
  57. +1 −1 test/src/org/exist/xquery/xqts/QT3TS_To_junit.java
  58. +1 −1 test/src/org/exist/xquery/xqts/XQTS_To_junit.java
View
@@ -39,8 +39,8 @@
<classpathentry kind="lib" path="lib/endorsed/xercesImpl-2.11.0.jar"/>
<classpathentry kind="lib" path="lib/endorsed/xml-resolver-1.2.jar"/>
<classpathentry kind="lib" path="lib/endorsed/xalan-2.7.1.jar"/>
- <classpathentry kind="lib" path="extensions/fluent/lib/hamcrest-core-1.1.jar"/>
- <classpathentry kind="lib" path="extensions/fluent/lib/hamcrest-library-1.1.jar"/>
+ <classpathentry kind="lib" path="lib/test/hamcrest-core-1.3.jar"/>
+ <classpathentry kind="lib" path="extensions/fluent/lib/hamcrest-library-1.3.jar"/>
<classpathentry kind="lib" path="extensions/fluent/lib/jmock-2.4.0.jar"/>
<classpathentry kind="lib" path="extensions/fluent/lib/jmock-junit4-2.4.0.jar"/>
<classpathentry kind="lib" path="lib/core/commons-pool-1.6.jar"/>
@@ -75,7 +75,7 @@
<classpathentry kind="lib" path="lib/optional/saaj-1.2.jar"/>
<classpathentry kind="lib" path="lib/optional/wsdl4j-1.5.1.jar"/>
<classpathentry kind="lib" path="tools/ant/lib/ant.jar"/>
- <classpathentry kind="lib" path="lib/test/junit-4.8.2.jar"/>
+ <classpathentry kind="lib" path="lib/test/junit-4.11.jar"/>
<classpathentry kind="lib" path="tools/ircbot/lib/pircbot.jar"/>
<classpathentry kind="lib" path="tools/wrapper/lib/wrapper.jar"/>
<classpathentry kind="lib" path="lib/core/jta-1.1.jar"/>
@@ -91,8 +91,8 @@
<classpathentry kind="lib" path="tools/ant/lib/xmlunit-1.3.jar"/>
<classpathentry kind="lib" path="lib/user/activation-1.1.1.jar"/>
<classpathentry kind="lib" path="lib/user/nekohtml-1.9.15.jar"/>
- <classpathentry kind="lib" path="lib/test/easymock-2.5.2.jar"/>
- <classpathentry kind="lib" path="lib/test/easymockclassextension-2.5.2.jar"/>
+ <classpathentry kind="lib" path="lib/test/easymock-3.2.jar"/>
+ <classpathentry kind="lib" path="lib/test/easymockclassextension-3.2.jar"/>
<classpathentry kind="lib" path="extensions/webdav/lib/jdom-1.1.jar"/>
<classpathentry kind="lib" path="extensions/webdav/lib/mime-util-2.1.3.jar"/>
<classpathentry kind="lib" path="lib/optional/commons-compress-1.4.1.jar"/>
View
@@ -103,9 +103,6 @@
<option name="OPEN_IN_BROWSER" value="false" />
<option name="OUTPUT_DIRECTORY" />
</component>
- <component name="GradleSettings">
- <option name="gradleHome" value="$USER_HOME$/Apps/gradle" />
- </component>
<component name="IdProvider" IDEtalkID="EDCB317F9C51C9BBC9F54E158B17D480" />
<component name="JavacSettings">
<option name="DEPRECATION" value="false" />
View
541 eXist.iws

Large diffs are not rendered by default.

Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
@@ -83,7 +83,7 @@ file.reference.jta-1.1.jar=lib/core/jta-1.1.jar
file.reference.xqdoc_conv.jar=extensions/xqdoc/lib/xqdoc_conv.jar
src.src11.dir=extensions/security/ldap/src
file.reference.xmlrpc-common-3.1.3.jar=lib/core/xmlrpc-common-3.1.3.jar
-file.reference.hamcrest-library-1.1.jar=extensions/fluent/lib/hamcrest-library-1.1.jar
+file.reference.hamcrest-library-1.3.jar=extensions/fluent/lib/hamcrest-library-1.3.jar
file.reference.mime-util-2.1.3.jar=extensions/webdav/lib/mime-util-2.1.3.jar
file.reference.commons-io-2.4.jar=lib/core/commons-io-2.4.jar
src.dir=${file.reference.eXist-trunk-src}
@@ -102,7 +102,8 @@ run.classpath=\
jaxbwiz.endorsed.dirs="${netbeans.home}/../ide12/modules/ext/jaxb/api"
annotation.processing.run.all.processors=true
manifest.file=manifest.mf
-file.reference.junit-4.8.2.jar=lib/test/junit-4.8.2.jar
+file.reference.junit-4.11.jar=lib/test/junit-4.11.jar
+file.reference.hamcrest-core-1.3.jar=lib/test/hamcrest-core-1.3.jar
jnlp.enabled=false
application.vendor=wessels
javadoc.author=false
@@ -127,7 +128,6 @@ platform.active=default_platform
src.src.dir=extensions/modules/src
endorsed.classpath=
file.reference.commons-discovery-0.5.jar=lib/optional/commons-discovery-0.5.jar
-file.reference.hamcrest-core-1.1.jar=extensions/fluent/lib/hamcrest-core-1.1.jar
javadoc.encoding=${source.encoding}
dist.jar=${dist.dir}/eXist-db-full.jar
meta.inf.dir=${src.dir}/META-INF
@@ -153,9 +153,10 @@ file.reference.xmlunit-1.3.jar=tools/ant/lib/xmlunit-1.3.jar
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}:\
- ${file.reference.easymock-2.5.2.jar}:\
- ${file.reference.easymockclassextension-2.5.2.jar}:\
- ${file.reference.junit-4.8.2.jar}:\
+ ${file.reference.easymock-3.2.jar}:\
+ ${file.reference.easymockclassextension-3.2.jar}:\
+ ${file.reference.junit-4.11.jar}:\
+ ${file.reference.hamcrest-core-1.3.jar}:\
${file.reference.xmlunit-1.3.jar}:\
${file.reference.fluent-hc-4.2.3.jar}
file.reference.wsdl4j-1.5.1.jar=lib/optional/wsdl4j-1.5.1.jar
@@ -167,7 +168,7 @@ jmx.jconsole.classpath.plugins=true
file.reference.commons-fileupload-1.3.jar=lib/optional/commons-fileupload-1.3.jar
file.reference.activation-1.1.1.jar=lib/user/activation-1.1.1.jar
file.reference.jdom-1.1.jar=extensions/webdav/lib/jdom-1.1.jar
-file.reference.easymockclassextension-2.5.2.jar=lib/test/easymockclassextension-2.5.2.jar
+file.reference.easymockclassextension-3.2.jar=lib/test/easymockclassextension-3.2.jar
build.dir=nbproject/build
application.title=eXist-db Trunk
file.reference.slf4j-log4j12-1.7.2.jar=lib/core/slf4j-log4j12-1.7.2.jar
@@ -219,7 +220,7 @@ file.reference.jing-20091111.jar=lib/optional/jing-20091111.jar
file.reference.xml-apis-1.4.01.jar=lib/endorsed/xml-apis-1.4.01.jar
file.reference.jline-0.9.94.jar=lib/core/jline-0.9.94.jar
javadoc.notree=false
-file.reference.easymock-2.5.2.jar=lib/test/easymock-2.5.2.jar
+file.reference.easymock-3.2.jar=lib/test/easymock-3.2.jar
file.reference.mail-1.4.4.jar=lib/user/mail-1.4.4.jar
file.reference.axis-ant-1.4.jar=lib/optional/axis-ant-1.4.jar
file.reference.jmock-2.4.0.jar=extensions/fluent/lib/jmock-2.4.0.jar
@@ -279,9 +280,9 @@ javac.classpath=\
${file.reference.mail-1.4.4.jar}:\
${file.reference.nekohtml-1.9.15.jar}:\
${file.reference.exificient-0.8.jar}:\
- ${file.reference.easymock-2.5.2.jar}:\
+ ${file.reference.easymock-3.2.jar}:\
${file.reference.cglib-nodep-2.2.jar}:\
- ${file.reference.easymockclassextension-2.5.2.jar}:\
+ ${file.reference.easymockclassextension-3.2.jar}:\
${file.reference.objenesis-1.2.jar}:\
${file.reference.ant.jar}:\
${file.reference.xmlunit-1.3.jar}:\
@@ -303,8 +304,8 @@ javac.classpath=\
${file.reference.jetty-webapp-8.1.9.v20130131.jar}:\
${file.reference.jetty-websocket-8.1.9.v20130131.jar}:\
${file.reference.jetty-xml-8.1.9.v20130131.jar}:\
- ${file.reference.hamcrest-core-1.1.jar}:\
- ${file.reference.hamcrest-library-1.1.jar}:\
+ ${file.reference.hamcrest-core-1.3.jar}:\
+ ${file.reference.hamcrest-library-1.3.jar}:\
${file.reference.jmock-2.4.0.jar}:\
${file.reference.jmock-junit4-2.4.0.jar}:\
${file.reference.xqdoc_conv.jar}:\
@@ -3,11 +3,13 @@
import org.exist.storage.io.VariableByteInput;
import org.easymock.Capture;
import org.exist.storage.io.VariableByteOutputStream;
-import org.easymock.classextension.EasyMock;
-import static org.easymock.classextension.EasyMock.expect;
-import static org.easymock.classextension.EasyMock.verify;
-import static org.easymock.classextension.EasyMock.replay;
-import static org.easymock.classextension.EasyMock.capture;
+import org.easymock.EasyMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.verify;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.captureByte;
+import static org.easymock.EasyMock.captureInt;
+import static org.easymock.EasyMock.capture;
import java.io.File;
import java.io.IOException;
import org.exist.EXistException;
@@ -118,8 +120,8 @@ public void write_and_read_are_balanced() throws EXistException, IOException {
final Capture<String> strCapture = new Capture<String>();
//write expectations
- mockOs.writeByte(capture(byteCapture));
- mockOs.writeInt(capture(intCapture));
+ mockOs.writeByte(captureByte(byteCapture));
+ mockOs.writeInt(captureInt(intCapture));
mockOs.writeUTF(capture(strCapture));
replay(mockOs);
@@ -161,7 +161,7 @@ public final static void createCredentials() {
@Before
public void setUp() throws Exception {
- //Don't worry about closing the server : the shutdown hook will do the job
+ //Don't worry about closing the server : the shutdownDB hook will do the job
if (server == null) {
server = new JettyStart();
System.out.println("Starting standalone server...");
@@ -164,7 +164,7 @@ protected void createBinResource(final String resourceUri, final byte[] content,
@BeforeClass
public static void startServer() throws InterruptedException {
- //Don't worry about closing the server : the shutdown hook will do the job
+ //Don't worry about closing the server : the shutdownDB hook will do the job
if (server == null) {
server = new JettyStart();
System.out.println("Starting standalone server...");
@@ -685,7 +685,7 @@ public static void stopServer() {
// Collection root = DatabaseManager.getCollection("xmldb:exist:///db", "admin", "");
// DatabaseInstanceManager mgr =
// (DatabaseInstanceManager) root.getService("DatabaseInstanceManager", "1.0");
-// mgr.shutdown();
+// mgr.shutdownDB();
// } catch (XMLDBException e) {
// e.printStackTrace();
// }
@@ -380,7 +380,7 @@ public static void stopServer() {
// Collection root = DatabaseManager.getCollection("xmldb:exist:///db", "admin", "");
// DatabaseInstanceManager mgr =
// (DatabaseInstanceManager) root.getService("DatabaseInstanceManager", "1.0");
-// mgr.shutdown();
+// mgr.shutdownDB();
// } catch (XMLDBException e) {
// e.printStackTrace();
// }
@@ -46,7 +46,7 @@ protected void tearDown() throws Exception {
rex.printStackTrace();
}
- //mn.shutdown();
+ //mn.shutdownDB();
}
private void setupTestCollection() throws RemoteException {
@@ -147,7 +147,7 @@ protected void tearDown() throws Exception {
} catch (RemoteException rex) {
rex.printStackTrace();
}
- //mn.shutdown();
+ //mn.shutdownDB();
}
public void testRemoveThisEmptyTest() throws Exception {
@@ -21,8 +21,6 @@
*/
package org.exist.storage;
-import junit.framework.TestCase;
-
import org.exist.collections.Collection;
import org.exist.collections.IndexInfo;
import org.exist.dom.DocumentImpl;
@@ -38,15 +36,20 @@
import org.exist.xquery.value.NodeValue;
import org.exist.xquery.value.Sequence;
import org.exist.xquery.value.SequenceIterator;
+import org.junit.After;
+import org.junit.Test;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
-public abstract class AbstractUpdateTest extends TestCase {
+public abstract class AbstractUpdateTest {
protected static XmldbURI TEST_COLLECTION_URI = XmldbURI.ROOT_COLLECTION_URI.append("test");
protected static String TEST_XML =
"<?xml version=\"1.0\"?>" +
"<products/>";
- public void testRead() {
+ @Test
+ public void read() {
BrokerPool.FORCE_CORRUPTION = false;
BrokerPool pool = null;
@@ -121,11 +124,8 @@ protected BrokerPool startDB() {
return null;
}
- protected void tearDown() {
- try {
- BrokerPool.stopAll(false);
- } catch (Exception e) {
- fail(e.getMessage());
- }
+ @After
+ public void tearDown() {
+ BrokerPool.stopAll(false);
}
}
@@ -21,7 +21,6 @@
*/
package org.exist.storage;
-import junit.textui.TestRunner;
import org.exist.collections.IndexInfo;
import org.exist.dom.DefaultDocumentSet;
import org.exist.dom.MutableDocumentSet;
@@ -31,16 +30,15 @@
import org.exist.xupdate.Modification;
import org.exist.xupdate.XUpdateProcessor;
import org.xml.sax.InputSource;
+import org.junit.Test;
+import static org.junit.Assert.fail;
import java.io.StringReader;
public class AppendTest extends AbstractUpdateTest {
- public static void main(String[] args) {
- TestRunner.run(AppendTest.class);
- }
-
- public void testUpdate() {
+ @Test
+ public void update() {
BrokerPool.FORCE_CORRUPTION = true;
BrokerPool pool = null;
DBBroker broker = null;
@@ -25,22 +25,23 @@
import java.io.Writer;
import java.util.Iterator;
-import junit.framework.TestCase;
-import junit.textui.TestRunner;
-
import org.exist.collections.Collection;
import org.exist.dom.DocumentImpl;
import org.exist.storage.btree.BTree;
import org.exist.storage.txn.TransactionManager;
import org.exist.storage.txn.Txn;
import org.exist.util.Configuration;
import org.exist.xmldb.XmldbURI;
+import org.junit.After;
+import org.junit.Test;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
/**
* @author wolf
*
*/
-public class CollectionTest extends TestCase {
+public class CollectionTest {
@SuppressWarnings("unused")
private static String docs[] = { "hamlet.xml", "r_and_j.xml", "macbeth.xml" };
@@ -54,12 +55,9 @@
" <title>Hello</title>" +
" <para>Hello World!</para>" +
"</test>";
-
- public static void main(String[] args) {
- TestRunner.run(CollectionTest.class);
- }
- public void testStoreRead() {
+ @Test
+ public void storeRead() {
store();
BrokerPool.stopAll(false);
read();
@@ -134,11 +132,8 @@ protected BrokerPool startDB() {
return null;
}
- protected void tearDown() {
- try {
- BrokerPool.stopAll(false);
- } catch (Exception e) {
- fail(e.getMessage());
- }
+ @After
+ public void tearDown() {
+ BrokerPool.stopAll(false);
}
}
Oops, something went wrong.

0 comments on commit dca9b61

Please sign in to comment.