Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2008-06-11 05:13:35 +0000
committerslewis2008-06-11 05:13:35 +0000
commit1c1ef00682aa726adf758e75ab649b4c24d9041a (patch)
tree70ce73150f81bf8bafdcb761d8f134a02fba9f0c
parent0a27f45fcb2d761829f80ddf1db3f7d5ff1c7a2b (diff)
downloadorg.eclipse.ecf-1c1ef00682aa726adf758e75ab649b4c24d9041a.tar.gz
org.eclipse.ecf-1c1ef00682aa726adf758e75ab649b4c24d9041a.tar.xz
org.eclipse.ecf-1c1ef00682aa726adf758e75ab649b4c24d9041a.zip
Fixed getUsername and getPassword so that they fail more explicitly/gracefully when necessary system properties have not been set
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/ContainerAbstractTestCase.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/ContainerAbstractTestCase.java b/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/ContainerAbstractTestCase.java
index da25010ea..2c12d7e29 100755
--- a/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/ContainerAbstractTestCase.java
+++ b/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/ContainerAbstractTestCase.java
@@ -76,14 +76,14 @@ public abstract class ContainerAbstractTestCase extends ECFAbstractTestCase {
}
protected String getUsername(int client) {
- if (usernames == null || usernames.length <= client)
- return null;
+ if (usernames == null || usernames.length <= client || usernames[client] == null)
+ throw new NullPointerException("System property -username" + client + " is not set and must be set to run this test");
return usernames[client];
}
protected String getPassword(int client) {
- if (passwords == null || passwords.length <= client)
- return null;
+ if (passwords == null || passwords.length <= client || passwords[client] == null)
+ throw new NullPointerException("System property -password" + client + " is not set and must be set to run this test");
return passwords[client];
}

Back to the top