From 7a635b8deb18b650814eae4a5544565209cd702d Mon Sep 17 00:00:00 2001 From: Saad Mohammad Date: Mon, 10 Dec 2012 17:45:36 -0500 Subject: Unit tests for PR1189 --- .../net/sourceforge/jnlp/PluginParametersTest.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tests') 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 rawParams = new HashMap(); + rawParams.put("classid", "clsid:classidValue"); + new PluginParameters(rawParams); + } + + /** + * Initialize PluginParameters with jnlp_href but no code/object parameters + */ + @Test + public void testConstructorWithOnlyJnlpHrefParam() { + Map rawParams = new HashMap(); + rawParams.put("jnlp_href", "applet.jnlp"); + PluginParameters pluginParam = new PluginParameters(rawParams); + assertEquals("applet.jnlp", pluginParam.getJNLPHref()); + } } -- cgit v1.2.3