diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2014-04-16 17:46:43 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2014-04-16 17:46:43 +0200 |
| commit | 25c480efd18b83d486cc616340f1dcd921de24c8 (patch) | |
| tree | 5a980ffeed3f4f553facca733473a8bc10203b1f /src/test/java/LauncherTest.java | |
| parent | e8645422ab8c50d952f1651f2f0acdf0edc95e51 (diff) | |
Do assert falses and reasons rather than throwing exceptions
Diffstat (limited to 'src/test/java/LauncherTest.java')
| -rw-r--r-- | src/test/java/LauncherTest.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/java/LauncherTest.java b/src/test/java/LauncherTest.java index 8abba93..a3217b1 100644 --- a/src/test/java/LauncherTest.java +++ b/src/test/java/LauncherTest.java @@ -31,8 +31,8 @@ public class LauncherTest { Logger.msg("Testing valid startup args");
props = AbstractMain.readC2KArgs(args);
- assert "MemoryOnlyClusterStorage".equals(props.get("ClusterStorage"));
- assert "1553".equals(props.get("ItemServer.Proxy.port"));
+ assert "MemoryOnlyClusterStorage".equals(props.get("ClusterStorage")) : "Config file properties not loaded";
+ assert "1553".equals(props.get("ItemServer.Proxy.port")) : "Connect file properties not loaded";
}
public void testWrongConfigFileName() throws Exception {
@@ -40,7 +40,7 @@ public class LauncherTest { args[5] = "filenotfound";
try {
props = AbstractMain.readC2KArgs(args);
- throw new Exception("Invalid connect file not detected");
+ assert false: "Invalid connect file not detected";
} catch (BadArgumentsException ex) { }
}
@@ -49,7 +49,7 @@ public class LauncherTest { args[7] = "alsonotfound";
try {
props = AbstractMain.readC2KArgs(args);
- throw new Exception("Invalid connect file not detected");
+ assert false : "Invalid connect file not detected";
} catch (BadArgumentsException ex) { }
}
@@ -59,7 +59,7 @@ public class LauncherTest { args[1] = LauncherTest.class.getResource("server.conf").getPath();
try {
props = AbstractMain.readC2KArgs(args);
- throw new Exception("Missing connect file not detected");
+ assert false: "Missing connect file not detected";
} catch (BadArgumentsException ex) { }
}
@@ -69,7 +69,7 @@ public class LauncherTest { args[1] = LauncherTest.class.getResource("test.clc").getPath();
try {
props = AbstractMain.readC2KArgs(args);
- throw new Exception("Missing config file not detected");
+ assert false: "Missing config file not detected";
} catch (BadArgumentsException ex) { }
}
}
|
