From 3a8a64103bcc4891fb1a1f4cc4538f9d5b62a7ba Mon Sep 17 00:00:00 2001 From: rfeng Date: Fri, 20 Feb 2009 20:10:37 +0000 Subject: Start to implement the SCA policy framework 1.1 spec draft from OASIS OpenCSA git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@746356 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/introspect/impl/PolicyProcessorTestCase.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'java/sca/modules/implementation-java/src/test') diff --git a/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/PolicyProcessorTestCase.java b/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/PolicyProcessorTestCase.java index e6a29b0e13..6c9ffc7975 100644 --- a/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/PolicyProcessorTestCase.java +++ b/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/PolicyProcessorTestCase.java @@ -26,9 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.tuscany.sca.assembly.ConfiguredOperation; import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory; -import org.apache.tuscany.sca.assembly.OperationsConfigurator; import org.apache.tuscany.sca.implementation.java.DefaultJavaImplementationFactory; import org.apache.tuscany.sca.implementation.java.JavaImplementation; import org.apache.tuscany.sca.implementation.java.JavaImplementationFactory; @@ -37,7 +35,7 @@ import org.apache.tuscany.sca.interfacedef.java.JavaInterface; import org.apache.tuscany.sca.interfacedef.java.impl.PolicyJavaInterfaceVisitor; import org.apache.tuscany.sca.policy.DefaultPolicyFactory; import org.apache.tuscany.sca.policy.Intent; -import org.apache.tuscany.sca.policy.PolicySetAttachPoint; +import org.apache.tuscany.sca.policy.PolicySubject; import org.junit.Before; import org.junit.Test; import org.oasisopen.sca.annotation.Requires; @@ -102,13 +100,13 @@ public class PolicyProcessorTestCase { } private void verifyIntents(Class serviceImplClass, JavaImplementation type) { - if ( !(type instanceof PolicySetAttachPoint) ) { + if ( !(type instanceof PolicySubject) ) { fail("No Intents on the service "); } Requires serviceImplIntentAnnotation = (Requires)serviceImplClass.getAnnotation(Requires.class); if (serviceImplIntentAnnotation != null) { String[] serviceImplIntents = serviceImplIntentAnnotation.value(); - List requiredIntents = ((PolicySetAttachPoint)type).getRequiredIntents(); + List requiredIntents = ((PolicySubject)type).getRequiredIntents(); if (serviceImplIntents.length > 0) { if (requiredIntents == null || requiredIntents.size() == 0) { fail("No Intents on the service "); @@ -162,6 +160,7 @@ public class PolicyProcessorTestCase { } } + /* for (Method method : interfaceClass.getDeclaredMethods()) { Requires methodIntentAnnotation = method.getAnnotation(Requires.class); @@ -232,6 +231,7 @@ public class PolicyProcessorTestCase { } } } + */ } } -- cgit v1.2.3