Package org.apache.tuscany.sca.policy.matching.helloworld

Examples of org.apache.tuscany.sca.policy.matching.helloworld.HelloWorld


        }
    }
   
    @Test
    public void testMutuallyExclusiveIntents() throws Exception {
        HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientMutuallyExclusiveIntents");
        try {
            helloWorld.getGreetings("petra");
            fail("Exception expected");
        } catch (Exception ex) {
            assertTrue(ex.getMessage().indexOf("No match because the following intents are mutually exclusive {http://tuscany.apache.org/xmlns/sca/1.1}testIntent3 {http://tuscany.apache.org/xmlns/sca/1.1}testIntent1") > -1);
        }
    }
View Full Code Here


        }
    }
   
    @Test
    public void testNoIntentsOrPolicies() throws Exception {
        HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientNoIntentsOrPolicies");
        assertEquals("Hello petra", helloWorld.getGreetings("petra"));
    }   
View Full Code Here

        assertEquals("Hello petra", helloWorld.getGreetings("petra"));
    }   
  
    @Test
    public void testUnresolvedIntentsOnReference() throws Exception {
        HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloUnresolvedIntentsOnReference");
        try {
            helloWorld.getGreetings("petra");
            fail("Exception expected");
        } catch (Exception ex) {
            assertTrue(ex.getMessage().indexOf("No match because there are unresolved intents [{http://tuscany.apache.org/xmlns/sca/1.1}testIntent2]") > -1);
        }
    }  
View Full Code Here

        }
    }  
      
    @Test
    public void testIntentsButNoPolicies() throws Exception {
        HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientIntentsButNoPolicies1");
        assertEquals("Hello petra", helloWorld.getGreetings("petra"));
       
        helloWorld = node.getService(HelloWorld.class, "HelloWorldClientIntentsButNoPolicies2");
        assertEquals("Hello petra", helloWorld.getGreetings("petra"));       
    }
View Full Code Here

    }
   
    @Test
    public void testSomePoliciesOnOneSideButNoneOnTheOther() throws Exception {
        try {
            HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientSomePoliciesOnOneSideButNoneOnTheOther");
            helloWorld.getGreetings("petra");
            fail("Exception expected");
        } catch (Exception ex) {
            assertTrue(ex.getMessage().indexOf("No match because there are policy sets at the endpoint but not at the endpoint reference") > -1);
        }
    }
View Full Code Here

        }
    }
   
    @Test
    public void testPolicySetQNameMatch() throws Exception {
        HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientPolicySetQNameMatch");
        assertEquals("Hello petra", helloWorld.getGreetings("petra"));
    }
View Full Code Here

    }
   
    @Test
    public void testDifferentPolicyLanguage() throws Exception {
        try {
            HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientDifferentPolicyLanguage");
            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://schemas.xmlsoap.org/ws/2004/09/policy}Policy and {http://tuscany.apache.org/xmlns/sca/1.1}jdkLogger") > -1);
        }   
    }
View Full Code Here

        }
    }
   
    @Test
    public void testMutuallyExclusiveIntents() throws Exception {
        HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientMutuallyExclusiveIntents");
        try {
            helloWorld.getGreetings("petra");
            fail("Exception expected");
        } catch (Exception ex) {
            assertTrue(ex.getMessage().indexOf("No match because the following intents are mutually exclusive {http://tuscany.apache.org/xmlns/sca/1.1}testIntent3 {http://tuscany.apache.org/xmlns/sca/1.1}testIntent1") > -1);
        }
    }
View Full Code Here

        }
    }
   
    @Test
    public void testNoIntentsOrPolicies() throws Exception {
        HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientNoIntentsOrPolicies");
        assertEquals("Hello petra", helloWorld.getGreetings("petra"));
    }   
View Full Code Here

        assertEquals("Hello petra", helloWorld.getGreetings("petra"));
    }   
  
    @Test
    public void testUnresolvedIntentsOnReference() throws Exception {
        HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloUnresolvedIntentsOnReference");
        try {
            helloWorld.getGreetings("petra");
            fail("Exception expected");
        } catch (Exception ex) {
            assertTrue(ex.getMessage().indexOf("No match because there are unresolved intents [{http://tuscany.apache.org/xmlns/sca/1.1}testIntent2]") > -1);
        }
    }  
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.policy.matching.helloworld.HelloWorld

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.