deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject [3/3] git commit: DELTASPIKE-378 more unit tests for geProjectStageAwarePropertyValue
Date Fri, 07 Jun 2013 10:08:38 GMT
DELTASPIKE-378 more unit tests for geProjectStageAwarePropertyValue


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/96d9ec71
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/96d9ec71
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/96d9ec71

Branch: refs/heads/master
Commit: 96d9ec7160efc69388bceb746898ea47311dd5f8
Parents: 4ed338e
Author: Mark Struberg <struberg@apache.org>
Authored: Fri Jun 7 08:53:34 2013 +0200
Committer: Mark Struberg <struberg@apache.org>
Committed: Fri Jun 7 12:06:30 2013 +0200

----------------------------------------------------------------------
 .../test/api/config/ConfigResolverTest.java        |    8 ++++++++
 .../test/api/config/TestConfigSource.java          |    8 ++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/96d9ec71/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/config/ConfigResolverTest.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/config/ConfigResolverTest.java
b/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/config/ConfigResolverTest.java
index 70c00e8..91ebb22 100644
--- a/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/config/ConfigResolverTest.java
+++ b/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/config/ConfigResolverTest.java
@@ -58,6 +58,14 @@ public class ConfigResolverTest
     {
         ProjectStageProducer.setProjectStage(ProjectStage.UnitTest);
         Assert.assertNull(ConfigResolver.getProjectStageAwarePropertyValue("notexisting",
null));
+
+        Assert.assertEquals("testvalue", ConfigResolver.getPropertyValue("testkey", null));
         Assert.assertEquals("unittestvalue", ConfigResolver.getProjectStageAwarePropertyValue("testkey",
null));
+
+        Assert.assertEquals("testvalue", ConfigResolver.getPropertyValue("testkey2", null));
+        Assert.assertEquals("testvalue", ConfigResolver.getProjectStageAwarePropertyValue("testkey2",
null));
+
+        Assert.assertEquals("testvalue", ConfigResolver.getPropertyValue("testkey3", null));
+        Assert.assertEquals("", ConfigResolver.getProjectStageAwarePropertyValue("testkey3",
null));
     }
 }

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/96d9ec71/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/config/TestConfigSource.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/config/TestConfigSource.java
b/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/config/TestConfigSource.java
index ed9dc86..e9e066f 100644
--- a/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/config/TestConfigSource.java
+++ b/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/config/TestConfigSource.java
@@ -38,8 +38,16 @@ public class TestConfigSource implements ConfigSource
 
     public TestConfigSource()
     {
+        // a ProjectStage overloaded value
         props.put("testkey", "testvalue");
         props.put("testkey.UnitTest", "unittestvalue");
+
+        // a value without any overloading
+        props.put("testkey2", "testvalue");
+
+        // a value which got ProjectStage overloaded to an empty value
+        props.put("testkey3", "testvalue");
+        props.put("testkey3.UnitTest", "");
     }
 
     @Override


Mime
View raw message