Package net.kuujo.vertigo.component.impl

Examples of net.kuujo.vertigo.component.impl.DefaultModuleConfig


    }
  }

  @Test
  public void testModuleDefaults() {
    ModuleConfig module = new DefaultModuleConfig("test", "com.test~test-module~1.0", new DefaultNetworkConfig("test"));
    assertEquals("test", module.getName());
    assertTrue(module.getType().equals(ComponentConfig.Type.MODULE));
    assertEquals("com.test~test-module~1.0", module.getModule());
    assertEquals(new JsonObject(), module.getConfig());
    assertEquals(1, module.getInstances());
  }
View Full Code Here


    assertEquals(1, module.getInstances());
  }

  @Test
  public void testDefaultModuleConfig() {
    ModuleConfig module = new DefaultModuleConfig("test", "com.test~test-module~1.0", new DefaultNetworkConfig("test"));
    assertEquals("test", module.getName());
    assertTrue(module.getType().equals(ComponentConfig.Type.MODULE));
    assertEquals("com.test~test-module~1.0", module.getModule());
    module.setModule("com.foo~foo~1.0");
    assertEquals("com.foo~foo~1.0", module.getModule());
    assertEquals(new JsonObject(), module.getConfig());
    module.setConfig(new JsonObject().putString("foo", "bar"));
    assertEquals("bar", module.getConfig().getString("foo"));
    assertEquals(1, module.getInstances());
    module.setInstances(4);
    assertEquals(4, module.getInstances());
    module.setGroup("test");
    assertEquals("test", module.getGroup());
  }
View Full Code Here

    return addModule(name, moduleName, null, instances);
  }

  @Override
  public ModuleConfig addModule(String name, String moduleName, JsonObject config, int instances) {
    return addModule(new DefaultModuleConfig(name, moduleName, this).setConfig(config).setInstances(instances));
  }
View Full Code Here

TOP

Related Classes of net.kuujo.vertigo.component.impl.DefaultModuleConfig

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.