[asterisk-scf-commits] asterisk-scf/release/ice-util-cpp.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu Sep 29 14:45:00 CDT 2011


branch "master" has been updated
       via  a92c362e79a13611485a666b656e8a3ea3b60500 (commit)
      from  efa46708b13689012282a678cb3501c4a7f6037d (commit)

Summary of changes:
 test/Component/ComponentTest.cpp |    8 +++++---
 test/UtilityTests.cpp            |    2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)


- Log -----------------------------------------------------------------
commit a92c362e79a13611485a666b656e8a3ea3b60500
Author: David M. Lee <dlee at digium.com>
Date:   Thu Sep 29 14:44:25 2011 -0500

    Use getBooleanPropertyValueWithDefault for consistency

diff --git a/test/Component/ComponentTest.cpp b/test/Component/ComponentTest.cpp
index 6ecc91f..680143c 100644
--- a/test/Component/ComponentTest.cpp
+++ b/test/Component/ComponentTest.cpp
@@ -25,6 +25,7 @@
 #include <IceBox/IceBox.h>
 #include <IceUtil/UUID.h>
 
+#include <AsteriskSCF/Helpers/PropertyHelper.h>
 #include <AsteriskSCF/Testing/IceBoxBoostTest.h>
 #include <AsteriskSCF/System/Component/ComponentServiceIf.h>
 #include <AsteriskSCF/System/Component/ReplicaIf.h>
@@ -33,6 +34,7 @@
 #include "ComponentTestIf.h"
 
 using namespace std;
+using namespace AsteriskSCF;
 using namespace AsteriskSCF::ComponentTest;
 using namespace AsteriskSCF::System::Component::V1;
 using namespace AsteriskSCF::Core::Discovery::V1;
@@ -236,9 +238,9 @@ BOOST_AUTO_TEST_CASE(AccessTestFacet)
 {
     try
     {
-        string testProp = IceBoxTestEnv.communicator->getProperties()->getPropertyWithDefault(
-                                  "MockComponent.ComponentTest", "no");
-        bool hasTestFacet = boost::iequals(testProp,"yes") || boost::iequals(testProp,"true");
+        bool hasTestFacet = getBooleanPropertyValueWithDefault(
+            IceBoxTestEnv.communicator->getProperties(),
+            "MockComponent.ComponentTest", false);
 
         if (!hasTestFacet)
         {
diff --git a/test/UtilityTests.cpp b/test/UtilityTests.cpp
index b3bf3ec..5243613 100644
--- a/test/UtilityTests.cpp
+++ b/test/UtilityTests.cpp
@@ -81,7 +81,7 @@ public:
             }
         }
 
-        if (mCommunicator->getProperties()->getPropertyWithDefault("AsteriskSCF.Test.Continue", "no") == "no")
+        if (!getBooleanPropertyValueWithDefault(mCommunicator->getProperties(), "AsteriskSCF.Test.Continue", false))
         {
             try
             {

-----------------------------------------------------------------------


-- 
asterisk-scf/release/ice-util-cpp.git



More information about the asterisk-scf-commits mailing list