use of com.qcadoo.plugin.api.Plugin 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());
}
use of com.qcadoo.plugin.api.Plugin in project qcadoo by qcadoo.
the class PluginDescriptorParserTest method shouldHavePluginInformationsForXml2.
@Test
public void shouldHavePluginInformationsForXml2() {
// given
// when
Plugin result = parser.parse(xmlFile2);
// then
assertEquals("testPlugin2Name", result.getPluginInformation().getName());
assertNull(result.getPluginInformation().getDescription());
assertNull(result.getPluginInformation().getVendor());
assertNull(result.getPluginInformation().getVendorUrl());
}
use of com.qcadoo.plugin.api.Plugin in project qcadoo by qcadoo.
the class PluginDescriptorParserTest method shouldHaveIdentifierVersionAndSystemForXml1.
@Test
public void shouldHaveIdentifierVersionAndSystemForXml1() {
// given
// when
Plugin result = parser.parse(xmlFile1);
// then
assertEquals("testPlugin", result.getIdentifier());
assertEquals(new Version("1.2.3"), result.getVersion());
assertTrue(result.isSystemPlugin());
}
use of com.qcadoo.plugin.api.Plugin in project qcadoo by qcadoo.
the class PluginDescriptorParserTest method shouldHavePluginDependenciesInformationsForXml1.
@Test
public void shouldHavePluginDependenciesInformationsForXml1() {
// given
// when
Plugin result = parser.parse(xmlFile1);
// then
Set<PluginDependencyInformation> dependencies = result.getRequiredPlugins();
assertEquals(3, dependencies.size());
assertTrue(dependencies.contains(new PluginDependencyInformation("testPluginDependency1", new VersionOfDependency("(1.2.3,2.3.4]"))));
assertTrue(dependencies.contains(new PluginDependencyInformation("testPluginDependency2", new VersionOfDependency("1.1.1"))));
assertTrue(dependencies.contains(new PluginDependencyInformation("testPluginDependency3", new VersionOfDependency(null))));
}
use of com.qcadoo.plugin.api.Plugin in project qcadoo by qcadoo.
the class PluginDescriptorParserTest method shouldParseXml1.
@Test
public void shouldParseXml1() {
// given
// when
Plugin result = parser.parse(xmlFile1);
// then
assertNotNull(result);
}
Aggregations