diff options
author | Jiri Vanek <[email protected]> | 2011-09-15 15:27:40 +0200 |
---|---|---|
committer | Jiri Vanek <[email protected]> | 2011-09-15 15:27:40 +0200 |
commit | 451529c4953d24e031f747fe1dee6cd8b1bb7574 (patch) | |
tree | 7b8f8f44f9fc1b7ca29eea9ebec80932638f82d7 /tests/jnlp_tests/simple/ReadProperties | |
parent | cf26e6d0b7e266f9866e5c608c56814e831cdb07 (diff) |
current reproducers (see changelog) done more verbose
Diffstat (limited to 'tests/jnlp_tests/simple/ReadProperties')
-rw-r--r-- | tests/jnlp_tests/simple/ReadProperties/testcases/ReadPropertiesTest.java | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/tests/jnlp_tests/simple/ReadProperties/testcases/ReadPropertiesTest.java b/tests/jnlp_tests/simple/ReadProperties/testcases/ReadPropertiesTest.java index f316643..1c22bb6 100644 --- a/tests/jnlp_tests/simple/ReadProperties/testcases/ReadPropertiesTest.java +++ b/tests/jnlp_tests/simple/ReadProperties/testcases/ReadPropertiesTest.java @@ -44,31 +44,36 @@ public class ReadPropertiesTest { private static ServerAccess server = new ServerAccess(); - - + @Test public void ReadPropertiesLunch1() throws Exception { - System.out.println("connecting ReadProperties request"); + System.out.println("connecting ReadProperties1 request"); + System.err.println("connecting ReadProperties1 request"); ServerAccess.ProcessResult pr=server.executeJavawsHeadless(null,"/ReadProperties1.jnlp"); System.out.println(pr.stdout); System.err.println(pr.stderr); - Assert.assertTrue(pr.stderr.contains("java.security.AccessControlException: access denied (java.util.PropertyPermission user.name read)")); - Assert.assertFalse(pr.stderr.contains("ClassNotFoundException")); - Assert.assertFalse(pr.stdout.length()>2); - Assert.assertFalse(pr.wasTerminated); + String s="java.security.AccessControlException: access denied (java.util.PropertyPermission user.name read)"; + Assert.assertTrue("stderr should contains "+s+" but didn't",pr.stderr.contains(s)); + String cc="ClassNotFoundException"; + Assert.assertFalse("stderr should NOT contains `"+cc+"`, but did",pr.stderr.contains(cc)); + Assert.assertFalse("stdout length should be <=2, but was "+pr.stdout.length(),pr.stdout.length()>2); + Assert.assertFalse("ReadPropertiesLunch1 should not be terminated, but was",pr.wasTerminated); Assert.assertEquals((Integer)0, pr.returnValue); } @Test public void ReadPropertiesLunch2() throws Exception { - System.out.println("connecting ReadProperties request"); + System.out.println("connecting ReadProperties2 request"); + System.err.println("connecting ReadProperties2 request"); ServerAccess.ProcessResult pr=server.executeJavawsHeadless(null,"/ReadProperties2.jnlp"); System.out.println(pr.stdout); System.err.println(pr.stderr); - Assert.assertTrue(pr.stderr.contains("java.security.AccessControlException: access denied (java.util.PropertyPermission user.home read)")); - Assert.assertFalse(pr.stderr.contains("ClassNotFoundException")); - Assert.assertFalse(pr.stdout.length()>2); - Assert.assertFalse(pr.wasTerminated); + String s="java.security.AccessControlException: access denied (java.util.PropertyPermission user.home read)"; + Assert.assertTrue("stderr should contains "+s+" but didn't",pr.stderr.contains(s)); + String cc="ClassNotFoundException"; + Assert.assertFalse("stderr should NOT contains `"+cc+"`, but did",pr.stderr.contains(cc)); + Assert.assertFalse("stdout length should be <=2, but was "+pr.stdout.length(),pr.stdout.length()>2); + Assert.assertFalse("ReadPropertiesLunch2 should not be terminated, but was",pr.wasTerminated); Assert.assertEquals((Integer)0, pr.returnValue); } } |