diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2014-04-09 11:48:45 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2014-04-09 11:48:45 +0200 |
| commit | a399f7cb69c94f02a7942147a9c4766a0d5152e3 (patch) | |
| tree | fc8a2154f9042a262303583e8f714f1734f6474a /src/test/java | |
| parent | 11e7a9aaed7c22ec93a791ea752e159b4b120e4e (diff) | |
BadArgumentsException - more specific exception thrown by readC2KArgs
when the arguments are wrong.
Diffstat (limited to 'src/test/java')
| -rw-r--r-- | src/test/java/LauncherTest.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/test/java/LauncherTest.java b/src/test/java/LauncherTest.java index 39c2b6e..8abba93 100644 --- a/src/test/java/LauncherTest.java +++ b/src/test/java/LauncherTest.java @@ -1,6 +1,7 @@ import java.util.Properties;
import com.c2kernel.process.AbstractMain;
+import com.c2kernel.process.resource.BadArgumentsException;
import com.c2kernel.utils.Logger;
@@ -40,7 +41,7 @@ public class LauncherTest { try {
props = AbstractMain.readC2KArgs(args);
throw new Exception("Invalid connect file not detected");
- } catch (Exception ex) { }
+ } catch (BadArgumentsException ex) { }
}
public void testWrongConnectFileName() throws Exception {
@@ -49,7 +50,7 @@ public class LauncherTest { try {
props = AbstractMain.readC2KArgs(args);
throw new Exception("Invalid connect file not detected");
- } catch (Exception ex) { }
+ } catch (BadArgumentsException ex) { }
}
public void testMissingConnectArg() throws Exception {
@@ -59,7 +60,7 @@ public class LauncherTest { try {
props = AbstractMain.readC2KArgs(args);
throw new Exception("Missing connect file not detected");
- } catch (Exception ex) { }
+ } catch (BadArgumentsException ex) { }
}
public void testMissingConfigArg() throws Exception {
@@ -69,6 +70,6 @@ public class LauncherTest { try {
props = AbstractMain.readC2KArgs(args);
throw new Exception("Missing config file not detected");
- } catch (Exception ex) { }
+ } catch (BadArgumentsException ex) { }
}
}
|
