http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/runtime/src/test/java/org/apache/zest/runtime/value/ValueWithAssociationTest.java ---------------------------------------------------------------------- diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/value/ValueWithAssociationTest.java b/core/runtime/src/test/java/org/apache/zest/runtime/value/ValueWithAssociationTest.java index 77474dd..4afb9ce 100644 --- a/core/runtime/src/test/java/org/apache/zest/runtime/value/ValueWithAssociationTest.java +++ b/core/runtime/src/test/java/org/apache/zest/runtime/value/ValueWithAssociationTest.java @@ -37,13 +37,13 @@ import org.apache.zest.bootstrap.AssemblyException; import org.apache.zest.bootstrap.ModuleAssembly; import org.apache.zest.entitystore.memory.MemoryEntityStoreService; import org.apache.zest.spi.uuid.UuidIdentityGeneratorService; -import org.apache.zest.test.AbstractQi4jTest; +import org.apache.zest.test.AbstractZestTest; import org.apache.zest.valueserialization.orgjson.OrgJsonValueSerializationService; import static org.hamcrest.core.IsEqual.equalTo; import static org.junit.Assert.assertThat; -public class ValueWithAssociationTest extends AbstractQi4jTest +public class ValueWithAssociationTest extends AbstractZestTest { @Override public void assemble( ModuleAssembly module )
http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/runtime/src/test/java/org/apache/zest/runtime/visibility/VisibilityInUnitOfWorkTest.java ---------------------------------------------------------------------- diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/visibility/VisibilityInUnitOfWorkTest.java b/core/runtime/src/test/java/org/apache/zest/runtime/visibility/VisibilityInUnitOfWorkTest.java index 84b185c..bae6c61 100644 --- a/core/runtime/src/test/java/org/apache/zest/runtime/visibility/VisibilityInUnitOfWorkTest.java +++ b/core/runtime/src/test/java/org/apache/zest/runtime/visibility/VisibilityInUnitOfWorkTest.java @@ -133,8 +133,8 @@ public class VisibilityInUnitOfWorkTest private Application createApplication() throws AssemblyException { - Energy4Java qi4j = new Energy4Java(); - return qi4j.newApplication( new ApplicationAssembler() + Energy4Java zest = new Energy4Java(); + return zest.newApplication( new ApplicationAssembler() { @Override public ApplicationAssembly assemble( ApplicationAssemblyFactory appFactory ) http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/runtime/src/test/java/org/apache/zest/spi/service/importer/InstanceImporterTest.java ---------------------------------------------------------------------- diff --git a/core/runtime/src/test/java/org/apache/zest/spi/service/importer/InstanceImporterTest.java b/core/runtime/src/test/java/org/apache/zest/spi/service/importer/InstanceImporterTest.java index a40f013..f8dd02c 100644 --- a/core/runtime/src/test/java/org/apache/zest/spi/service/importer/InstanceImporterTest.java +++ b/core/runtime/src/test/java/org/apache/zest/spi/service/importer/InstanceImporterTest.java @@ -19,7 +19,7 @@ import org.apache.zest.api.common.Visibility; import org.apache.zest.api.injection.scope.Service; import org.apache.zest.bootstrap.AssemblyException; import org.apache.zest.bootstrap.ModuleAssembly; -import org.apache.zest.test.AbstractQi4jTest; +import org.apache.zest.test.AbstractZestTest; import static org.hamcrest.CoreMatchers.equalTo; import static org.junit.Assert.assertThat; @@ -28,7 +28,7 @@ import static org.junit.Assert.assertThat; * Test import of singleton services */ public class InstanceImporterTest - extends AbstractQi4jTest + extends AbstractZestTest { @Service TestInterface service; http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/runtime/src/test/java/org/apache/zest/spi/service/importer/NewObjectImporterTest.java ---------------------------------------------------------------------- diff --git a/core/runtime/src/test/java/org/apache/zest/spi/service/importer/NewObjectImporterTest.java b/core/runtime/src/test/java/org/apache/zest/spi/service/importer/NewObjectImporterTest.java index 7860489..e382ba2 100644 --- a/core/runtime/src/test/java/org/apache/zest/spi/service/importer/NewObjectImporterTest.java +++ b/core/runtime/src/test/java/org/apache/zest/spi/service/importer/NewObjectImporterTest.java @@ -21,13 +21,13 @@ import org.apache.zest.api.injection.scope.Service; import org.apache.zest.bootstrap.AssemblyException; import org.apache.zest.bootstrap.ImportedServiceDeclaration; import org.apache.zest.bootstrap.ModuleAssembly; -import org.apache.zest.test.AbstractQi4jTest; +import org.apache.zest.test.AbstractZestTest; /** * JAVADOC */ public class NewObjectImporterTest - extends AbstractQi4jTest + extends AbstractZestTest { public void assemble( ModuleAssembly module ) throws AssemblyException http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/runtime/src/test/java/org/apache/zest/spi/service/importer/ServiceInstanceImporterTest.java ---------------------------------------------------------------------- diff --git a/core/runtime/src/test/java/org/apache/zest/spi/service/importer/ServiceInstanceImporterTest.java b/core/runtime/src/test/java/org/apache/zest/spi/service/importer/ServiceInstanceImporterTest.java index cba4575..fb3afc9 100644 --- a/core/runtime/src/test/java/org/apache/zest/spi/service/importer/ServiceInstanceImporterTest.java +++ b/core/runtime/src/test/java/org/apache/zest/spi/service/importer/ServiceInstanceImporterTest.java @@ -26,13 +26,13 @@ import org.apache.zest.api.service.ServiceImporterException; import org.apache.zest.bootstrap.AssemblyException; import org.apache.zest.bootstrap.ImportedServiceDeclaration; import org.apache.zest.bootstrap.ModuleAssembly; -import org.apache.zest.test.AbstractQi4jTest; +import org.apache.zest.test.AbstractZestTest; /** * JAVADOC */ public class ServiceInstanceImporterTest - extends AbstractQi4jTest + extends AbstractZestTest { public void assemble( ModuleAssembly module ) throws AssemblyException http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/runtime/src/test/java/org/apache/zest/test/ASMTest.java ---------------------------------------------------------------------- diff --git a/core/runtime/src/test/java/org/apache/zest/test/ASMTest.java b/core/runtime/src/test/java/org/apache/zest/test/ASMTest.java index 08bd4e6..0badfa6 100644 --- a/core/runtime/src/test/java/org/apache/zest/test/ASMTest.java +++ b/core/runtime/src/test/java/org/apache/zest/test/ASMTest.java @@ -165,11 +165,11 @@ public class ASMTest MethodVisitor mv; AnnotationVisitor av0; - cw.visit( V1_6, ACC_PUBLIC + ACC_SUPER, "org/qi4j/satisfiedBy/SomeMixin_Stub", null, - "org/qi4j/satisfiedBy/SomeMixin", null ); + cw.visit( V1_6, ACC_PUBLIC + ACC_SUPER, "org/apache/zest/satisfiedBy/SomeMixin_Stub", null, + "org/apache/zest/satisfiedBy/SomeMixin", null ); { - fv = cw.visitField( ACC_PUBLIC, "_instance", "Lorg/qi4j/spi/composite/CompositeInvoker;", null, null ); + fv = cw.visitField( ACC_PUBLIC, "_instance", "Lorg/apache/zest/spi/composite/CompositeInvoker;", null, null ); fv.visitEnd(); } { @@ -196,7 +196,7 @@ public class ASMTest mv = cw.visitMethod( ACC_PUBLIC, "<init>", "()V", null, null ); mv.visitCode(); mv.visitVarInsn( ALOAD, 0 ); - mv.visitMethodInsn( INVOKESPECIAL, "org/qi4j/satisfiedBy/SomeMixin", "<init>", "()V", false ); + mv.visitMethodInsn( INVOKESPECIAL, "org/apache/zest/satisfiedBy/SomeMixin", "<init>", "()V", false ); mv.visitInsn( RETURN ); mv.visitMaxs( 1, 1 ); mv.visitEnd(); @@ -206,7 +206,7 @@ public class ASMTest mv.visitCode(); mv.visitVarInsn( ALOAD, 0 ); mv.visitVarInsn( ALOAD, 1 ); - mv.visitMethodInsn( INVOKESPECIAL, "org/qi4j/satisfiedBy/SomeMixin", "<init>", "(Ljava/lang/String;)V", false ); + mv.visitMethodInsn( INVOKESPECIAL, "org/apache/zest/satisfiedBy/SomeMixin", "<init>", "(Ljava/lang/String;)V", false ); mv.visitInsn( RETURN ); mv.visitMaxs( 2, 2 ); mv.visitEnd(); @@ -220,11 +220,11 @@ public class ASMTest mv.visitTryCatchBlock( l0, l1, l2, "java/lang/Throwable" ); mv.visitLabel( l0 ); mv.visitVarInsn( ALOAD, 0 ); - mv.visitFieldInsn( GETFIELD, "org/qi4j/satisfiedBy/SomeMixin_Stub", "_instance", - "Lorg/qi4j/spi/composite/CompositeInvoker;" ); - mv.visitFieldInsn( GETSTATIC, "org/qi4j/satisfiedBy/SomeMixin_Stub", "m1", "Ljava/lang/reflect/Method;" ); + mv.visitFieldInsn( GETFIELD, "org/apache/zest/satisfiedBy/SomeMixin_Stub", "_instance", + "Lorg/apache/zest/spi/composite/CompositeInvoker;" ); + mv.visitFieldInsn( GETSTATIC, "org/apache/zest/satisfiedBy/SomeMixin_Stub", "m1", "Ljava/lang/reflect/Method;" ); mv.visitInsn( ACONST_NULL ); - mv.visitMethodInsn( INVOKEINTERFACE, "org/qi4j/spi/composite/CompositeInvoker", "invokeComposite", + mv.visitMethodInsn( INVOKEINTERFACE, "org/apache/zest/spi/composite/CompositeInvoker", "invokeComposite", "(Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;", true ); mv.visitTypeInsn( CHECKCAST, "java/lang/String" ); mv.visitLabel( l1 ); @@ -253,9 +253,9 @@ public class ASMTest mv.visitTryCatchBlock( l0, l1, l3, "java/lang/Throwable" ); mv.visitLabel( l0 ); mv.visitVarInsn( ALOAD, 0 ); - mv.visitFieldInsn( GETFIELD, "org/qi4j/satisfiedBy/SomeMixin_Stub", "_instance", - "Lorg/qi4j/spi/composite/CompositeInvoker;" ); - mv.visitFieldInsn( GETSTATIC, "org/qi4j/satisfiedBy/SomeMixin_Stub", "m2", "Ljava/lang/reflect/Method;" ); + mv.visitFieldInsn( GETFIELD, "org/apache/zest/satisfiedBy/SomeMixin_Stub", "_instance", + "Lorg/apache/zest/spi/composite/CompositeInvoker;" ); + mv.visitFieldInsn( GETSTATIC, "org/apache/zest/satisfiedBy/SomeMixin_Stub", "m2", "Ljava/lang/reflect/Method;" ); mv.visitInsn( ICONST_2 ); mv.visitTypeInsn( ANEWARRAY, "java/lang/Object" ); mv.visitInsn( DUP ); @@ -267,7 +267,7 @@ public class ASMTest mv.visitVarInsn( ILOAD, 2 ); mv.visitMethodInsn( INVOKESTATIC, "java/lang/Integer", "valueOf", "(I)Ljava/lang/Integer;", false ); mv.visitInsn( AASTORE ); - mv.visitMethodInsn( INVOKEINTERFACE, "org/qi4j/spi/composite/CompositeInvoker", "invokeComposite", + mv.visitMethodInsn( INVOKEINTERFACE, "org/apache/zest/spi/composite/CompositeInvoker", "invokeComposite", "(Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;", true ); mv.visitTypeInsn( CHECKCAST, "java/lang/String" ); mv.visitLabel( l1 ); @@ -298,9 +298,9 @@ public class ASMTest mv.visitTryCatchBlock( l0, l1, l2, "java/lang/Throwable" ); mv.visitLabel( l0 ); mv.visitVarInsn( ALOAD, 0 ); - mv.visitFieldInsn( GETFIELD, "org/qi4j/satisfiedBy/SomeMixin_Stub", "_instance", - "Lorg/qi4j/spi/composite/CompositeInvoker;" ); - mv.visitFieldInsn( GETSTATIC, "org/qi4j/satisfiedBy/SomeMixin_Stub", "m3", "Ljava/lang/reflect/Method;" ); + mv.visitFieldInsn( GETFIELD, "org/apache/zest/satisfiedBy/SomeMixin_Stub", "_instance", + "Lorg/apache/zest/spi/composite/CompositeInvoker;" ); + mv.visitFieldInsn( GETSTATIC, "org/apache/zest/satisfiedBy/SomeMixin_Stub", "m3", "Ljava/lang/reflect/Method;" ); mv.visitIntInsn( BIPUSH, 11 ); mv.visitTypeInsn( ANEWARRAY, "java/lang/Object" ); mv.visitInsn( DUP ); @@ -355,7 +355,7 @@ public class ASMTest mv.visitIntInsn( BIPUSH, 10 ); mv.visitVarInsn( ALOAD, 13 ); mv.visitInsn( AASTORE ); - mv.visitMethodInsn( INVOKEINTERFACE, "org/qi4j/spi/composite/CompositeInvoker", "invokeComposite", + mv.visitMethodInsn( INVOKEINTERFACE, "org/apache/zest/spi/composite/CompositeInvoker", "invokeComposite", "(Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;", true ); mv.visitInsn( POP ); mv.visitLabel( l1 ); @@ -378,40 +378,40 @@ public class ASMTest } { mv = cw.visitMethod( ACC_PUBLIC, "multiEx", "(Ljava/lang/String;)V", null, - new String[]{ "org/qi4j/satisfiedBy/Exception1", "org/qi4j/satisfiedBy/Exception2" } ); + new String[]{ "org/apache/zest/satisfiedBy/Exception1", "org/apache/zest/satisfiedBy/Exception2" } ); mv.visitCode(); Label l0 = new Label(); Label l1 = new Label(); Label l2 = new Label(); - mv.visitTryCatchBlock( l0, l1, l2, "org/qi4j/satisfiedBy/Exception1" ); + mv.visitTryCatchBlock( l0, l1, l2, "org/apache/zest/satisfiedBy/Exception1" ); Label l3 = new Label(); - mv.visitTryCatchBlock( l0, l1, l3, "org/qi4j/satisfiedBy/Exception2" ); + mv.visitTryCatchBlock( l0, l1, l3, "org/apache/zest/satisfiedBy/Exception2" ); Label l4 = new Label(); mv.visitTryCatchBlock( l0, l1, l4, "java/lang/Throwable" ); mv.visitLabel( l0 ); mv.visitVarInsn( ALOAD, 0 ); - mv.visitFieldInsn( GETFIELD, "org/qi4j/satisfiedBy/SomeMixin_Stub", "_instance", - "Lorg/qi4j/spi/composite/CompositeInvoker;" ); - mv.visitFieldInsn( GETSTATIC, "org/qi4j/satisfiedBy/SomeMixin_Stub", "m4", "Ljava/lang/reflect/Method;" ); + mv.visitFieldInsn( GETFIELD, "org/apache/zest/satisfiedBy/SomeMixin_Stub", "_instance", + "Lorg/apache/zest/spi/composite/CompositeInvoker;" ); + mv.visitFieldInsn( GETSTATIC, "org/apache/zest/satisfiedBy/SomeMixin_Stub", "m4", "Ljava/lang/reflect/Method;" ); mv.visitInsn( ICONST_1 ); mv.visitTypeInsn( ANEWARRAY, "java/lang/Object" ); mv.visitInsn( DUP ); mv.visitInsn( ICONST_0 ); mv.visitVarInsn( ALOAD, 1 ); mv.visitInsn( AASTORE ); - mv.visitMethodInsn( INVOKEINTERFACE, "org/qi4j/spi/composite/CompositeInvoker", "invokeComposite", + mv.visitMethodInsn( INVOKEINTERFACE, "org/apache/zest/spi/composite/CompositeInvoker", "invokeComposite", "(Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;", true ); mv.visitInsn( POP ); mv.visitLabel( l1 ); Label l5 = new Label(); mv.visitJumpInsn( GOTO, l5 ); mv.visitLabel( l2 ); - mv.visitFrame( Opcodes.F_SAME1, 0, null, 1, new Object[]{ "org/qi4j/satisfiedBy/Exception1" } ); + mv.visitFrame( Opcodes.F_SAME1, 0, null, 1, new Object[]{ "org/apache/zest/satisfiedBy/Exception1" } ); mv.visitVarInsn( ASTORE, 2 ); mv.visitVarInsn( ALOAD, 2 ); mv.visitInsn( ATHROW ); mv.visitLabel( l3 ); - mv.visitFrame( Opcodes.F_SAME1, 0, null, 1, new Object[]{ "org/qi4j/satisfiedBy/Exception2" } ); + mv.visitFrame( Opcodes.F_SAME1, 0, null, 1, new Object[]{ "org/apache/zest/satisfiedBy/Exception2" } ); mv.visitVarInsn( ASTORE, 2 ); mv.visitVarInsn( ALOAD, 2 ); mv.visitInsn( ATHROW ); @@ -439,11 +439,11 @@ public class ASMTest mv.visitTryCatchBlock( l0, l1, l2, "java/lang/Throwable" ); mv.visitLabel( l0 ); mv.visitVarInsn( ALOAD, 0 ); - mv.visitFieldInsn( GETFIELD, "org/qi4j/satisfiedBy/SomeMixin_Stub", "_instance", - "Lorg/qi4j/spi/composite/CompositeInvoker;" ); - mv.visitFieldInsn( GETSTATIC, "org/qi4j/satisfiedBy/SomeMixin_Stub", "m5", "Ljava/lang/reflect/Method;" ); + mv.visitFieldInsn( GETFIELD, "org/apache/zest/satisfiedBy/SomeMixin_Stub", "_instance", + "Lorg/apache/zest/spi/composite/CompositeInvoker;" ); + mv.visitFieldInsn( GETSTATIC, "org/apache/zest/satisfiedBy/SomeMixin_Stub", "m5", "Ljava/lang/reflect/Method;" ); mv.visitInsn( ACONST_NULL ); - mv.visitMethodInsn( INVOKEINTERFACE, "org/qi4j/spi/composite/CompositeInvoker", "invokeComposite", + mv.visitMethodInsn( INVOKEINTERFACE, "org/apache/zest/spi/composite/CompositeInvoker", "invokeComposite", "(Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;", true ); mv.visitTypeInsn( CHECKCAST, "java/lang/Integer" ); mv.visitMethodInsn( INVOKEVIRTUAL, "java/lang/Integer", "intValue", "()I", false ); @@ -469,14 +469,14 @@ public class ASMTest Label l2 = new Label(); mv.visitTryCatchBlock( l0, l1, l2, "java/lang/NoSuchMethodException" ); mv.visitLabel( l0 ); - mv.visitLdcInsn( Type.getType( "Lorg/qi4j/satisfiedBy/Other;" ) ); + mv.visitLdcInsn( Type.getType( "Lorg/apache/zest/satisfiedBy/Other;" ) ); mv.visitLdcInsn( "other" ); mv.visitInsn( ICONST_0 ); mv.visitTypeInsn( ANEWARRAY, "java/lang/Class" ); mv.visitMethodInsn( INVOKEVIRTUAL, "java/lang/Class", "getMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false ); - mv.visitFieldInsn( PUTSTATIC, "org/qi4j/satisfiedBy/SomeMixin_Stub", "m1", "Ljava/lang/reflect/Method;" ); - mv.visitLdcInsn( Type.getType( "Lorg/qi4j/satisfiedBy/Other;" ) ); + mv.visitFieldInsn( PUTSTATIC, "org/apache/zest/satisfiedBy/SomeMixin_Stub", "m1", "Ljava/lang/reflect/Method;" ); + mv.visitLdcInsn( Type.getType( "Lorg/apache/zest/satisfiedBy/Other;" ) ); mv.visitLdcInsn( "foo" ); mv.visitInsn( ICONST_2 ); mv.visitTypeInsn( ANEWARRAY, "java/lang/Class" ); @@ -490,8 +490,8 @@ public class ASMTest mv.visitInsn( AASTORE ); mv.visitMethodInsn( INVOKEVIRTUAL, "java/lang/Class", "getMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false ); - mv.visitFieldInsn( PUTSTATIC, "org/qi4j/satisfiedBy/SomeMixin_Stub", "m2", "Ljava/lang/reflect/Method;" ); - mv.visitLdcInsn( Type.getType( "Lorg/qi4j/satisfiedBy/Other;" ) ); + mv.visitFieldInsn( PUTSTATIC, "org/apache/zest/satisfiedBy/SomeMixin_Stub", "m2", "Ljava/lang/reflect/Method;" ); + mv.visitLdcInsn( Type.getType( "Lorg/apache/zest/satisfiedBy/Other;" ) ); mv.visitLdcInsn( "bar" ); mv.visitIntInsn( BIPUSH, 11 ); mv.visitTypeInsn( ANEWARRAY, "java/lang/Class" ); @@ -541,8 +541,8 @@ public class ASMTest mv.visitInsn( AASTORE ); mv.visitMethodInsn( INVOKEVIRTUAL, "java/lang/Class", "getMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false ); - mv.visitFieldInsn( PUTSTATIC, "org/qi4j/satisfiedBy/SomeMixin_Stub", "m3", "Ljava/lang/reflect/Method;" ); - mv.visitLdcInsn( Type.getType( "Lorg/qi4j/satisfiedBy/Other;" ) ); + mv.visitFieldInsn( PUTSTATIC, "org/apache/zest/satisfiedBy/SomeMixin_Stub", "m3", "Ljava/lang/reflect/Method;" ); + mv.visitLdcInsn( Type.getType( "Lorg/apache/zest/satisfiedBy/Other;" ) ); mv.visitLdcInsn( "multiEx" ); mv.visitInsn( ICONST_1 ); mv.visitTypeInsn( ANEWARRAY, "java/lang/Class" ); @@ -552,14 +552,14 @@ public class ASMTest mv.visitInsn( AASTORE ); mv.visitMethodInsn( INVOKEVIRTUAL, "java/lang/Class", "getMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false ); - mv.visitFieldInsn( PUTSTATIC, "org/qi4j/satisfiedBy/SomeMixin_Stub", "m4", "Ljava/lang/reflect/Method;" ); - mv.visitLdcInsn( Type.getType( "Lorg/qi4j/satisfiedBy/Other;" ) ); + mv.visitFieldInsn( PUTSTATIC, "org/apache/zest/satisfiedBy/SomeMixin_Stub", "m4", "Ljava/lang/reflect/Method;" ); + mv.visitLdcInsn( Type.getType( "Lorg/apache/zest/satisfiedBy/Other;" ) ); mv.visitLdcInsn( "unwrapResult" ); mv.visitInsn( ICONST_0 ); mv.visitTypeInsn( ANEWARRAY, "java/lang/Class" ); mv.visitMethodInsn( INVOKEVIRTUAL, "java/lang/Class", "getMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false ); - mv.visitFieldInsn( PUTSTATIC, "org/qi4j/satisfiedBy/SomeMixin_Stub", "m5", "Ljava/lang/reflect/Method;" ); + mv.visitFieldInsn( PUTSTATIC, "org/apache/zest/satisfiedBy/SomeMixin_Stub", "m5", "Ljava/lang/reflect/Method;" ); mv.visitLabel( l1 ); Label l3 = new Label(); mv.visitJumpInsn( GOTO, l3 ); http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/runtime/src/test/java/org/apache/zest/test/composite/CleanStackTraceTest.java ---------------------------------------------------------------------- diff --git a/core/runtime/src/test/java/org/apache/zest/test/composite/CleanStackTraceTest.java b/core/runtime/src/test/java/org/apache/zest/test/composite/CleanStackTraceTest.java index 8ff4e21..da247ff 100644 --- a/core/runtime/src/test/java/org/apache/zest/test/composite/CleanStackTraceTest.java +++ b/core/runtime/src/test/java/org/apache/zest/test/composite/CleanStackTraceTest.java @@ -25,7 +25,7 @@ import org.apache.zest.api.concern.GenericConcern; import org.apache.zest.api.mixin.Mixins; import org.apache.zest.bootstrap.AssemblyException; import org.apache.zest.bootstrap.ModuleAssembly; -import org.apache.zest.test.AbstractQi4jTest; +import org.apache.zest.test.AbstractZestTest; import static org.hamcrest.core.IsNull.notNullValue; import static org.junit.Assert.assertEquals; @@ -35,11 +35,11 @@ import static org.junit.Assume.assumeTrue; /** * Test if the stacktrace is cleaned up properly. * <p> - * NOTE: This satisfiedBy MUST NOT be inside package org.qi4j.runtime, or it will fail. + * NOTE: This satisfiedBy MUST NOT be inside package org.apache.zest.runtime, or it will fail. * </p> */ public class CleanStackTraceTest - extends AbstractQi4jTest + extends AbstractZestTest { @BeforeClass @@ -62,7 +62,7 @@ public class CleanStackTraceTest public void cleanStackTraceOnApplicationException() { // Don't run the satisfiedBy if compacttrace is set to anything else but proxy - String compactTracePropertyValue = System.getProperty( "qi4j.compacttrace" ); + String compactTracePropertyValue = System.getProperty( "zest.compacttrace" ); if( compactTracePropertyValue != null && !"proxy".equals( compactTracePropertyValue ) ) { return; @@ -76,14 +76,14 @@ public class CleanStackTraceTest { String separator = System.getProperty( "line.separator" ); String correctTrace1 = "java.lang.RuntimeException: level 2" + separator + - "\tat org.qi4j.test.composite.CleanStackTraceTest$DoStuffMixin.doStuff(CleanStackTraceTest.java:122)" + separator + - "\tat org.qi4j.test.composite.CleanStackTraceTest$NillyWilly.invoke(CleanStackTraceTest.java:135)" + separator + - "\tat org.qi4j.test.composite.CleanStackTraceTest.cleanStackTraceOnApplicationException(CleanStackTraceTest.java:73)"; + "\tat org.apache.zest.test.composite.CleanStackTraceTest$DoStuffMixin.doStuff(CleanStackTraceTest.java:122)" + separator + + "\tat org.apache.zest.test.composite.CleanStackTraceTest$NillyWilly.invoke(CleanStackTraceTest.java:135)" + separator + + "\tat org.apache.zest.test.composite.CleanStackTraceTest.cleanStackTraceOnApplicationException(CleanStackTraceTest.java:73)"; assertEquality( e, correctTrace1 ); String correctTrace2 = "java.lang.RuntimeException: level 1" + separator + - "\tat org.qi4j.test.composite.CleanStackTraceTest$DoStuffMixin.doStuff(CleanStackTraceTest.java:118)" + separator + - "\tat org.qi4j.test.composite.CleanStackTraceTest$NillyWilly.invoke(CleanStackTraceTest.java:135)" + separator + - "\tat org.qi4j.test.composite.CleanStackTraceTest.cleanStackTraceOnApplicationException(CleanStackTraceTest.java:73)"; + "\tat org.apache.zest.test.composite.CleanStackTraceTest$DoStuffMixin.doStuff(CleanStackTraceTest.java:118)" + separator + + "\tat org.apache.zest.test.composite.CleanStackTraceTest$NillyWilly.invoke(CleanStackTraceTest.java:135)" + separator + + "\tat org.apache.zest.test.composite.CleanStackTraceTest.cleanStackTraceOnApplicationException(CleanStackTraceTest.java:73)"; assertThat( e.getCause(), notNullValue() ); assertEquality( e.getCause(), correctTrace2 ); } http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/spi/build.gradle ---------------------------------------------------------------------- diff --git a/core/spi/build.gradle b/core/spi/build.gradle index 3908bc6..c092991 100644 --- a/core/spi/build.gradle +++ b/core/spi/build.gradle @@ -21,12 +21,12 @@ jar { manifest { name = "Apache Zest⢠Core SPI"}} dependencies { - compile project( ':org.qi4j.core:org.qi4j.core.api' ) + compile project( ':org.apache.zest.core:org.apache.zest.core.api' ) compile libraries.org_json - testCompile project(":org.qi4j.core:org.qi4j.core.testsupport") + testCompile project(":org.apache.zest.core:org.apache.zest.core.testsupport") - testRuntime project(":org.qi4j.core:org.qi4j.core.runtime") + testRuntime project(":org.apache.zest.core:org.apache.zest.core.runtime") testRuntime libraries.logback } http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/spi/dev-status.xml ---------------------------------------------------------------------- diff --git a/core/spi/dev-status.xml b/core/spi/dev-status.xml index 4f034dc..5f3136c 100644 --- a/core/spi/dev-status.xml +++ b/core/spi/dev-status.xml @@ -15,10 +15,10 @@ See the License for the specific language governing permissions and limitations under the License. --> -<module xmlns="http://www.qi4j.org/schemas/2008/dev-status/1" +<module xmlns="http://zest.apache.org/schemas/2008/dev-status/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.qi4j.org/schemas/2008/dev-status/1 - http://www.qi4j.org/schemas/2008/dev-status/1/dev-status.xsd"> + xsi:schemaLocation="http://zest.apache.org/schemas/2008/dev-status/1 + http://zest.apache.org/schemas/2008/dev-status/1/dev-status.xsd"> <status> <codebase>stable</codebase> <!--none,early,beta,stable,mature--> http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/spi/src/main/java/org/apache/zest/spi/Qi4jSPI.java ---------------------------------------------------------------------- diff --git a/core/spi/src/main/java/org/apache/zest/spi/Qi4jSPI.java b/core/spi/src/main/java/org/apache/zest/spi/Qi4jSPI.java deleted file mode 100644 index d9c1c7c..0000000 --- a/core/spi/src/main/java/org/apache/zest/spi/Qi4jSPI.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2007, Rickard Ãberg. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package org.apache.zest.spi; - -import java.util.Map; -import org.apache.zest.api.Qi4j; -import org.apache.zest.api.association.Association; -import org.apache.zest.api.association.AssociationStateHolder; -import org.apache.zest.api.association.ManyAssociation; -import org.apache.zest.api.association.NamedAssociation; -import org.apache.zest.api.composite.TransientComposite; -import org.apache.zest.api.entity.EntityComposite; -import org.apache.zest.api.entity.EntityReference; -import org.apache.zest.api.property.StateHolder; -import org.apache.zest.api.value.ValueComposite; -import org.apache.zest.spi.entity.EntityState; - -/** - * Encapsulation of the Zest SPI. This is implemented by the runtime. - */ -public interface Qi4jSPI - extends Qi4j -{ - StateHolder stateOf( TransientComposite composite ); - - AssociationStateHolder stateOf( EntityComposite composite ); - - AssociationStateHolder stateOf( ValueComposite composite ); - - // Entities - EntityState entityStateOf( EntityComposite composite ); - - /** - * Fetches the EntityReference without loading the referenced entity. - * - * @param assoc The Association for which we want to obtain the EntityReference - * @return The EntityReference of the given Association. - */ - EntityReference entityReferenceOf( Association assoc ); - - /** - * Fetches the EntityReferences without loading the referenced entities. - * - * @param assoc The ManyAssociation for which we want to obtain the EntityReferences. - * @return An Iteranble of all the EntityReferences of the given ManyAssociation. - */ - Iterable<EntityReference> entityReferenceOf( ManyAssociation assoc ); - - /** - * Fetches the EntityReferences without loading the referenced entities. - * - * @param assoc The NamedAssociation for which we want to obtain the EntityReference - * @return An Iteranble of Map.Entry with the name and EntityReference of the given NamedAssociation. - */ - Iterable<Map.Entry<String,EntityReference>> entityReferenceOf( NamedAssociation assoc ); - -} http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/spi/src/main/java/org/apache/zest/spi/ZestSPI.java ---------------------------------------------------------------------- diff --git a/core/spi/src/main/java/org/apache/zest/spi/ZestSPI.java b/core/spi/src/main/java/org/apache/zest/spi/ZestSPI.java new file mode 100644 index 0000000..bb56236 --- /dev/null +++ b/core/spi/src/main/java/org/apache/zest/spi/ZestSPI.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2007, Rickard Ãberg. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.apache.zest.spi; + +import java.util.Map; +import org.apache.zest.api.ZestAPI; +import org.apache.zest.api.association.Association; +import org.apache.zest.api.association.AssociationStateHolder; +import org.apache.zest.api.association.ManyAssociation; +import org.apache.zest.api.association.NamedAssociation; +import org.apache.zest.api.composite.TransientComposite; +import org.apache.zest.api.entity.EntityComposite; +import org.apache.zest.api.entity.EntityReference; +import org.apache.zest.api.property.StateHolder; +import org.apache.zest.api.value.ValueComposite; +import org.apache.zest.spi.entity.EntityState; + +/** + * Encapsulation of the Zest SPI. This is implemented by the runtime. + */ +public interface ZestSPI + extends ZestAPI +{ + StateHolder stateOf( TransientComposite composite ); + + AssociationStateHolder stateOf( EntityComposite composite ); + + AssociationStateHolder stateOf( ValueComposite composite ); + + // Entities + EntityState entityStateOf( EntityComposite composite ); + + /** + * Fetches the EntityReference without loading the referenced entity. + * + * @param assoc The Association for which we want to obtain the EntityReference + * @return The EntityReference of the given Association. + */ + EntityReference entityReferenceOf( Association assoc ); + + /** + * Fetches the EntityReferences without loading the referenced entities. + * + * @param assoc The ManyAssociation for which we want to obtain the EntityReferences. + * @return An Iteranble of all the EntityReferences of the given ManyAssociation. + */ + Iterable<EntityReference> entityReferenceOf( ManyAssociation assoc ); + + /** + * Fetches the EntityReferences without loading the referenced entities. + * + * @param assoc The NamedAssociation for which we want to obtain the EntityReference + * @return An Iteranble of Map.Entry with the name and EntityReference of the given NamedAssociation. + */ + Iterable<Map.Entry<String,EntityReference>> entityReferenceOf( NamedAssociation assoc ); + +} http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/spi/src/main/java/org/apache/zest/spi/entity/QualifiedIdentity.java ---------------------------------------------------------------------- diff --git a/core/spi/src/main/java/org/apache/zest/spi/entity/QualifiedIdentity.java b/core/spi/src/main/java/org/apache/zest/spi/entity/QualifiedIdentity.java index 7c33b26..527052b 100644 --- a/core/spi/src/main/java/org/apache/zest/spi/entity/QualifiedIdentity.java +++ b/core/spi/src/main/java/org/apache/zest/spi/entity/QualifiedIdentity.java @@ -15,7 +15,7 @@ package org.apache.zest.spi.entity; import java.io.Serializable; -import org.apache.zest.api.Qi4j; +import org.apache.zest.api.ZestAPI; import org.apache.zest.api.entity.EntityComposite; import org.apache.zest.api.util.Classes; @@ -34,7 +34,7 @@ public final class QualifiedIdentity { public static QualifiedIdentity parseURI( String uri ) { - String str = uri.substring( "urn:qi4j:entity:".length() ); + String str = uri.substring( "urn:zest:entity:".length() ); int idx = str.indexOf( "/" ); String type = str.substring( 0, idx ).replace( "-", "$" ); String identity = str.substring( idx + 1 ); @@ -61,7 +61,7 @@ public final class QualifiedIdentity public QualifiedIdentity( EntityComposite entityComposite ) { - this( entityComposite.identity().get(), first( Qi4j.FUNCTION_DESCRIPTOR_FOR + this( entityComposite.identity().get(), first( ZestAPI.FUNCTION_DESCRIPTOR_FOR .map( entityComposite ) .types() ).getName() ); } @@ -101,7 +101,7 @@ public final class QualifiedIdentity public final String toURI() { - return "urn:qi4j:entity:" + Classes.normalizeClassToURI( compositeType ) + "/" + identity; + return "urn:zest:entity:" + Classes.normalizeClassToURI( compositeType ) + "/" + identity; } @Override http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/spi/src/main/java/org/apache/zest/spi/entitystore/ConcurrentModificationCheckConcern.java ---------------------------------------------------------------------- diff --git a/core/spi/src/main/java/org/apache/zest/spi/entitystore/ConcurrentModificationCheckConcern.java b/core/spi/src/main/java/org/apache/zest/spi/entitystore/ConcurrentModificationCheckConcern.java index cd7270e..a00145d 100644 --- a/core/spi/src/main/java/org/apache/zest/spi/entitystore/ConcurrentModificationCheckConcern.java +++ b/core/spi/src/main/java/org/apache/zest/spi/entitystore/ConcurrentModificationCheckConcern.java @@ -17,7 +17,7 @@ package org.apache.zest.spi.entitystore; import java.util.ArrayList; import java.util.List; import java.util.concurrent.locks.ReentrantReadWriteLock; -import org.apache.zest.api.Qi4j; +import org.apache.zest.api.ZestAPI; import org.apache.zest.api.concern.ConcernOf; import org.apache.zest.api.entity.EntityDescriptor; import org.apache.zest.api.entity.EntityReference; @@ -45,7 +45,7 @@ public abstract class ConcurrentModificationCheckConcern private EntityStateVersions versions; @Structure - private Qi4j api; + private ZestAPI api; @Override public EntityStoreUnitOfWork newUnitOfWork( Usecase usecase, ModuleSpi module, long currentTime ) http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/spi/src/main/java/org/apache/zest/spi/entitystore/helpers/JSONMapEntityStoreMixin.java ---------------------------------------------------------------------- diff --git a/core/spi/src/main/java/org/apache/zest/spi/entitystore/helpers/JSONMapEntityStoreMixin.java b/core/spi/src/main/java/org/apache/zest/spi/entitystore/helpers/JSONMapEntityStoreMixin.java index e10b0ef..8c9bf68 100644 --- a/core/spi/src/main/java/org/apache/zest/spi/entitystore/helpers/JSONMapEntityStoreMixin.java +++ b/core/spi/src/main/java/org/apache/zest/spi/entitystore/helpers/JSONMapEntityStoreMixin.java @@ -49,7 +49,7 @@ import org.apache.zest.io.Input; import org.apache.zest.io.Output; import org.apache.zest.io.Receiver; import org.apache.zest.io.Sender; -import org.apache.zest.spi.Qi4jSPI; +import org.apache.zest.spi.ZestSPI; import org.apache.zest.spi.cache.Cache; import org.apache.zest.spi.cache.CachePool; import org.apache.zest.spi.cache.NullCache; @@ -86,7 +86,7 @@ public class JSONMapEntityStoreMixin private EntityStoreSPI entityStoreSpi; @Structure - private Qi4jSPI spi; + private ZestSPI spi; @Structure private Application application; http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/spi/src/main/java/org/apache/zest/spi/entitystore/helpers/MapEntityStoreMixin.java ---------------------------------------------------------------------- diff --git a/core/spi/src/main/java/org/apache/zest/spi/entitystore/helpers/MapEntityStoreMixin.java b/core/spi/src/main/java/org/apache/zest/spi/entitystore/helpers/MapEntityStoreMixin.java index 5a087a8..b1ba7b2 100644 --- a/core/spi/src/main/java/org/apache/zest/spi/entitystore/helpers/MapEntityStoreMixin.java +++ b/core/spi/src/main/java/org/apache/zest/spi/entitystore/helpers/MapEntityStoreMixin.java @@ -54,7 +54,7 @@ import org.apache.zest.io.Input; import org.apache.zest.io.Output; import org.apache.zest.io.Receiver; import org.apache.zest.io.Sender; -import org.apache.zest.spi.Qi4jSPI; +import org.apache.zest.spi.ZestSPI; import org.apache.zest.spi.entity.EntityState; import org.apache.zest.spi.entity.EntityStatus; import org.apache.zest.spi.entitystore.DefaultEntityStoreUnitOfWork; @@ -88,7 +88,7 @@ public class MapEntityStoreMixin private EntityStoreSPI entityStoreSpi; @Structure - private Qi4jSPI spi; + private ZestSPI spi; @Structure private Application application; http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/spi/src/main/java/org/apache/zest/spi/value/ValueSerializerAdapter.java ---------------------------------------------------------------------- diff --git a/core/spi/src/main/java/org/apache/zest/spi/value/ValueSerializerAdapter.java b/core/spi/src/main/java/org/apache/zest/spi/value/ValueSerializerAdapter.java index e4a54f1..08e7d82 100644 --- a/core/spi/src/main/java/org/apache/zest/spi/value/ValueSerializerAdapter.java +++ b/core/spi/src/main/java/org/apache/zest/spi/value/ValueSerializerAdapter.java @@ -28,7 +28,7 @@ import java.util.Map; import org.joda.time.DateTime; import org.joda.time.LocalDate; import org.joda.time.LocalDateTime; -import org.apache.zest.api.Qi4j; +import org.apache.zest.api.ZestAPI; import org.apache.zest.api.association.Association; import org.apache.zest.api.association.AssociationDescriptor; import org.apache.zest.api.association.AssociationStateHolder; @@ -409,7 +409,7 @@ public abstract class ValueSerializerAdapter<OutputType> private void serializeValueComposite( Options options, Object object, OutputType output, boolean rootPass ) throws Exception { - CompositeInstance valueInstance = Qi4j.FUNCTION_COMPOSITE_INSTANCE_OF.map( (ValueComposite) object ); + CompositeInstance valueInstance = ZestAPI.FUNCTION_COMPOSITE_INSTANCE_OF.map( (ValueComposite) object ); ValueDescriptor descriptor = (ValueDescriptor) valueInstance.descriptor(); AssociationStateHolder state = (AssociationStateHolder) valueInstance.state(); http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/testsupport/build.gradle ---------------------------------------------------------------------- diff --git a/core/testsupport/build.gradle b/core/testsupport/build.gradle index 2f0af58..56b3f40 100644 --- a/core/testsupport/build.gradle +++ b/core/testsupport/build.gradle @@ -21,9 +21,9 @@ jar { manifest { name = "Apache Zest⢠Core TestSupport"}} dependencies { - compile project( ':org.qi4j.core:org.qi4j.core.bootstrap' ) + compile project( ':org.apache.zest.core:org.apache.zest.core.bootstrap' ) compile libraries.junit - testRuntime project( ':org.qi4j.core:org.qi4j.core.runtime' ) + testRuntime project( ':org.apache.zest.core:org.apache.zest.core.runtime' ) } http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/testsupport/dev-status.xml ---------------------------------------------------------------------- diff --git a/core/testsupport/dev-status.xml b/core/testsupport/dev-status.xml index 7b1a30b..1cb8793 100644 --- a/core/testsupport/dev-status.xml +++ b/core/testsupport/dev-status.xml @@ -15,10 +15,10 @@ See the License for the specific language governing permissions and limitations under the License. --> -<module xmlns="http://www.qi4j.org/schemas/2008/dev-status/1" +<module xmlns="http://zest.apache.org/schemas/2008/dev-status/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.qi4j.org/schemas/2008/dev-status/1 - http://www.qi4j.org/schemas/2008/dev-status/1/dev-status.xsd"> + xsi:schemaLocation="http://zest.apache.org/schemas/2008/dev-status/1 + http://zest.apache.org/schemas/2008/dev-status/1/dev-status.xsd"> <status> <codebase>stable</codebase> <!--none,early,beta,stable,mature--> http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/testsupport/src/docs/reference/ref-testsupport.txt ---------------------------------------------------------------------- diff --git a/core/testsupport/src/docs/reference/ref-testsupport.txt b/core/testsupport/src/docs/reference/ref-testsupport.txt index e1f117f..726aa5b 100644 --- a/core/testsupport/src/docs/reference/ref-testsupport.txt +++ b/core/testsupport/src/docs/reference/ref-testsupport.txt @@ -17,9 +17,9 @@ * under the License. /////////////////////////////////////////////////////////////// -include::AbstractQi4jTest.txt +include::AbstractZestTest.txt -include::AbstractQi4jScenarioTest.txt +include::AbstractZestScenarioTest.txt include::AbstractEntityStoreTest.txt http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/testsupport/src/docs/testsupport.txt ---------------------------------------------------------------------- diff --git a/core/testsupport/src/docs/testsupport.txt b/core/testsupport/src/docs/testsupport.txt index f45ca30..2f2bde6 100644 --- a/core/testsupport/src/docs/testsupport.txt +++ b/core/testsupport/src/docs/testsupport.txt @@ -29,7 +29,7 @@ mocking is seldom, if ever, needed. include::../../build/docs/buildinfo/artifact.txt[] == Your First Testcase == -In most cases, you will probably use the AbstractQi4jTest class to simplify starting a Zest⢠test instance. +In most cases, you will probably use the AbstractZestTest class to simplify starting a Zest⢠test instance. [snippet,java] -------------- http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/testsupport/src/main/java/org/apache/zest/test/AbstractQi4jBaseTest.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/AbstractQi4jBaseTest.java b/core/testsupport/src/main/java/org/apache/zest/test/AbstractQi4jBaseTest.java deleted file mode 100644 index 932261f..0000000 --- a/core/testsupport/src/main/java/org/apache/zest/test/AbstractQi4jBaseTest.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.zest.test; - -import org.junit.After; -import org.junit.Before; -import org.apache.zest.api.Qi4j; -import org.apache.zest.api.structure.Application; -import org.apache.zest.api.structure.ApplicationDescriptor; -import org.apache.zest.bootstrap.ApplicationAssembler; -import org.apache.zest.bootstrap.ApplicationAssembly; -import org.apache.zest.bootstrap.ApplicationAssemblyFactory; -import org.apache.zest.bootstrap.AssemblyException; -import org.apache.zest.bootstrap.Energy4Java; -import org.apache.zest.spi.Qi4jSPI; - -public abstract class AbstractQi4jBaseTest -{ - protected Qi4j api; - protected Qi4jSPI spi; - - protected Energy4Java qi4j; - protected ApplicationDescriptor applicationModel; - protected Application application; - - @Before - public void setUp() - throws Exception - { - qi4j = new Energy4Java(); - applicationModel = newApplication(); - if( applicationModel == null ) - { - // An AssemblyException has occurred that the Test wants to check for. - return; - } - application = newApplicationInstance( applicationModel ); - initApplication( application ); - api = spi = qi4j.spi(); - application.activate(); - } - - /** Called by the superclass for the test to define the entire application, every layer, every module and all - * the contents of each module. - * - * @param applicationAssembly the {@link org.apache.zest.bootstrap.ApplicationAssembly} to be populated. - */ - protected abstract void defineApplication( ApplicationAssembly applicationAssembly ) - throws AssemblyException; - - protected Application newApplicationInstance( ApplicationDescriptor applicationModel ) - { - return applicationModel.newInstance( qi4j.api() ); - } - - protected ApplicationDescriptor newApplication() - throws AssemblyException - { - ApplicationAssembler assembler = new ApplicationAssembler() - { - @Override - public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory ) - throws AssemblyException - { - ApplicationAssembly applicationAssembly = applicationFactory.newApplicationAssembly(); - applicationAssembly.setMode( Application.Mode.test ); - defineApplication( applicationAssembly ); - return applicationAssembly; - } - }; - - try - { - return qi4j.newApplicationModel( assembler ); - } - catch( AssemblyException e ) - { - assemblyException( e ); - return null; - } - } - - /** - * This method is called when there was an AssemblyException in the creation of the Zest application model. - * <p> - * Override this method to catch valid failures to place into satisfiedBy suites. - * </p> - * @param exception the exception thrown. - * - * @throws org.apache.zest.bootstrap.AssemblyException The default implementation of this method will simply re-throw the exception. - */ - protected void assemblyException( AssemblyException exception ) - throws AssemblyException - { - throw exception; - } - - protected void initApplication( Application app ) - throws Exception - { - } - - @After - public void tearDown() - throws Exception - { - if( application != null ) - { - application.passivate(); - } - } -} http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/testsupport/src/main/java/org/apache/zest/test/AbstractQi4jScenarioTest.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/AbstractQi4jScenarioTest.java b/core/testsupport/src/main/java/org/apache/zest/test/AbstractQi4jScenarioTest.java deleted file mode 100644 index d7004bd..0000000 --- a/core/testsupport/src/main/java/org/apache/zest/test/AbstractQi4jScenarioTest.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (c) 2008, Rickard Ãberg. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package org.apache.zest.test; - -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.apache.zest.api.Qi4j; -import org.apache.zest.api.structure.Application; -import org.apache.zest.api.structure.ApplicationDescriptor; -import org.apache.zest.api.structure.Module; -import org.apache.zest.api.unitofwork.UnitOfWork; -import org.apache.zest.bootstrap.ApplicationAssembler; -import org.apache.zest.bootstrap.ApplicationAssembly; -import org.apache.zest.bootstrap.ApplicationAssemblyFactory; -import org.apache.zest.bootstrap.Assembler; -import org.apache.zest.bootstrap.AssemblyException; -import org.apache.zest.bootstrap.Energy4Java; -import org.apache.zest.spi.Qi4jSPI; - -/** - * Base class for Zest scenario tests. This will create one Zest application per class instead of per test. - */ -public abstract class AbstractQi4jScenarioTest - implements Assembler -{ - static protected Qi4j api; - static protected Qi4jSPI spi; - - static protected Energy4Java qi4j; - static protected ApplicationDescriptor applicationModel; - static protected Application application; - - static protected Module module; - - static protected Assembler assembler; // Initialize this in static block of subclass - - @BeforeClass - public static void setUp() - throws Exception - { - qi4j = new Energy4Java(); - applicationModel = newApplication(); - if( applicationModel == null ) - { - // An AssemblyException has occurred that the Test wants to check for. - return; - } - application = applicationModel.newInstance( qi4j.spi() ); - initApplication( application ); - api = spi = qi4j.spi(); - application.activate(); - - // Assume only one module - module = application.findModule( "Layer 1", "Module 1" ); - } - - static protected ApplicationDescriptor newApplication() - throws AssemblyException - { - final Assembler asm = assembler; - - ApplicationAssembler assembler = new ApplicationAssembler() - { - @Override - public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory ) - throws AssemblyException - { - return applicationFactory.newApplicationAssembly( asm ); - } - }; - try - { - return qi4j.newApplicationModel( assembler ); - } - catch( AssemblyException e ) - { - assemblyException( e ); - return null; - } - } - - /** - * This method is called when there was an AssemblyException in the creation of the Zest application model. - * <p> - * Override this method to catch valid failures to place into satisfiedBy suites. - * </p> - * - * @param exception the exception thrown. - * - * @throws org.apache.zest.bootstrap.AssemblyException The default implementation of this method will simply re-throw the exception. - */ - static protected void assemblyException( AssemblyException exception ) - throws AssemblyException - { - throw exception; - } - - static protected void initApplication( Application app ) - throws Exception - { - } - - @AfterClass - public void tearDown() - throws Exception - { - if( module != null && module.isUnitOfWorkActive() ) - { - while( module.isUnitOfWorkActive() ) - { - UnitOfWork uow = module.currentUnitOfWork(); - if( uow.isOpen() ) - { - uow.discard(); - } - else - { - throw new InternalError( "I have seen a case where a UoW is on the stack, but not opened. First is" + uow - .usecase() - .name() ); - } - } - new Exception( "UnitOfWork not properly cleaned up" ).printStackTrace(); - } - - if( application != null ) - { - application.passivate(); - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/testsupport/src/main/java/org/apache/zest/test/AbstractQi4jTest.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/AbstractQi4jTest.java b/core/testsupport/src/main/java/org/apache/zest/test/AbstractQi4jTest.java deleted file mode 100644 index b0f4ffa..0000000 --- a/core/testsupport/src/main/java/org/apache/zest/test/AbstractQi4jTest.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2008, Rickard Ãberg. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package org.apache.zest.test; - -import org.junit.After; -import org.junit.Before; -import org.apache.zest.api.unitofwork.UnitOfWork; -import org.apache.zest.bootstrap.ApplicationAssembly; -import org.apache.zest.bootstrap.Assembler; -import org.apache.zest.bootstrap.AssemblyException; -import org.apache.zest.bootstrap.LayerAssembly; -import org.apache.zest.bootstrap.ModuleAssembly; -import org.apache.zest.spi.module.ModuleSpi; - -/** - * Base class for Composite tests. - */ -public abstract class AbstractQi4jTest extends AbstractQi4jBaseTest - implements Assembler -{ - protected ModuleSpi module; - - @Before - @Override - public void setUp() - throws Exception - { - super.setUp(); - if( application == null ) - { - return; // failure in Assembly. - } - module = (ModuleSpi) application.findModule( "Layer 1", "Module 1" ); - module.injectTo( this ); - } - - @Override - protected void defineApplication( ApplicationAssembly applicationAssembly ) - throws AssemblyException - { - LayerAssembly layer = applicationAssembly.layer( "Layer 1" ); - ModuleAssembly module = layer.module( "Module 1" ); - module.objects( AbstractQi4jTest.this.getClass() ); - assemble( module ); - } - - @After - @Override - public void tearDown() - throws Exception - { - if( module != null && module.isUnitOfWorkActive() ) - { - while( module.isUnitOfWorkActive() ) - { - UnitOfWork uow = module.currentUnitOfWork(); - if( uow.isOpen() ) - { - System.err.println( "UnitOfWork not cleaned up:" + uow.usecase().name() ); - uow.discard(); - } - else - { - throw new InternalError( "I have seen a case where a UoW is on the stack, but not opened. First is: " + uow - .usecase() - .name() ); - } - } - new Exception( "UnitOfWork not properly cleaned up" ).printStackTrace(); - } - super.tearDown(); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/testsupport/src/main/java/org/apache/zest/test/AbstractZestBaseTest.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/AbstractZestBaseTest.java b/core/testsupport/src/main/java/org/apache/zest/test/AbstractZestBaseTest.java new file mode 100644 index 0000000..47484b8 --- /dev/null +++ b/core/testsupport/src/main/java/org/apache/zest/test/AbstractZestBaseTest.java @@ -0,0 +1,128 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.zest.test; + +import org.junit.After; +import org.junit.Before; +import org.apache.zest.api.ZestAPI; +import org.apache.zest.api.structure.Application; +import org.apache.zest.api.structure.ApplicationDescriptor; +import org.apache.zest.bootstrap.ApplicationAssembler; +import org.apache.zest.bootstrap.ApplicationAssembly; +import org.apache.zest.bootstrap.ApplicationAssemblyFactory; +import org.apache.zest.bootstrap.AssemblyException; +import org.apache.zest.bootstrap.Energy4Java; +import org.apache.zest.spi.ZestSPI; + +public abstract class AbstractZestBaseTest +{ + protected ZestAPI api; + protected ZestSPI spi; + + protected Energy4Java zest; + protected ApplicationDescriptor applicationModel; + protected Application application; + + @Before + public void setUp() + throws Exception + { + zest = new Energy4Java(); + applicationModel = newApplication(); + if( applicationModel == null ) + { + // An AssemblyException has occurred that the Test wants to check for. + return; + } + application = newApplicationInstance( applicationModel ); + initApplication( application ); + api = spi = zest.spi(); + application.activate(); + } + + /** Called by the superclass for the test to define the entire application, every layer, every module and all + * the contents of each module. + * + * @param applicationAssembly the {@link org.apache.zest.bootstrap.ApplicationAssembly} to be populated. + */ + protected abstract void defineApplication( ApplicationAssembly applicationAssembly ) + throws AssemblyException; + + protected Application newApplicationInstance( ApplicationDescriptor applicationModel ) + { + return applicationModel.newInstance( zest.api() ); + } + + protected ApplicationDescriptor newApplication() + throws AssemblyException + { + ApplicationAssembler assembler = new ApplicationAssembler() + { + @Override + public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory ) + throws AssemblyException + { + ApplicationAssembly applicationAssembly = applicationFactory.newApplicationAssembly(); + applicationAssembly.setMode( Application.Mode.test ); + defineApplication( applicationAssembly ); + return applicationAssembly; + } + }; + + try + { + return zest.newApplicationModel( assembler ); + } + catch( AssemblyException e ) + { + assemblyException( e ); + return null; + } + } + + /** + * This method is called when there was an AssemblyException in the creation of the Zest application model. + * <p> + * Override this method to catch valid failures to place into satisfiedBy suites. + * </p> + * @param exception the exception thrown. + * + * @throws org.apache.zest.bootstrap.AssemblyException The default implementation of this method will simply re-throw the exception. + */ + protected void assemblyException( AssemblyException exception ) + throws AssemblyException + { + throw exception; + } + + protected void initApplication( Application app ) + throws Exception + { + } + + @After + public void tearDown() + throws Exception + { + if( application != null ) + { + application.passivate(); + } + } +} http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/testsupport/src/main/java/org/apache/zest/test/AbstractZestScenarioTest.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/AbstractZestScenarioTest.java b/core/testsupport/src/main/java/org/apache/zest/test/AbstractZestScenarioTest.java new file mode 100644 index 0000000..a035345 --- /dev/null +++ b/core/testsupport/src/main/java/org/apache/zest/test/AbstractZestScenarioTest.java @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2008, Rickard Ãberg. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.apache.zest.test; + +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.apache.zest.api.ZestAPI; +import org.apache.zest.api.structure.Application; +import org.apache.zest.api.structure.ApplicationDescriptor; +import org.apache.zest.api.structure.Module; +import org.apache.zest.api.unitofwork.UnitOfWork; +import org.apache.zest.bootstrap.ApplicationAssembler; +import org.apache.zest.bootstrap.ApplicationAssembly; +import org.apache.zest.bootstrap.ApplicationAssemblyFactory; +import org.apache.zest.bootstrap.Assembler; +import org.apache.zest.bootstrap.AssemblyException; +import org.apache.zest.bootstrap.Energy4Java; +import org.apache.zest.spi.ZestSPI; + +/** + * Base class for Zest scenario tests. This will create one Zest application per class instead of per test. + */ +public abstract class AbstractZestScenarioTest + implements Assembler +{ + static protected ZestAPI api; + static protected ZestSPI spi; + + static protected Energy4Java zest; + static protected ApplicationDescriptor applicationModel; + static protected Application application; + + static protected Module module; + + static protected Assembler assembler; // Initialize this in static block of subclass + + @BeforeClass + public static void setUp() + throws Exception + { + zest = new Energy4Java(); + applicationModel = newApplication(); + if( applicationModel == null ) + { + // An AssemblyException has occurred that the Test wants to check for. + return; + } + application = applicationModel.newInstance( zest.spi() ); + initApplication( application ); + api = spi = zest.spi(); + application.activate(); + + // Assume only one module + module = application.findModule( "Layer 1", "Module 1" ); + } + + static protected ApplicationDescriptor newApplication() + throws AssemblyException + { + final Assembler asm = assembler; + + ApplicationAssembler assembler = new ApplicationAssembler() + { + @Override + public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory ) + throws AssemblyException + { + return applicationFactory.newApplicationAssembly( asm ); + } + }; + try + { + return zest.newApplicationModel( assembler ); + } + catch( AssemblyException e ) + { + assemblyException( e ); + return null; + } + } + + /** + * This method is called when there was an AssemblyException in the creation of the Zest application model. + * <p> + * Override this method to catch valid failures to place into satisfiedBy suites. + * </p> + * + * @param exception the exception thrown. + * + * @throws org.apache.zest.bootstrap.AssemblyException The default implementation of this method will simply re-throw the exception. + */ + static protected void assemblyException( AssemblyException exception ) + throws AssemblyException + { + throw exception; + } + + static protected void initApplication( Application app ) + throws Exception + { + } + + @AfterClass + public void tearDown() + throws Exception + { + if( module != null && module.isUnitOfWorkActive() ) + { + while( module.isUnitOfWorkActive() ) + { + UnitOfWork uow = module.currentUnitOfWork(); + if( uow.isOpen() ) + { + uow.discard(); + } + else + { + throw new InternalError( "I have seen a case where a UoW is on the stack, but not opened. First is" + uow + .usecase() + .name() ); + } + } + new Exception( "UnitOfWork not properly cleaned up" ).printStackTrace(); + } + + if( application != null ) + { + application.passivate(); + } + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/testsupport/src/main/java/org/apache/zest/test/AbstractZestTest.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/AbstractZestTest.java b/core/testsupport/src/main/java/org/apache/zest/test/AbstractZestTest.java new file mode 100644 index 0000000..8f2fb96 --- /dev/null +++ b/core/testsupport/src/main/java/org/apache/zest/test/AbstractZestTest.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2008, Rickard Ãberg. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.apache.zest.test; + +import org.junit.After; +import org.junit.Before; +import org.apache.zest.api.unitofwork.UnitOfWork; +import org.apache.zest.bootstrap.ApplicationAssembly; +import org.apache.zest.bootstrap.Assembler; +import org.apache.zest.bootstrap.AssemblyException; +import org.apache.zest.bootstrap.LayerAssembly; +import org.apache.zest.bootstrap.ModuleAssembly; +import org.apache.zest.spi.module.ModuleSpi; + +/** + * Base class for Composite tests. + */ +public abstract class AbstractZestTest extends AbstractZestBaseTest + implements Assembler +{ + protected ModuleSpi module; + + @Before + @Override + public void setUp() + throws Exception + { + super.setUp(); + if( application == null ) + { + return; // failure in Assembly. + } + module = (ModuleSpi) application.findModule( "Layer 1", "Module 1" ); + module.injectTo( this ); + } + + @Override + protected void defineApplication( ApplicationAssembly applicationAssembly ) + throws AssemblyException + { + LayerAssembly layer = applicationAssembly.layer( "Layer 1" ); + ModuleAssembly module = layer.module( "Module 1" ); + module.objects( AbstractZestTest.this.getClass() ); + assemble( module ); + } + + @After + @Override + public void tearDown() + throws Exception + { + if( module != null && module.isUnitOfWorkActive() ) + { + while( module.isUnitOfWorkActive() ) + { + UnitOfWork uow = module.currentUnitOfWork(); + if( uow.isOpen() ) + { + System.err.println( "UnitOfWork not cleaned up:" + uow.usecase().name() ); + uow.discard(); + } + else + { + throw new InternalError( "I have seen a case where a UoW is on the stack, but not opened. First is: " + uow + .usecase() + .name() ); + } + } + new Exception( "UnitOfWork not properly cleaned up" ).printStackTrace(); + } + super.tearDown(); + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/testsupport/src/main/java/org/apache/zest/test/cache/AbstractCachePoolTest.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/cache/AbstractCachePoolTest.java b/core/testsupport/src/main/java/org/apache/zest/test/cache/AbstractCachePoolTest.java index f9ca7d4..ab05212 100644 --- a/core/testsupport/src/main/java/org/apache/zest/test/cache/AbstractCachePoolTest.java +++ b/core/testsupport/src/main/java/org/apache/zest/test/cache/AbstractCachePoolTest.java @@ -25,7 +25,7 @@ import org.apache.zest.api.constraint.ConstraintViolationException; import org.apache.zest.api.util.NullArgumentException; import org.apache.zest.spi.cache.Cache; import org.apache.zest.spi.cache.CachePool; -import org.apache.zest.test.AbstractQi4jTest; +import org.apache.zest.test.AbstractZestTest; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; @@ -35,7 +35,7 @@ import static org.junit.Assert.fail; * Abstract satisfiedBy with tests for the CachePool interface. */ public abstract class AbstractCachePoolTest - extends AbstractQi4jTest + extends AbstractZestTest { protected CachePool cachePool; protected Cache<String> cache; http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/testsupport/src/main/java/org/apache/zest/test/entity/AbstractConfigurationDeserializationTest.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/entity/AbstractConfigurationDeserializationTest.java b/core/testsupport/src/main/java/org/apache/zest/test/entity/AbstractConfigurationDeserializationTest.java index 40be1c4..8712911 100644 --- a/core/testsupport/src/main/java/org/apache/zest/test/entity/AbstractConfigurationDeserializationTest.java +++ b/core/testsupport/src/main/java/org/apache/zest/test/entity/AbstractConfigurationDeserializationTest.java @@ -31,14 +31,14 @@ import org.apache.zest.bootstrap.AssemblyException; import org.apache.zest.bootstrap.ModuleAssembly; import org.apache.zest.entitystore.memory.MemoryEntityStoreService; import org.apache.zest.spi.uuid.UuidIdentityGeneratorService; -import org.apache.zest.test.AbstractQi4jTest; +import org.apache.zest.test.AbstractZestTest; import org.apache.zest.valueserialization.orgjson.OrgJsonValueSerializationService; import static org.hamcrest.core.IsEqual.equalTo; import static org.hamcrest.core.IsNull.notNullValue; import static org.junit.Assert.assertThat; -public abstract class AbstractConfigurationDeserializationTest extends AbstractQi4jTest +public abstract class AbstractConfigurationDeserializationTest extends AbstractZestTest { @Override public void assemble( ModuleAssembly module ) http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/testsupport/src/main/java/org/apache/zest/test/entity/AbstractEntityStoreTest.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/entity/AbstractEntityStoreTest.java b/core/testsupport/src/main/java/org/apache/zest/test/entity/AbstractEntityStoreTest.java index 1be6c4d..af74176 100644 --- a/core/testsupport/src/main/java/org/apache/zest/test/entity/AbstractEntityStoreTest.java +++ b/core/testsupport/src/main/java/org/apache/zest/test/entity/AbstractEntityStoreTest.java @@ -50,7 +50,7 @@ import org.apache.zest.bootstrap.AssemblyException; import org.apache.zest.bootstrap.ModuleAssembly; import org.apache.zest.spi.entitystore.EntityStore; import org.apache.zest.spi.uuid.UuidIdentityGeneratorService; -import org.apache.zest.test.AbstractQi4jTest; +import org.apache.zest.test.AbstractZestTest; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.is; @@ -63,7 +63,7 @@ import static org.junit.Assert.fail; * Abstract satisfiedBy with tests for the EntityStore interface. */ public abstract class AbstractEntityStoreTest - extends AbstractQi4jTest + extends AbstractZestTest { @Service http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/testsupport/src/main/java/org/apache/zest/test/indexing/AbstractAnyQueryTest.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/indexing/AbstractAnyQueryTest.java b/core/testsupport/src/main/java/org/apache/zest/test/indexing/AbstractAnyQueryTest.java index cd0909e..03ff7cb 100644 --- a/core/testsupport/src/main/java/org/apache/zest/test/indexing/AbstractAnyQueryTest.java +++ b/core/testsupport/src/main/java/org/apache/zest/test/indexing/AbstractAnyQueryTest.java @@ -20,7 +20,7 @@ package org.apache.zest.test.indexing; import org.apache.zest.api.unitofwork.UnitOfWork; import org.apache.zest.bootstrap.AssemblyException; import org.apache.zest.bootstrap.ModuleAssembly; -import org.apache.zest.test.AbstractQi4jTest; +import org.apache.zest.test.AbstractZestTest; import org.apache.zest.test.EntityTestAssembler; import org.apache.zest.test.indexing.model.Address; import org.apache.zest.test.indexing.model.File; @@ -40,7 +40,7 @@ import org.apache.zest.test.indexing.model.entities.MaleEntity; * Abstract satisfiedBy with tests for any queries against Index/Query engines. */ public class AbstractAnyQueryTest - extends AbstractQi4jTest + extends AbstractZestTest { protected UnitOfWork unitOfWork; http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/testsupport/src/main/java/org/apache/zest/test/indexing/AbstractQueryTest.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/indexing/AbstractQueryTest.java b/core/testsupport/src/main/java/org/apache/zest/test/indexing/AbstractQueryTest.java index ad17b6b..e071204 100644 --- a/core/testsupport/src/main/java/org/apache/zest/test/indexing/AbstractQueryTest.java +++ b/core/testsupport/src/main/java/org/apache/zest/test/indexing/AbstractQueryTest.java @@ -419,7 +419,7 @@ public abstract class AbstractQueryTest { QueryBuilder<Person> qb = this.module.newQueryBuilder( Person.class ); Person person = templateFor( Person.class ); - qb.where( eq( person.personalWebsite().get().host().get().value(), "www.qi4j.org" ) ); + qb.where( eq( person.personalWebsite().get().host().get().value(), "zest.apache.org" ) ); } @Test( expected = NotQueryableException.class ) http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/testsupport/src/main/java/org/apache/zest/test/util/Assume.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/util/Assume.java b/core/testsupport/src/main/java/org/apache/zest/test/util/Assume.java index 0e59bf7..08582e8 100644 --- a/core/testsupport/src/main/java/org/apache/zest/test/util/Assume.java +++ b/core/testsupport/src/main/java/org/apache/zest/test/util/Assume.java @@ -78,12 +78,11 @@ public class Assume } /** - * // TODO: qi4j.org will soon go down. - * If called on a runtime with no access to qi4j.org on port 80, the test will halt and be ignored. + * If called on a runtime with no access to zest.apache.org on port 80, the test will halt and be ignored. */ public static void assumeConnectivity() { - assumeConnectivity( "qi4j.org", 80 ); + assumeConnectivity( "zest.apache.org", 80 ); } /** http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractCollectionSerializationTest.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractCollectionSerializationTest.java b/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractCollectionSerializationTest.java index 3455a23..ac0e1c9 100644 --- a/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractCollectionSerializationTest.java +++ b/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractCollectionSerializationTest.java @@ -40,7 +40,7 @@ import org.apache.zest.api.value.ValueSerialization; import org.apache.zest.bootstrap.AssemblyException; import org.apache.zest.bootstrap.ModuleAssembly; import org.apache.zest.functional.Iterables; -import org.apache.zest.test.AbstractQi4jTest; +import org.apache.zest.test.AbstractZestTest; import static org.junit.Assert.*; import static org.apache.zest.io.Inputs.iterable; @@ -54,7 +54,7 @@ import static org.apache.zest.io.Transforms.map; */ // TODO How to assert that given a collection of valuecomposites when serializing and deserializing we have to OOME? public class AbstractCollectionSerializationTest - extends AbstractQi4jTest + extends AbstractZestTest { @Override http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractJsonDateFormatTest.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractJsonDateFormatTest.java b/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractJsonDateFormatTest.java index cdfa96f..cfeea10 100644 --- a/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractJsonDateFormatTest.java +++ b/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractJsonDateFormatTest.java @@ -29,7 +29,7 @@ import org.apache.zest.api.type.ValueType; import org.apache.zest.api.value.ValueDeserializer; import org.apache.zest.bootstrap.AssemblyException; import org.apache.zest.bootstrap.ModuleAssembly; -import org.apache.zest.test.AbstractQi4jTest; +import org.apache.zest.test.AbstractZestTest; import static org.junit.Assert.*; @@ -38,7 +38,7 @@ import static org.junit.Assert.*; */ @SuppressWarnings( "ProtectedField" ) public class AbstractJsonDateFormatTest - extends AbstractQi4jTest + extends AbstractZestTest { private final ValueType dateType = new ValueType( Date.class ); http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractPlainValueSerializationTest.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractPlainValueSerializationTest.java b/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractPlainValueSerializationTest.java index 844f9e1..a30ae27 100644 --- a/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractPlainValueSerializationTest.java +++ b/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractPlainValueSerializationTest.java @@ -27,7 +27,7 @@ import org.junit.Test; import org.apache.zest.api.entity.EntityReference; import org.apache.zest.api.injection.scope.Service; import org.apache.zest.api.value.ValueSerialization; -import org.apache.zest.test.AbstractQi4jTest; +import org.apache.zest.test.AbstractZestTest; import static org.hamcrest.core.IsEqual.equalTo; import static org.hamcrest.core.IsNot.not; @@ -40,7 +40,7 @@ import static org.junit.Assert.assertThat; * Assert that ValueSerialization behaviour on plain values is correct. */ public abstract class AbstractPlainValueSerializationTest - extends AbstractQi4jTest + extends AbstractZestTest { @Before http://git-wip-us.apache.org/repos/asf/zest-java/blob/ab97249b/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractValueCompositeSerializationTest.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractValueCompositeSerializationTest.java b/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractValueCompositeSerializationTest.java index 859d98c..4920ebd 100644 --- a/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractValueCompositeSerializationTest.java +++ b/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractValueCompositeSerializationTest.java @@ -50,7 +50,7 @@ import org.apache.zest.api.value.ValueComposite; import org.apache.zest.api.value.ValueSerialization; import org.apache.zest.bootstrap.AssemblyException; import org.apache.zest.bootstrap.ModuleAssembly; -import org.apache.zest.test.AbstractQi4jTest; +import org.apache.zest.test.AbstractZestTest; import org.apache.zest.test.EntityTestAssembler; import static org.hamcrest.CoreMatchers.equalTo; @@ -63,7 +63,7 @@ import static org.junit.Assert.assertThat; // TODO Assert Arrays behaviour! // TODO Assert Generics behaviour! public abstract class AbstractValueCompositeSerializationTest - extends AbstractQi4jTest + extends AbstractZestTest { @Rule public TestName testName = new TestName();
