aboutsummaryrefslogtreecommitdiffstats
path: root/tests/reproducers/simple/ManifestedJar1/testcases/ManifestedJar1Test.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/reproducers/simple/ManifestedJar1/testcases/ManifestedJar1Test.java')
-rw-r--r--tests/reproducers/simple/ManifestedJar1/testcases/ManifestedJar1Test.java35
1 files changed, 18 insertions, 17 deletions
diff --git a/tests/reproducers/simple/ManifestedJar1/testcases/ManifestedJar1Test.java b/tests/reproducers/simple/ManifestedJar1/testcases/ManifestedJar1Test.java
index 47baa6f..a2e0c0f 100644
--- a/tests/reproducers/simple/ManifestedJar1/testcases/ManifestedJar1Test.java
+++ b/tests/reproducers/simple/ManifestedJar1/testcases/ManifestedJar1Test.java
@@ -35,10 +35,11 @@ obligated to do so. If you do not wish to do so, delete this
exception statement from your version.
*/
+import net.sourceforge.jnlp.ProcessResult;
import net.sourceforge.jnlp.ServerAccess;
import net.sourceforge.jnlp.annotations.Bug;
-import org.junit.Assert;
+import org.junit.Assert;
import org.junit.Test;
@Bug(id="http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-February/017435.html")
@@ -49,30 +50,30 @@ public class ManifestedJar1Test {
//actually this on eis never printed as stderr will not recieve this message in headless mode :(
private static final String twoMainException = "net.sourceforge.jnlp.ParseException: Invalid XML document syntax";
- private void assertManifestedJar1(String id, ServerAccess.ProcessResult q) {
+ private void assertManifestedJar1(String id, ProcessResult q) {
String s = "Hello from ManifestedJar1";
Assert.assertTrue(id + " stdout should contains `" + s + "`, but didn't ", q.stdout.contains(s));
}
- private void assertManifestedJar2(String id, ServerAccess.ProcessResult q) {
+ private void assertManifestedJar2(String id, ProcessResult q) {
String s = "Hello from ManifestedJar2";
Assert.assertTrue(id + " stdout should contains `" + s + "`, but didn't ", q.stdout.contains(s));
}
- private void assertNotManifestedJar1(String id, ServerAccess.ProcessResult q) {
+ private void assertNotManifestedJar1(String id, ProcessResult q) {
String s = "Hello from ManifestedJar1";
Assert.assertFalse(id + " stdout should NOT contains `" + s + "`, but didn ", q.stdout.contains(s));
}
- private void assertAppError(String id, ServerAccess.ProcessResult q) {
+ private void assertAppError(String id, ProcessResult q) {
Assert.assertTrue(id + " stderr should contains `" + nonLunchableMessage + "`, but didnn't ", q.stderr.contains(nonLunchableMessage));
}
- private void assertNotManifestedJar2(String id, ServerAccess.ProcessResult q) {
+ private void assertNotManifestedJar2(String id, ProcessResult q) {
String s = "Hello from ManifestedJar2";
Assert.assertFalse(id + " stdout should NOT contains `" + s + "`, but didn ", q.stdout.contains(s));
}
- private void assertNotDead(String id, ServerAccess.ProcessResult pr) {
+ private void assertNotDead(String id, ProcessResult pr) {
String cc = "ClassNotFoundException";
Assert.assertFalse(id + " stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
Assert.assertFalse(id + " should not be terminated, but was", pr.wasTerminated);
@@ -85,7 +86,7 @@ public class ManifestedJar1Test {
*/
public void manifestedJar1nothing2nothingNoAppDesc() throws Exception {
String id = "ManifestedJar-1nothing2nothingNoAppDesc";
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
assertManifestedJar1(id, pr);
assertNotDead(id, pr);
}
@@ -97,7 +98,7 @@ public class ManifestedJar1Test {
@Test
public void manifestedJar1noAppDesc() throws Exception {
String id = "ManifestedJar-1noAppDesc";
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
assertManifestedJar1(id, pr);
assertNotDead(id, pr);
}
@@ -109,7 +110,7 @@ public class ManifestedJar1Test {
@Test
public void manifestedJar1mainNoAppDesc() throws Exception {
String id = "ManifestedJar-1mainNoAppDesc";
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
assertManifestedJar1(id, pr);
assertNotDead(id, pr);
}
@@ -121,7 +122,7 @@ public class ManifestedJar1Test {
@Test
public void ManifestedJar1mainHaveAppDesc() throws Exception {
String id = "ManifestedJar-1mainHaveAppDesc";
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
assertManifestedJar2(id, pr);
assertNotDead(id, pr);
}
@@ -133,7 +134,7 @@ public class ManifestedJar1Test {
@Test
public void ManifestedJar1main2nothingNoAppDesc() throws Exception {
String id = "ManifestedJar-1main2nothingNoAppDesc";
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
assertManifestedJar2(id, pr);
assertNotDead(id, pr);
}
@@ -145,7 +146,7 @@ public class ManifestedJar1Test {
@Test
public void manifestedJar1main2nothingNoAppDesc() throws Exception {
String id = "ManifestedJar-1main2nothingNoAppDesc";
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
assertManifestedJar2(id, pr);
assertNotDead(id, pr);
}
@@ -160,7 +161,7 @@ public class ManifestedJar1Test {
@Test
public void manifestedJar1main2mainNoAppDesc() throws Exception {
String id = "ManifestedJar-1main2mainNoAppDesc";
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
assertManifestedJar1(id, pr);
assertNotDead(id, pr);
}
@@ -174,7 +175,7 @@ public class ManifestedJar1Test {
@Test
public void manifestedJar1main2mainAppDesc() throws Exception {
String id = "ManifestedJar-1main2mainAppDesc";
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
assertNotManifestedJar1(id, pr);
assertNotManifestedJar2(id, pr);
assertNotDead(id, pr);
@@ -189,7 +190,7 @@ public class ManifestedJar1Test {
@Test
public void manifestedJar1noAppDescAtAll() throws Exception {
String id = "ManifestedJar-1noAppDescAtAll";
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
assertNotManifestedJar1(id, pr);
assertNotManifestedJar2(id, pr);
assertAppError(id, pr);
@@ -208,7 +209,7 @@ public class ManifestedJar1Test {
@Test
public void manifestedJar1nothing2nothingAppDesc() throws Exception {
String id = "ManifestedJar-1nothing2nothingAppDesc";
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
assertNotManifestedJar2(id, pr);
assertNotManifestedJar1(id, pr);
assertNotDead(id, pr);