Search in sources :

Example 1 with Log

use of org.nutz.log.Log in project nutz by nutzam.

the class PlugsTest method test_get_plugin_from_ioc.

@Test
public void test_get_plugin_from_ioc() {
    Ioc ioc = new NutIoc(new JsonLoader("org/nutz/plugin/plugin.js"));
    PluginManager<Log> manager = new IocPluginManager<Log>(ioc, "pluB", "pluA", "pluC");
    assertNotNull(manager.get());
    assertTrue(manager.get() instanceof SystemLogAdapter);
    ioc.depose();
}
Also used : NutIoc(org.nutz.ioc.impl.NutIoc) Log(org.nutz.log.Log) SystemLogAdapter(org.nutz.log.impl.SystemLogAdapter) JsonLoader(org.nutz.ioc.loader.json.JsonLoader) Ioc(org.nutz.ioc.Ioc) NutIoc(org.nutz.ioc.impl.NutIoc) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 Ioc (org.nutz.ioc.Ioc)1 NutIoc (org.nutz.ioc.impl.NutIoc)1 JsonLoader (org.nutz.ioc.loader.json.JsonLoader)1 Log (org.nutz.log.Log)1 SystemLogAdapter (org.nutz.log.impl.SystemLogAdapter)1