Search in sources :

Example 1 with DefaultPlugin

use of com.qcadoo.plugin.internal.DefaultPlugin in project qcadoo by qcadoo.

the class PluginDescriptorParserTest method shouldHaveModulesForXml2.

@Test
public void shouldHaveModulesForXml2() throws Exception {
    // given
    // when
    Plugin result = parser.parse(xmlFile2);
    // then
    DefaultPlugin castedResult = (DefaultPlugin) result;
    assertEquals(0, castedResult.getModules(testModule1Factory).size());
    assertEquals(0, castedResult.getModules(testModule2Factory).size());
}
Also used : Plugin(com.qcadoo.plugin.api.Plugin) InternalPlugin(com.qcadoo.plugin.internal.api.InternalPlugin) DefaultPlugin(com.qcadoo.plugin.internal.DefaultPlugin) DefaultPlugin(com.qcadoo.plugin.internal.DefaultPlugin) Test(org.junit.Test)

Example 2 with DefaultPlugin

use of com.qcadoo.plugin.internal.DefaultPlugin in project qcadoo by qcadoo.

the class PluginDescriptorParserTest method shouldHaveModulesForXml1.

@Test
public void shouldHaveModulesForXml1() throws Exception {
    // given
    // when
    Plugin result = parser.parse(xmlFile1);
    // then
    DefaultPlugin castedResult = (DefaultPlugin) result;
    assertTrue(castedResult.getModules(testModule1Factory).contains(testModule1));
    assertTrue(castedResult.getModules(testModule2Factory).contains(testModule2));
}
Also used : Plugin(com.qcadoo.plugin.api.Plugin) InternalPlugin(com.qcadoo.plugin.internal.api.InternalPlugin) DefaultPlugin(com.qcadoo.plugin.internal.DefaultPlugin) DefaultPlugin(com.qcadoo.plugin.internal.DefaultPlugin) Test(org.junit.Test)

Aggregations

Plugin (com.qcadoo.plugin.api.Plugin)2 DefaultPlugin (com.qcadoo.plugin.internal.DefaultPlugin)2 InternalPlugin (com.qcadoo.plugin.internal.api.InternalPlugin)2 Test (org.junit.Test)2