Author: chris.laprun(a)jboss.com
Date: 2010-10-05 09:35:38 -0400 (Tue, 05 Oct 2010)
New Revision: 4509
Modified:
components/common/trunk/common/src/test/java/org/gatein/common/RuntimeContextTestCase.java
Log:
- GTNCOMMON-12: Proper tests... :(
Modified:
components/common/trunk/common/src/test/java/org/gatein/common/RuntimeContextTestCase.java
===================================================================
---
components/common/trunk/common/src/test/java/org/gatein/common/RuntimeContextTestCase.java 2010-10-05
13:29:49 UTC (rev 4508)
+++
components/common/trunk/common/src/test/java/org/gatein/common/RuntimeContextTestCase.java 2010-10-05
13:35:38 UTC (rev 4509)
@@ -38,9 +38,8 @@
public void testIsUnknown()
{
- System.setProperty(RuntimeContext.GATEIN_RUNTIME_CONTEXT_PROP_NAME,
"foo");
-
- assertTrue(RuntimeContext.getInstance().isRunningInUnknownEnvironment());
+ RuntimeContext instance = new RuntimeContext("foo");
+ assertTrue(instance.isRunningInUnknownEnvironment());
}
public void testKnownValues()
@@ -52,8 +51,6 @@
private void setAndAssert(final String value)
{
- System.setProperty(RuntimeContext.GATEIN_RUNTIME_CONTEXT_PROP_NAME, value);
-
RuntimeContext instance = new RuntimeContext(value);
assertTrue(instance.isRunningIn(RuntimeContext.RunningEnvironment.valueOf(value)));
}
Show replies by date