Permalink
Browse files

removed deprecated test infrastructure methods

  • Loading branch information...
DirkMahler committed May 18, 2017
1 parent 85191b4 commit 07594062403210cc1b0bd627922a40dcbd4d692e
Showing with 146 additions and 163 deletions.
  1. +2 −2 jqassistant/maven.adoc
  2. +1 −1 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/AbstractNeo4jXOManagerTest.java
  3. +2 −2 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/batchable/BatchableTest.java
  4. +2 −2 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/bootstrap/NonRegisteredTypeTest.java
  5. +2 −2 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/concurrency/MultithreadedTest.java
  6. +3 −3 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/delegate/DelegateTest.java
  7. +1 −1 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/demo/CrudTest.java
  8. +1 −1 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/demo/IndexedDemoTest.java
  9. +1 −1 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/demo/QueryDemoTest.java
  10. +2 −2 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/example/ByExampleTest.java
  11. +2 −2 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/findbyid/FindByIdTest.java
  12. +1 −1 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/generics/GenericTypeTest.java
  13. +1 −1 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/id/IdTest.java
  14. +5 −5 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/implementedby/EntityImplementedByTest.java
  15. +4 −4 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/implementedby/RelationImplementedByTest.java
  16. +2 −2 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/inheritance/AnonymousSubTypeTest.java
  17. +1 −1 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/inheritance/AnonymousSuperTypeTest.java
  18. +1 −1 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/inheritance/ValueHierarchyTest.java
  19. +5 −5 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/instancelistener/InstanceListenerTest.java
  20. +1 −1 ...com/buschmais/xo/neo4j/test/issues/initialize_primitive_values/InitializePrimitiveValuesTest.java
  21. +1 −1 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/issues/not_a_proxy/NotAProxyTest.java
  22. +2 −2 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/label/LabelTest.java
  23. +3 −3 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/mapping/BidirectionalMappingTest.java
  24. +5 −5 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/mapping/CollectionPropertyMappingTest.java
  25. +9 −9 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/mapping/EntityResultOfTest.java
  26. +2 −2 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/mapping/EnumPropertyMappingTest.java
  27. +2 −2 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/mapping/IndexMappingTest.java
  28. +2 −2 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/mapping/PrimitivePropertyMappingTest.java
  29. +2 −2 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/mapping/ReferencePropertyMappingTest.java
  30. +9 −9 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/mapping/RelationResultOfTest.java
  31. +1 −1 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/mapping/UnmappedTypesTest.java
  32. +6 −6 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/migration/MigrationTest.java
  33. +2 −2 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/modifier/ModifierTest.java
  34. +2 −2 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/performance/XoVsNativePerformanceIT.java
  35. +2 −2 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/query/CreateIndexTest.java
  36. +1 −1 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/query/IndexTest.java
  37. +1 −1 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/query/PathTest.java
  38. +6 −6 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/query/QueryReturnTypesTest.java
  39. +10 −10 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/query/QueryTest.java
  40. +2 −2 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/query/UniqueTest.java
  41. +1 −1 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/relation/implicit/ImplicitRelationTest.java
  42. +5 −5 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/relation/qualified/QualifiedRelationTest.java
  43. +1 −1 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/relation/typed/CombinedEntitiesTest.java
  44. +1 −1 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/relation/typed/RelationSubclassingTest.java
  45. +1 −1 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/relation/typed/TreeTest.java
  46. +3 −3 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/relation/typed/TypedRelationTest.java
  47. +4 −4 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/repository/RepositoryTest.java
  48. +1 −1 ...test/src/test/java/com/buschmais/xo/neo4j/test/transaction/TransactionAttributeMandatoryTest.java
  49. +5 −5 .../test/src/test/java/com/buschmais/xo/neo4j/test/transaction/TransactionAttributeRequiresTest.java
  50. +2 −2 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/transientproperty/TransientPropertyTest.java
  51. +1 −1 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/validation/ValidationModeNoneTest.java
  52. +4 −4 neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/validation/ValidationTest.java
  53. +6 −13 pom.xml
  54. +1 −11 test/src/main/java/com/buschmais/xo/test/AbstractXOManagerTest.java
View
@@ -5,7 +5,7 @@
This section describes rules that apply to the Maven build system.
[[maven:MainArtifact]]
[source,cypher,role=concept,requiresConcepts="classpath:Resolve"]
[source,cypher,role=concept]
// classpath:Resolve is required due to https://github.com/buschmais/jqa-maven-plugin/issues/7
.Adds a label `Main` to all non test artifacts created by a Maven project.
----
@@ -32,4 +32,4 @@ OPTIONAL MATCH
(artifact)-[dependsOn:DEPENDS_ON]->(:Main:Artifact)
RETURN
*
----
----
@@ -37,7 +37,7 @@ protected AbstractNeo4jXOManagerTest(XOUnit xoUnit) {
}
protected void dropDatabase() {
XOManager manager = getXoManager();
XOManager manager = getXOManager();
manager.currentTransaction().begin();
manager.createQuery("MATCH (n) DETACH DELETE n").execute();
manager.currentTransaction().commit();
@@ -33,8 +33,8 @@ public BatchableTest(XOUnit xoUnit) {
@Test
public void batchable() throws ExecutionException, InterruptedException {
assumeThat(getXoManagerFactory().getXOUnit().getProvider(), equalTo(Neo4jDatabase.BOLT.getProvider()));
XOManager xoManager = getXoManager();
assumeThat(getXOManagerFactory().getXOUnit().getProvider(), equalTo(Neo4jDatabase.BOLT.getProvider()));
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
A a = xoManager.create(A.class);
a.setName("A1");
@@ -33,7 +33,7 @@ public NonRegisteredTypeTest(XOUnit xoUnit) {
@Test
public void entity() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
try {
xoManager.create(A.class);
@@ -46,7 +46,7 @@ public void entity() {
@Test
public void relation() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
B b1 = xoManager.create(B.class);
B b2 = xoManager.create(B.class);
@@ -36,8 +36,8 @@ public MultithreadedTest(XOUnit xoUnit) {
@Test
public void instance() throws ExecutionException, InterruptedException {
assumeThat(getXoManagerFactory().getXOUnit().getProvider(), equalTo(Neo4jDatabase.MEMORY.getProvider()));
XOManager xoManager = getXoManager();
assumeThat(getXOManagerFactory().getXOUnit().getProvider(), equalTo(Neo4jDatabase.MEMORY.getProvider()));
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
A a = xoManager.create(A.class);
xoManager.currentTransaction().commit();
@@ -38,7 +38,7 @@ public DelegateTest(XOUnit xoUnit) {
@Test
public void entity() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
Neo4jNode<Neo4jLabel, ?, ?, ?> node = ((CompositeObject) xoManager.create(A.class)).getDelegate();
Iterable<Neo4jLabel> labels = node.getLabels();
@@ -53,7 +53,7 @@ public void entity() {
@Test
public void relation() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
A a = xoManager.create(A.class);
B b = xoManager.create(B.class);
@@ -67,7 +67,7 @@ public void relation() {
@Test
public void row() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
A a = xoManager.create(A.class);
Result<CompositeRowObject> row = xoManager.createQuery("match (a:A) return a").execute();
@@ -32,7 +32,7 @@ public CrudTest(XOUnit xoUnit) {
@Test
public void create() throws InterruptedException {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
A a = xoManager.create(A.class);
a.setName("Foo");
@@ -29,7 +29,7 @@ public IndexedDemoTest(XOUnit xoUnit) {
@Test
public void test() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
Person person1 = xoManager.create(Person.class);
person1.setName("Peter");
@@ -31,7 +31,7 @@ public QueryDemoTest(XOUnit xoUnit) {
@Test
public void test() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
Group group = xoManager.create(Group.class);
Person person1 = xoManager.create(Person.class);
@@ -33,7 +33,7 @@ public ByExampleTest(XOUnit xoUnit) {
@Test
public void createByExample() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
// java 7: anonymous inner class
A a1 = xoManager.create(new Example<A>() {
@@ -74,7 +74,7 @@ public void prepare(A example) {
@Test
public void findCompositeByExample() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
// java 7: anonymous inner class
CompositeObject compositeObject1 = xoManager.<CompositeObject>create(new Example<CompositeObject>() {
@@ -31,7 +31,7 @@ public FindByIdTest(XOUnit xoUnit) {
@Test
public void entity() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
A a1 = xoManager.create(A.class);
A a2 = xoManager.create(A.class);
@@ -46,7 +46,7 @@ public void entity() {
@Test
public void relation() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
A a1 = xoManager.create(A.class);
B b1 = xoManager.create(B.class);
@@ -27,7 +27,7 @@ public GenericTypeTest(XOUnit xoUnit) {
@Test
public void composite() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
BoundType b = xoManager.create(BoundType.class);
b.setValue("value");
@@ -34,7 +34,7 @@ public IdTest(XOUnit xoUnit) {
@Test
public void id() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
A a = xoManager.create(A.class);
B b = xoManager.create(B.class);
@@ -33,7 +33,7 @@ public EntityImplementedByTest(XOUnit xoUnit) {
@Test
public void nonPropertyMethod() {
XOManager xoManager = getXoManagerFactory().createXOManager();
XOManager xoManager = getXOManagerFactory().createXOManager();
xoManager.currentTransaction().begin();
A a = xoManager.create(A.class);
a.setValue(1);
@@ -45,8 +45,8 @@ public void nonPropertyMethod() {
@Test
public void propertyMethods() {
assumeThat(getXoManagerFactory().getXOUnit().getProvider(), equalTo(Neo4jDatabase.MEMORY.getProvider()));
XOManager xoManager = getXoManagerFactory().createXOManager();
assumeThat(getXOManagerFactory().getXOUnit().getProvider(), equalTo(Neo4jDatabase.MEMORY.getProvider()));
XOManager xoManager = getXOManagerFactory().createXOManager();
xoManager.currentTransaction().begin();
A a = xoManager.create(A.class);
a.setCustomValue("VALUE");
@@ -58,7 +58,7 @@ public void propertyMethods() {
@Test
public void compareTo() {
XOManager xoManager = getXoManagerFactory().createXOManager();
XOManager xoManager = getXOManagerFactory().createXOManager();
xoManager.currentTransaction().begin();
A a1 = xoManager.create(A.class);
a1.setValue(100);
@@ -73,7 +73,7 @@ public void compareTo() {
@Test(expected = UnsupportedOperationException.class)
public void unsupportedOperation() {
XOManager xoManager = getXoManagerFactory().createXOManager();
XOManager xoManager = getXOManagerFactory().createXOManager();
xoManager.currentTransaction().begin();
A a = xoManager.create(A.class);
xoManager.currentTransaction().commit();
@@ -33,7 +33,7 @@ public RelationImplementedByTest(XOUnit xoUnit) {
@Test
public void nonPropertyMethod() {
XOManager xoManager = getXoManagerFactory().createXOManager();
XOManager xoManager = getXOManagerFactory().createXOManager();
xoManager.currentTransaction().begin();
A a = xoManager.create(A.class);
B b = xoManager.create(B.class);
@@ -47,8 +47,8 @@ public void nonPropertyMethod() {
@Test
public void propertyMethods() {
assumeThat(getXoManagerFactory().getXOUnit().getProvider(), equalTo(Neo4jDatabase.MEMORY.getProvider()));
XOManager xoManager = getXoManagerFactory().createXOManager();
assumeThat(getXOManagerFactory().getXOUnit().getProvider(), equalTo(Neo4jDatabase.MEMORY.getProvider()));
XOManager xoManager = getXOManagerFactory().createXOManager();
xoManager.currentTransaction().begin();
A a = xoManager.create(A.class);
B b = xoManager.create(B.class);
@@ -62,7 +62,7 @@ public void propertyMethods() {
@Test(expected = UnsupportedOperationException.class)
public void unsupportedOperation() {
XOManager xoManager = getXoManagerFactory().createXOManager();
XOManager xoManager = getXOManagerFactory().createXOManager();
xoManager.currentTransaction().begin();
A a = xoManager.create(A.class);
B b = xoManager.create(B.class);
@@ -30,13 +30,13 @@ public AnonymousSubTypeTest(XOUnit xoUnit) {
@Test
public void anonymousSubType() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
D b = xoManager.create(D.class);
b.setIndex("1");
xoManager.currentTransaction().commit();
closeXOmanager();
xoManager = getXoManager();
xoManager = getXOManager();
xoManager.currentTransaction().begin();
A a = xoManager.find(A.class, "1").iterator().next();
assertThat(a.getIndex(), equalTo("1"));
@@ -30,7 +30,7 @@ public AnonymousSuperTypeTest(XOUnit xoUnit) {
@Test
public void anonymousSuperType() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
B b = xoManager.create(B.class);
b.setIndex("1");
@@ -31,7 +31,7 @@ public ValueHierarchyTest(XOUnit xoUnit) {
@Test
public void valueHierarchy() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
ObjectDescriptor master = xoManager.create(ObjectDescriptor.class);
ObjectDescriptor detail = xoManager.create(ObjectDescriptor.class);
@@ -47,7 +47,7 @@ public void reset() {
@Test
public void staticInstanceListener() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
A a = xoManager.create(A.class);
B b = xoManager.create(B.class);
@@ -64,7 +64,7 @@ public void staticInstanceListener() {
assertThat(StaticInstanceListener.getPostUpdate(), IsCollectionContaining.<Object>hasItems(a, b, a2b));
xoManager.currentTransaction().commit();
closeXOmanager();
xoManager = getXoManager();
xoManager = getXOManager();
xoManager.currentTransaction().begin();
a = xoManager.createQuery("match (a:A) return a", A.class).execute().getSingleResult();
assertThat(StaticInstanceListener.getPostLoad(), IsCollectionContaining.<Object>hasItems(a));
@@ -90,7 +90,7 @@ public void staticInstanceListener() {
@Test
public void aggregatedLifecycleEvents() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
A a = xoManager.create(A.class);
// @PostCreate
@@ -100,7 +100,7 @@ public void aggregatedLifecycleEvents() {
// @PreUpdate and @PostUpdate
assertThat(StaticInstanceListener.getAggregated().size(), equalTo(3));
closeXOmanager();
xoManager = getXoManager();
xoManager = getXOManager();
xoManager.currentTransaction().begin();
a = xoManager.createQuery("match (a:A) return a", A.class).execute().getSingleResult();
// @PostLoad
@@ -113,7 +113,7 @@ public void aggregatedLifecycleEvents() {
@Test
public void typedInstanceListener() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
TypedInstanceListener typedInstanceListener = new TypedInstanceListener();
xoManager.registerInstanceListener(typedInstanceListener);
xoManager.currentTransaction().begin();
@@ -33,7 +33,7 @@ public InitializePrimitiveValuesTest(XOUnit xoUnit) {
@Test
public void test() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
A a = xoManager.create(A.class);
xoManager.currentTransaction().commit();
@@ -34,7 +34,7 @@ public NotAProxyTest(XOUnit xoUnit) {
@Test
public void test() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
A a = xoManager.create(A.class);
C c = xoManager.create(C.class);
@@ -30,7 +30,7 @@ public LabelTest(XOUnit xoUnit) {
@Test
public void implicitLabel() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
ImplicitLabel implicitLabel = xoManager.create(ImplicitLabel.class);
assertThat(executeQuery("MATCH (n:ImplicitLabel) RETURN n").getColumn("n"), hasItem(implicitLabel));
@@ -40,7 +40,7 @@ public void implicitLabel() {
@Test
public void explicitLabel() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
ExplicitLabel explicitLabel = xoManager.create(ExplicitLabel.class);
assertThat(executeQuery("MATCH (n:EXPLICIT_LABEL) RETURN n").getColumn("n"), hasItem(explicitLabel));
@@ -31,7 +31,7 @@ public BidirectionalMappingTest(XOUnit xoUnit) {
@Test
public void oneToOne() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
G g1 = xoManager.create(G.class);
H h = xoManager.create(H.class);
@@ -52,7 +52,7 @@ public void oneToOne() {
@Test
public void oneToMany() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
G g1 = xoManager.create(G.class);
H h = xoManager.create(H.class);
@@ -73,7 +73,7 @@ public void oneToMany() {
@Test
public void ManyToMany() {
XOManager xoManager = getXoManager();
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
G g1 = xoManager.create(G.class);
H h = xoManager.create(H.class);
Oops, something went wrong.

0 comments on commit 0759406

Please sign in to comment.