diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-16 09:21:45 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-16 09:21:45 +0000 |
commit | 08b9ad1d1c34abf3d45a7b239a5ce87c9e39791e (patch) | |
tree | ba0f4fe1050af67fd8817ebafb6ac59f2ea95875 /sca-java-2.x/trunk | |
parent | 56d35e582159b7c9f23ad6774595b7b6676a56c7 (diff) |
Fix test case to take account of stricter policy checks and also apparent inconsistencies in the WS Policy namespace in the code.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@964724 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
3 files changed, 13 insertions, 11 deletions
diff --git a/sca-java-2.x/trunk/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/definitions.xml b/sca-java-2.x/trunk/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/definitions.xml index 1d1f2131bb..f37b1ee739 100644 --- a/sca-java-2.x/trunk/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/definitions.xml +++ b/sca-java-2.x/trunk/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/definitions.xml @@ -20,7 +20,7 @@ <definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1" - xmlns:wsp="http://www.w3.org/ns/ws-policy" + xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"> <intent name="testIntent1" constrains="sca:binding" intentType="interaction"/> @@ -52,14 +52,16 @@ <policySet name="testPolicy3" provides="tuscany:testIntent6" appliesTo="//binding | //implementation"> - <wsp:ExactlyOne> - <wsp:All> - <tuscany:jdkLogger name="test.logger"> - <tuscany:logLevel>FINE</tuscany:logLevel> - <tuscany:resourceBundle>LoggingMessages.properties</tuscany:resourceBundle> - </tuscany:jdkLogger> - </wsp:All> - </wsp:ExactlyOne> + <wsp:Policy> + <wsp:ExactlyOne> + <wsp:All> + <tuscany:jdkLogger name="test.logger"> + <tuscany:logLevel>FINE</tuscany:logLevel> + <tuscany:resourceBundle>LoggingMessages.properties</tuscany:resourceBundle> + </tuscany:jdkLogger> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> </policySet> </definitions>
\ No newline at end of file diff --git a/sca-java-2.x/trunk/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/helloworld.composite b/sca-java-2.x/trunk/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/helloworld.composite index f5c05c2de6..7dfe083bae 100644 --- a/sca-java-2.x/trunk/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/helloworld.composite +++ b/sca-java-2.x/trunk/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/helloworld.composite @@ -75,7 +75,7 @@ <component name="HelloWorldService2"> <implementation.java class="org.apache.tuscany.sca.policy.matching.helloworld.HelloWorldService"/> - <service name="HelloWorld" requires="tuscany:testIntent1"/> + <service name="HelloWorld" requires="tuscany:testIntent1" policySets="tuscany:testPolicy1"/> </component> <component name="HelloWorldService3"> diff --git a/sca-java-2.x/trunk/itest/policy/matching/src/test/java/org/apache/tuscany/sca/policy/matching/MatchingTestCase.java b/sca-java-2.x/trunk/itest/policy/matching/src/test/java/org/apache/tuscany/sca/policy/matching/MatchingTestCase.java index 762194afbf..d5112e5312 100644 --- a/sca-java-2.x/trunk/itest/policy/matching/src/test/java/org/apache/tuscany/sca/policy/matching/MatchingTestCase.java +++ b/sca-java-2.x/trunk/itest/policy/matching/src/test/java/org/apache/tuscany/sca/policy/matching/MatchingTestCase.java @@ -118,7 +118,7 @@ public class MatchingTestCase { helloWorld.getGreetings("petra"); fail("Exception expected"); } catch (Exception ex) { - assertTrue(ex.getMessage().indexOf("No match because the policy sets on either side have policies in differnt languages {http://www.w3.org/ns/ws-policy}ExactlyOne and {http://tuscany.apache.org/xmlns/sca/1.1}jdkLogger") > -1); + assertTrue(ex.getMessage().indexOf("No match because the policy sets on either side have policies in differnt languages {http://schemas.xmlsoap.org/ws/2004/09/policy}Policy and {http://tuscany.apache.org/xmlns/sca/1.1}jdkLogger") > -1); } } |