pd1 = new DefaultPluginDescriptor();
pd1.setPluginId("myPlugin");
pd1.setPluginVersion("1.2.3");
- pd1.setPluginClass("foo");
pd1.setPluginDescription("My plugin");
pd1.setDependencies("bar, baz");
pd1.setProvider("Me");
pluginManager.validatePluginDescriptor(pd1);
}
- @Test(expected = PluginException.class)
- public void validateFailsOnClass() throws PluginException {
- pd1.setPluginClass(null);
+ @Test
+ public void validateNoPluginClass() throws PluginException {
pluginManager.validatePluginDescriptor(pd1);
+ assertEquals(Plugin.class.getName(), pd1.getPluginClass());
}
@Test
- public void isPluginValid() throws Exception {
+ public void isPluginValid() {
// By default accept all since system version not given
assertTrue(pluginManager.isPluginValid(pw1));
}
@Test
- public void isPluginValidAllowExact() throws Exception {
+ public void isPluginValidAllowExact() {
pluginManager.setExactVersionAllowed(true);
// By default accept all since system version not given
}
@Test
- public void testDefaultExactVersionAllowed() throws Exception {
+ public void testDefaultExactVersionAllowed() {
assertEquals(false, pluginManager.isExactVersionAllowed());
}