diff options
author | Decebal Suiu <decebal.suiu@gmail.com> | 2018-03-19 20:32:05 +0200 |
---|---|---|
committer | Decebal Suiu <decebal.suiu@gmail.com> | 2018-03-19 20:32:05 +0200 |
commit | e81057f72aea8c702b61261d935d3c48cc5cb9f1 (patch) | |
tree | 71515d521b31c8fabb55cc575a8dad64c7143d07 | |
parent | 9b6d4a3efb31351cb45d1187edba796e03bcec16 (diff) | |
download | pf4j-e81057f72aea8c702b61261d935d3c48cc5cb9f1.tar.gz pf4j-e81057f72aea8c702b61261d935d3c48cc5cb9f1.zip |
Fix unit test
-rw-r--r-- | pf4j/src/test/java/org/pf4j/DefaultPluginManagerTest.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/pf4j/src/test/java/org/pf4j/DefaultPluginManagerTest.java b/pf4j/src/test/java/org/pf4j/DefaultPluginManagerTest.java index a474f57..c9b55fb 100644 --- a/pf4j/src/test/java/org/pf4j/DefaultPluginManagerTest.java +++ b/pf4j/src/test/java/org/pf4j/DefaultPluginManagerTest.java @@ -36,7 +36,6 @@ public class DefaultPluginManagerTest { 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"); @@ -62,14 +61,14 @@ public class DefaultPluginManagerTest { 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)); @@ -84,7 +83,7 @@ public class DefaultPluginManagerTest { } @Test - public void isPluginValidAllowExact() throws Exception { + public void isPluginValidAllowExact() { pluginManager.setExactVersionAllowed(true); // By default accept all since system version not given @@ -101,7 +100,7 @@ public class DefaultPluginManagerTest { } @Test - public void testDefaultExactVersionAllowed() throws Exception { + public void testDefaultExactVersionAllowed() { assertEquals(false, pluginManager.isExactVersionAllowed()); } |