Examples of TestInterface


Examples of org.apache.tuscany.sca.host.corba.testing.general.TestInterface

     */
    @Test
    public void test_invalidHost() {
        try {
            String url = CorbaHostUtils.createCorbanameURI("not_" + LOCALHOST, DEFAULT_PORT, "Name");
            TestInterface servant = new TestInterfaceServant();
            host.registerServant(url, servant);
            fail();
        } catch (CorbaHostException e) {
            // Expected
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.tuscany.sca.host.corba.testing.general.TestInterface

     */
    @Test
    public void test_invalidPort() {
        try {
            String url = CorbaHostUtils.createCorbanameURI(LOCALHOST, DEFAULT_PORT + 1, "Name");
            TestInterface servant = new TestInterfaceServant();
            host.registerServant(url, servant);
            fail();
        } catch (CorbaHostException e) {
            // Expected
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.tuscany.sca.host.corba.testing.general.TestInterface

     */
    @Test
    @Ignore("SUN JDK 6 is happy with all kind of names")
    public void test_invalidBindingName() {
        try {
            TestInterface servant = new TestInterfaceServant();
            host.registerServant("---", servant);
            fail();
        } catch (CorbaHostException e) {
            assertTrue(e.getMessage().equals(CorbaHostException.WRONG_NAME));
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.tuscany.sca.host.corba.testing.general.TestInterface

     */
    @Test
    public void test_registerServant() {
        try {
            String uri = CorbaHostUtils.createCorbanameURI(LOCALHOST, DEFAULT_PORT, "Nested/Test");
            TestInterface servant = new TestInterfaceServant();
            host.registerServant(uri, servant);
            TestInterface ref = TestInterfaceHelper.narrow(host.lookup(uri));
            assertEquals(2, ref.getInt(2));
        } catch (Exception e) {
            e.printStackTrace();
            fail();
        }
    }
View Full Code Here

Examples of org.apache.tuscany.sca.host.corba.testing.general.TestInterface

    @Test
    public void test_unregisterServant() {
        try {
            String objName = "Unregistering/Test";
            String uri = CorbaHostUtils.createCorbanameURI(LOCALHOST, DEFAULT_PORT, objName);
            TestInterface servant = new TestInterfaceServant();

            // creating and releasing using corbaname URI
            host.registerServant(uri, servant);
            host.unregisterServant(uri);
            host.registerServant(uri, servant);
View Full Code Here

Examples of org.apache.tuscany.sca.host.corba.testing.general.TestInterface

     */
    @Test
    public void test_nameAlreadyRegistered() {
        // test using URI
        try {
            TestInterface servant = new TestInterfaceServant();
            String uri = CorbaHostUtils.createCorbanameURI(LOCALHOST, DEFAULT_PORT, "AlreadyRegisteredTest2");
            host.registerServant(uri, servant);
            host.registerServant(uri, servant);
            fail();
        } catch (CorbaHostException e) {
View Full Code Here

Examples of org.apache.tuscany.sca.host.corba.testing.general.TestInterface

     */
    @Test
    public void test_invalidHost() {
        try {
            String url = CorbaHostUtils.createCorbanameURI("not_" + LOCALHOST, DEFAULT_PORT, "Name");
            TestInterface servant = new TestInterfaceServant();
            host.registerServant(url, servant);
            fail();
        } catch (CorbaHostException e) {
            // Expected
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.tuscany.sca.host.corba.testing.general.TestInterface

     */
    @Test
    public void test_invalidPort() {
        try {
            String url = CorbaHostUtils.createCorbanameURI(LOCALHOST, DEFAULT_PORT + 1, "Name");
            TestInterface servant = new TestInterfaceServant();
            host.registerServant(url, servant);
            fail();
        } catch (CorbaHostException e) {
            // Expected
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.tuscany.sca.host.corba.testing.general.TestInterface

     */
    @Test
    @Ignore("SUN JDK 6 is happy with all kind of names")
    public void test_invalidBindingName() {
        try {
            TestInterface servant = new TestInterfaceServant();
            host.registerServant("---", servant);
            fail();
        } catch (CorbaHostException e) {
            assertTrue(e.getMessage().equals(CorbaHostException.WRONG_NAME));
        } catch (Exception e) {
View Full Code Here

Examples of org.drools.core.util.asm.TestInterface

    }

    @Test
    public void testInterface() throws Exception {

        final TestInterface obj = new TestInterfaceImpl();
        final ClassFieldReader ext = store.getReader( TestInterface.class,
                                                      "something",
                                                      getClass().getClassLoader() );

        assertEquals( "foo",
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.