diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/netx/unit/net/sourceforge/jnlp/PluginParametersTest.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/netx/unit/net/sourceforge/jnlp/PluginParametersTest.java b/tests/netx/unit/net/sourceforge/jnlp/PluginParametersTest.java index 0e05b53..fd855e2 100644 --- a/tests/netx/unit/net/sourceforge/jnlp/PluginParametersTest.java +++ b/tests/netx/unit/net/sourceforge/jnlp/PluginParametersTest.java @@ -111,4 +111,24 @@ public class PluginParametersTest { } + /** + * Initialize PluginParameters without code/object parameters + */ + @Test(expected = PluginParameterException.class) + public void testConstructorWithNoCodeAndObjectParam() { + Map<String, String> rawParams = new HashMap<String, String>(); + rawParams.put("classid", "clsid:classidValue"); + new PluginParameters(rawParams); + } + + /** + * Initialize PluginParameters with jnlp_href but no code/object parameters + */ + @Test + public void testConstructorWithOnlyJnlpHrefParam() { + Map<String, String> rawParams = new HashMap<String, String>(); + rawParams.put("jnlp_href", "applet.jnlp"); + PluginParameters pluginParam = new PluginParameters(rawParams); + assertEquals("applet.jnlp", pluginParam.getJNLPHref()); + } } |