aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSaad Mohammad <[email protected]>2012-12-10 17:45:36 -0500
committerSaad Mohammad <[email protected]>2012-12-10 17:45:36 -0500
commit7a635b8deb18b650814eae4a5544565209cd702d (patch)
tree509fb73ab454ab92c6390c6c878b97abb1e6bdad /tests
parent8306fcd15c76094e3ef04f16016f04150b330fa4 (diff)
Unit tests for PR1189
Diffstat (limited to 'tests')
-rw-r--r--tests/netx/unit/net/sourceforge/jnlp/PluginParametersTest.java20
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());
+ }
}