use of com.qcadoo.plugin.api.ModuleFactory in project qcadoo by qcadoo.
the class PluginTest method shouldHaveInformation.
@Test
public void shouldHaveInformation() throws Exception {
// given
Plugin plugin = DefaultPlugin.Builder.identifier("identifier1", Collections.<ModuleFactory<?>>emptyList()).withDescription("description").withName("name").withVendor("vendor").withVendorUrl("vendorUrl").build();
// then
assertEquals("description", plugin.getPluginInformation().getDescription());
assertEquals("name", plugin.getPluginInformation().getName());
assertEquals("vendor", plugin.getPluginInformation().getVendor());
assertEquals("vendorUrl", plugin.getPluginInformation().getVendorUrl());
}
use of com.qcadoo.plugin.api.ModuleFactory in project qcadoo by qcadoo.
the class PluginTest method shouldHaveUnknownStateByDefault.
@Test
public void shouldHaveUnknownStateByDefault() throws Exception {
// given
Plugin plugin = DefaultPlugin.Builder.identifier("identifier", Collections.<ModuleFactory<?>>emptyList()).build();
// then
assertTrue(plugin.hasState(PluginState.UNKNOWN));
assertEquals(PluginState.UNKNOWN, plugin.getState());
}
use of com.qcadoo.plugin.api.ModuleFactory in project qcadoo by qcadoo.
the class PluginTest method shouldHaveSystemFlag.
@Test
public void shouldHaveSystemFlag() throws Exception {
// given
Plugin plugin1 = DefaultPlugin.Builder.identifier("identifier1", Collections.<ModuleFactory<?>>emptyList()).asSystem().build();
Plugin plugin2 = DefaultPlugin.Builder.identifier("identifier1", Collections.<ModuleFactory<?>>emptyList()).build();
// then
assertTrue(plugin1.isSystemPlugin());
assertFalse(plugin2.isSystemPlugin());
}
Aggregations