Package com.oldratlee.cooma.ext2.impl

Examples of com.oldratlee.cooma.ext2.impl.Ext2Impl2


    public void test_urlHolder_getAdaptiveExtension_ExceptionWhenNameNotProvided() throws Exception {
        Ext2 ext = ExtensionLoader.getExtensionLoader(Ext2.class).getAdaptiveExtension();

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

        UrlHolder holder = new UrlHolder();
        holder.setUrl(config);
       
        try {
            ext.echo(holder, "impl1");
            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) {
            assertThat(expected.getMessage(), containsString("Fail to get extension(com.oldratlee.cooma.ext2.Ext2) name from config"));
View Full Code Here

TOP

Related Classes of com.oldratlee.cooma.ext2.impl.Ext2Impl2

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.