You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by jm...@apache.org on 2007/02/25 04:06:47 UTC
svn commit: r511417 [3/4] - in /incubator/tuscany/java/sca/kernel:
core/src/main/java/org/apache/tuscany/core/binding/local/
core/src/main/java/org/apache/tuscany/core/builder/
core/src/main/java/org/apache/tuscany/core/databinding/impl/
core/src/main/...
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ContextProcessorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ContextProcessorTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ContextProcessorTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ContextProcessorTestCase.java Sat Feb 24 19:06:42 2007
@@ -68,7 +68,7 @@
Method method = Foo.class.getMethod("setRequestContext", RequestContext.class);
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitMethod(composite, method, type, null);
+ processor.visitMethod(method, type, null);
assertNotNull(type.getResources().get("requestContext"));
}
@@ -76,7 +76,7 @@
Field field = Foo.class.getDeclaredField("requestContext");
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitField(composite, field, type, null);
+ processor.visitField(field, type, null);
assertNotNull(type.getResources().get("requestContext"));
}
@@ -85,7 +85,7 @@
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
try {
- processor.visitMethod(composite, method, type, null);
+ processor.visitMethod(method, type, null);
fail();
} catch (UnknownContextTypeException e) {
// expected
@@ -97,7 +97,7 @@
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
try {
- processor.visitField(composite, field, type, null);
+ processor.visitField(field, type, null);
fail();
} catch (UnknownContextTypeException e) {
// expected
@@ -110,7 +110,7 @@
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
try {
- processor.visitMethod(composite, method, type, null);
+ processor.visitMethod(method, type, null);
fail();
} catch (IllegalContextException e) {
// expected
@@ -122,7 +122,7 @@
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
try {
- processor.visitMethod(composite, method, type, null);
+ processor.visitMethod(method, type, null);
fail();
} catch (IllegalContextException e) {
// expected
@@ -133,7 +133,7 @@
Method method = Foo.class.getMethod("noContext", ComponentContext.class);
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitMethod(composite, method, type, null);
+ processor.visitMethod(method, type, null);
assertEquals(0, type.getResources().size());
}
@@ -141,7 +141,7 @@
Field field = Foo.class.getDeclaredField("noContext");
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitField(composite, field, type, null);
+ processor.visitField(field, type, null);
assertEquals(0, type.getResources().size());
}
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConversationProcessorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConversationProcessorTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConversationProcessorTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConversationProcessorTestCase.java Sat Feb 24 19:06:42 2007
@@ -41,7 +41,7 @@
public void testMaxIdleTime() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitClass(null, FooMaxIdle.class, type, null);
+ processor.visitClass(FooMaxIdle.class, type, null);
assertEquals(10000L, type.getMaxIdleTime());
assertEquals(-1, type.getMaxAge());
}
@@ -49,7 +49,7 @@
public void testMaxAge() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitClass(null, FooMaxAge.class, type, null);
+ processor.visitClass(FooMaxAge.class, type, null);
assertEquals(10000L, type.getMaxAge());
assertEquals(-1, type.getMaxIdleTime());
}
@@ -58,7 +58,7 @@
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
try {
- processor.visitClass(null, BadFooBoth.class, type, null);
+ processor.visitClass(BadFooBoth.class, type, null);
fail();
} catch (InvalidConversationalImplementation e) {
// expected
@@ -68,7 +68,7 @@
public void testImplicitScope() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitClass(null, ImplicitFooScope.class, type, null);
+ processor.visitClass(ImplicitFooScope.class, type, null);
assertEquals(org.apache.tuscany.spi.model.Scope.CONVERSATION, type.getImplementationScope());
}
@@ -76,7 +76,7 @@
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
try {
- processor.visitClass(null, BadFooScope.class, type, null);
+ processor.visitClass(BadFooScope.class, type, null);
fail();
} catch (InvalidConversationalImplementation e) {
// expected
@@ -87,7 +87,7 @@
// TODO do we want these semantics
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitClass(null, FooJustConversation.class, type, null);
+ processor.visitClass(FooJustConversation.class, type, null);
assertEquals(org.apache.tuscany.spi.model.Scope.CONVERSATION, type.getImplementationScope());
assertEquals(-1, type.getMaxAge());
assertEquals(-1, type.getMaxIdleTime());
@@ -97,7 +97,7 @@
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
Field field = FooWithConversationIDField.class.getDeclaredField("conversationID");
- processor.visitField(null, field, type, null);
+ processor.visitField(field, type, null);
assertNotNull(type.getConversationIDMember());
assertEquals(field, type.getConversationIDMember());
}
@@ -106,7 +106,7 @@
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
Method method = FooWithConversationIDMethod.class.getDeclaredMethods()[0];
- processor.visitMethod(null, method, type, null);
+ processor.visitMethod(method, type, null);
assertNotNull(type.getConversationIDMember());
assertEquals(method, type.getConversationIDMember());
}
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/DestroyProcessorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/DestroyProcessorTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/DestroyProcessorTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/DestroyProcessorTestCase.java Sat Feb 24 19:06:42 2007
@@ -40,7 +40,7 @@
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
Method method = Foo.class.getMethod("destroy");
- processor.visitMethod(null, method, type, null);
+ processor.visitMethod(method, type, null);
assertNotNull(type.getDestroyMethod());
}
@@ -50,7 +50,7 @@
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
Method method = Bar.class.getMethod("badDestroy", String.class);
try {
- processor.visitMethod(null, method, type, null);
+ processor.visitMethod(method, type, null);
fail();
} catch (IllegalDestructorException e) {
// expected
@@ -63,9 +63,9 @@
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
Method method = Bar.class.getMethod("destroy");
Method method2 = Bar.class.getMethod("destroy2");
- processor.visitMethod(null, method, type, null);
+ processor.visitMethod(method, type, null);
try {
- processor.visitMethod(null, method2, type, null);
+ processor.visitMethod(method2, type, null);
fail();
} catch (DuplicateDestructorException e) {
// expected
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/EagerInitProcessorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/EagerInitProcessorTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/EagerInitProcessorTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/EagerInitProcessorTestCase.java Sat Feb 24 19:06:42 2007
@@ -19,7 +19,7 @@
EagerInitProcessor processor = new EagerInitProcessor();
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitClass(null, Level.class, type, null);
+ processor.visitClass(Level.class, type, null);
assertEquals(50, type.getInitLevel());
}
@@ -27,7 +27,7 @@
EagerInitProcessor processor = new EagerInitProcessor();
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitClass(null, SubClass.class, type, null);
+ processor.visitClass(SubClass.class, type, null);
assertEquals(50, type.getInitLevel());
}
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeuristicAndPropertyTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeuristicAndPropertyTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeuristicAndPropertyTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeuristicAndPropertyTestCase.java Sat Feb 24 19:06:42 2007
@@ -48,8 +48,8 @@
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
Constructor ctor = Foo.class.getConstructor(String.class);
type.setConstructorDefinition(new ConstructorDefinition(ctor));
- propertyProcessor.visitConstructor(null, ctor, type, null);
- heuristicProcessor.visitEnd(null, Foo.class, type, null);
+ propertyProcessor.visitConstructor(ctor, type, null);
+ heuristicProcessor.visitEnd(Foo.class, type, null);
assertEquals(1, type.getProperties().size());
assertNotNull(type.getProperties().get("foo"));
}
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeuristicConstructorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeuristicConstructorTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeuristicConstructorTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeuristicConstructorTestCase.java Sat Feb 24 19:06:42 2007
@@ -53,7 +53,7 @@
prop.setName("foo");
prop.setJavaType(String.class);
type.getProperties().put("foo", prop);
- processor.visitEnd(null, Foo1.class, type, null);
+ processor.visitEnd(Foo1.class, type, null);
assertNotNull(type.getConstructorDefinition().getConstructor());
assertEquals("foo", type.getConstructorDefinition().getInjectionNames().get(0));
}
@@ -69,7 +69,7 @@
ServiceContract contract = new JavaServiceContract(String.class);
ref.setServiceContract(contract);
type.getReferences().put("foo", ref);
- processor.visitEnd(null, Foo1.class, type, null);
+ processor.visitEnd(Foo1.class, type, null);
assertNotNull(type.getConstructorDefinition().getConstructor());
assertEquals("foo", type.getConstructorDefinition().getInjectionNames().get(0));
}
@@ -91,7 +91,7 @@
ServiceContract contract = new JavaServiceContract(Foo1.class);
ref.setServiceContract(contract);
type.getReferences().put("ref", ref);
- processor.visitEnd(null, Foo2.class, type, null);
+ processor.visitEnd(Foo2.class, type, null);
assertNotNull(type.getConstructorDefinition().getConstructor());
assertEquals(2, type.getConstructorDefinition().getInjectionNames().size());
}
@@ -100,14 +100,14 @@
public void testSingleConstructorResolvableParam() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitEnd(null, Foo5.class, type, null);
+ processor.visitEnd(Foo5.class, type, null);
assertEquals(String.class, type.getProperties().get("string").getJavaType());
}
public void testSingleConstructorResolvableRef() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitEnd(null, Foo6.class, type, null);
+ processor.visitEnd(Foo6.class, type, null);
assertEquals(Ref.class,
type.getReferences().get("heuristicconstructortestcase$ref").getServiceContract().getInterfaceClass());
}
@@ -125,7 +125,7 @@
ref2.setServiceContract(contract);
type.getReferences().put("ref2", ref2);
try {
- processor.visitEnd(null, Foo4.class, type, null);
+ processor.visitEnd(Foo4.class, type, null);
fail();
} catch (AmbiguousConstructorException e) {
// expected
@@ -135,21 +135,21 @@
public void testConstructorPropertyAnnotatedParamsOnly() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitEnd(null, Foo7.class, type, null);
+ processor.visitEnd(Foo7.class, type, null);
assertNotNull(type.getProperties().get("myProp"));
}
public void testConstructorReferenceAnnotatedParamsOnly() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitEnd(null, Foo8.class, type, null);
+ processor.visitEnd(Foo8.class, type, null);
assertNotNull(type.getReferences().get("myRef"));
}
public void testConstructorAutowireAnnotatedParamsOnly() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitEnd(null, Foo9.class, type, null);
+ processor.visitEnd(Foo9.class, type, null);
assertNotNull(type.getReferences().get("myAutowire"));
}
@@ -157,14 +157,14 @@
public void testDefaultConstructor() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitEnd(null, Foo3.class, type, null);
+ processor.visitEnd(Foo3.class, type, null);
assertNotNull(type.getConstructorDefinition().getConstructor());
}
public void testSameTypesButAnnotated() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitEnd(null, Foo12.class, type, null);
+ processor.visitEnd(Foo12.class, type, null);
assertEquals(2, type.getProperties().size());
assertNotNull(type.getProperties().get("prop1"));
assertNotNull(type.getProperties().get("prop2"));
@@ -176,7 +176,7 @@
public void testRandomAnnotation() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitEnd(null, Foo11.class, type, null);
+ processor.visitEnd(Foo11.class, type, null);
assertEquals(1, type.getProperties().size());
assertNotNull(type.getProperties().get("prop1"));
}
@@ -184,7 +184,7 @@
public void testAutowire() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitEnd(null, Foo13.class, type, null);
+ processor.visitEnd(Foo13.class, type, null);
assertEquals(1, type.getReferences().size());
assertNotNull(type.getReferences().get(String.class.getName() + "0"));
}
@@ -192,7 +192,7 @@
public void testMultipleAutowire() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitEnd(null, Foo15.class, type, null);
+ processor.visitEnd(Foo15.class, type, null);
assertEquals(2, type.getReferences().size());
assertNotNull(type.getReferences().get(String.class.getName() + "0"));
assertNotNull(type.getReferences().get(String.class.getName() + "1"));
@@ -201,7 +201,7 @@
public void testNoAutowireNameInConstructor() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitEnd(null, Foo16.class, type, null);
+ processor.visitEnd(Foo16.class, type, null);
assertEquals(2, type.getReferences().size());
assertNotNull(type.getReferences().get(String.class.getName() + "0"));
assertNotNull(type.getReferences().get("bar"));
@@ -212,7 +212,7 @@
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
try {
- processor.visitEnd(null, Foo14.class, type, null);
+ processor.visitEnd(Foo14.class, type, null);
fail();
} catch (NoConstructorException e) {
// expected
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeuristicPojoProcessorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeuristicPojoProcessorTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeuristicPojoProcessorTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeuristicPojoProcessorTestCase.java Sat Feb 24 19:06:42 2007
@@ -58,7 +58,7 @@
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
Constructor<SingleInterfaceImpl> ctor = SingleInterfaceImpl.class.getConstructor();
type.setConstructorDefinition(new ConstructorDefinition<SingleInterfaceImpl>(ctor));
- processor.visitEnd(null, SingleInterfaceImpl.class, type, null);
+ processor.visitEnd(SingleInterfaceImpl.class, type, null);
assertEquals(1, type.getServices().size());
assertEquals(PropertyInterface.class,
type.getServices().get(PropertyInterface.class.getSimpleName())
@@ -76,7 +76,7 @@
Constructor<SingleInterfaceWithPropertyReferenceImpl> ctor =
SingleInterfaceWithPropertyReferenceImpl.class.getConstructor();
type.setConstructorDefinition(new ConstructorDefinition<SingleInterfaceWithPropertyReferenceImpl>(ctor));
- processor.visitEnd(null, SingleInterfaceWithPropertyReferenceImpl.class, type, null);
+ processor.visitEnd(SingleInterfaceWithPropertyReferenceImpl.class, type, null);
assertEquals(1, type.getServices().size());
assertEquals(Interface1.class,
type.getServices().get(Interface1.class.getSimpleName())
@@ -95,7 +95,7 @@
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
Constructor<SingleInterfaceImpl> ctor = SingleInterfaceImpl.class.getConstructor();
type.setConstructorDefinition(new ConstructorDefinition<SingleInterfaceImpl>(ctor));
- processor.visitEnd(null, SingleInterfaceImpl.class, type, null);
+ processor.visitEnd(SingleInterfaceImpl.class, type, null);
assertEquals(0, type.getProperties().size());
}
@@ -107,7 +107,7 @@
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
Constructor<RefInterfaceImpl> ctor = RefInterfaceImpl.class.getConstructor();
type.setConstructorDefinition(new ConstructorDefinition<RefInterfaceImpl>(ctor));
- processor.visitEnd(null, RefInterfaceImpl.class, type, null);
+ processor.visitEnd(RefInterfaceImpl.class, type, null);
assertEquals(0, type.getReferences().size());
}
@@ -119,7 +119,7 @@
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
Constructor<ReferenceCollectionImpl> ctor = ReferenceCollectionImpl.class.getConstructor();
type.setConstructorDefinition(new ConstructorDefinition<ReferenceCollectionImpl>(ctor));
- processor.visitEnd(null, ReferenceCollectionImpl.class, type, null);
+ processor.visitEnd(ReferenceCollectionImpl.class, type, null);
assertEquals(0, type.getProperties().size());
assertEquals(4, type.getReferences().size());
}
@@ -132,7 +132,7 @@
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
Constructor<PropertyCollectionImpl> ctor = PropertyCollectionImpl.class.getConstructor();
type.setConstructorDefinition(new ConstructorDefinition<PropertyCollectionImpl>(ctor));
- processor.visitEnd(null, PropertyCollectionImpl.class, type, null);
+ processor.visitEnd(PropertyCollectionImpl.class, type, null);
assertEquals(0, type.getReferences().size());
assertEquals(4, type.getProperties().size());
}
@@ -145,7 +145,7 @@
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
Constructor<RemotableRefImpl> ctor = RemotableRefImpl.class.getConstructor();
type.setConstructorDefinition(new ConstructorDefinition<RemotableRefImpl>(ctor));
- processor.visitEnd(null, RemotableRefImpl.class, type, null);
+ processor.visitEnd(RemotableRefImpl.class, type, null);
assertEquals(2, type.getReferences().size());
assertEquals(0, type.getProperties().size());
}
@@ -155,7 +155,7 @@
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
Constructor<Child> ctor = Child.class.getConstructor();
type.setConstructorDefinition(new ConstructorDefinition<Child>(ctor));
- processor.visitEnd(null, Child.class, type, null);
+ processor.visitEnd(Child.class, type, null);
assertTrue(type.getServices().containsKey(Interface1.class.getSimpleName()));
}
@@ -177,7 +177,7 @@
JavaMappedProperty<?> prop2 = new JavaMappedProperty();
prop2.setName("string2");
type.add(prop2);
- processor.visitEnd(null, MockService.class, type, null);
+ processor.visitEnd(MockService.class, type, null);
assertEquals(1, type.getServices().size());
}
@@ -186,7 +186,7 @@
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
Constructor<ProtectedRemotableRefFieldImpl> ctor = ProtectedRemotableRefFieldImpl.class.getConstructor();
type.setConstructorDefinition(new ConstructorDefinition<ProtectedRemotableRefFieldImpl>(ctor));
- processor.visitEnd(null, ProtectedRemotableRefFieldImpl.class, type, null);
+ processor.visitEnd(ProtectedRemotableRefFieldImpl.class, type, null);
assertNotNull(type.getReferences().get("otherRef"));
}
@@ -195,7 +195,7 @@
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
Constructor<ProtectedRemotableRefMethodImpl> ctor = ProtectedRemotableRefMethodImpl.class.getConstructor();
type.setConstructorDefinition(new ConstructorDefinition<ProtectedRemotableRefMethodImpl>(ctor));
- processor.visitEnd(null, ProtectedRemotableRefMethodImpl.class, type, null);
+ processor.visitEnd(ProtectedRemotableRefMethodImpl.class, type, null);
assertNotNull(type.getReferences().get("otherRef"));
}
@@ -204,7 +204,7 @@
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
Constructor<PropertyIntTypeOnConstructor> ctor = PropertyIntTypeOnConstructor.class.getConstructor(int.class);
type.setConstructorDefinition(new ConstructorDefinition<PropertyIntTypeOnConstructor>(ctor));
- processor.visitEnd(null, ProtectedRemotableRefMethodImpl.class, type, null);
+ processor.visitEnd(ProtectedRemotableRefMethodImpl.class, type, null);
org.apache.tuscany.spi.model.Property<?> foo = type.getProperties().get("foo");
assertEquals(int.class, foo.getJavaType());
assertEquals(SimpleTypeMapperExtension.XSD_INT, foo.getXmlType());
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeutisticExtensibleConstructorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeutisticExtensibleConstructorTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeutisticExtensibleConstructorTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeutisticExtensibleConstructorTestCase.java Sat Feb 24 19:06:42 2007
@@ -54,7 +54,7 @@
property.setName("myBar");
definition.getInjectionNames().add("myBar");
type.getProperties().put("myBar", property);
- processor.visitEnd(null, Foo.class, type, null);
+ processor.visitEnd(Foo.class, type, null);
assertEquals(2, type.getProperties().size());
}
@@ -71,7 +71,7 @@
public void testBarAnnotationProcessedLast() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitEnd(null, Foo.class, type, null);
+ processor.visitEnd(Foo.class, type, null);
// now simulate process the bar impl
ConstructorDefinition<?> definition = type.getConstructorDefinition();
@@ -101,7 +101,7 @@
property.setName("myBar");
definition.getInjectionNames().add("myBar");
type.getProperties().put("myBar", property);
- processor.visitEnd(null, Foo2.class, type, null);
+ processor.visitEnd(Foo2.class, type, null);
assertEquals("baz", definition.getInjectionNames().get(0));
assertEquals(2, type.getProperties().size());
assertEquals(1, type.getReferences().size());
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/InitProcessorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/InitProcessorTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/InitProcessorTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/InitProcessorTestCase.java Sat Feb 24 19:06:42 2007
@@ -39,7 +39,7 @@
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
Method method = InitProcessorTestCase.Foo.class.getMethod("init");
- processor.visitMethod(null, method, type, null);
+ processor.visitMethod(method, type, null);
assertNotNull(type.getInitMethod());
assertEquals(0, type.getInitLevel());
}
@@ -50,7 +50,7 @@
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
Method method = InitProcessorTestCase.Bar.class.getMethod("badInit", String.class);
try {
- processor.visitMethod(null, method, type, null);
+ processor.visitMethod(method, type, null);
fail();
} catch (IllegalInitException e) {
// expected
@@ -63,9 +63,9 @@
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
Method method = InitProcessorTestCase.Bar.class.getMethod("init");
Method method2 = InitProcessorTestCase.Bar.class.getMethod("init2");
- processor.visitMethod(null, method, type, null);
+ processor.visitMethod(method, type, null);
try {
- processor.visitMethod(null, method2, type, null);
+ processor.visitMethod(method2, type, null);
fail();
} catch (DuplicateInitException e) {
// expected
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/MonitorProcessorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/MonitorProcessorTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/MonitorProcessorTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/MonitorProcessorTestCase.java Sat Feb 24 19:06:42 2007
@@ -51,7 +51,7 @@
Method method = Foo.class.getMethod("setMonitor", Foo.class);
EasyMock.expect(monitorFactory.getMonitor(EasyMock.eq(Foo.class))).andReturn(null);
EasyMock.replay(monitorFactory);
- processor.visitMethod(null, method, type, null);
+ processor.visitMethod(method, type, null);
Map<String, JavaMappedProperty<?>> properties = type.getProperties();
assertTrue(properties.get("monitor").getDefaultValueFactory() instanceof SingletonObjectFactory);
EasyMock.verify(monitorFactory);
@@ -63,7 +63,7 @@
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
Method method = BadMonitor.class.getMethod("setMonitor");
try {
- processor.visitMethod(null, method, type, null);
+ processor.visitMethod(method, type, null);
fail();
} catch (IllegalPropertyException e) {
// expected
@@ -76,7 +76,7 @@
Field field = Foo.class.getDeclaredField("bar");
EasyMock.expect(monitorFactory.getMonitor(EasyMock.eq(Foo.class))).andReturn(null);
EasyMock.replay(monitorFactory);
- processor.visitField(null, field, type, null);
+ processor.visitField(field, type, null);
Map<String, JavaMappedProperty<?>> properties = type.getProperties();
assertTrue(properties.get("bar").getDefaultValueFactory() instanceof SingletonObjectFactory);
EasyMock.verify(monitorFactory);
@@ -88,7 +88,7 @@
Constructor<Bar> ctor = Bar.class.getConstructor(BazMonitor.class);
EasyMock.expect(monitorFactory.getMonitor(EasyMock.eq(BazMonitor.class))).andReturn(null);
EasyMock.replay(monitorFactory);
- processor.visitConstructor(null, ctor, type, null);
+ processor.visitConstructor(ctor, type, null);
Map<String, JavaMappedProperty<?>> properties = type.getProperties();
assertTrue(
properties.get(BazMonitor.class.getName()).getDefaultValueFactory() instanceof SingletonObjectFactory);
@@ -110,7 +110,7 @@
definition.getInjectionNames().add("prop");
type.setConstructorDefinition(definition);
type.getProperties().put("prop", prop);
- processor.visitConstructor(null, ctor, type, null);
+ processor.visitConstructor(ctor, type, null);
Map<String, JavaMappedProperty<?>> properties = type.getProperties();
assertEquals(BazMonitor.class.getName(), definition.getInjectionNames().get(1));
assertEquals(2, type.getProperties().size());
@@ -129,7 +129,7 @@
Constructor<Bar> ctor = Bar.class.getConstructor(String.class, BazMonitor.class);
EasyMock.expect(monitorFactory.getMonitor(EasyMock.eq(BazMonitor.class))).andReturn(null);
EasyMock.replay(monitorFactory);
- processor.visitConstructor(null, ctor, type, null);
+ processor.visitConstructor(ctor, type, null);
Map<String, JavaMappedProperty<?>> properties = type.getProperties();
ConstructorDefinition definition = type.getConstructorDefinition();
assertEquals(2, definition.getInjectionNames().size());
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/PropertyProcessorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/PropertyProcessorTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/PropertyProcessorTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/PropertyProcessorTestCase.java Sat Feb 24 19:06:42 2007
@@ -44,43 +44,43 @@
PropertyProcessor processor;
public void testMethodAnnotation() throws Exception {
- processor.visitMethod(null, Foo.class.getMethod("setFoo", String.class), type, null);
+ processor.visitMethod(Foo.class.getMethod("setFoo", String.class), type, null);
assertNotNull(type.getProperties().get("foo"));
}
public void testMethodRequired() throws Exception {
- processor.visitMethod(null, Foo.class.getMethod("setFooRequired", String.class), type, null);
+ processor.visitMethod(Foo.class.getMethod("setFooRequired", String.class), type, null);
JavaMappedProperty prop = type.getProperties().get("fooRequired");
assertNotNull(prop);
assertEquals(prop.getOverride(), MUST);
}
public void testMethodName() throws Exception {
- processor.visitMethod(null, Foo.class.getMethod("setBarMethod", String.class), type, null);
+ processor.visitMethod(Foo.class.getMethod("setBarMethod", String.class), type, null);
assertNotNull(type.getProperties().get("bar"));
}
public void testFieldAnnotation() throws Exception {
- processor.visitField(null, Foo.class.getDeclaredField("baz"), type, null);
+ processor.visitField(Foo.class.getDeclaredField("baz"), type, null);
assertNotNull(type.getProperties().get("baz"));
}
public void testFieldRequired() throws Exception {
- processor.visitField(null, Foo.class.getDeclaredField("bazRequired"), type, null);
+ processor.visitField(Foo.class.getDeclaredField("bazRequired"), type, null);
JavaMappedProperty prop = type.getProperties().get("bazRequired");
assertNotNull(prop);
assertEquals(prop.getOverride(), OverrideOptions.MUST);
}
public void testFieldName() throws Exception {
- processor.visitField(null, Foo.class.getDeclaredField("bazField"), type, null);
+ processor.visitField(Foo.class.getDeclaredField("bazField"), type, null);
assertNotNull(type.getProperties().get("theBaz"));
}
public void testDuplicateFields() throws Exception {
- processor.visitField(null, Bar.class.getDeclaredField("dup"), type, null);
+ processor.visitField(Bar.class.getDeclaredField("dup"), type, null);
try {
- processor.visitField(null, Bar.class.getDeclaredField("baz"), type, null);
+ processor.visitField(Bar.class.getDeclaredField("baz"), type, null);
fail();
} catch (DuplicatePropertyException e) {
// expected
@@ -88,9 +88,9 @@
}
public void testDuplicateMethods() throws Exception {
- processor.visitMethod(null, Bar.class.getMethod("dupMethod", String.class), type, null);
+ processor.visitMethod(Bar.class.getMethod("dupMethod", String.class), type, null);
try {
- processor.visitMethod(null, Bar.class.getMethod("dupSomeMethod", String.class), type, null);
+ processor.visitMethod(Bar.class.getMethod("dupSomeMethod", String.class), type, null);
fail();
} catch (DuplicatePropertyException e) {
// expected
@@ -99,7 +99,7 @@
public void testInvalidProperty() throws Exception {
try {
- processor.visitMethod(null, Bar.class.getMethod("badMethod"), type, null);
+ processor.visitMethod(Bar.class.getMethod("badMethod"), type, null);
fail();
} catch (IllegalPropertyException e) {
// expected
@@ -176,7 +176,7 @@
}
public void testMultiplicityCollection() throws Exception {
- processor.visitField(null, Multiple.class.getDeclaredField("refs1"), type, null);
+ processor.visitField(Multiple.class.getDeclaredField("refs1"), type, null);
JavaMappedProperty prop = type.getProperties().get("refs1");
assertNotNull(prop);
assertSame(String.class, prop.getJavaType());
@@ -184,7 +184,7 @@
}
public void testMultiplicityArray() throws Exception {
- processor.visitField(null, Multiple.class.getDeclaredField("refs2"), type, null);
+ processor.visitField(Multiple.class.getDeclaredField("refs2"), type, null);
JavaMappedProperty prop = type.getProperties().get("refs2");
assertNotNull(prop);
assertSame(String.class, prop.getJavaType());
@@ -192,7 +192,7 @@
}
public void testMultiplicityArrayMethod() throws Exception {
- processor.visitMethod(null, Multiple.class.getMethod("setRefs3", String[].class), type, null);
+ processor.visitMethod(Multiple.class.getMethod("setRefs3", String[].class), type, null);
JavaMappedProperty prop = type.getProperties().get("refs3");
assertNotNull(prop);
assertSame(String.class, prop.getJavaType());
@@ -200,7 +200,7 @@
}
public void testMultiplicityCollectionMethod() throws Exception {
- processor.visitMethod(null, Multiple.class.getMethod("setRefs4", Collection.class), type, null);
+ processor.visitMethod(Multiple.class.getMethod("setRefs4", Collection.class), type, null);
JavaMappedProperty prop = type.getProperties().get("refs4");
assertNotNull(prop);
assertSame(String.class, prop.getJavaType());
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ReferenceProcessorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ReferenceProcessorTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ReferenceProcessorTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ReferenceProcessorTestCase.java Sat Feb 24 19:06:42 2007
@@ -43,7 +43,7 @@
ReferenceProcessor processor = new ReferenceProcessor(new JavaInterfaceProcessorRegistryImpl());
public void testMethodAnnotation() throws Exception {
- processor.visitMethod(null, ReferenceProcessorTestCase.Foo.class.getMethod("setFoo", Ref.class), type, null);
+ processor.visitMethod(ReferenceProcessorTestCase.Foo.class.getMethod("setFoo", Ref.class), type, null);
JavaMappedReference reference = type.getReferences().get("foo");
assertNotNull(reference);
ServiceContract contract = reference.getServiceContract();
@@ -52,8 +52,8 @@
}
public void testMethodRequired() throws Exception {
- processor.visitMethod(null,
- ReferenceProcessorTestCase.Foo.class.getMethod("setFooRequired", Ref.class),
+ processor.visitMethod(
+ ReferenceProcessorTestCase.Foo.class.getMethod("setFooRequired", Ref.class),
type,
null);
JavaMappedReference prop = type.getReferences().get("fooRequired");
@@ -62,15 +62,15 @@
}
public void testMethodName() throws Exception {
- processor.visitMethod(null,
- ReferenceProcessorTestCase.Foo.class.getMethod("setBarMethod", Ref.class),
+ processor.visitMethod(
+ ReferenceProcessorTestCase.Foo.class.getMethod("setBarMethod", Ref.class),
type,
null);
assertNotNull(type.getReferences().get("bar"));
}
public void testFieldAnnotation() throws Exception {
- processor.visitField(null, ReferenceProcessorTestCase.Foo.class.getDeclaredField("baz"), type, null);
+ processor.visitField(ReferenceProcessorTestCase.Foo.class.getDeclaredField("baz"), type, null);
JavaMappedReference reference = type.getReferences().get("baz");
assertNotNull(reference);
ServiceContract contract = reference.getServiceContract();
@@ -79,21 +79,21 @@
}
public void testFieldRequired() throws Exception {
- processor.visitField(null, ReferenceProcessorTestCase.Foo.class.getDeclaredField("bazRequired"), type, null);
+ processor.visitField(ReferenceProcessorTestCase.Foo.class.getDeclaredField("bazRequired"), type, null);
JavaMappedReference prop = type.getReferences().get("bazRequired");
assertNotNull(prop);
assertTrue(prop.isRequired());
}
public void testFieldName() throws Exception {
- processor.visitField(null, ReferenceProcessorTestCase.Foo.class.getDeclaredField("bazField"), type, null);
+ processor.visitField(ReferenceProcessorTestCase.Foo.class.getDeclaredField("bazField"), type, null);
assertNotNull(type.getReferences().get("theBaz"));
}
public void testDuplicateFields() throws Exception {
- processor.visitField(null, ReferenceProcessorTestCase.Bar.class.getDeclaredField("dup"), type, null);
+ processor.visitField(ReferenceProcessorTestCase.Bar.class.getDeclaredField("dup"), type, null);
try {
- processor.visitField(null, ReferenceProcessorTestCase.Bar.class.getDeclaredField("baz"), type, null);
+ processor.visitField(ReferenceProcessorTestCase.Bar.class.getDeclaredField("baz"), type, null);
fail();
} catch (DuplicateReferenceException e) {
// expected
@@ -101,10 +101,10 @@
}
public void testDuplicateMethods() throws Exception {
- processor.visitMethod(null, ReferenceProcessorTestCase.Bar.class.getMethod("dupMethod", Ref.class), type, null);
+ processor.visitMethod(ReferenceProcessorTestCase.Bar.class.getMethod("dupMethod", Ref.class), type, null);
try {
- processor.visitMethod(null,
- ReferenceProcessorTestCase.Bar.class.getMethod("dupSomeMethod", Ref.class),
+ processor.visitMethod(
+ ReferenceProcessorTestCase.Bar.class.getMethod("dupSomeMethod", Ref.class),
type,
null);
fail();
@@ -115,7 +115,7 @@
public void testInvalidProperty() throws Exception {
try {
- processor.visitMethod(null, ReferenceProcessorTestCase.Bar.class.getMethod("badMethod"), type, null);
+ processor.visitMethod(ReferenceProcessorTestCase.Bar.class.getMethod("badMethod"), type, null);
fail();
} catch (IllegalReferenceException e) {
// expected
@@ -194,7 +194,7 @@
}
public void testMultiplicity1ToN() throws Exception {
- processor.visitField(null, Multiple.class.getDeclaredField("refs1"), type, null);
+ processor.visitField(Multiple.class.getDeclaredField("refs1"), type, null);
JavaMappedReference prop = type.getReferences().get("refs1");
assertNotNull(prop);
assertSame(Ref.class, prop.getServiceContract().getInterfaceClass());
@@ -203,7 +203,7 @@
}
public void testMultiplicityTo0ToN() throws Exception {
- processor.visitField(null, Multiple.class.getDeclaredField("refs2"), type, null);
+ processor.visitField(Multiple.class.getDeclaredField("refs2"), type, null);
JavaMappedReference prop = type.getReferences().get("refs2");
assertNotNull(prop);
assertSame(Ref.class, prop.getServiceContract().getInterfaceClass());
@@ -212,7 +212,7 @@
}
public void testMultiplicity1ToNMethod() throws Exception {
- processor.visitMethod(null, Multiple.class.getMethod("setRefs3", Ref[].class), type, null);
+ processor.visitMethod(Multiple.class.getMethod("setRefs3", Ref[].class), type, null);
JavaMappedReference prop = type.getReferences().get("refs3");
assertNotNull(prop);
assertSame(Ref.class, prop.getServiceContract().getInterfaceClass());
@@ -221,7 +221,7 @@
}
public void testMultiplicity0ToNMethod() throws Exception {
- processor.visitMethod(null, Multiple.class.getMethod("setRefs4", Collection.class), type, null);
+ processor.visitMethod(Multiple.class.getMethod("setRefs4", Collection.class), type, null);
JavaMappedReference prop = type.getReferences().get("refs4");
assertNotNull(prop);
assertSame(Ref.class, prop.getServiceContract().getInterfaceClass());
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ResourceProcessorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ResourceProcessorTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ResourceProcessorTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ResourceProcessorTestCase.java Sat Feb 24 19:06:42 2007
@@ -21,7 +21,7 @@
public void testVisitField() throws Exception {
Field field = Foo.class.getDeclaredField("bar");
- processor.visitField(null, field, type, null);
+ processor.visitField(field, type, null);
Resource resource = type.getResources().get("bar");
assertFalse(resource.isOptional());
assertNull(resource.getMappedName());
@@ -30,7 +30,7 @@
public void testVisitMethod() throws Exception {
Method method = Foo.class.getMethod("setBar", Bar.class);
- processor.visitMethod(null, method, type, null);
+ processor.visitMethod(method, type, null);
Resource resource = type.getResources().get("bar");
assertFalse(resource.isOptional());
assertNull(resource.getMappedName());
@@ -39,7 +39,7 @@
public void testVisitNamedMethod() throws Exception {
Method method = Foo.class.getMethod("setBar2", Bar.class);
- processor.visitMethod(null, method, type, null);
+ processor.visitMethod(method, type, null);
Resource resource = type.getResources().get("someName");
assertFalse(resource.isOptional());
assertEquals("mapped", resource.getMappedName());
@@ -48,7 +48,7 @@
public void testVisitBadMethod() throws Exception {
Method method = Foo.class.getMethod("setBad");
try {
- processor.visitMethod(null, method, type, null);
+ processor.visitMethod(method, type, null);
fail();
} catch (IllegalResourceException e) {
// expected
@@ -57,9 +57,9 @@
public void testDuplicateResources() throws Exception {
Field field = Foo.class.getDeclaredField("bar");
- processor.visitField(null, field, type, null);
+ processor.visitField(field, type, null);
try {
- processor.visitField(null, field, type, null);
+ processor.visitField(field, type, null);
fail();
} catch (DuplicateResourceException e) {
//expected
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ScopeProcessorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ScopeProcessorTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ScopeProcessorTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ScopeProcessorTestCase.java Sat Feb 24 19:06:42 2007
@@ -41,7 +41,7 @@
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitClass(parent, Composite.class, type, null);
+ processor.visitClass(Composite.class, type, null);
assertEquals(Scope.COMPOSITE, type.getImplementationScope());
}
@@ -49,7 +49,7 @@
ScopeProcessor processor = new ScopeProcessor();
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitClass(parent, Session.class, type, null);
+ processor.visitClass(Session.class, type, null);
assertEquals(Scope.SESSION, type.getImplementationScope());
}
@@ -57,7 +57,7 @@
ScopeProcessor processor = new ScopeProcessor();
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitClass(parent, Conversation.class, type, null);
+ processor.visitClass(Conversation.class, type, null);
assertEquals(Scope.CONVERSATION, type.getImplementationScope());
}
@@ -65,7 +65,7 @@
ScopeProcessor processor = new ScopeProcessor();
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitClass(parent, Request.class, type, null);
+ processor.visitClass(Request.class, type, null);
assertEquals(Scope.REQUEST, type.getImplementationScope());
}
@@ -73,7 +73,7 @@
ScopeProcessor processor = new ScopeProcessor();
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitClass(parent, System.class, type, null);
+ processor.visitClass(System.class, type, null);
assertEquals(Scope.SYSTEM, type.getImplementationScope());
}
@@ -81,7 +81,7 @@
ScopeProcessor processor = new ScopeProcessor();
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitClass(parent, Stateless.class, type, null);
+ processor.visitClass(Stateless.class, type, null);
assertEquals(Scope.STATELESS, type.getImplementationScope());
}
@@ -89,7 +89,7 @@
ScopeProcessor processor = new ScopeProcessor();
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitClass(parent, None.class, type, null);
+ processor.visitClass(None.class, type, null);
assertEquals(Scope.STATELESS, type.getImplementationScope());
}
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ServiceCallbackTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ServiceCallbackTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ServiceCallbackTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ServiceCallbackTestCase.java Sat Feb 24 19:06:42 2007
@@ -45,32 +45,32 @@
public void testMethodCallbackInterface() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitClass(null, FooImpl.class, type, null);
+ processor.visitClass(FooImpl.class, type, null);
JavaMappedService service = type.getServices().get(Foo.class.getSimpleName());
assertNotNull(service);
Method method = FooImpl.class.getMethod("setCallback", FooCallback.class);
- processor.visitMethod(null, method, type, null);
+ processor.visitMethod(method, type, null);
assertEquals(method, service.getCallbackMember());
}
public void testFieldCallbackInterface() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitClass(null, FooImpl.class, type, null);
+ processor.visitClass(FooImpl.class, type, null);
JavaMappedService service = type.getServices().get(Foo.class.getSimpleName());
assertNotNull(service);
Field field = FooImpl.class.getDeclaredField("callback");
- processor.visitField(null, field, type, null);
+ processor.visitField(field, type, null);
assertEquals(field, service.getCallbackMember());
}
public void testMethodDoesNotMatchCallback() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitClass(null, BadBarImpl.class, type, null);
+ processor.visitClass(BadBarImpl.class, type, null);
Method method = BadBarImpl.class.getMethod("setWrongInterfaceCallback", String.class);
try {
- processor.visitMethod(null, method, type, null);
+ processor.visitMethod(method, type, null);
fail();
} catch (IllegalCallbackReferenceException e) {
// expected
@@ -80,10 +80,10 @@
public void testNoParamCallback() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitClass(null, BadBarImpl.class, type, null);
+ processor.visitClass(BadBarImpl.class, type, null);
Method method = BadBarImpl.class.getMethod("setNoParamCallback");
try {
- processor.visitMethod(null, method, type, null);
+ processor.visitMethod(method, type, null);
fail();
} catch (IllegalCallbackReferenceException e) {
// expected
@@ -93,10 +93,10 @@
public void testFieldDoesNotMatchCallback() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- processor.visitClass(null, BadBarImpl.class, type, null);
+ processor.visitClass(BadBarImpl.class, type, null);
Field field = BadBarImpl.class.getDeclaredField("wrongInterfaceCallback");
try {
- processor.visitField(null, field, type, null);
+ processor.visitField(field, type, null);
fail();
} catch (IllegalCallbackReferenceException e) {
// expected
@@ -107,7 +107,7 @@
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
try {
- processor.visitClass(null, BadFooImpl.class, type, null);
+ processor.visitClass(BadFooImpl.class, type, null);
fail();
} catch (ProcessingException e) {
// expected
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ServiceProcessorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ServiceProcessorTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ServiceProcessorTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ServiceProcessorTestCase.java Sat Feb 24 19:06:42 2007
@@ -39,7 +39,7 @@
private PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type;
public void testMultipleInterfaces() throws Exception {
- processor.visitClass(null, FooMultiple.class, type, null);
+ processor.visitClass(FooMultiple.class, type, null);
assertEquals(2, type.getServices().size());
JavaMappedService service = type.getServices().get(Baz.class.getSimpleName());
ServiceContract contract = service.getServiceContract();
@@ -50,13 +50,13 @@
}
public void testSingleInterfaces() throws Exception {
- processor.visitClass(null, FooSingle.class, type, null);
+ processor.visitClass(FooSingle.class, type, null);
assertEquals(1, type.getServices().size());
assertNotNull(type.getServices().get(Baz.class.getSimpleName()));
}
public void testMultipleNoService() throws Exception {
- processor.visitClass(null, FooMultipleNoService.class, type, null);
+ processor.visitClass(FooMultipleNoService.class, type, null);
assertEquals(0, type.getServices().size());
}
@@ -64,12 +64,12 @@
* Verifies a service with a callback annotation is recognized
*/
public void testMultipleWithCallbackAnnotation() throws Exception {
- processor.visitClass(null, FooMultipleWithCalback.class, type, null);
+ processor.visitClass(FooMultipleWithCalback.class, type, null);
assertEquals(1, type.getServices().size());
}
public void testRemotableNoService() throws Exception {
- processor.visitClass(null, FooRemotableNoService.class, type, null);
+ processor.visitClass(FooRemotableNoService.class, type, null);
assertEquals(1, type.getServices().size());
JavaMappedService service = type.getServices().get(BazRemotable.class.getSimpleName());
ServiceContract contract = service.getServiceContract();
@@ -78,7 +78,7 @@
public void testNonInterface() throws Exception {
try {
- processor.visitClass(null, BadImpl.class, type, null);
+ processor.visitClass(BadImpl.class, type, null);
fail();
} catch (InvalidServiceType e) {
//expected
@@ -87,7 +87,7 @@
public void testNoInterfaces() throws Exception {
try {
- processor.visitClass(null, BadDefinition.class, type, null);
+ processor.visitClass(BadDefinition.class, type, null);
fail();
} catch (IllegalServiceDefinitionException e) {
//expected
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/builder/SystemComponentBuilderResourceTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/builder/SystemComponentBuilderResourceTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/builder/SystemComponentBuilderResourceTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/builder/SystemComponentBuilderResourceTestCase.java Sat Feb 24 19:06:42 2007
@@ -62,7 +62,7 @@
Component parent = EasyMock.createMock(Component.class);
EasyMock.replay(parent);
- AtomicComponent component = builder.build(parent, definition, ctx);
+ AtomicComponent component = builder.build(definition, ctx);
SystemComponentBuilderResourceTestCase.Foo foo =
(SystemComponentBuilderResourceTestCase.Foo) component.createInstance();
assertEquals("result", foo.resource);
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/loader/SystemComponentTypeLoaderTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/loader/SystemComponentTypeLoaderTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/loader/SystemComponentTypeLoaderTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/loader/SystemComponentTypeLoaderTestCase.java Sat Feb 24 19:06:42 2007
@@ -53,7 +53,7 @@
public void testIntrospectUnannotatedClass() throws ProcessingException {
Component parent = EasyMock.createNiceMock(Component.class);
SystemImplementation impl = new SystemImplementation(BasicInterfaceImpl.class);
- PojoComponentType<?, ?, ?> componentType = loader.loadByIntrospection(parent, impl, null);
+ PojoComponentType<?, ?, ?> componentType = loader.loadByIntrospection(impl, null);
ServiceDefinition service = componentType.getServices().get(BasicInterface.class.getSimpleName());
assertEquals(BasicInterface.class, service.getServiceContract().getInterfaceClass());
Property<?> property = componentType.getProperties().get("publicProperty");
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/loader/SystemImplementationLoaderTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/loader/SystemImplementationLoaderTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/loader/SystemImplementationLoaderTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/loader/SystemImplementationLoaderTestCase.java Sat Feb 24 19:06:42 2007
@@ -52,7 +52,7 @@
EasyMock.expect(reader.next()).andReturn(XMLStreamConstants.END_ELEMENT);
EasyMock.replay(reader);
SystemImplementationLoader loader = new SystemImplementationLoader(registry);
- SystemImplementation impl = loader.load(null, null, reader, context);
+ SystemImplementation impl = loader.load(null, reader, context);
assertEquals(getClass(), impl.getImplementationClass());
EasyMock.verify(reader);
EasyMock.verify(context);
@@ -73,7 +73,7 @@
EasyMock.replay(reader);
SystemImplementationLoader loader = new SystemImplementationLoader(registry);
try {
- loader.load(null, null, reader, context);
+ loader.load(null, reader, context);
fail();
} catch (UnrecognizedElementException e) {
// expected
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/integration/implementation/IntrospectionRegistryIntegrationTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/integration/implementation/IntrospectionRegistryIntegrationTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/integration/implementation/IntrospectionRegistryIntegrationTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/integration/implementation/IntrospectionRegistryIntegrationTestCase.java Sat Feb 24 19:06:42 2007
@@ -56,7 +56,7 @@
public void testSimpleComponentTypeParsing() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- registry.introspect(null, Foo.class, type, null);
+ registry.introspect(Foo.class, type, null);
assertEquals(Foo.class.getMethod("init"), type.getInitMethod());
assertEquals(Foo.class.getMethod("destroy"), type.getDestroyMethod());
assertEquals(COMPOSITE, type.getImplementationScope());
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/integration/implementation/system/builder/SystemBuilderPropertyTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/integration/implementation/system/builder/SystemBuilderPropertyTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/integration/implementation/system/builder/SystemBuilderPropertyTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/integration/implementation/system/builder/SystemBuilderPropertyTestCase.java Sat Feb 24 19:06:42 2007
@@ -62,7 +62,7 @@
impl.setImplementationClass(Foo.class);
ComponentDefinition<SystemImplementation> definition = new ComponentDefinition<SystemImplementation>(impl);
definition.setUri(URI.create("component"));
- AtomicComponent component = builder.build(parent, definition, deploymentContext);
+ AtomicComponent component = builder.build(definition, deploymentContext);
Foo foo = (Foo) component.createInstance();
assertEquals("foo", foo.getTest());
}
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/loader/ComponentLoaderNoBindingTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/loader/ComponentLoaderNoBindingTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/loader/ComponentLoaderNoBindingTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/loader/ComponentLoaderNoBindingTestCase.java Sat Feb 24 19:06:42 2007
@@ -54,12 +54,12 @@
private DeploymentContext ctx;
public void testNoServiceBinding() throws Exception {
- loader.load(parent, null, reader, ctx);
+ loader.load(null, reader, ctx);
assert service.getBindings().isEmpty();
}
public void testNoReferenceBinding() throws Exception {
- loader.load(parent, null, reader, ctx);
+ loader.load(null, reader, ctx);
assert reference.getBindings().isEmpty();
}
@@ -79,11 +79,11 @@
type.add(reference);
JavaImplementation impl = new JavaImplementation(null, type);
LoaderRegistry registry = EasyMock.createMock(LoaderRegistry.class);
- EasyMock.expect(registry.load(EasyMock.isA(Component.class),
+ EasyMock.expect(registry.load(
(ModelObject) EasyMock.isNull(),
EasyMock.isA(XMLStreamReader.class),
EasyMock.isA(DeploymentContext.class))).andReturn(impl);
- registry.loadComponentType(EasyMock.isA(Component.class),
+ registry.loadComponentType(
EasyMock.isA(Implementation.class),
EasyMock.isA(DeploymentContext.class));
EasyMock.replay(registry);
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/loader/ComponentLoaderNoReferenceTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/loader/ComponentLoaderNoReferenceTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/loader/ComponentLoaderNoReferenceTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/loader/ComponentLoaderNoReferenceTestCase.java Sat Feb 24 19:06:42 2007
@@ -44,7 +44,7 @@
*/
public void testNoReferenceOnComponentType() throws LoaderException, XMLStreamException {
try {
- loader.load(parent, null, reader, ctx);
+ loader.load(null, reader, ctx);
fail();
} catch (UndefinedReferenceException e) {
// expected
@@ -75,10 +75,10 @@
EasyMock.expect(reader.next()).andReturn(XMLStreamConstants.END_ELEMENT);
EasyMock.replay(reader);
LoaderRegistry mockRegistry = EasyMock.createMock(LoaderRegistry.class);
- mockRegistry.loadComponentType(EasyMock.isA(Component.class),
+ mockRegistry.loadComponentType(
EasyMock.isA(Implementation.class),
EasyMock.isA(DeploymentContext.class));
- EasyMock.expect(mockRegistry.load(EasyMock.isA(Component.class),
+ EasyMock.expect(mockRegistry.load(
(ModelObject) isNull(),
EasyMock.isA(XMLStreamReader.class),
EasyMock.isA(DeploymentContext.class))).andReturn(impl);
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/loader/ComponentLoaderTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/loader/ComponentLoaderTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/loader/ComponentLoaderTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/loader/ComponentLoaderTestCase.java Sat Feb 24 19:06:42 2007
@@ -77,24 +77,24 @@
EasyMock.expect(mockReader.nextTag()).andReturn(0);
EasyMock.expect(mockReader.next()).andReturn(XMLStreamConstants.END_ELEMENT);
EasyMock.replay(mockReader);
- mockRegistry.loadComponentType(EasyMock.isA(Component.class),
+ mockRegistry.loadComponentType(
EasyMock.isA(Implementation.class),
EasyMock.isA(DeploymentContext.class));
EasyMock.expectLastCall().andStubAnswer(new IAnswer<Object>() {
@SuppressWarnings("unchecked")
public Object answer() throws Throwable {
- Implementation impl = (Implementation) EasyMock.getCurrentArguments()[1];
+ Implementation impl = (Implementation) EasyMock.getCurrentArguments()[0];
impl.setComponentType(new PojoComponentType());
return impl;
}
});
- EasyMock.expect(mockRegistry.load(EasyMock.isA(Component.class),
+ EasyMock.expect(mockRegistry.load(
(ModelObject) isNull(),
EasyMock.eq(mockReader),
EasyMock.isA(DeploymentContext.class))).andReturn(impl);
EasyMock.replay(mockRegistry);
- ComponentDefinition component = loader.load(parent, null, mockReader, ctx);
+ ComponentDefinition component = loader.load(null, mockReader, ctx);
assertEquals(COMPONENT_NAME + NAME, component.getUri().toString());
assertNull(component.getInitLevel());
}
@@ -109,25 +109,25 @@
EasyMock.expect(mockReader.next()).andReturn(XMLStreamConstants.END_ELEMENT);
EasyMock.replay(mockReader);
- mockRegistry.loadComponentType(EasyMock.isA(Component.class),
+ mockRegistry.loadComponentType(
EasyMock.isA(Implementation.class),
EasyMock.isA(DeploymentContext.class));
EasyMock.expectLastCall().andStubAnswer(new IAnswer<Object>() {
@SuppressWarnings("unchecked")
public Object answer() throws Throwable {
- Implementation impl = (Implementation) EasyMock.getCurrentArguments()[1];
+ Implementation impl = (Implementation) EasyMock.getCurrentArguments()[0];
impl.setComponentType(new PojoComponentType());
return impl;
}
});
- EasyMock.expect(mockRegistry.load(EasyMock.isA(Component.class),
+ EasyMock.expect(mockRegistry.load(
(ModelObject) isNull(),
EasyMock.eq(mockReader),
EasyMock.isA(DeploymentContext.class))).andReturn(impl);
EasyMock.replay(mockRegistry);
- ComponentDefinition component = loader.load(parent, null, mockReader, ctx);
+ ComponentDefinition component = loader.load(null, mockReader, ctx);
assertEquals(COMPONENT_NAME + NAME, component.getUri().toString());
assertEquals(Integer.valueOf(20), component.getInitLevel());
}
@@ -164,17 +164,17 @@
EasyMock.expect(mockReader.next()).andReturn(XMLStreamConstants.START_ELEMENT);
EasyMock.expect(mockReader.getName()).andReturn(new QName("foo", "bar"));
EasyMock.replay(mockReader);
- mockRegistry.loadComponentType(EasyMock.isA(Component.class),
+ mockRegistry.loadComponentType(
EasyMock.isA(Implementation.class),
EasyMock.isA(DeploymentContext.class));
- EasyMock.expect(mockRegistry.load(EasyMock.isA(Component.class),
+ EasyMock.expect(mockRegistry.load(
(ModelObject) isNull(),
EasyMock.eq(mockReader),
EasyMock.isA(DeploymentContext.class))).andReturn(impl);
EasyMock.replay(mockRegistry);
try {
- loader.load(parent, null, mockReader, ctx);
+ loader.load(null, mockReader, ctx);
fail();
} catch (UnrecognizedElementException e) {
// expected
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/loader/ComponentTypeElementLoaderTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/loader/ComponentTypeElementLoaderTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/loader/ComponentTypeElementLoaderTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/loader/ComponentTypeElementLoaderTestCase.java Sat Feb 24 19:06:42 2007
@@ -22,7 +22,6 @@
import javax.xml.stream.XMLStreamReader;
import javax.xml.namespace.QName;
-import org.apache.tuscany.spi.component.Component;
import org.apache.tuscany.spi.deployer.DeploymentContext;
import org.apache.tuscany.spi.loader.LoaderRegistry;
import org.apache.tuscany.spi.model.ComponentType;
@@ -50,7 +49,7 @@
// verify that the exact component type instance is returned. Some StAXElementLoader implementations may chose
// to copy the original instance but ComponentTypeElementLoader does not since it has no knowledge of the
// specialized instance
- ModelObject object = loader.load(null, type, reader, null);
+ ModelObject object = loader.load(type, reader, null);
assertEquals(object, type);
}
@@ -58,7 +57,7 @@
ComponentType<ServiceDefinition, ReferenceDefinition, Property<?>> type =
new ComponentType<ServiceDefinition, ReferenceDefinition, Property<?>>();
LoaderRegistry registry = EasyMock.createMock(LoaderRegistry.class);
- EasyMock.expect(registry.load((Component) EasyMock.isNull(),
+ EasyMock.expect(registry.load(
EasyMock.isA(ComponentType.class),
EasyMock.isA(XMLStreamReader.class),
(DeploymentContext) EasyMock.isNull())).andReturn(type);
@@ -71,7 +70,7 @@
EasyMock.expect(reader.next()).andReturn(XMLStreamConstants.END_ELEMENT);
EasyMock.replay(reader);
- loader.load(null, type, reader, null);
+ loader.load(type, reader, null);
EasyMock.verify(registry);
}
@@ -81,7 +80,7 @@
EasyMock.expect(reader.getName()).andReturn(ComponentTypeElementLoader.COMPONENT_TYPE);
EasyMock.expect(reader.next()).andReturn(XMLStreamConstants.END_ELEMENT);
EasyMock.replay(reader);
- ModelObject object = loader.load(null, null, reader, null);
+ ModelObject object = loader.load(null, reader, null);
assertEquals(ComponentType.class, object.getClass());
}
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/loader/DependencyLoaderTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/loader/DependencyLoaderTestCase.java?view=diff&rev=511417&r1=511416&r2=511417
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/loader/DependencyLoaderTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/loader/DependencyLoaderTestCase.java Sat Feb 24 19:06:42 2007
@@ -64,7 +64,7 @@
EasyMock.expect(reader.nextTag()).andReturn(XMLStreamConstants.END_ELEMENT);
EasyMock.replay(reader);
DependencyLoader loader = new DependencyLoader(registry);
- Dependency dependency = loader.load(null, null, reader, null);
+ Dependency dependency = loader.load(null, reader, null);
assertEquals("group", dependency.getArtifact().getGroup());
assertEquals("name", dependency.getArtifact().getName());
assertEquals("1", dependency.getArtifact().getVersion());
@@ -92,7 +92,7 @@
EasyMock.replay(reader);
DependencyLoader loader = new DependencyLoader(registry);
try {
- loader.load(null, null, reader, null);
+ loader.load(null, reader, null);
fail();
} catch (UnrecognizedElementException e) {
// expected
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org