/hg/icedtea-web: PolicyFileModel null file tests added
ldracz at icedtea.classpath.org
ldracz at icedtea.classpath.org
Tue Oct 21 15:01:17 UTC 2014
changeset d2f6040df270 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=d2f6040df270
author: Lukasz Dracz <ldracz at redhat.com>
date: Tue Oct 21 11:01:05 2014 -0400
PolicyFileModel null file tests added
2014-10-21 Lukasz Dracz <ldracz at redhat.com>
PolicyFileModel null file tests added
* tests/netx/unit/net/sourceforge/jnlp/security/policyeditor/PolicyFileModelTest.java
diffstat:
ChangeLog | 5 ++
tests/netx/unit/net/sourceforge/jnlp/security/policyeditor/PolicyFileModelTest.java | 20 +++++++++-
2 files changed, 24 insertions(+), 1 deletions(-)
diffs (44 lines):
diff -r 016df62ed7a3 -r d2f6040df270 ChangeLog
--- a/ChangeLog Mon Oct 20 17:44:45 2014 +0200
+++ b/ChangeLog Tue Oct 21 11:01:05 2014 -0400
@@ -1,3 +1,8 @@
+2014-10-21 Lukasz Dracz <ldracz at redhat.com>
+
+ PolicyFileModel null file tests added
+ * tests/netx/unit/net/sourceforge/jnlp/security/policyeditor/PolicyFileModelTest.java
+
2014-10-20 Jiri Vanek <jvanek at redhat.com>
Added support for chromium binary (along with older chromium-browser one)
diff -r 016df62ed7a3 -r d2f6040df270 tests/netx/unit/net/sourceforge/jnlp/security/policyeditor/PolicyFileModelTest.java
--- a/tests/netx/unit/net/sourceforge/jnlp/security/policyeditor/PolicyFileModelTest.java Mon Oct 20 17:44:45 2014 +0200
+++ b/tests/netx/unit/net/sourceforge/jnlp/security/policyeditor/PolicyFileModelTest.java Tue Oct 21 11:01:05 2014 -0400
@@ -73,9 +73,27 @@
assertEquals(new File(tempFilePath), model.getFile());
}
- @Test(expected = NullPointerException.class)
+ @Test
public void testSetFileNull() throws Exception {
model.setFile(null);
+
+ assertEquals(null, model.getFile());
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void testOpenAndParsePolicyFileWithFileNull() throws Exception {
+ model.setFile(null);
+
+ assertEquals(null, model.getFile());
+ model.openAndParsePolicyFile();
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void testSavePolicyFileWithFileNull() throws Exception {
+ model.setFile(null);
+
+ assertEquals(null, model.getFile());
+ model.savePolicyFile();
}
@Test
More information about the distro-pkg-dev
mailing list