Package com.oldratlee.cooma

Examples of com.oldratlee.cooma.Config.addConfig()


        Config config = Config.fromKv("protocol", "p1", "host", "1.2.3.4", "port", "1010", "path", "path1", "key2", "impl2");

        String echo = ext.yell(config, "haha");
        assertEquals("Ext1Impl2-yell", echo);

        config = config.addConfig("key1", "impl3");
        echo = ext.yell(config, "haha");
        assertEquals("Ext1Impl3-yell", echo);
    }

    @Test
View Full Code Here


        Config config = Config.fromKv("protocol", "impl3", "host", "1.2.3.4", "port", "1010", "path", "path1");

        String echo = ext.echo(config, "s");
        assertEquals("Ext3Impl3-echo", echo);
   
        config = config.addConfig("key1", "impl2");
        echo = ext.echo(config, "s");
        assertEquals("Ext3Impl2-echo", echo);
       
        String yell = ext.yell(config, "d");
        assertEquals("Ext3Impl3-yell", yell);
View Full Code Here

        Config config = Config.fromKv("protocol", "impl1", "host", "1.2.3.4", "port", "1010", "path", "path1");

        String yell = ext.yell(config, "s");
        assertEquals("Ext2Impl1-yell", yell);
       
        config = config.addConfig("key1", "impl2");
        yell = ext.yell(config, "s");
        assertEquals("Ext2Impl2-yell", yell);
    }

    @Test
View Full Code Here

            fail();
        } catch (IllegalStateException expected) {
            assertThat(expected.getMessage(), containsString("Fail to get extension("));
        }
       
        config = config.addConfig("ext2", "XXX");
        holder.setUrl(config);
        try {
            ext.echo(holder, "haha");
            fail();
        } catch (IllegalStateException expected) {
View Full Code Here

            fail();
        } catch (IllegalStateException expected) {
            assertThat(expected.getMessage(), containsString("Fail to get extension("));
        }
       
        config = config.addConfig("key1", "impl1");
        holder.setUrl(config);
        try {
            ext.echo(holder, "haha");
            fail();
        } catch (IllegalStateException expected) {
View Full Code Here

        Config config = Config.fromKv("protocol", "p1", "host", "1.2.3.4", "port", "1010", "path", "path1", "ext6", "impl1");
       
        assertEquals("Ext6Impl1-echo-Ext1Impl1-echo", ext.echo(config, "ha"));
       
        config = config.addConfig("ext1", "impl2");
        assertEquals("Ext6Impl1-echo-Ext1Impl2-echo", ext.echo(config, "ha"));
       
    }
   
    @Test
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.