[mapguide-commits] r9677 - in trunk/MgDev: . Common/Foundation Common/Foundation/Data Common/Geometry Common/PlatformBase Common/PlatformBase/Services Desktop Desktop/DesktopUnmanagedApi Desktop/DesktopUnmanagedApi/MapGuideApi Desktop/MgDesktop Desktop/MgDesktop/Services/Rendering Desktop/UnitTest Oem Server/src/Core Server/src/UnitTesting cmake/modules

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Jul 21 02:28:12 PDT 2020


Author: jng
Date: 2020-07-21 02:28:07 -0700 (Tue, 21 Jul 2020)
New Revision: 9677

Added:
   trunk/MgDev/Common/Foundation/Data/LinuxNumericalConstants.cpp
   trunk/MgDev/Common/Geometry/LinuxNumericalConstants.cpp
   trunk/MgDev/Common/PlatformBase/LinuxNumericalConstants.cpp
   trunk/MgDev/Desktop/UnitTest/CatchHelperMacros.h
   trunk/MgDev/Desktop/UnitTest/TestServiceFactory.cpp
   trunk/MgDev/Desktop/UnitTest/TestServiceFactory.h
   trunk/MgDev/Oem/catch2/
   trunk/MgDev/Server/src/UnitTesting/CatchHelperMacros.h
   trunk/MgDev/Server/src/UnitTesting/TestServiceFactory.cpp
   trunk/MgDev/Server/src/UnitTesting/TestServiceFactory.h
Removed:
   trunk/MgDev/Common/PlatformBase/Services/OrderingOption.cpp
   trunk/MgDev/Desktop/UnitTest/TestFeatureService.h
   trunk/MgDev/Desktop/UnitTest/TestKmlService.h
   trunk/MgDev/Desktop/UnitTest/TestLogManager.h
   trunk/MgDev/Desktop/UnitTest/TestMappingService.h
   trunk/MgDev/Desktop/UnitTest/TestPerformance.h
   trunk/MgDev/Desktop/UnitTest/TestProfilingService.h
   trunk/MgDev/Desktop/UnitTest/TestRenderingService.h
   trunk/MgDev/Desktop/UnitTest/TestResourceService.h
   trunk/MgDev/Desktop/UnitTest/TestTileService.h
   trunk/MgDev/Server/src/UnitTesting/CppUnitExtensions.h
   trunk/MgDev/Server/src/UnitTesting/TestCoordinateSystem.h
   trunk/MgDev/Server/src/UnitTesting/TestDrawingService.h
   trunk/MgDev/Server/src/UnitTesting/TestFeatureService.h
   trunk/MgDev/Server/src/UnitTesting/TestGeometry.h
   trunk/MgDev/Server/src/UnitTesting/TestKmlService.h
   trunk/MgDev/Server/src/UnitTesting/TestLogManager.h
   trunk/MgDev/Server/src/UnitTesting/TestMappingService.h
   trunk/MgDev/Server/src/UnitTesting/TestMdfModel.h
   trunk/MgDev/Server/src/UnitTesting/TestMisc.h
   trunk/MgDev/Server/src/UnitTesting/TestPerformance.h
   trunk/MgDev/Server/src/UnitTesting/TestProfilingService.h
   trunk/MgDev/Server/src/UnitTesting/TestRenderingService.h
   trunk/MgDev/Server/src/UnitTesting/TestResourceService.h
   trunk/MgDev/Server/src/UnitTesting/TestServerAdminService.h
   trunk/MgDev/Server/src/UnitTesting/TestServerManager.h
   trunk/MgDev/Server/src/UnitTesting/TestServiceManager.h
   trunk/MgDev/Server/src/UnitTesting/TestSiteManager.h
   trunk/MgDev/Server/src/UnitTesting/TestSiteService.h
   trunk/MgDev/Server/src/UnitTesting/TestTileService.h
   trunk/MgDev/Server/src/UnitTesting/TestTransformMesh.h
Modified:
   trunk/MgDev/
   trunk/MgDev/CMakeLists.txt
   trunk/MgDev/Common/Foundation/FoundationBuild.cpp
   trunk/MgDev/Common/Geometry/GeometricEntityType.h
   trunk/MgDev/Common/Geometry/GeometryBuild.cpp
   trunk/MgDev/Common/PlatformBase/PlatformBaseBuild.cpp
   trunk/MgDev/Desktop/
   trunk/MgDev/Desktop/DesktopUnmanagedApi/
   trunk/MgDev/Desktop/DesktopUnmanagedApi/MapGuideApi/Constants.xml
   trunk/MgDev/Desktop/DesktopUnmanagedApi/MapGuideApi/MapGuideApiGen.xml
   trunk/MgDev/Desktop/MgDesktop/MgDesktop.h
   trunk/MgDev/Desktop/MgDesktop/MgDesktop.vcxproj
   trunk/MgDev/Desktop/MgDesktop/Services/Rendering/RSMgFeatureReader.cpp
   trunk/MgDev/Desktop/MgDesktop/Services/Rendering/RSMgFeatureReader.h
   trunk/MgDev/Desktop/UnitTest/CMakeLists.txt
   trunk/MgDev/Desktop/UnitTest/TestFeatureService.cpp
   trunk/MgDev/Desktop/UnitTest/TestKmlService.cpp
   trunk/MgDev/Desktop/UnitTest/TestLogManager.cpp
   trunk/MgDev/Desktop/UnitTest/TestLogManagerThread.cpp
   trunk/MgDev/Desktop/UnitTest/TestMappingService.cpp
   trunk/MgDev/Desktop/UnitTest/TestPerformance.cpp
   trunk/MgDev/Desktop/UnitTest/TestProfilingService.cpp
   trunk/MgDev/Desktop/UnitTest/TestRenderingService.cpp
   trunk/MgDev/Desktop/UnitTest/TestResourceService.cpp
   trunk/MgDev/Desktop/UnitTest/TestTileService.cpp
   trunk/MgDev/Desktop/UnitTest/UnitTest.vcxproj
   trunk/MgDev/Desktop/UnitTest/UnitTest.vcxproj.filters
   trunk/MgDev/Desktop/UnitTest/main.cpp
   trunk/MgDev/Server/src/Core/TestCommand.cpp
   trunk/MgDev/Server/src/UnitTesting/CMakeLists.txt
   trunk/MgDev/Server/src/UnitTesting/TestCoordinateSystem.cpp
   trunk/MgDev/Server/src/UnitTesting/TestDrawingService.cpp
   trunk/MgDev/Server/src/UnitTesting/TestFeatureService.cpp
   trunk/MgDev/Server/src/UnitTesting/TestGeometry.cpp
   trunk/MgDev/Server/src/UnitTesting/TestKmlService.cpp
   trunk/MgDev/Server/src/UnitTesting/TestLogManager.cpp
   trunk/MgDev/Server/src/UnitTesting/TestLogManagerThread.cpp
   trunk/MgDev/Server/src/UnitTesting/TestMappingService.cpp
   trunk/MgDev/Server/src/UnitTesting/TestMdfModel.cpp
   trunk/MgDev/Server/src/UnitTesting/TestMisc.cpp
   trunk/MgDev/Server/src/UnitTesting/TestPerformance.cpp
   trunk/MgDev/Server/src/UnitTesting/TestProfilingService.cpp
   trunk/MgDev/Server/src/UnitTesting/TestRenderingService.cpp
   trunk/MgDev/Server/src/UnitTesting/TestResourceService.cpp
   trunk/MgDev/Server/src/UnitTesting/TestServerAdminService.cpp
   trunk/MgDev/Server/src/UnitTesting/TestServerManager.cpp
   trunk/MgDev/Server/src/UnitTesting/TestServiceManager.cpp
   trunk/MgDev/Server/src/UnitTesting/TestSiteManager.cpp
   trunk/MgDev/Server/src/UnitTesting/TestSiteService.cpp
   trunk/MgDev/Server/src/UnitTesting/TestTileService.cpp
   trunk/MgDev/Server/src/UnitTesting/TestTransformMesh.cpp
   trunk/MgDev/Server/src/UnitTesting/UnitTesting.cpp
   trunk/MgDev/Server/src/UnitTesting/UnitTesting.vcxproj
   trunk/MgDev/cmake/modules/FindMapGuideThirdparty.cmake
Log:
Merged revision(s) 9649-9676 from sandbox/jng/catch2: Implement MapGuide RFC 180 - Migrate from cppunit to catch2


Index: trunk/MgDev
===================================================================
--- trunk/MgDev	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev	2020-07-21 09:28:07 UTC (rev 9677)

Property changes on: trunk/MgDev
___________________________________________________________________
Modified: svn:mergeinfo
## -8,6 +8,7 ##
 /sandbox/adsk/3.1n:8871,8895,8901,8912-8913,8921-8922,8942,9019-9020,9486
 /sandbox/adsk/3.2o.AIMS:9135-9140,9146
 /sandbox/adsk/3.2p:9254
+/sandbox/jng/catch2:9649-9676
 /sandbox/jng/clean_json:8818-9180
 /sandbox/jng/cmake_v2:9259-9317
 /sandbox/jng/cmdline:9199-9217
Modified: trunk/MgDev/CMakeLists.txt
===================================================================
--- trunk/MgDev/CMakeLists.txt	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/CMakeLists.txt	2020-07-21 09:28:07 UTC (rev 9677)
@@ -42,7 +42,6 @@
 endif ((NOT MG_CPU EQUAL 32) AND (NOT MG_CPU EQUAL 64))
 
 #message(STATUS "INTERNAL_ACE = ${INTERNAL_ACE}")
-#message(STATUS "INTERNAL_CPPUNIT = ${INTERNAL_CPPUNIT}")
 #message(STATUS "INTERNAL_ZLIB = ${INTERNAL_ZLIB}")
 #message(STATUS "INTERNAL_LIBPNG = ${INTERNAL_LIBPNG}")
 #message(STATUS "INTERNAL_JPEG = ${INTERNAL_JPEG}")
@@ -83,6 +82,7 @@
 set(MG_OEM_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Oem")
 set(MG_OEM_ROOT_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/Oem")
 
+set(MG_OEM_CATCH2_INCLUDE_DIR "${MG_OEM_ROOT_DIR}/catch2")
 set(MG_OEM_CSMAP_INCLUDE_DIR "${MG_OEM_ROOT_DIR}/CsMap/CsMapDev/Include")
 set(MG_OEM_AGG_DIR "${MG_OEM_ROOT_DIR}/agg-2.4")
 set(MG_OEM_AGG_INCLUDE_DIR "${MG_OEM_AGG_DIR}/include")

Copied: trunk/MgDev/Common/Foundation/Data/LinuxNumericalConstants.cpp (from rev 9676, sandbox/jng/catch2/Common/Foundation/Data/LinuxNumericalConstants.cpp)
===================================================================
--- trunk/MgDev/Common/Foundation/Data/LinuxNumericalConstants.cpp	                        (rev 0)
+++ trunk/MgDev/Common/Foundation/Data/LinuxNumericalConstants.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -0,0 +1,45 @@
+//
+//  Copyright (C) 2004-2011 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+// Linux-specific TU to ensure static int constants are defined as actual symbols
+// in the final library
+
+#include "FeaturePropertyType.h"
+#include "PropertyType.h"
+
+const int MgFeaturePropertyType::DataProperty;
+const int MgFeaturePropertyType::ObjectProperty;
+const int MgFeaturePropertyType::GeometricProperty;
+const int MgFeaturePropertyType::AssociationProperty;
+const int MgFeaturePropertyType::RasterProperty;
+
+const int MgPropertyType::Null;
+const int MgPropertyType::Boolean;
+const int MgPropertyType::Byte;
+const int MgPropertyType::DateTime;
+const int MgPropertyType::Single;
+const int MgPropertyType::Double;
+const int MgPropertyType::Int16;
+const int MgPropertyType::Int32;
+const int MgPropertyType::Int64;
+const int MgPropertyType::String;
+const int MgPropertyType::Blob;
+const int MgPropertyType::Clob;
+const int MgPropertyType::Feature;
+const int MgPropertyType::Geometry;
+const int MgPropertyType::Raster;
+const int MgPropertyType::Decimal;
\ No newline at end of file

Modified: trunk/MgDev/Common/Foundation/FoundationBuild.cpp
===================================================================
--- trunk/MgDev/Common/Foundation/FoundationBuild.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Common/Foundation/FoundationBuild.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -33,6 +33,9 @@
 #include "Data/PropertyDefinition.cpp"
 #include "Data/StringCollection.cpp"
 #include "Data/StringProperty.cpp"
+#ifndef _WIN32
+#include "Data/LinuxNumericalConstants.cpp"
+#endif
 
 #include "Exception/ApplicationException.cpp"
 #include "Exception/ArgumentOutOfRangeException.cpp"

Modified: trunk/MgDev/Common/Geometry/GeometricEntityType.h
===================================================================
--- trunk/MgDev/Common/Geometry/GeometricEntityType.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Common/Geometry/GeometricEntityType.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -23,7 +23,7 @@
 /// \brief
 /// MgGeometryEntityType defines two integer constants which
 /// signify whether an MgGeometricEntity is a geometry or a
-/// geometry ciomponent.
+/// geometry component.
 ///
 class MgGeometryEntityType
 {

Modified: trunk/MgDev/Common/Geometry/GeometryBuild.cpp
===================================================================
--- trunk/MgDev/Common/Geometry/GeometryBuild.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Common/Geometry/GeometryBuild.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -111,6 +111,7 @@
     #include "Parse/yyAwkt.cpp"
 #else
     #include "Parse/yyAwkt_linux.cpp"
+    #include "LinuxNumericalConstants.cpp"
 #endif
 
 #include "Spatial/MathUtility.cpp"

Copied: trunk/MgDev/Common/Geometry/LinuxNumericalConstants.cpp (from rev 9676, sandbox/jng/catch2/Common/Geometry/LinuxNumericalConstants.cpp)
===================================================================
--- trunk/MgDev/Common/Geometry/LinuxNumericalConstants.cpp	                        (rev 0)
+++ trunk/MgDev/Common/Geometry/LinuxNumericalConstants.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -0,0 +1,2263 @@
+//
+//  Copyright (C) 2004-2011 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+// Linux-specific TU to ensure static int constants are defined as actual symbols
+// in the final library
+
+#include "CoordinateSystem/CoordinateSystemCodeFormat.h"
+#include "CoordinateSystem/CoordinateSystemErrorCode.h"
+#include "CoordinateSystem/CoordinateSystemGeodeticAnalyticalTransformationMethod.h"
+#include "CoordinateSystem/CoordinateSystemGeodeticDirection.h"
+#include "CoordinateSystem/CoordinateSystemGeodeticMultipleRegressionTransformationMethod.h"
+#include "CoordinateSystem/CoordinateSystemGeodeticStandaloneTransformationMethod.h"
+#include "CoordinateSystem/CoordinateSystemGeodeticTransformationMethod.h"
+#include "CoordinateSystem/CoordinateSystemGeodeticTransformDefType.h"
+#include "CoordinateSystem/CoordinateSystemGeodeticTransformGridFileFormat.h"
+#include "CoordinateSystem/CoordinateSystemGridOrientation.h"
+#include "CoordinateSystem/CoordinateSystemGridSpecializationType.h"
+#include "CoordinateSystem/CoordinateSystemMgrsGridLevel.h"
+#include "CoordinateSystem/CoordinateSystemMgrsGridSquarePosition.h"
+#include "CoordinateSystem/CoordinateSystemMgrsLetteringScheme.h"
+#include "CoordinateSystem/CoordinateSystemProjectionCode.h"
+#include "CoordinateSystem/CoordinateSystemProjectionFormatType.h"
+#include "CoordinateSystem/CoordinateSystemProjectionLogicalType.h"
+#include "CoordinateSystem/CoordinateSystemProjectionParameterType.h"
+#include "CoordinateSystem/CoordinateSystemType.h"
+#include "CoordinateSystem/CoordinateSystemUnitCode.h"
+#include "CoordinateSystem/CoordinateSystemUnitType.h"
+
+#include "GeometricEntityType.h"
+#include "GeometryComponentType.h"
+#include "GeometrySimplificationAlgorithmType.h"
+#include "GeometryType.h"
+
+///////////////////////////////////////////////////////////////
+/// \brief
+/// Mentor/CS-Map flavor
+///
+const INT32 MgCoordinateSystemCodeFormat::Mentor;
+///////////////////////////////////////////////////////////////
+/// \brief
+/// EPSG flavor
+///
+const INT32 MgCoordinateSystemCodeFormat::Epsg;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Y axis azimuth specification is invalid.
+///
+const INT32 MgCoordinateSystemErrorCode::AZM;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Great circle azimuth value is invalid.
+///
+const INT32 MgCoordinateSystemErrorCode::AZMTH;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Invalid latitude detected in definition.
+///
+const INT32 MgCoordinateSystemErrorCode::LAT;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Latitudes of defining points are equal.
+///
+const INT32 MgCoordinateSystemErrorCode::LATEQU;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Invalid longitude detected in definition.
+///
+const INT32 MgCoordinateSystemErrorCode::LNG;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// First defining point may not be on the equator.
+///
+const INT32 MgCoordinateSystemErrorCode::LNGEQU;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Invalid map scale value detected.
+///
+const INT32 MgCoordinateSystemErrorCode::MAPSCL;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Standard meridians are the same.
+///
+const INT32 MgCoordinateSystemErrorCode::MEREQU;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Defining great circle is a parallel, try Mercator.
+///
+const INT32 MgCoordinateSystemErrorCode::MRCAT;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Invalid coefficient value specified.
+///
+const INT32 MgCoordinateSystemErrorCode::MSCOEF;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// System must be referenced to a datum or an ellipsoid.
+///
+const INT32 MgCoordinateSystemErrorCode::NOREF;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Standard paralells are not ordered correctly.
+///
+const INT32 MgCoordinateSystemErrorCode::NOTNRTH;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Standard parallells are not ordered correctly.
+///
+const INT32 MgCoordinateSystemErrorCode::NRTHLAT;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Point defining Y axis direction incorrectly specified.
+///
+const INT32 MgCoordinateSystemErrorCode::NRTHPNT;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Invalid latitude value given for projection origin.
+///
+const INT32 MgCoordinateSystemErrorCode::ORGLAT;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Invalid longitude value given for projection origin.
+///
+const INT32 MgCoordinateSystemErrorCode::ORGLNG;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Standard parallel location exceeds 90 degrees.
+///
+const INT32 MgCoordinateSystemErrorCode::PLL90;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Standard parallel locations are the same.
+///
+const INT32 MgCoordinateSystemErrorCode::PLLEQU;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Standard parallel locations not inbetween poles.
+///
+const INT32 MgCoordinateSystemErrorCode::PLLLRG;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Order of standard parallels incorrect.
+///
+const INT32 MgCoordinateSystemErrorCode::PLLREV;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Standard parallel location is zero.
+///
+const INT32 MgCoordinateSystemErrorCode::PLLZERO;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Poles are too far apart.
+///
+const INT32 MgCoordinateSystemErrorCode::POLDD;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Poles are not sufficiently separated.
+///
+const INT32 MgCoordinateSystemErrorCode::POLDUP;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Latitude of pole incorrectly specified.
+///
+const INT32 MgCoordinateSystemErrorCode::POLLAT;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Longitude of pole incorrectly specified.
+///
+const INT32 MgCoordinateSystemErrorCode::POLLNG;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Invalid quad specification detected.
+///
+const INT32 MgCoordinateSystemErrorCode::QUAD;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Invalid scale reduction value encountered.
+///
+const INT32 MgCoordinateSystemErrorCode::SCLRED;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Standard parallels are not ordered correctly.
+///
+const INT32 MgCoordinateSystemErrorCode::SOTHLAT;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Standard parallel is incorrectly specified.
+///
+const INT32 MgCoordinateSystemErrorCode::STDLAT;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Standard meridian specification is invalid.
+///
+const INT32 MgCoordinateSystemErrorCode::STDLNG;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Standard parallel specifications are invalid.
+///
+const INT32 MgCoordinateSystemErrorCode::STDPLL;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Southern parallel is equal to or north of northern.
+///
+const INT32 MgCoordinateSystemErrorCode::STDSOU;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Standard meridian must be east of the central meridian.
+///
+const INT32 MgCoordinateSystemErrorCode::STDWEST;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Invalid unit specification detected.
+///
+const INT32 MgCoordinateSystemErrorCode::UNIT;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Invalid projection key name detected.
+///
+const INT32 MgCoordinateSystemErrorCode::INVPRJ;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Invalid datum name specification detected.
+///
+const INT32 MgCoordinateSystemErrorCode::INVDTM;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Invalid ellipsoid name specification detected.
+///
+const INT32 MgCoordinateSystemErrorCode::INVELP;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Longitude range is too small.
+///
+const INT32 MgCoordinateSystemErrorCode::LLRNG;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Longitude range values out of order.
+///
+const INT32 MgCoordinateSystemErrorCode::RNGORD;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Invalid quadrant specification given.
+///
+const INT32 MgCoordinateSystemErrorCode::INVQUAD;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Invalid invalid geographic useful range detected.
+///
+const INT32 MgCoordinateSystemErrorCode::GEOMM;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Invalid invalid cartesian useful range detected.
+///
+const INT32 MgCoordinateSystemErrorCode::CRTMM;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Standard parallels must be equidistant from poles.
+///
+const INT32 MgCoordinateSystemErrorCode::PLLED;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Origin latitude is not polar; use oblique form of projection.
+///
+const INT32 MgCoordinateSystemErrorCode::PLRLAT;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Origin latitude is polar; use polar form of projection.
+///
+const INT32 MgCoordinateSystemErrorCode::USEPLR;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Invalid value given for UTM zone number.
+///
+const INT32 MgCoordinateSystemErrorCode::UTMZON;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Invalid hemisphere specification (+1 = north, -1 = south).
+///
+const INT32 MgCoordinateSystemErrorCode::HMISPHR;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Central azimuth is 90, use the Swiss Oblique Mercator.
+///
+const INT32 MgCoordinateSystemErrorCode::USESW;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Eastern meridian is more than 15 degrees from the central meridian.
+///
+const INT32 MgCoordinateSystemErrorCode::MAX15;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Invalid oblique pole specification.
+///
+const INT32 MgCoordinateSystemErrorCode::OBLQPOLE;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Denominator of affine is zero.
+///
+const INT32 MgCoordinateSystemErrorCode::AFFZERO;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Non-earth system referenced to a datum.
+///
+const INT32 MgCoordinateSystemErrorCode::NRDATUM;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// OSTN97.TXT grid shift file could not be located or opened with read access.
+///
+const INT32 MgCoordinateSystemErrorCode::OSTN97;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Invalid region code specified for Danish System 34/45 (1=J, 2=S, 3=B).
+///
+const INT32 MgCoordinateSystemErrorCode::DENRGN;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Value supplied for elevated ellipsoid is outside acceptable range
+///
+const INT32 MgCoordinateSystemErrorCode::ELEVEL;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// OSTN02.TXT grid shift file could not be located or opened with read access.
+///
+const INT32 MgCoordinateSystemErrorCode::OSTN02;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Transverse Mercator Kruger formulation requested with non-zero origin latitude.
+///
+const INT32 MgCoordinateSystemErrorCode::TMKRG0;    
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// The operation succeeded
+///
+const INT32 MgCoordinateSystemErrorCode::Ok;
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// The operation ran out of memory
+///
+const INT32 MgCoordinateSystemErrorCode::OutOfMemory;
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// An initialization operation failed 
+///
+const INT32 MgCoordinateSystemErrorCode::InitializationFailed;
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// A conversion operation failed
+///
+const INT32 MgCoordinateSystemErrorCode::ConversionFailed;
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// An argument supplied to an operation was null
+///
+const INT32 MgCoordinateSystemErrorCode::NullArgument;
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// An argument supplied to an operation was invalid
+///
+const INT32 MgCoordinateSystemErrorCode::InvalidArgument;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// None
+///
+const INT32 MgCoordinateSystemGeodeticAnalyticalTransformationMethod::None;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Three Parameter
+///
+const INT32 MgCoordinateSystemGeodeticAnalyticalTransformationMethod::ThreeParameter;     //cs_DTCMTH_3PARM
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Molodensky
+///
+const INT32 MgCoordinateSystemGeodeticAnalyticalTransformationMethod::Molodensky;     //cs_DTCMTH_MOLOD
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Abridged Molodensky
+///
+const INT32 MgCoordinateSystemGeodeticAnalyticalTransformationMethod::AbridgedMolodensky;     //cs_DTCMTH_AMOLO
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Geocentric
+///
+const INT32 MgCoordinateSystemGeodeticAnalyticalTransformationMethod::Geocentric;     //cs_DTCMTH_GEOCT
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Four Parameter
+///
+const INT32 MgCoordinateSystemGeodeticAnalyticalTransformationMethod::FourParameter;     //cs_DTCMTH_4PARM
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Six Parameter
+///
+const INT32 MgCoordinateSystemGeodeticAnalyticalTransformationMethod::SixParameter;     //cs_DTCMTH_6PARM
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Bursa
+///
+const INT32 MgCoordinateSystemGeodeticAnalyticalTransformationMethod::Bursa;     //cs_DTCMTH_BURSA
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Frame
+///
+const INT32 MgCoordinateSystemGeodeticAnalyticalTransformationMethod::Frame;     //cs_DTCMTH_FRAME
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Seven Parameter
+///
+const INT32 MgCoordinateSystemGeodeticAnalyticalTransformationMethod::SevenParameter;     //cs_DTCMTH_7PARM
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Molodensky Badekas
+///
+const INT32 MgCoordinateSystemGeodeticAnalyticalTransformationMethod::MolodenskyBadekas;     //cs_DTCMTH_BDKAS
+
+
+///////////////////////////////////////////////////////////////
+/// \brief
+/// Direction not been specified.  This appears when the
+/// direction member has not bee set, or in the case where
+/// direction is not applicable, such as when the
+/// is the null transformation.
+const INT32 MgCoordinateSystemGeodeticDirection::GeodeticDirectionNone;
+
+///////////////////////////////////////////////////////////////
+/// \brief
+/// Forward direction, the calculation the geodetic
+/// transformation definitions natural calculation.
+/// I.e. conversion from the definition's "source" datum to the
+/// "target" datum.
+const INT32 MgCoordinateSystemGeodeticDirection::GeodeticDirectionForward;
+
+///////////////////////////////////////////////////////////////
+/// \brief
+/// Inverse direction, i.e. conversion from the definition's
+/// "target" datum to the "source" datum.  Often inmplies an
+/// iterative technique using the forward technique as the
+/// estimator.
+const INT32 MgCoordinateSystemGeodeticDirection::GeodeticDirectionInverse;
+
+///////////////////////////////////////////////////////////////
+/// \brief
+/// Use this value to indicate an error condition of some sort;
+/// especially useful when this type is the return value of a
+/// function.
+const INT32 MgCoordinateSystemGeodeticDirection::GeodeticDirectionError;
+
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+///  None 
+///
+const INT32 MgCoordinateSystemGeodeticMultipleRegressionTransformationMethod::None;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+///  Multiple Regression
+///
+const INT32 MgCoordinateSystemGeodeticMultipleRegressionTransformationMethod::MultipleRegression; //cs_DTCMTH_MULRG
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+///  General Polynomial EPSG 
+///
+const INT32 MgCoordinateSystemGeodeticMultipleRegressionTransformationMethod::GeneralPolynomialEpsg; //cs_DTCMTH_PLYNM
+
+
+////////////////////////////////////////////////////////////////
+/// \brief
+/// Default constant available for programming convenience only. No specific
+/// geodetic transformation can be created from this constant.
+const INT32 MgCoordinateSystemGeodeticStandaloneTransformationMethod::None;
+
+////////////////////////////////////////////////////////////////
+/// \brief
+/// Describes a geodetic transformation that is actually a NOOP, i.e.
+/// the 2 datums to be transformed between are considered equal.
+const INT32 MgCoordinateSystemGeodeticStandaloneTransformationMethod::NullX; //cs_DTCMTH_NULLX
+
+////////////////////////////////////////////////////////////////
+/// \brief
+/// Describes the WGS72 to WGS84 geodetic transformation as published by the DMA (DMA TR 8350.2-B).
+/// All required parameters are known and built-in.
+const INT32 MgCoordinateSystemGeodeticStandaloneTransformationMethod::Wgs72; //cs_DTCMTH_WGS72
+
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// None
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::None;
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Use the Molodensky transformation to convert to WGS84
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::Molodensky;      
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Use the Multiple Regression Transformation formulas.
+/// If such a definition is not available, default to the
+/// Bursa/Wolfe Seven Parameter Transformation.
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::MReg;            
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Use the Bursa/Wolfe to convert to WGS84, default to
+/// Molodensky if the necessary parameters are not present.
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::Bursa;           
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Use the NADCON or Canadian National Transformation
+/// emulation as appropriate to convert to NAD83, and
+/// consider the result to be WGS84 coordinates.
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::NAD27;           
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Consider the coordinates to be WGS84 coordinates already, no shift is to be performed.
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::NAD83;           
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// The coordinates are WGS84 coordinates already, no datum shift is required
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::WGS84;           
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Use an internal formula to convert to WGS84
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::WGS72;           
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Use the NADCOM algorithm, but use the HPGN data
+/// files, to shift the coordinates to NAD83, then
+/// consider the result to be WGS84 coordinates
+/// without any further datum shift
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::HPGN;            
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Seven Parameter Transformation
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::SevenParameter;  
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// AGD66<->GDA94 via Grid Files
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::AGD66;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Three Parameter Transformation - Obsolete technique that is kept around for backward compatibility
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::ThreeParameter; 
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Six Parameter Transformation
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::SixParameter;   
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Four Parameter Transformation
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::FourParameter;  
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// AGD84<->GDA94 via Grid Files
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::AGD84;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// NZGD49<->NZGD2K via Grid File
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::NZGD49;         
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// ATS77<->NAD83 via Grid Files
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::ATS77;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Is GDA94, no shift required.
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::GDA94;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Is NZGD2000, no shift required.
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::NZGD2K;         
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// NAD83<->CSRS Via Grid Files.
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::CSRS;           
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// TOKYO<->JGD2k via Grid Files
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::TOKYO;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// NTF<->RGF93 via Grid File
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::RGF93;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// ED50 <--> ETRF89 via Grid Files
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::ED50;           
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// DHDN<->ETRF89 via Grid Files
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::DHDN;           
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Is ETRF89, no shift required
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::ETRF89;         
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Local Geodetic Reference System
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::Lclgrf;         
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Geocentric Translation
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::Geocentric;     
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Swiss Ch1903 to CH1903+
+///
+const INT32 MgCoordinateSystemGeodeticTransformationMethod::CHENYX;
+
+
+///////////////////////////////////////////////////////////////
+/// \brief
+/// Default 0 constant available for programming convenience only. It does not
+/// describe a specific geodetic transformation type.
+const INT32 MgCoordinateSystemGeodeticTransformDefType::None;
+
+///////////////////////////////////////////////////////////////
+/// \brief
+/// The transformation definition describes a built-in transformation. That is, that
+/// transformation is well-known and cannot be parameterized because
+/// the information is available to the transformation engine.
+const INT32 MgCoordinateSystemGeodeticTransformDefType::Standalone;
+
+///////////////////////////////////////////////////////////////
+/// \brief
+/// The transformation definition describes an analytical transformation where
+/// the transformation between the source and the target datum is defined
+/// through a formular that's fed with up to 10 parameters.
+const INT32 MgCoordinateSystemGeodeticTransformDefType::Analytical;
+
+///////////////////////////////////////////////////////////////
+/// \brief
+/// The transformation definition describes a transformation that
+/// uses grid files to calculate the actual datum shift for a given
+/// coordinate by interpolating between given grid points.
+const INT32 MgCoordinateSystemGeodeticTransformDefType::Interpolation;
+
+///////////////////////////////////////////////////////////////
+/// \brief
+/// The transformation definition describes a transformation that
+/// uses a multiple regression calculation to perform the actual datum shift.
+const INT32 MgCoordinateSystemGeodeticTransformDefType::MultipleRegression;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// None
+///
+const INT32 MgCoordinateSystemGeodeticTransformGridFileFormat::None;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// NTv1
+///
+const INT32 MgCoordinateSystemGeodeticTransformGridFileFormat::NTv1;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// NTv2
+///
+const INT32 MgCoordinateSystemGeodeticTransformGridFileFormat::NTv2;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// NADCON
+///
+const INT32 MgCoordinateSystemGeodeticTransformGridFileFormat::NADCON;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// RGF
+///
+const INT32 MgCoordinateSystemGeodeticTransformGridFileFormat::RGF;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// PAR
+///
+const INT32 MgCoordinateSystemGeodeticTransformGridFileFormat::PAR;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// ATS77
+///
+const INT32 MgCoordinateSystemGeodeticTransformGridFileFormat::ATS77;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// GEOCON
+///
+const INT32 MgCoordinateSystemGeodeticTransformGridFileFormat::GEOCON;
+
+
+///////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Not specified yet, initialize to this value.
+const INT8 MgCoordinateSystemGridOrientation::None;
+///////////////////////////////////////////////////////////////////////////
+/// \brief
+/// The object represents a constant easting value.
+const INT8 MgCoordinateSystemGridOrientation::EastWest;         // generally indicates a vertical grid line
+///////////////////////////////////////////////////////////////////////////
+/// \brief
+/// The object represents a constant northing value.
+const INT8 MgCoordinateSystemGridOrientation::NorthSouth;       // generally indicates a horizontal grid line
+///////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Indicates the failure of an algorithm or other problem.
+const INT8 MgCoordinateSystemGridOrientation::Unknown;          // indicates a failure of an algorithm
+
+
+
+///////////////////////////////////////////////////////////////////////////
+/// \brief 
+/// Not specified yet, initialize to this value.
+///
+const INT32 MgCoordinateSystemGridSpecializationType::None;
+///////////////////////////////////////////////////////////////////////////
+/// \brief 
+/// Generic grid of a specified coordinate system; may be
+/// geographic or projected.
+///
+const INT32 MgCoordinateSystemGridSpecializationType::Generic;           // Generic grid of a specified coordinate system;
+                                                    // may be geographic or projected
+///////////////////////////////////////////////////////////////////////////
+/// \brief 
+/// Specialized grid: MGRS (Military Grid Reference System)
+///
+const INT32 MgCoordinateSystemGridSpecializationType::MGRS;
+///////////////////////////////////////////////////////////////////////////
+/// \brief 
+/// Specialized grid: USNG (United States National Grid)
+///
+const INT32 MgCoordinateSystemGridSpecializationType::USNG;
+///////////////////////////////////////////////////////////////////////////
+/// \brief 
+/// Indicates the failure of an algorithm or other problem.
+///
+const INT32 MgCoordinateSystemGridSpecializationType::Unknown;
+
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// None
+///
+const INT32 MgCoordinateSystemMgrsGridLevel::MgrsNone;
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// UTM
+///
+const INT32 MgCoordinateSystemMgrsGridLevel::MgrsUtm;
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// UPS
+///
+const INT32 MgCoordinateSystemMgrsGridLevel::MgrsUps;
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// 100km
+///
+const INT32 MgCoordinateSystemMgrsGridLevel::Mgrs100Km;
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// 10km
+///
+const INT32 MgCoordinateSystemMgrsGridLevel::Mgrs10Km;
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// 1km
+///
+const INT32 MgCoordinateSystemMgrsGridLevel::Mgrs1Km;
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// 100m
+///
+const INT32 MgCoordinateSystemMgrsGridLevel::Mgrs100m;
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// 10m
+///
+const INT32 MgCoordinateSystemMgrsGridLevel::Mgrs10m;
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// 1m
+///
+const INT32 MgCoordinateSystemMgrsGridLevel::Mgrs1m;
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Unknown 
+///
+const INT32 MgCoordinateSystemMgrsGridLevel::MgrsUnknown;
+
+
+///////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Specifies the grid square position is not set as yet.
+///
+const INT32 MgCoordinateSystemMgrsGridSquarePosition::None;
+/// \brief
+/// Specifies the center of the grid square; the default previous to this
+/// revision (Dec 2009).
+///
+const INT32 MgCoordinateSystemMgrsGridSquarePosition::Center;
+/// \brief
+/// Specifies the southwest corner of the MGRS grid square.
+///
+const INT32 MgCoordinateSystemMgrsGridSquarePosition::SouthWest;
+/// \brief
+/// Specifies the midpoint of the western edge of the MGRS grid square.
+///
+const INT32 MgCoordinateSystemMgrsGridSquarePosition::West;
+/// \brief
+/// Specifies the northwest corner of the MGRS grid square.
+///
+const INT32 MgCoordinateSystemMgrsGridSquarePosition::NorthWest;
+/// \brief
+/// Specifies the midpoint of the northern edge of the MGRS grid square.
+///
+const INT32 MgCoordinateSystemMgrsGridSquarePosition::North;
+/// \brief
+/// Specifies the southwest corner of the MGRS grid square.
+///
+const INT32 MgCoordinateSystemMgrsGridSquarePosition::NorthEast;
+/// \brief
+/// Specifies the midpoint of the eastern edge of the MGRS grid square.
+///
+const INT32 MgCoordinateSystemMgrsGridSquarePosition::East;
+/// \brief
+/// Specifies the southeast corner of the MGRS grid square.
+///
+const INT32 MgCoordinateSystemMgrsGridSquarePosition::SouthEast;
+/// \brief
+/// Specifies the midpoint of the southern edge of the MGRS grid square.
+///
+const INT32 MgCoordinateSystemMgrsGridSquarePosition::South;
+/// \brief
+/// Specifies an error return value, end of table, or other abnormal situation.
+///
+const INT32 MgCoordinateSystemMgrsGridSquarePosition::Unknown;
+
+
+
+///////////////////////////////////////////////////////////////
+/// \brief
+/// Normal
+///
+const INT8 MgCoordinateSystemMgrsLetteringScheme::Normal;
+///////////////////////////////////////////////////////////////
+/// \brief
+/// Alternative
+///
+const INT8 MgCoordinateSystemMgrsLetteringScheme::Alternative;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Albers Equal Area Conic Projection
+///
+const INT32 MgCoordinateSystemProjectionCode::Alber;           
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Azimuthal Equi-Distant; Elevated ellipsoid.
+///
+const INT32 MgCoordinateSystemProjectionCode::Azede;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Lambert Azimuthal Equal Area Projection
+///
+const INT32 MgCoordinateSystemProjectionCode::Azmea;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Lambert Azimuthal Equidistant Projection
+///
+const INT32 MgCoordinateSystemProjectionCode::Azmed;           
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Bipolar Oblique Conformal Conic Projection
+///
+const INT32 MgCoordinateSystemProjectionCode::Bipolar;        
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Bonne Pseudoconical Projection
+///
+const INT32 MgCoordinateSystemProjectionCode::Bonne;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Cassini Projection
+///
+const INT32 MgCoordinateSystemProjectionCode::Cassini;        
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Ekert Pseudocylindrical Projection; Number IV
+///
+const INT32 MgCoordinateSystemProjectionCode::Eckert4;        
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Ekert Pseudocylindrical Projection; Number VI
+///
+const INT32 MgCoordinateSystemProjectionCode::Eckert6;        
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Equidistant Conic Projection; aka Simple Conic
+///
+const INT32 MgCoordinateSystemProjectionCode::Edcnc;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Equidistant Cylindrical Projection (Spherical only)
+///
+const INT32 MgCoordinateSystemProjectionCode::Edcyl;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Gauss-Kruger: Transverse Mercator without scale reduction parameter.
+///
+const INT32 MgCoordinateSystemProjectionCode::GaussK;        
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Gnomonic Projection
+///
+const INT32 MgCoordinateSystemProjectionCode::Gnomonic;       
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Goode Homolosine Projection
+///
+const INT32 MgCoordinateSystemProjectionCode::Goode;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Unrectified Hotine Oblique Mercator Projection; Sngl Point Form
+///
+const INT32 MgCoordinateSystemProjectionCode::Hom1uv;       
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Rectified Hotine Oblique Mercator Projection; Single Point Form
+///
+const INT32 MgCoordinateSystemProjectionCode::Hom1xy;       
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Unrectified Hotine Oblique Mercator Projection; Two Point Form
+///
+const INT32 MgCoordinateSystemProjectionCode::Hom2uv;       
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Rectified Hotine Oblique Mercator Projection; Two Point Form
+///
+const INT32 MgCoordinateSystemProjectionCode::Hom2xy;       
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Czech Krovak; original.
+///
+const INT32 MgCoordinateSystemProjectionCode::Krovak;         
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Czech Krovak; includes 1995 adjustment.
+///
+const INT32 MgCoordinateSystemProjectionCode::Krvk95;         
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Null Projection; produces/processes Latitude and Longitude
+///
+const INT32 MgCoordinateSystemProjectionCode::LL;              
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Single standard parallel variation of the Lambert Conformal Conic.
+///
+const INT32 MgCoordinateSystemProjectionCode::Lm1sp;         
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Double standard parallel variation of the Lambert Conformal Conic.
+///
+const INT32 MgCoordinateSystemProjectionCode::Lm2sp;        
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Belgian variation of the Lambert Conformal Conic Projection.
+///
+const INT32 MgCoordinateSystemProjectionCode::Lmblg;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Lambert Tangential Conformal Conic Projection 
+///
+const INT32 MgCoordinateSystemProjectionCode::Lmtan;           
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Miller Cylindrical Projection
+///
+const INT32 MgCoordinateSystemProjectionCode::Miller;         
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Minnesota DOT variation of the Lambert Conformal Conic.
+///
+const INT32 MgCoordinateSystemProjectionCode::Mndotl;         
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Minnesota DOT variation of the Transverse Mercator projection.
+///
+const INT32 MgCoordinateSystemProjectionCode::Mndott;         
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Lallemand IMW Modified Polyconic Projection
+///
+const INT32 MgCoordinateSystemProjectionCode::Modpc;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Mollweide Projection
+///
+const INT32 MgCoordinateSystemProjectionCode::Mollweid;       
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Mercator Cylindrical Projection
+///
+const INT32 MgCoordinateSystemProjectionCode::Mrcat;           
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Standard Mercator with a scale reduction factor instead of a standard parallel.
+///
+const INT32 MgCoordinateSystemProjectionCode::MrcatK;         
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Modified Sterographic Projection
+///
+const INT32 MgCoordinateSystemProjectionCode::Mstero;         
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Normal Aspect; Equal Area Cylindrical Projection
+///
+const INT32 MgCoordinateSystemProjectionCode::Neacyl;         
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Non-georeferenced coordinate system.  Named Non-Earth by Map Info.
+///
+const INT32 MgCoordinateSystemProjectionCode::Nerth;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// New Zealand National Grid
+///
+const INT32 MgCoordinateSystemProjectionCode::Nzealand;       
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Oblique Mercator (obsolete)
+///
+const INT32 MgCoordinateSystemProjectionCode::OblqM;         
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Oblique Cylindrical; a generalized version of the Swiss projection; specifically for Hungary
+///
+const INT32 MgCoordinateSystemProjectionCode::Obqcyl;         
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Orthographic Projection
+///
+const INT32 MgCoordinateSystemProjectionCode::Ortho;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// The Transverse Mercator with specific parameters; with the OSTN02 grid shift tacked on.  This is a combination of a projection and a datum shift 
+///
+const INT32 MgCoordinateSystemProjectionCode::Ostn02;         
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// The Transverse Mercator with specific parameters; with the OSTN97 grid shoft tacked on.  This is a combination of a projection and a datum shift
+///
+const INT32 MgCoordinateSystemProjectionCode::Ostn97;         
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Oblique Sterographic
+///
+const INT32 MgCoordinateSystemProjectionCode::Ostro;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Hassler American Polyconic Projection
+///
+const INT32 MgCoordinateSystemProjectionCode::Plycn;           
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Polar sterographic
+///
+const INT32 MgCoordinateSystemProjectionCode::Pstro;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Polar sterographic with standard latitude
+///
+const INT32 MgCoordinateSystemProjectionCode::Pstrosl;        
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// cs_PRJCOD_RSKEW 
+///
+const INT32 MgCoordinateSystemProjectionCode::Rskew;        
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// cs_PRJCOD_RSKEWC
+///
+const INT32 MgCoordinateSystemProjectionCode::Rskewc;       
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// cs_PRJCOD_RSKEWO - Rectified Skew Orthomorphic; Skew Azimuth at Rectified Origin
+///
+const INT32 MgCoordinateSystemProjectionCode::Rskewo;       
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Robinson Cylindrical Projection
+///
+const INT32 MgCoordinateSystemProjectionCode::Robinson;       
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Sinusoidal Projection; Optionally Interrupted
+///
+const INT32 MgCoordinateSystemProjectionCode::Sinus;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// South Oriented variation of the Transverse Mercator Projection.
+///
+const INT32 MgCoordinateSystemProjectionCode::Sotrm;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Synder's Oblique Sterographic
+///
+const INT32 MgCoordinateSystemProjectionCode::Sstro;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// "Swiss" Projection
+///
+const INT32 MgCoordinateSystemProjectionCode::Swiss;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Combination of Transverse Mercator and a polynomial expansion used in Denmark
+///
+const INT32 MgCoordinateSystemProjectionCode::Sys34;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Combination of Transverse Mercator and polynomial expansion used in Denmark.  Polynominals are of the 1999 vintage.
+///
+const INT32 MgCoordinateSystemProjectionCode::Sys34_99;       
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Transverse Aspect; Equal Area Cylindrical Projection
+///
+const INT32 MgCoordinateSystemProjectionCode::Teacyl;         
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Transverse Mercator or Gauss Kruger Projection
+///
+const INT32 MgCoordinateSystemProjectionCode::Tm;              
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Transverse Mercator with affiine post-processor.
+///
+const INT32 MgCoordinateSystemProjectionCode::Trmeraf;        
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Transverse Mercator using Kruger Formulation
+///
+const INT32 MgCoordinateSystemProjectionCode::Trmrkrg;        
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Transverse Mercator per J. P. Snyder.
+///
+const INT32 MgCoordinateSystemProjectionCode::Trmrs;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Van Der Grinten Projection
+///
+const INT32 MgCoordinateSystemProjectionCode::Vdgrntn;        
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Wisconsin County Coord System variation; Lambert Conformal Conic
+///
+const INT32 MgCoordinateSystemProjectionCode::Wccsl;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Wisconsin County Coord System variation; Transverse Mercator projection
+///
+const INT32 MgCoordinateSystemProjectionCode::Wccst;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// The UTM direct variation of the Transverse Mercator projection
+///
+const INT32 MgCoordinateSystemProjectionCode::Utm;            
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Winkel-Tripel; variable standard latitude
+///
+const INT32 MgCoordinateSystemProjectionCode::Winkl;          
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Nerth with scale and rotation
+///
+const INT32 MgCoordinateSystemProjectionCode::Nrthsrt;        
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Lambert Conformal Conic with affine post-processor.
+///
+const INT32 MgCoordinateSystemProjectionCode::Lmbrtaf;        
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Combination of Transverse Mercator and polynomial expansion used in Denmark.  Polynominals are of the 2001 vintage.
+///
+const INT32 MgCoordinateSystemProjectionCode::Sys34_01;       
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Equidistant Cylindrical Projection, Ellipsoidal or Spherical
+///
+const INT32 MgCoordinateSystemProjectionCode::EdcylE;         
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Inplementation of Plate Carree as a variation of the Equidistant Cylindrical
+///
+const INT32 MgCoordinateSystemProjectionCode::PlateCarree;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Popular Visualization Pseudo Mercator (aka Google Earth)
+///
+const INT32 MgCoordinateSystemProjectionCode::PvMercator;     
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Lambert Conformal Conic, Michigan Variation
+///
+const INT32 MgCoordinateSystemProjectionCode::LmMich;
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Unknown
+///
+const INT32 MgCoordinateSystemProjectionCode::Unknown;
+
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// none (no formatting)
+///
+const INT32 MgCoordinateSystemProjectionFormatType::None;        
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// longitude(cs_FRMT_LNG), azimuth(cs_FRMT_AZM)
+///
+const INT32 MgCoordinateSystemProjectionFormatType::Lng;     
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// latitude (cs_FRMT_LAT)
+///
+const INT32 MgCoordinateSystemProjectionFormatType::Lat;     
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// angular distance (cs_FRMT_ANGD)
+///
+const INT32 MgCoordinateSystemProjectionFormatType::Angd;    
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// coefficient (cs_FRMT_COEF)
+///
+const INT32 MgCoordinateSystemProjectionFormatType::Coef;       
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// coefficient (cs_FRMT_XXX)
+///
+const INT32 MgCoordinateSystemProjectionFormatType::Xxx;      
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// coefficient (cs_FRMT_YYY)
+///
+const INT32 MgCoordinateSystemProjectionFormatType::Yyy;      
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// coefficient (cs_FRMT_SCL)
+///
+const INT32 MgCoordinateSystemProjectionFormatType::Scl;         
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// coefficient (cs_FRMT_ROT)
+///
+const INT32 MgCoordinateSystemProjectionFormatType::Rot;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// no specification
+///
+const INT32 MgCoordinateSystemProjectionLogicalType::None;                
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// longitude
+///
+const INT32 MgCoordinateSystemProjectionLogicalType::Longitude;           
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// latitude
+///
+const INT32 MgCoordinateSystemProjectionLogicalType::Latitude;            
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// azimuth
+///
+const INT32 MgCoordinateSystemProjectionLogicalType::Azimuth;             
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// angular distance
+///
+const INT32 MgCoordinateSystemProjectionLogicalType::AngularDistance;     
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// complex coefficient
+///
+const INT32 MgCoordinateSystemProjectionLogicalType::ComplexCoefficient;  
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// UTM zone number
+///
+const INT32 MgCoordinateSystemProjectionLogicalType::UTMZoneNumber;       
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// hemisphere selection: north > 0, south < 0
+///
+const INT32 MgCoordinateSystemProjectionLogicalType::HemisphereSelection; 
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// geoid height in meters
+///
+const INT32 MgCoordinateSystemProjectionLogicalType::GeoidHeight;         
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// elevation, system units
+///
+const INT32 MgCoordinateSystemProjectionLogicalType::Elevation;           
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// affine coefficient
+///
+const INT32 MgCoordinateSystemProjectionLogicalType::AffineCoefficient;  
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// X/Y Coordinate
+///
+const INT32 MgCoordinateSystemProjectionLogicalType::XYCoordinate;       
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Scale value
+///
+const INT32 MgCoordinateSystemProjectionLogicalType::Scale;
+
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Not used.
+///
+const INT32 MgCoordinateSystemProjectionParameterType::NotUsed;         
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Central Meridian
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Cntmer;          
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Northern Standard Parallel
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Nstdpll;         
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Southern Standard Parallel
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Sstdpll;         
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Standard Parallel
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Stdpll;          
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// First Great Circle Point Longitude
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Gcp1lng;         
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// First Great Circle Point Latitude
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Gcp1lat;         
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Second Great Circle Point Longitude
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Gcp2lng;         
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Second Great Circle Point Latitude
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Gcp2lat;         
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Great Circle Point Longitude
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Gcplng;          
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Great Circle Point Latitude
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Gcplat;         
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Great Circle Azimuth
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Gcazm;          
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Y axis azimuth
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Yaxisaz;        
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Eastern Standard Meridian
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Estdmer;        
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Northern Parallel
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Nparall;        
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Southern Parallel
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Sparall;        
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// First pole longitude
+///
+const INT32 MgCoordinateSystemProjectionParameterType::P1lng;          
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// First pole latitude
+///
+const INT32 MgCoordinateSystemProjectionParameterType::P1lat;          
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Second pole longitude
+///
+const INT32 MgCoordinateSystemProjectionParameterType::P2lng;          
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Second pole latitude
+///
+const INT32 MgCoordinateSystemProjectionParameterType::P2lat;          
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Distance between the poles.
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Adp1p2;         
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Angular distance to the first standard parallel
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Adsp1;          
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Angular distance to the second standard parallel
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Adsp2;          
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Complex Parameter A (n). Label string includes a %s for generation by sprintf.
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Cmplxan;        
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Complex Parameter B (n). Label string includes a %s for generation by sprintf.
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Cmplxbn;        
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Western end of Longitude range.
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Westll;         
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Eastern end of Longitude range
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Eastll;         
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// UTM Zone Number
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Utmzn;         
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// North/South Hemisphere
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Hsns;           
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Average Geoid Height
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Ghgt;           
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Average Elevation
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Aelev;          
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Oblique Pole Longitude
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Polelng;        
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Oblique Pole Latitude
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Polelat;        
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Oblique Cone Standard Parallel
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Ostdpll;        
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Standard Circle Latitude
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Stdcir;         
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Affine A0 Coefficient
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Afa0;           
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Affine B0 Coefficient
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Afb0;           
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Affine A1 Coefficient
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Afa1;           
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Affine A2 Coefficient
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Afa2;           
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Affine B1 Coefficient
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Afb1;           
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Affine B2 Coefficient
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Afb2;           
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Normal Parallel
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Nrmlpll;        
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Danish System 24 Region
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Denrgn;         
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// cs_PRMCOD_SKWAZM - Skew Azimuth at Rectified Origin.
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Skwazm;         
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// X Coordinate of Scale/Rotate Origin
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Sclrotorgx;     
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Y Coordinate of Scale/Rotate Origin
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Sclrotorgy;     
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Cartesian Scale Factor
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Nrthscl;        
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Cartesian Rotation Angle
+///
+const INT32 MgCoordinateSystemProjectionParameterType::Nrthrot;        
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Ellipsoid scaling factor
+///
+const INT32 MgCoordinateSystemProjectionParameterType::EllipsoidScale;
+
+
+
+///////////////////////////////////////////////////////////////
+/// \brief
+/// Specifies the coordinate system is not set.
+///
+///
+const INT32 MgCoordinateSystemType::Unknown;
+///////////////////////////////////////////////////////////////
+/// \brief
+/// Specifies that the coordinate system is arbitrary. That is,
+/// it is not spatially bound to the earth, and the initial
+/// keyword in the WKT definition of the coordinate system is
+/// LOCAL_CS.
+///
+///
+const INT32 MgCoordinateSystemType::Arbitrary;
+////////////////////////////////////////////////////////////////
+/// \brief
+/// Specifies that the coordinate system is geographic. That is,
+/// the initial keyword in the WKT definition of the coordinate
+/// system is GEOGCS.
+///
+///
+const INT32 MgCoordinateSystemType::Geographic;
+//////////////////////////////////////////////////////////////
+/// \brief
+/// Specifies that the coordinate system is projected. In most
+/// cases, the initial keyword in the WKT definition of the
+/// coordinate system is PROJCS. In some cases, the initial
+/// keyword is GEOGCS.
+///
+///
+const INT32 MgCoordinateSystemType::Projected;
+
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Meter
+///
+const INT32 MgCoordinateSystemUnitCode::Meter;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Foot
+///
+const INT32 MgCoordinateSystemUnitCode::Foot;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Inch
+///
+const INT32 MgCoordinateSystemUnitCode::Inch;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// IFoot
+///
+const INT32 MgCoordinateSystemUnitCode::IFoot;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// ClarkeFoot
+///
+const INT32 MgCoordinateSystemUnitCode::ClarkeFoot;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// IInch
+///
+const INT32 MgCoordinateSystemUnitCode::IInch;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Centimeter
+///
+const INT32 MgCoordinateSystemUnitCode::Centimeter;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Kilometer
+///
+const INT32 MgCoordinateSystemUnitCode::Kilometer;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Yard
+///
+const INT32 MgCoordinateSystemUnitCode::Yard;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// SearsYard
+///
+const INT32 MgCoordinateSystemUnitCode::SearsYard;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Mile
+///
+const INT32 MgCoordinateSystemUnitCode::Mile;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// IYard
+///
+const INT32 MgCoordinateSystemUnitCode::IYard;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// IMile
+///
+const INT32 MgCoordinateSystemUnitCode::IMile;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Knot
+///
+const INT32 MgCoordinateSystemUnitCode::Knot;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// NautM
+///
+const INT32 MgCoordinateSystemUnitCode::NautM;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Lat66
+///
+const INT32 MgCoordinateSystemUnitCode::Lat66;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Lat83
+///
+const INT32 MgCoordinateSystemUnitCode::Lat83;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Decimeter
+///
+const INT32 MgCoordinateSystemUnitCode::Decimeter;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Millimeter
+///
+const INT32 MgCoordinateSystemUnitCode::Millimeter;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Dekameter
+///
+const INT32 MgCoordinateSystemUnitCode::Dekameter;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Hectometer
+///
+const INT32 MgCoordinateSystemUnitCode::Hectometer;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// GermanMeter
+///
+const INT32 MgCoordinateSystemUnitCode::GermanMeter;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// CaGrid
+///
+const INT32 MgCoordinateSystemUnitCode::CaGrid;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// ClarkeChain
+///
+const INT32 MgCoordinateSystemUnitCode::ClarkeChain;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// GunterChain
+///
+const INT32 MgCoordinateSystemUnitCode::GunterChain;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// BenoitChain
+///
+const INT32 MgCoordinateSystemUnitCode::BenoitChain;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// SearsChain
+///
+const INT32 MgCoordinateSystemUnitCode::SearsChain;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// ClarkeLink
+///
+const INT32 MgCoordinateSystemUnitCode::ClarkeLink;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// GunterLink
+///
+const INT32 MgCoordinateSystemUnitCode::GunterLink;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// BenoitLink
+///
+const INT32 MgCoordinateSystemUnitCode::BenoitLink;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// SearsLink
+///
+const INT32 MgCoordinateSystemUnitCode::SearsLink;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Rod
+///
+const INT32 MgCoordinateSystemUnitCode::Rod;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Perch
+///
+const INT32 MgCoordinateSystemUnitCode::Perch;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Pole
+///
+const INT32 MgCoordinateSystemUnitCode::Pole;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Furlong
+///
+const INT32 MgCoordinateSystemUnitCode::Furlong;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Rood
+///
+const INT32 MgCoordinateSystemUnitCode::Rood;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// CapeFoot
+///
+const INT32 MgCoordinateSystemUnitCode::CapeFoot;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Brealey
+///
+const INT32 MgCoordinateSystemUnitCode::Brealey;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// SearsFoot
+///
+const INT32 MgCoordinateSystemUnitCode::SearsFoot;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// GoldCoastFoot
+///
+const INT32 MgCoordinateSystemUnitCode::GoldCoastFoot;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// MicroInch
+///
+const INT32 MgCoordinateSystemUnitCode::MicroInch;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// IndianYard
+///
+const INT32 MgCoordinateSystemUnitCode::IndianYard;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// IndianFoot
+///
+const INT32 MgCoordinateSystemUnitCode::IndianFoot;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// IndianFt37
+///
+const INT32 MgCoordinateSystemUnitCode::IndianFt37;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// IndianFt62
+///
+const INT32 MgCoordinateSystemUnitCode::IndianFt62;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// IndianFt75
+///
+const INT32 MgCoordinateSystemUnitCode::IndianFt75;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// IndianYd37
+///
+const INT32 MgCoordinateSystemUnitCode::IndianYd37;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Decameter
+///
+const INT32 MgCoordinateSystemUnitCode::Decameter;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// InternationalChain
+///
+const INT32 MgCoordinateSystemUnitCode::InternationalChain;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// InternationalLink
+///
+const INT32 MgCoordinateSystemUnitCode::InternationalLink;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// BritishFootTrunc
+///
+const INT32 MgCoordinateSystemUnitCode::BrFootTrunc;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// BritishChainTrunc
+///
+const INT32 MgCoordinateSystemUnitCode::BrChainTrunc;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// BritishLinkTrunc
+///
+const INT32 MgCoordinateSystemUnitCode::BrLinkTrunc;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Degree
+///
+const INT32 MgCoordinateSystemUnitCode::Degree;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Grad
+///
+const INT32 MgCoordinateSystemUnitCode::Grad;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Grade
+///
+const INT32 MgCoordinateSystemUnitCode::Grade;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// MapInfo
+///
+const INT32 MgCoordinateSystemUnitCode::MapInfo;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Mil
+///
+const INT32 MgCoordinateSystemUnitCode::Mil;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Minute
+///
+const INT32 MgCoordinateSystemUnitCode::Minute;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Radian
+///
+const INT32 MgCoordinateSystemUnitCode::Radian;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Second
+///
+const INT32 MgCoordinateSystemUnitCode::Second;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Decisec
+///
+const INT32 MgCoordinateSystemUnitCode::Decisec;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Centisec
+///
+const INT32 MgCoordinateSystemUnitCode::Centisec;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Millisec
+///
+const INT32 MgCoordinateSystemUnitCode::Millisec;
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Unknown
+///
+const INT32 MgCoordinateSystemUnitCode::Unknown;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Unknown unit type. Used mainly for default or error conditions
+///
+const INT32 MgCoordinateSystemUnitType::Unknown;
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Linear unit type
+///
+const INT32 MgCoordinateSystemUnitType::Linear;
+///////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Angular unit type
+///
+const INT32 MgCoordinateSystemUnitType::Angular;
+
+
+/////////////////////////////////////////////////////////////////
+/// \brief
+/// Specifies that the geometric entity is a geometry component.
+///
+const INT32 MgGeometryEntityType::GeometryComponent;
+
+///////////////////////////////////////////////////////
+/// \brief
+/// Specifies that the geometric entity is a geometry.
+///
+const INT32 MgGeometryEntityType::Geometry;
+
+
+////////////////////////////////////////////////////////
+/// \brief
+/// Specifies the geometry component is a MgLinearRing.
+///
+const INT32 MgGeometryComponentType::LinearRing;
+
+/////////////////////////////////////////////////////////
+/// \brief
+/// Specifies the geometry component is an MgArcSegment.
+///
+const INT32 MgGeometryComponentType::ArcSegment;
+
+////////////////////////////////////////////////////////////
+/// \brief
+/// Specifies the geometry component is an MgLinearSegment.
+///
+const INT32 MgGeometryComponentType::LinearSegment;
+
+////////////////////////////////////////////////////////
+/// \brief
+/// Specifies the geometry component is an MgCurveRing.
+///
+const INT32 MgGeometryComponentType::CurveRing;
+
+
+
+/////////////////////////////////////////////////////////////////
+/// \brief
+/// Specifies that the Douglas-Peucker algorithm be used for simplification.
+///
+const INT32 MgGeometrySimplificationAlgorithmType::DouglasPeucker;
+
+///////////////////////////////////////////////////////
+/// \brief
+/// Specifies that the Topology Preserving algorithm be used for simplification
+///
+const INT32 MgGeometrySimplificationAlgorithmType::TopologyPreserving;
+
+
+
+////////////////////////////////////////////
+/// \brief
+/// Specifies that the geometry is a Point.
+///
+const INT32 MgGeometryType::Point;
+
+/////////////////////////////////////////////////
+/// \brief
+/// Specifies that the geometry is a LineString.
+///
+const INT32 MgGeometryType::LineString;
+
+//////////////////////////////////////////////
+/// \brief
+/// Specifies that the geometry is a Polygon.
+///
+const INT32 MgGeometryType::Polygon;
+
+/////////////////////////////////////////////////
+/// \brief
+/// Specifies that the geometry is a MultiPoint.
+///
+const INT32 MgGeometryType::MultiPoint;
+
+//////////////////////////////////////////////////////
+/// \brief
+/// Specifies that the geometry is a MultiLineString.
+///
+const INT32 MgGeometryType::MultiLineString;
+
+///////////////////////////////////////////////////
+/// \brief
+/// Specifies that the geometry is a MultiPolygon.
+///
+const INT32 MgGeometryType::MultiPolygon;
+
+//////////////////////////////////////////////////////////////
+/// \brief
+/// Specifies that the geometry is a MultiGeometry. In OpenGIS
+/// this is referred to as a GeometryCollection.
+///
+const INT32 MgGeometryType::MultiGeometry;
+
+//////////////////////////////////////////////////
+/// \brief
+/// Specifies that the geometry is a CurveString.
+///
+const INT32 MgGeometryType::CurveString;
+
+///////////////////////////////////////////////////
+/// \brief
+/// Specifies that the geometry is a CurvePolygon.
+///
+const INT32 MgGeometryType::CurvePolygon;
+
+//////////////////////////////////////////////////////
+/// \brief
+/// Specifies that the geometry is a MultiLineString.
+///
+const INT32 MgGeometryType::MultiCurveString;
+
+//////////////////////////////////////////////
+/// \brief
+/// Specifies the geometry is a MultiPolygon.
+///
+const INT32 MgGeometryType::MultiCurvePolygon;
\ No newline at end of file

Copied: trunk/MgDev/Common/PlatformBase/LinuxNumericalConstants.cpp (from rev 9676, sandbox/jng/catch2/Common/PlatformBase/LinuxNumericalConstants.cpp)
===================================================================
--- trunk/MgDev/Common/PlatformBase/LinuxNumericalConstants.cpp	                        (rev 0)
+++ trunk/MgDev/Common/PlatformBase/LinuxNumericalConstants.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -0,0 +1,122 @@
+//
+//  Copyright (C) 2004-2020 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+// Linux-specific TU to ensure static int constants are defined as actual symbols
+// in the final library
+
+#include "MapLayer/LayerGroupType.h"
+#include "MapLayer/LayerType.h"
+#include "Services/FeatureGeometricType.h"
+#include "Services/ObjectPropertyType.h"
+#include "Services/OrderingOption.h"
+#include "Services/ReaderType.h"
+
+////////////////////////////////////////////
+/// \brief
+/// Specifies that the layer group is a normal layer group.
+///
+const INT32 MgLayerGroupType::Normal;
+/////////////////////////////////////////////////
+/// \brief
+/// Specifies that the layer is a base map layer group (i.e.
+/// it contains base map layers).
+///
+const INT32 MgLayerGroupType::BaseMap;
+/////////////////////////////////////////////////
+/// \brief
+/// Specifies that the layer is a base map layer from a TileSetDefinition resource.
+///
+/// \remarks
+/// From a client application perspective, a layer group with of this type should be treated
+/// the same as layer group of type \link MgLayerGroupType::BaseMap BaseMap \endlink
+///
+/// \since 3.0
+const INT32 MgLayerGroupType::BaseMapFromTileSet;
+
+////////////////////////////////////////////
+/// \brief
+/// Specifies that the layer is a dynamic layer.
+///
+const INT32 MgLayerType::Dynamic;
+/////////////////////////////////////////////////
+/// \brief
+/// Specifies that the layer is a base map layer.
+///
+const INT32 MgLayerType::BaseMap;
+
+
+/////////////////////////////////////////////////////////////
+/// \brief
+/// Represents zero-dimensional geometric primitives, such as
+/// MgPoint.
+const int MgFeatureGeometricType::Point;
+
+////////////////////////////////////////////////////////////
+/// \brief
+/// Represents one-dimensional geometric primitives, such as
+/// MgLineString and MgCurveString.
+const int MgFeatureGeometricType::Curve;
+
+////////////////////////////////////////////////////////////
+/// \brief
+/// Represents two-dimensional geometric primitives, such as
+/// MgPolygon and MgCurvePolygon.
+const int MgFeatureGeometricType::Surface;
+
+//////////////////////////////////////////////////////////////
+/// \brief
+/// Represents three-dimensional geometric primitives, such as
+/// Cubes.
+const int MgFeatureGeometricType::Solid;
+
+
+////////////////////////////////////////////////////////////////
+/// \brief
+/// Signifies that the object property contains a single feature
+/// class object.
+const int MgObjectPropertyType::Value;
+//////////////////////////////////////////////////////////////
+/// \brief
+/// Signifies that the object property contains more than one
+/// feature class object. The collection of objects is in no
+/// particular order relative to the identity property defined
+/// for the collection. See \link MgObjectPropertyDefinition::GetIdentityProperty \endlink
+const int MgObjectPropertyType::Collection;
+/////////////////////////////////////////////////////////////////
+/// \brief
+/// Signifies that the object property contains more than one
+/// feature class object in ascending or descending order
+/// relative to the identity property defined for the collection.
+/// See \link MgObjectPropertyDefinition::GetIdentityProperty \endlink
+const int MgObjectPropertyType::OrderedCollection;
+
+
+const int MgOrderingOption::Ascending;
+const int MgOrderingOption::Descending;
+
+/////////////////////////////////////////////////////////
+/// \brief
+/// Signifies that the object is of type MgFeatureReader.
+const int MgReaderType::FeatureReader;
+//////////////////////////////////////////////////////
+/// \brief
+/// Signifies that the object is of type MgDataReader.
+const int MgReaderType::DataReader;
+/////////////////////////////////////////////////////////
+/// \brief
+/// Signifies that the object is of type MgSqlDataReader.
+const int MgReaderType::SqlDataReader;
\ No newline at end of file

Modified: trunk/MgDev/Common/PlatformBase/PlatformBaseBuild.cpp
===================================================================
--- trunk/MgDev/Common/PlatformBase/PlatformBaseBuild.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Common/PlatformBase/PlatformBaseBuild.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -98,7 +98,6 @@
 #include "Services/LongTransactionData.cpp"
 #include "Services/LongTransactionReader.cpp"
 #include "Services/ObjectPropertyDefinition.cpp"
-#include "Services/OrderingOption.cpp"
 #include "Services/Parameter.cpp"
 #include "Services/ParameterCollection.cpp"
 #include "Services/Raster.cpp"
@@ -128,3 +127,7 @@
 #include "Services/PrintLayoutService/PropertyMapping.cpp"
 #include "Services/PrintLayoutService/PropertyMappingCollection.cpp"
 #include "Services/Transaction.cpp"
+
+#ifndef _WIN32
+#include "LinuxNumericalConstants.cpp"
+#endif
\ No newline at end of file

Deleted: trunk/MgDev/Common/PlatformBase/Services/OrderingOption.cpp
===================================================================
--- trunk/MgDev/Common/PlatformBase/Services/OrderingOption.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Common/PlatformBase/Services/OrderingOption.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,25 +0,0 @@
-//
-//  Copyright (C) 2004-2014 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "OrderingOption.h"
-
-//NOTE: This is primarily for Linux to ensure that the symbols below are
-//included in the resulting binary, as the typedef changes to enable 64-bit support
-//caused these symbols below to be unresolved
-
-const int MgOrderingOption::Ascending;
-const int MgOrderingOption::Descending;

Index: trunk/MgDev/Desktop
===================================================================
--- trunk/MgDev/Desktop	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop	2020-07-21 09:28:07 UTC (rev 9677)

Property changes on: trunk/MgDev/Desktop
___________________________________________________________________
Modified: svn:mergeinfo
## -3,6 +3,7 ##
 /branches/2.6/MgDev/Desktop:8276-8286,8314-8315
 /branches/3.0/MgDev/Desktop:8710
 /branches/3.1/MgDev/Desktop:9382
+/sandbox/jng/catch2/Desktop:9649-9676
 /sandbox/jng/clean_json/Desktop:8818-9180
 /sandbox/jng/cmake_v2/Desktop:9259-9317
 /sandbox/jng/convenience_apis/Desktop:8271-8363
Index: trunk/MgDev/Desktop/DesktopUnmanagedApi
===================================================================
--- trunk/MgDev/Desktop/DesktopUnmanagedApi	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/DesktopUnmanagedApi	2020-07-21 09:28:07 UTC (rev 9677)

Property changes on: trunk/MgDev/Desktop/DesktopUnmanagedApi
___________________________________________________________________
Added: svn:ignore
## -0,0 +1 ##
+lib
Modified: trunk/MgDev/Desktop/DesktopUnmanagedApi/MapGuideApi/Constants.xml
===================================================================
--- trunk/MgDev/Desktop/DesktopUnmanagedApi/MapGuideApi/Constants.xml	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/DesktopUnmanagedApi/MapGuideApi/Constants.xml	2020-07-21 09:28:07 UTC (rev 9677)
@@ -84,6 +84,7 @@
   <Class name="MgGeometricPathInstructionType" />
   <Class name="MgGeometryType" />
   <Class name="MgGeometryComponentType" />
+  <Class name="MgGeometrySimplificationAlgorithmType" />
   <Class name="MgLayerGroupType" />
   <Class name="MgLayerType" />
   <Class name="MgFeatureGeometricType" />
@@ -155,6 +156,7 @@
     <Header path="../../../Common/Geometry/GeometricPathInstructionType.h" />
     <Header path="../../../Common/Geometry/GeometryComponentType.h" />
     <Header path="../../../Common/Geometry/GeometryType.h" />
+    <Header path="../../../Common/Geometry/GeometrySimplificationAlgorithmType.h" />
     <Header path="../../../Common/Geometry/CoordinateSystem/CoordinateSystemCodeFormat.h" />
     <Header path="../../../Common/Geometry/CoordinateSystem/CoordinateSystemErrorCode.h" />
     <Header path="../../../Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticTransformationMethod.h" />

Modified: trunk/MgDev/Desktop/DesktopUnmanagedApi/MapGuideApi/MapGuideApiGen.xml
===================================================================
--- trunk/MgDev/Desktop/DesktopUnmanagedApi/MapGuideApi/MapGuideApiGen.xml	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/DesktopUnmanagedApi/MapGuideApi/MapGuideApiGen.xml	2020-07-21 09:28:07 UTC (rev 9677)
@@ -187,6 +187,7 @@
     <Header path="../../../Common/Geometry/Envelope.h" />
     <Header path="../../../Common/Geometry/GeometryCollection.h" />
     <Header path="../../../Common/Geometry/GeometryFactory.h" />
+    <Header path="../../../Common/Geometry/GeometrySimplifier.h" />
     <Header path="../../../Common/Geometry/LinearRing.h" />
     <Header path="../../../Common/Geometry/LinearRingCollection.h" />
     <Header path="../../../Common/Geometry/LinearSegment.h" />
@@ -203,6 +204,7 @@
     <Header path="../../../Common/Geometry/PointCollection.h" />
     <Header path="../../../Common/Geometry/Polygon.h" />
     <Header path="../../../Common/Geometry/PolygonCollection.h" />
+    <Header path="../../../Common/Geometry/PreparedGeometry.h" />
     <Header path="../../../Common/Geometry/Transform.h" />
     <Header path="../../../Common/Geometry/WktReaderWriter.h" />
 

Modified: trunk/MgDev/Desktop/MgDesktop/MgDesktop.h
===================================================================
--- trunk/MgDev/Desktop/MgDesktop/MgDesktop.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/MgDesktop/MgDesktop.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -80,6 +80,7 @@
 
 //Uncomment to debug memory leaks. This is the header for Visual Leak Detector
 //See: http://vld.codeplex.com for download and setup
+/*
 #ifdef _WIN32
 #ifdef _DEBUG
 #define USING_VLD
@@ -86,6 +87,7 @@
 #include <vld.h>
 #endif
 #endif
+*/
 
 //Uncomment to get extra FDO join chatter when running unit tests
 //#define DEBUG_FDOJOIN

Modified: trunk/MgDev/Desktop/MgDesktop/MgDesktop.vcxproj
===================================================================
--- trunk/MgDev/Desktop/MgDesktop/MgDesktop.vcxproj	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/MgDesktop/MgDesktop.vcxproj	2020-07-21 09:28:07 UTC (rev 9677)
@@ -94,11 +94,11 @@
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>FDO.lib;FDOCommon.lib;FDOGeometry.lib;ExpressionEngine.lib;ACEd.lib;MgFoundationd.lib;MgGeometryd.lib;MgMdfModeld.lib;MgMdfParserd.lib;MgPlatformBased.lib;MgRenderersd.lib;MgStylizationd.lib;MgGwsCommond.lib;MgGwsQueryEngined.lib;xerces-c_3mgD.lib;dwfcore_wt.1.7.0.lib;dwftk_wt.7.7.0.lib;w3dtk_wt.1.7.1555.lib;whiptk_wt.7.13.601.lib;MgSecurityd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>FDO.lib;FDOCommon.lib;FDOGeometry.lib;FDOSpatial.lib;ExpressionEngine.lib;ACEd.lib;MgFoundationd.lib;MgGeometryd.lib;MgMdfModeld.lib;MgMdfParserd.lib;MgPlatformBased.lib;MgRenderersd.lib;MgStylizationd.lib;MgGwsCommond.lib;MgGwsQueryEngined.lib;xerces-c_3mgD.lib;dwfcore_wt.1.7.0.lib;dwftk_wt.7.7.0.lib;w3dtk_wt.1.7.1555.lib;whiptk_wt.7.13.601.lib;MgSecurityd.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <ShowProgress>NotSet</ShowProgress>
       <OutputFile>$(OutDir)MgDesktopd.dll</OutputFile>
       <AdditionalLibraryDirectories>..\..\Oem\ACE\ACE_wrappers\lib\$(Configuration);..\..\Oem\FDO\Lib;..\..\Oem\DWFTK\develop\global\lib\static\$(Configuration)\vc10.0;..\..\Oem\dbxml\xerces-c-src\Build\$(Configuration);..\..\Common\lib\$(Configuration);..\..\Server\lib\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-      <DelayLoadDLLs>FDO.dll;FDOCommon.dll;FDOGeometry.dll;ExpressionEngine.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+      <DelayLoadDLLs>FDO.dll;FDOCommon.dll;FDOGeometry.dll;FDOSpatial.dll;ExpressionEngine.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
       <OptimizeReferences>
@@ -131,10 +131,10 @@
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>FDO.lib;FDOCommon.lib;FDOGeometry.lib;ExpressionEngine.lib;ACE.lib;MgFoundation.lib;MgGeometry.lib;MgMdfModel.lib;MgMdfParser.lib;MgPlatformBase.lib;MgRenderers.lib;MgStylization.lib;MgGwsCommon.lib;MgGwsQueryEngine.lib;xerces-c_3mg.lib;dwfcore_wt.1.7.0.lib;dwftk_wt.7.7.0.lib;w3dtk_wt.1.7.1555.lib;whiptk_wt.7.13.601.lib;MgSecurity.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>FDO.lib;FDOCommon.lib;FDOGeometry.lib;FDOSpatial.lib;ExpressionEngine.lib;ACE.lib;MgFoundation.lib;MgGeometry.lib;MgMdfModel.lib;MgMdfParser.lib;MgPlatformBase.lib;MgRenderers.lib;MgStylization.lib;MgGwsCommon.lib;MgGwsQueryEngine.lib;xerces-c_3mg.lib;dwfcore_wt.1.7.0.lib;dwftk_wt.7.7.0.lib;w3dtk_wt.1.7.1555.lib;whiptk_wt.7.13.601.lib;MgSecurity.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
       <AdditionalLibraryDirectories>..\..\Oem\ACE\ACE_wrappers\lib\$(Configuration);..\..\Oem\FDO\Lib;..\..\Oem\DWFTK\develop\global\lib\static\$(Configuration)\vc10.0;..\..\Oem\dbxml\xerces-c-src\Build\$(Configuration);..\..\Common\lib\$(Configuration);..\..\Server\lib\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-      <DelayLoadDLLs>MgMdfParser.dll;MgGeometry.dll;MgGwsCommon.dll;MgGwsResource.dll;FDO.dll;FDOCommon.dll;MgStylization.dll;FDOGeometry.dll;ExpressionEngine.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+      <DelayLoadDLLs>MgMdfParser.dll;MgGeometry.dll;MgGwsCommon.dll;MgGwsResource.dll;FDO.dll;FDOCommon.dll;FDOSpatial.dll;MgStylization.dll;FDOGeometry.dll;ExpressionEngine.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>
@@ -167,11 +167,11 @@
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>FDO.lib;FDOCommon.lib;FDOGeometry.lib;ExpressionEngine.lib;ACEd.lib;MgFoundationd.lib;MgGeometryd.lib;MgMdfModeld.lib;MgMdfParserd.lib;MgPlatformBased.lib;MgRenderersd.lib;MgStylizationd.lib;MgGwsCommond.lib;MgGwsQueryEngined.lib;xerces-c_3mgD.lib;dwfcore_wt.1.7.0.lib;dwftk_wt.7.7.0.lib;w3dtk_wt.1.7.1555.lib;whiptk_wt.7.13.601.lib;MgSecurityd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>FDO.lib;FDOCommon.lib;FDOGeometry.lib;FDOSpatial.lib;ExpressionEngine.lib;ACEd.lib;MgFoundationd.lib;MgGeometryd.lib;MgMdfModeld.lib;MgMdfParserd.lib;MgPlatformBased.lib;MgRenderersd.lib;MgStylizationd.lib;MgGwsCommond.lib;MgGwsQueryEngined.lib;xerces-c_3mgD.lib;dwfcore_wt.1.7.0.lib;dwftk_wt.7.7.0.lib;w3dtk_wt.1.7.1555.lib;whiptk_wt.7.13.601.lib;MgSecurityd.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <ShowProgress>NotSet</ShowProgress>
       <OutputFile>$(OutDir)MgDesktopd.dll</OutputFile>
-      <AdditionalLibraryDirectories>..\..\Oem\ACE\ACE_wrappers\lib64\$(Configuration);..\..\Oem\FDO\Lib64;..\..\Oem\DWFTK\develop\global\lib\static\$(Configuration)64\vc10.0;..\..\Oem\dbxml\xerces-c-src\Build\$(Configuration)64;..\..\Common\lib\$(Configuration)64;..\..\Server\lib\$(Configuration)64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-      <DelayLoadDLLs>FDO.dll;FDOCommon.dll;FDOGeometry.dll;ExpressionEngine.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+      <AdditionalLibraryDirectories>..\..\Oem\ACE\ACE_wrappers\lib64\$(Configuration);..\..\Oem\FDO\Lib64;..\..\Oem\DWFTK\develop\global\lib\x64\static\$(Configuration)\vc10.0;..\..\Oem\dbxml\xerces-c-src\Build\$(Configuration)64;..\..\Common\lib\$(Configuration)64;..\..\Server\lib\$(Configuration)64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <DelayLoadDLLs>FDO.dll;FDOCommon.dll;FDOGeometry.dll;FDOSpatial.dll;ExpressionEngine.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
       <OptimizeReferences>
@@ -207,10 +207,10 @@
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>FDO.lib;FDOCommon.lib;FDOGeometry.lib;ExpressionEngine.lib;ACE.lib;MgFoundation.lib;MgGeometry.lib;MgMdfModel.lib;MgMdfParser.lib;MgPlatformBase.lib;MgRenderers.lib;MgStylization.lib;MgGwsCommon.lib;MgGwsQueryEngine.lib;xerces-c_3mg.lib;dwfcore_wt.1.7.0.lib;dwftk_wt.7.7.0.lib;w3dtk_wt.1.7.1555.lib;whiptk_wt.7.13.601.lib;MgSecurity.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>FDO.lib;FDOCommon.lib;FDOGeometry.lib;FDOSpatial.lib;ExpressionEngine.lib;ACE.lib;MgFoundation.lib;MgGeometry.lib;MgMdfModel.lib;MgMdfParser.lib;MgPlatformBase.lib;MgRenderers.lib;MgStylization.lib;MgGwsCommon.lib;MgGwsQueryEngine.lib;xerces-c_3mg.lib;dwfcore_wt.1.7.0.lib;dwftk_wt.7.7.0.lib;w3dtk_wt.1.7.1555.lib;whiptk_wt.7.13.601.lib;MgSecurity.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
       <AdditionalLibraryDirectories>..\..\Oem\ACE\ACE_wrappers\lib64\$(Configuration);..\..\Oem\FDO\Lib64;..\..\Oem\DWFTK\develop\global\lib\x64\static\$(Configuration)\vc10.0;..\..\Oem\dbxml\xerces-c-src\Build\$(Configuration)64;..\..\Common\lib\$(Configuration)64;..\..\Server\lib\$(Configuration)64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-      <DelayLoadDLLs>MgMdfParser.dll;MgGeometry.dll;MgGwsCommon.dll;MgGwsResource.dll;FDO.dll;FDOCommon.dll;MgStylization.dll;FDOGeometry.dll;ExpressionEngine.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+      <DelayLoadDLLs>MgMdfParser.dll;MgGeometry.dll;MgGwsCommon.dll;MgGwsResource.dll;FDO.dll;FDOCommon.dll;FDOSpatial.dll;MgStylization.dll;FDOGeometry.dll;ExpressionEngine.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>

Modified: trunk/MgDev/Desktop/MgDesktop/Services/Rendering/RSMgFeatureReader.cpp
===================================================================
--- trunk/MgDev/Desktop/MgDesktop/Services/Rendering/RSMgFeatureReader.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/MgDesktop/Services/Rendering/RSMgFeatureReader.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -3,6 +3,7 @@
 #include "RSMgInputStream.h"
 #include "LineBuffer.h"
 #include "Services/FeatureReader.h"
+#include "FdoSpatial.h"
 //#include "ServerGwsFeatureReader.h"
 
 //we want to catch the MgException and rethrow a FdoException which
@@ -278,8 +279,9 @@
 
 
 LineBuffer* RSMgdFeatureReader::GetGeometry(const wchar_t*   propertyName,
-                                           LineBuffer*      lb,
-                                           CSysTransformer* xformer)
+                                            LineBuffer*      lb,
+                                            CSysTransformer* xformer,
+                                            RS_DesiredPolygonOrientation polygonOrientation)
 {
     RSFR_TRY()
 
@@ -293,8 +295,66 @@
         throw FdoException::Create(FdoException::NLSGetMessage(FDO_NLSID(FDO_60_NULL_POINTER)));
 
     _ASSERT(lb);
-    lb->LoadFromAgf(agf, sz, xformer);
 
+    //Peek at the raw AGF bytes to see if it's a polygon ahead of time.
+    int* ireader = (int*)agf;
+    // the geometry type
+    auto geomType = (FdoGeometryType)*ireader++;
+    bool isPolygon = geomType == FdoGeometryType_Polygon
+        || geomType == FdoGeometryType_MultiPolygon
+        || geomType == FdoGeometryType_CurvePolygon
+        || geomType == FdoGeometryType_MultiCurvePolygon;
+
+    if (isPolygon && polygonOrientation != RS_DesiredPolygonOrientation::NotApplicable)
+    {
+        FdoPtr<FdoFgfGeometryFactory> geomFactory = FdoFgfGeometryFactory::GetInstance();
+        FdoPtr<FdoIGeometry> geom = geomFactory->CreateGeometryFromFgf(agf, sz);
+        FdoPtr<FdoIGeometry> reoriented;
+
+        switch (polygonOrientation)
+        {
+        case RS_DesiredPolygonOrientation::Clockwise:
+        {
+            reoriented = FdoSpatialUtility::FixPolygonVertexOrder(geom, FdoPolygonVertexOrderRule_CW);
+            FdoPtr<FdoByteArray> reFgf;
+            if (NULL != reoriented.p)
+            {
+                reFgf = geomFactory->GetFgf(reoriented);
+                lb->LoadFromAgf(reFgf->GetData(), reFgf->GetCount(), xformer);
+            }
+            else //Load original
+            {
+                lb->LoadFromAgf(agf, sz, xformer);
+            }
+            break;
+        }
+        case RS_DesiredPolygonOrientation::CounterClockwise:
+        {
+            reoriented = FdoSpatialUtility::FixPolygonVertexOrder(geom, FdoPolygonVertexOrderRule_CCW);
+            FdoPtr<FdoByteArray> reFgf;
+            if (NULL != reoriented.p)
+            {
+                reFgf = geomFactory->GetFgf(reoriented);
+                lb->LoadFromAgf(reFgf->GetData(), reFgf->GetCount(), xformer);
+            }
+            else //Load original
+            {
+                lb->LoadFromAgf(agf, sz, xformer);
+            }
+            break;
+        }
+        default:
+        {
+            _ASSERT(false);
+            break;
+        }
+        }
+    }
+    else
+    {
+        lb->LoadFromAgf(agf, sz, xformer);
+    }
+
     return lb;
 
     RSFR_CATCH()

Modified: trunk/MgDev/Desktop/MgDesktop/Services/Rendering/RSMgFeatureReader.h
===================================================================
--- trunk/MgDev/Desktop/MgDesktop/Services/Rendering/RSMgFeatureReader.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/MgDesktop/Services/Rendering/RSMgFeatureReader.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -42,7 +42,7 @@
     virtual FdoInt32        GetInt32       (const wchar_t* propertyName);
     virtual FdoInt64        GetInt64       (const wchar_t* propertyName);
     virtual const wchar_t*  GetString      (const wchar_t* propertyName);
-    virtual LineBuffer*     GetGeometry    (const wchar_t* propertyName, LineBuffer* lb, CSysTransformer* xformer);
+    virtual LineBuffer*     GetGeometry    (const wchar_t* propertyName, LineBuffer* lb, CSysTransformer* xformer, RS_DesiredPolygonOrientation polygonOrientation);
     virtual RS_Raster*      GetRaster      (const wchar_t* propertyName);
     virtual const wchar_t*  GetAsString    (const wchar_t* propertyName);
     virtual RS_InputStream* GetBLOB        (const wchar_t* propertyName);

Modified: trunk/MgDev/Desktop/UnitTest/CMakeLists.txt
===================================================================
--- trunk/MgDev/Desktop/UnitTest/CMakeLists.txt	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/UnitTest/CMakeLists.txt	2020-07-21 09:28:07 UTC (rev 9677)
@@ -26,6 +26,7 @@
     TestProfilingService.cpp
     TestRenderingService.cpp
     TestResourceService.cpp
+    TestServiceFactory.cpp
     TestTileService.cpp
 )
 

Copied: trunk/MgDev/Desktop/UnitTest/CatchHelperMacros.h (from rev 9676, sandbox/jng/catch2/Desktop/UnitTest/CatchHelperMacros.h)
===================================================================
--- trunk/MgDev/Desktop/UnitTest/CatchHelperMacros.h	                        (rev 0)
+++ trunk/MgDev/Desktop/UnitTest/CatchHelperMacros.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -0,0 +1,26 @@
+//
+//  Copyright (C) 2004-2020 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "catch.hpp"
+#define REQUIRE_THROWS_MG(action, extype) \
+    try { \
+        action; \
+        FAIL("Expected exception to be thrown"); \
+    } \
+    catch (extype ex) { \
+        SAFE_RELEASE(ex); \
+    }

Modified: trunk/MgDev/Desktop/UnitTest/TestFeatureService.cpp
===================================================================
--- trunk/MgDev/Desktop/UnitTest/TestFeatureService.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/UnitTest/TestFeatureService.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -17,327 +17,27 @@
 
 #include "Services/Feature/FeatureUtil.h"
 #include "MgDesktop.h"
-#include "Services/Feature/FdoConnectionPool.h"
-#include "TestFeatureService.h"
 #include "CppUnitExtensions.h"
 #include "Fdo.h"
 #include <ctime>
 
+#include "CatchHelperMacros.h"
+#include "TestServiceFactory.h"
+#include "catch.hpp"
+
 //Uncommenting this will make the join benchmarks 10-15x slower (because we're writing each feature out!)
 //
 //#define DUMP_BENCHMARK_RESULTS
 
-const STRING TEST_LOCALE = L"en";
 const STRING wkt = L"LOCAL_CS[\"Non-Earth (Meter)\",LOCAL_DATUM[\"Local Datum\",0],UNIT[\"Meter\", 1],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]]";
 
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestFeatureService, "TestFeatureService");
 
-
-void TestFeatureService::setUp()
-{
-}
-
-
-void TestFeatureService::tearDown()
-{
-}
-
-
-void TestFeatureService::TestStart()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Feature Service tests.\n")));
-
-    try
-    {
-        Ptr<MgdServiceFactory> fact = new MgdServiceFactory();
-        Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
-        if (pService == 0)
-        {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestStart", __LINE__, __WFILE__, NULL, L"", NULL);
-        }
-        Ptr<MgdFeatureService> featSvc = dynamic_cast<MgdFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
-        if (featSvc == 0)
-        {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestStart", __LINE__, __WFILE__, NULL, L"", NULL);
-        }
-
-        // publish the map definition
-        Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWriteable.MapDefinition");
-        Ptr<MgByteSource> mdfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_Sheboygan_Writeable.mdf", false);
-        Ptr<MgByteReader> mdfrdr1 = mdfsrc1->GetReader();
-        pService->SetResource(mapres1, mdfrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/ParcelsWriteable.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels_Writeable.ldf", false);
-        Ptr<MgByteReader> ldfrdr3 = ldfsrc3->GetReader();
-        pService->SetResource(ldfres3, ldfrdr3, NULL);
-
-        Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/ParcelsWriteable.FeatureSource");
-        Ptr<MgByteSource> fssrc3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels_writeable.fs", false);
-        Ptr<MgByteReader> fsrdr3 = fssrc3->GetReader();
-        pService->SetResource(fsres3, fsrdr3, NULL);
-
-        Ptr<MgByteSource> fsSource3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.sdf", false);
-        Ptr<MgByteReader> fsReader3 = fsSource3->GetReader();
-        pService->SetResourceData(fsres3, L"UT_Parcels.sdf", L"File", fsReader3);
-
-        MgResourceIdentifier resourceIdentifier1(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
-        MgResourceIdentifier resourceIdentifier2(L"Library://UnitTests/Data/Redding_Parcels.FeatureSource");
-        MgResourceIdentifier resourceIdentifier3(L"Library://UnitTests/Data/Sheboygan_BuildingOutlines.FeatureSource");
-        MgResourceIdentifier resourceIdentifier4(L"Library://UnitTests/Data/Sheboygan_VotingDistricts.FeatureSource");
-        MgResourceIdentifier resourceIdentifier5(L"Library://UnitTests/Data/TestChainedInner1ToManyJoin.FeatureSource");
-        MgResourceIdentifier resourceIdentifier6(L"Library://UnitTests/Data/Empty.FeatureSource");
-        MgResourceIdentifier resourceIdentifier7(L"Library://UnitTests/Data/Sheboygan_Parcels_Writable.FeatureSource");
-        MgResourceIdentifier resourceIdentifier8(L"Library://UnitTests/Data/FdoJoin.FeatureSource");
-        MgResourceIdentifier resourceIdentifier9(L"Library://UnitTests/Data/SecuredCredentials.FeatureSource");
-#ifdef _WIN32
-        STRING resourceContentFileName1 = L"..\\UnitTestFiles\\Sheboygan_Parcels.FeatureSource";
-        STRING resourceContentFileName2 = L"..\\UnitTestFiles\\Redding_Parcels.FeatureSource";
-        STRING resourceContentFileName3 = L"..\\UnitTestFiles\\Sheboygan_BuildingOutlines.FeatureSource";
-        STRING resourceContentFileName4 = L"..\\UnitTestFiles\\Sheboygan_VotingDistricts.FeatureSource";
-        STRING resourceContentFileName5=  L"..\\UnitTestFiles\\TESTChainedInner1ToManyJoin.FeatureSource";
-        STRING resourceContentFileName6=  L"..\\UnitTestFiles\\Empty.FeatureSource";
-        STRING resourceContentFileName7=  L"..\\UnitTestFiles\\Sheboygan_Parcels_Writable.FeatureSource";
-        STRING resourceContentFileName8=  L"..\\UnitTestFiles\\UT_FdoJoin.FeatureSource";
-        STRING resourceContentFileName9=  L"..\\UnitTestFiles\\SecuredCredentials.fs";
-        STRING dataFileName1 = L"..\\UnitTestFiles\\Sheboygan_Parcels.sdf";
-        STRING dataFileName2 = L"..\\UnitTestFiles\\Redding_Parcels.shp";
-        STRING dataFileName3 = L"..\\UnitTestFiles\\Redding_Parcels.dbf";
-        STRING dataFileName4 = L"..\\UnitTestFiles\\Redding_Parcels.shx";
-        STRING dataFileName5 = L"..\\UnitTestFiles\\Sheboygan_BuildingOutlines.sdf";
-        STRING dataFileName6 = L"..\\UnitTestFiles\\Sheboygan_VotingDistricts.sdf";
-        STRING dataFileName7 = L"..\\UnitTestFiles\\Empty.sdf";
-        STRING dataFileName8 = L"..\\UnitTestFiles\\JoinTest.sqlite";
-#else
-        STRING resourceContentFileName1 = L"../UnitTestFiles/Sheboygan_Parcels.FeatureSource";
-        STRING resourceContentFileName2 = L"../UnitTestFiles/Redding_Parcels.FeatureSource";
-        STRING resourceContentFileName3 = L"../UnitTestFiles/Sheboygan_BuildingOutlines.FeatureSource";
-        STRING resourceContentFileName4 = L"../UnitTestFiles/Sheboygan_VotingDistricts.FeatureSource";
-        STRING resourceContentFileName5 = L"../UnitTestFiles/TESTChainedInner1ToManyJoin.FeatureSource";
-        STRING resourceContentFileName6 = L"../UnitTestFiles/Empty.FeatureSource";
-        STRING resourceContentFileName7=  L"../UnitTestFiles/Sheboygan_Parcels_Writable.FeatureSource";
-        STRING resourceContentFileName8=  L"../UnitTestFiles/UT_FdoJoin.FeatureSource";
-        STRING resourceContentFileName9=  L"../UnitTestFiles/SecuredCredentials.fs";
-        STRING dataFileName1 = L"../UnitTestFiles/Sheboygan_Parcels.sdf";
-        STRING dataFileName2 = L"../UnitTestFiles/Redding_Parcels.shp";
-        STRING dataFileName3 = L"../UnitTestFiles/Redding_Parcels.dbf";
-        STRING dataFileName4 = L"../UnitTestFiles/Redding_Parcels.shx";
-        STRING dataFileName5 = L"../UnitTestFiles/Sheboygan_BuildingOutlines.sdf";
-        STRING dataFileName6 = L"../UnitTestFiles/Sheboygan_VotingDistricts.sdf";
-        STRING dataFileName7 = L"../UnitTestFiles/Empty.sdf";
-        STRING dataFileName8 = L"../UnitTestFiles/JoinTest.sqlite";
-#endif
-
-        //Add a new resource
-        Ptr<MgByteSource> contentSource1 = new MgByteSource(resourceContentFileName1);
-        Ptr<MgByteReader> contentReader1 = contentSource1->GetReader();
-        pService->SetResource(&resourceIdentifier1, contentReader1, NULL);
-
-        Ptr<MgByteSource> contentSource2 = new MgByteSource(resourceContentFileName2);
-        Ptr<MgByteReader> contentReader2 = contentSource2->GetReader();
-        pService->SetResource(&resourceIdentifier2, contentReader2, NULL);
-
-        Ptr<MgByteSource> contentSource3 = new MgByteSource(resourceContentFileName3);
-        Ptr<MgByteReader> contentReader3 = contentSource3->GetReader();
-        pService->SetResource(&resourceIdentifier3, contentReader3, NULL);
-
-        Ptr<MgByteSource> contentSource4 = new MgByteSource(resourceContentFileName4);
-        Ptr<MgByteReader> contentReader4 = contentSource4->GetReader();
-        pService->SetResource(&resourceIdentifier4, contentReader4, NULL);
-
-        Ptr<MgByteSource> contentSource5 = new MgByteSource(resourceContentFileName5);
-        Ptr<MgByteReader> contentReader5 = contentSource5->GetReader();
-        pService->SetResource(&resourceIdentifier5, contentReader5, NULL);
-
-        Ptr<MgByteSource> contentSource6 = new MgByteSource(resourceContentFileName6);
-        Ptr<MgByteReader> contentReader6 = contentSource6->GetReader();
-        pService->SetResource(&resourceIdentifier6, contentReader6, NULL);
-
-        Ptr<MgByteSource> contentSource7 = new MgByteSource(resourceContentFileName7);
-        Ptr<MgByteReader> contentReader7 = contentSource7->GetReader();
-        pService->SetResource(&resourceIdentifier7, contentReader7, NULL);
-
-        Ptr<MgByteSource> contentSource8 = new MgByteSource(resourceContentFileName8);
-        Ptr<MgByteReader> contentReader8 = contentSource8->GetReader();
-        pService->SetResource(&resourceIdentifier8, contentReader8, NULL);
-
-        Ptr<MgByteSource> contentSource9 = new MgByteSource(resourceContentFileName9);
-        Ptr<MgByteReader> contentReader9 = contentSource9->GetReader();
-        pService->SetResource(&resourceIdentifier9, contentReader9, NULL);
-
-        //Set the resource data
-        Ptr<MgByteSource> dataSource1 = new MgByteSource(dataFileName1);
-        Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
-        pService->SetResourceData(&resourceIdentifier1, L"Sheboygan_Parcels.sdf", L"File", dataReader1);
-
-        Ptr<MgByteSource> dataSource2 = new MgByteSource(dataFileName2);
-        Ptr<MgByteReader> dataReader2 = dataSource2->GetReader();
-        pService->SetResourceData(&resourceIdentifier2, L"Redding_Parcels.shp", L"File", dataReader2);
-
-        Ptr<MgByteSource> dataSource3 = new MgByteSource(dataFileName3);
-        Ptr<MgByteReader> dataReader3 = dataSource3->GetReader();
-        pService->SetResourceData(&resourceIdentifier2, L"Redding_Parcels.dbf", L"File", dataReader3);
-
-        Ptr<MgByteSource> dataSource4 = new MgByteSource(dataFileName4);
-        Ptr<MgByteReader> dataReader4 = dataSource4->GetReader();
-        pService->SetResourceData(&resourceIdentifier2, L"Redding_Parcels.shx", L"File", dataReader4);
-
-        Ptr<MgByteSource> dataSource5 = new MgByteSource(dataFileName5);
-        Ptr<MgByteReader> dataReader5 = dataSource5->GetReader();
-        pService->SetResourceData(&resourceIdentifier3, L"Sheboygan_BuildingOutlines.sdf", L"File", dataReader5);
-
-        Ptr<MgByteSource> dataSource6 = new MgByteSource(dataFileName6);
-        Ptr<MgByteReader> dataReader6 = dataSource6->GetReader();
-        pService->SetResourceData(&resourceIdentifier4, L"Sheboygan_VotingDistricts.sdf", L"File", dataReader6);
-
-        Ptr<MgByteSource> dataSource7 = new MgByteSource(dataFileName1);
-        Ptr<MgByteReader> dataReader7 = dataSource7->GetReader();
-        pService->SetResourceData(&resourceIdentifier5, L"Sheboygan_Parcels.sdf", L"File", dataReader7);
-
-        Ptr<MgByteSource> dataSource8 = new MgByteSource(dataFileName7);
-        Ptr<MgByteReader> dataReader8 = dataSource8->GetReader();
-        pService->SetResourceData(&resourceIdentifier6, L"Empty.sdf", L"File", dataReader8);
-
-        Ptr<MgByteSource> dataSource9 = new MgByteSource(dataFileName1);
-        Ptr<MgByteReader> dataReader9 = dataSource9->GetReader();
-        pService->SetResourceData(&resourceIdentifier7, L"Sheboygan_Parcels.sdf", L"File", dataReader9);
-
-        Ptr<MgByteSource> dataSource10 = new MgByteSource(dataFileName8);
-        Ptr<MgByteReader> dataReader10 = dataSource10->GetReader();
-        pService->SetResourceData(&resourceIdentifier8, L"JoinTest.sqlite", L"File", dataReader10);
-
-        //Sortable Right side data set
-        Ptr<MgResourceIdentifier> fsId = new MgResourceIdentifier(L"Library://UnitTests/Data/SortableRight.FeatureSource");
-        Ptr<MgByteSource> fsContent = new MgByteSource(L"../UnitTestFiles/UT_Sortable_Right.fs");
-        Ptr<MgByteReader> fsReader = fsContent->GetReader();
-
-        pService->SetResource(fsId, fsReader, NULL);
-        Ptr<MgByteSource> fsData = new MgByteSource(L"../UnitTestFiles/SortableRight.sqlite");
-        Ptr<MgByteReader> fsDataReader = fsData->GetReader();
-
-        pService->SetResourceData(fsId, L"SortableRight.sqlite", L"File", fsDataReader);
-        //CPPUNIT_ASSERT(featSvc->TestConnection(fsId));
-
-        //Sortable Left side data set
-        fsId = new MgResourceIdentifier(L"Library://UnitTests/Data/SortableLeft.FeatureSource");
-        fsContent = new MgByteSource(L"../UnitTestFiles/UT_Sortable_Left.fs");
-        fsReader = fsContent->GetReader();
-
-        pService->SetResource(fsId, fsReader, NULL);
-        fsData = new MgByteSource(L"../UnitTestFiles/SortableLeft.sqlite");
-        fsDataReader = fsData->GetReader();
-
-        pService->SetResourceData(fsId, L"SortableLeft.sqlite", L"File", fsDataReader);
-        //CPPUNIT_ASSERT(featSvc->TestConnection(fsId));
-
-        //Unsortable Right side data set
-        fsId = new MgResourceIdentifier(L"Library://UnitTests/Data/UnsortableRight.FeatureSource");
-        fsContent = new MgByteSource(L"../UnitTestFiles/UT_Unsortable_Right.fs");
-        fsReader = fsContent->GetReader();
-
-        pService->SetResource(fsId, fsReader, NULL);
-        fsData = new MgByteSource(L"../UnitTestFiles/UnsortableRight.sdf");
-        fsDataReader = fsData->GetReader();
-
-        pService->SetResourceData(fsId, L"UnsortableRight.sdf", L"File", fsDataReader);
-        //CPPUNIT_ASSERT(featSvc->TestConnection(fsId));
-
-        //Unsortable Left side data set
-        fsId = new MgResourceIdentifier(L"Library://UnitTests/Data/UnsortableLeft.FeatureSource");
-        fsContent = new MgByteSource(L"../UnitTestFiles/UT_Unsortable_Left.fs");
-        fsReader = fsContent->GetReader();
-
-        pService->SetResource(fsId, fsReader, NULL);
-        fsData = new MgByteSource(L"../UnitTestFiles/UnsortableLeft.sdf");
-        fsDataReader = fsData->GetReader();
-
-        pService->SetResourceData(fsId, L"UnsortableLeft.sdf", L"File", fsDataReader);
-        //CPPUNIT_ASSERT(featSvc->TestConnection(fsId));
-    }
-    catch(MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-}
-
-
-void TestFeatureService::TestEnd()
-{
-    try
-    {
-        Ptr<MgdServiceFactory> fact = new MgdServiceFactory();
-        Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
-        if (pService == 0)
-        {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestEnd",
-                __LINE__, __WFILE__, NULL, L"", NULL);
-        }
-
-
-#ifdef DEBUG
-        ACE_DEBUG((LM_INFO, ACE_TEXT("\nConnection Pool status: \n\n")));
-        std::vector<PoolCacheEntry*> entries;
-        MgFdoConnectionPool::GetCacheInfo(entries);
-        for (std::vector<PoolCacheEntry*>::iterator it = entries.begin(); it != entries.end(); it++)
-        {
-            STRING resId = (*it)->ResourceId;
-            ACE_DEBUG((LM_INFO, ACE_TEXT(" - %W (%d Open, %d Closed)\n"), resId.c_str(), (*it)->OpenCount, (*it)->ClosedCount));
-        }
-#endif
-
-        // delete the feature sources definition
-        Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
-        pService->DeleteResource(fsres1);
-
-        Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Redding_Parcels.FeatureSource");
-        pService->DeleteResource(fsres2);
-
-        Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_BuildingOutlines.FeatureSource");
-        pService->DeleteResource(fsres3);
-
-        Ptr<MgResourceIdentifier> fsres4 = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_VotingDistricts.FeatureSource");
-        pService->DeleteResource(fsres4);
-
-        Ptr<MgResourceIdentifier> fsres5 = new MgResourceIdentifier(L"Library://UnitTests/Data/TestChainedInner1ToManyJoin.FeatureSource");
-        pService->DeleteResource(fsres5);
-
-        Ptr<MgResourceIdentifier> fsres6 = new MgResourceIdentifier(L"Library://UnitTests/Data/Empty.FeatureSource");
-        pService->DeleteResource(fsres6);
-
-        Ptr<MgResourceIdentifier> fsres7 = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels_Writable.FeatureSource");
-        pService->DeleteResource(fsres7);
-
-        Ptr<MgResourceIdentifier> fsres8 = new MgResourceIdentifier(L"Library://UnitTests/Data/FdoJoin.FeatureSource");
-        pService->DeleteResource(fsres8);
-        
-        Ptr<MgResourceIdentifier> fsres9 = new MgResourceIdentifier(L"Library://UnitTests/Data/SecuredCredentials.FeatureSource");
-        pService->DeleteResource(fsres9);
-
-        //Ptr<MgResourceIdentifier> folder = new MgResourceIdentifier(L"Library://UnitTests/");
-        //pService->DeleteResource(folder);
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nFeature Service tests completed.\n\n")));
-}
-
 ///----------------------------------------------------------------------------
 /// Test Case Description:
 ///
 /// This test case gets the feature providers.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_GetFeatureProviders()
+TEST_CASE("GetFeatureProviders", "[FeatureService]")
 {
     try
     {
@@ -345,18 +45,18 @@
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetFeatureProviders", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetFeatureProviders", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgByteReader> byteReader = pService->GetFeatureProviders();
         STRING mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -363,7 +63,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -377,7 +77,7 @@
 ///
 /// This test case tests connections to the SDF provider.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_TestConnectionSDFProvider()
+TEST_CASE("TestConnectionSDFProvider", "[FeatureService]")
 {
     try
     {
@@ -385,7 +85,7 @@
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_TestConnectionSDFProvider", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_TestConnectionSDFProvider", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         const STRING provider = L"OSGeo.SDF";
@@ -395,13 +95,13 @@
         const STRING connectionString = L"File=../UnitTestFiles/Sheboygan_Parcels.sdf";
 #endif
         bool bSuccess = pService->TestConnection(provider, connectionString);
-        CPPUNIT_ASSERT(bSuccess);
+        REQUIRE(bSuccess);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -408,7 +108,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -421,7 +121,7 @@
 ///
 /// This test case gets the connection property values.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_GetConnectionPropertyValues()
+TEST_CASE("GetConnectionPropertyValues", "[FeatureService]")
 {
     try
     {
@@ -429,24 +129,24 @@
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetConnectionPropertyValues", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetConnectionPropertyValues", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         STRING provider = L"";
         STRING property = L"";
         STRING connectionString = L"";
-        CPPUNIT_ASSERT_THROW_MG(pService->GetConnectionPropertyValues(provider, property, connectionString), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetConnectionPropertyValues(provider, property, connectionString), MgInvalidArgumentException*);
 
         provider = L"OSGeo.SDF";
         property = L"ReadOnly";
         Ptr<MgStringCollection> properties = pService->GetConnectionPropertyValues(provider, property, connectionString);
-        CPPUNIT_ASSERT(properties->GetCount() > 0);
+        REQUIRE(properties->GetCount() > 0);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -453,7 +153,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -467,7 +167,7 @@
 ///
 /// This test case gets the provider capabilities.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_GetCapabilities()
+TEST_CASE("GetCapabilities", "[FeatureService]")
 {
     try
     {
@@ -475,7 +175,7 @@
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetCapabilities", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetCapabilities", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         STRING provider = L"OSGeo.SDF";
@@ -482,17 +182,17 @@
 
         Ptr<MgByteReader> reader = pService->GetCapabilities(provider);
         STRING mimetype = reader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimetype.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimetype.c_str(), MgMimeType::Xml.c_str()) == 0);
 
         provider = L"";
 
-        CPPUNIT_ASSERT_THROW_MG(pService->GetCapabilities(provider), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetCapabilities(provider), MgInvalidArgumentException*);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -499,7 +199,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -513,7 +213,7 @@
 ///
 /// This test case tests a connection to a resource.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_TestConnectionResourceIdentifier()
+TEST_CASE("TestConnectionResourceIdentifier", "[FeatureService]")
 {
     try
     {
@@ -521,24 +221,24 @@
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_TestConnectionResourceIdentifier", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_TestConnectionResourceIdentifier", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
-        CPPUNIT_ASSERT_THROW_MG(pService->TestConnection(resource), MgInvalidRepositoryTypeException*);
+        REQUIRE_THROWS_MG(pService->TestConnection(resource), MgInvalidRepositoryTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Geography/World.MapDefinition");
-        CPPUNIT_ASSERT_THROW_MG(pService->TestConnection(resource), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(pService->TestConnection(resource), MgInvalidResourceTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
         bool bResult = pService->TestConnection(resource);
-        CPPUNIT_ASSERT(bResult);
+        REQUIRE(bResult);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -545,7 +245,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -559,7 +259,7 @@
 ///
 /// This test case exercises getting schemas.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_GetSchemas()
+TEST_CASE("GetSchemas", "[FeatureService]")
 {
     try
     {
@@ -567,24 +267,24 @@
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetSchemas", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetSchemas", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
-        CPPUNIT_ASSERT_THROW_MG(pService->GetSchemas(resource), MgInvalidRepositoryTypeException*);
+        REQUIRE_THROWS_MG(pService->GetSchemas(resource), MgInvalidRepositoryTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Geography/World.MapDefinition");
-        CPPUNIT_ASSERT_THROW_MG(pService->GetSchemas(resource), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(pService->GetSchemas(resource), MgInvalidResourceTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
         Ptr<MgStringCollection> schemas = pService->GetSchemas(resource);
-        CPPUNIT_ASSERT(schemas->GetCount() > 0);
+        REQUIRE(schemas->GetCount() > 0);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -591,7 +291,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -605,7 +305,7 @@
 ///
 /// This test case exercises getting classes.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_GetClasses()
+TEST_CASE("GetClasses", "[FeatureService]")
 {
     try
     {
@@ -613,26 +313,26 @@
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetClasses", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetClasses", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
         STRING schemaName = L"";
-        CPPUNIT_ASSERT_THROW_MG(pService->GetClasses(resource, schemaName), MgInvalidRepositoryTypeException*);
+        REQUIRE_THROWS_MG(pService->GetClasses(resource, schemaName), MgInvalidRepositoryTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Geography/World.MapDefinition");
-        CPPUNIT_ASSERT_THROW_MG(pService->GetClasses(resource, schemaName), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(pService->GetClasses(resource, schemaName), MgInvalidResourceTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
         schemaName = L"SHP_Schema";
         Ptr<MgStringCollection> classes = pService->GetClasses(resource, schemaName);
-        CPPUNIT_ASSERT(classes->GetCount() > 0);
+        REQUIRE(classes->GetCount() > 0);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -639,7 +339,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -653,7 +353,7 @@
 ///
 /// This test case exercises getting class definitions.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_GetClassDefinition()
+TEST_CASE("GetClassDefinition", "[FeatureService]")
 {
     try
     {
@@ -661,33 +361,33 @@
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetClassDefinition", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetClassDefinition", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
         STRING schemaName = L"";
         STRING className = L"";
-        CPPUNIT_ASSERT_THROW_MG(pService->GetClassDefinition(resource, schemaName, className), MgInvalidRepositoryTypeException*);
+        REQUIRE_THROWS_MG(pService->GetClassDefinition(resource, schemaName, className), MgInvalidRepositoryTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.MapDefinition");
         schemaName = L"";
         className = L"";
-        CPPUNIT_ASSERT_THROW_MG(pService->GetClassDefinition(resource, schemaName, className), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(pService->GetClassDefinition(resource, schemaName, className), MgInvalidResourceTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
         schemaName = L"SHP_Schema";
         className = L"";
-        CPPUNIT_ASSERT_THROW_MG(pService->GetClassDefinition(resource, schemaName, className), MgClassNotFoundException*);
+        REQUIRE_THROWS_MG(pService->GetClassDefinition(resource, schemaName, className), MgClassNotFoundException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
         schemaName = L"Foo";
         className = L"Bar";
-        CPPUNIT_ASSERT_THROW_MG(pService->GetClassDefinition(resource, schemaName, className), MgFdoException*);
+        REQUIRE_THROWS_MG(pService->GetClassDefinition(resource, schemaName, className), MgFdoException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
         schemaName = L"SHP_Schema";
         className = L"Bar";
-        CPPUNIT_ASSERT_THROW_MG(pService->GetClassDefinition(resource, schemaName, className), MgFdoException*);
+        REQUIRE_THROWS_MG(pService->GetClassDefinition(resource, schemaName, className), MgFdoException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
         schemaName = L"SHP_Schema";
@@ -694,13 +394,13 @@
         className = L"Parcels";
         Ptr<MgClassDefinition> classDef = pService->GetClassDefinition(resource, schemaName, className);
         STRING name = classDef->GetName();
-        CPPUNIT_ASSERT(name == L"Parcels");
+        REQUIRE(name == L"Parcels");
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -707,7 +407,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -721,7 +421,7 @@
 /// This test case verifies modifications to returned class definitions does not
 /// affect subsequent fetches of the same class definition
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_GetClassDefinitionImmutability()
+TEST_CASE("GetClassDefinitionImmutability", "[FeatureService]")
 {
     try
     {
@@ -729,7 +429,7 @@
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetClassDefinition", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetClassDefinition", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
@@ -737,7 +437,7 @@
         STRING className = L"Parcels";
         Ptr<MgClassDefinition> classDef = pService->GetClassDefinition(resource, schemaName, className);
         STRING name = classDef->GetName();
-        CPPUNIT_ASSERT(name == L"Parcels");
+        REQUIRE(name == L"Parcels");
 
         //Remove RNAME
         Ptr<MgPropertyDefinitionCollection> props = classDef->GetProperties();
@@ -744,26 +444,26 @@
         INT32 pidx = props->IndexOf(L"RNAME");
         props->RemoveAt(pidx);
         pidx = props->IndexOf(L"RNAME");
-        CPPUNIT_ASSERT(pidx < 0);
+        REQUIRE(pidx < 0);
 
         //Fetch another one
         Ptr<MgClassDefinition> classDef2 = pService->GetClassDefinition(resource, schemaName, className);
         STRING name2 = classDef2->GetName();
-        CPPUNIT_ASSERT(name2 == L"Parcels");
-        CPPUNIT_ASSERT(classDef.p != classDef2.p);
+        REQUIRE(name2 == L"Parcels");
+        REQUIRE(classDef.p != classDef2.p);
 
         //Verify our modification of the previous return value did nothing
         Ptr<MgPropertyDefinitionCollection> props2 = classDef2->GetProperties();
-        CPPUNIT_ASSERT(props2.p != props.p);
-        CPPUNIT_ASSERT(props->GetCount() == props2->GetCount() - 1);
+        REQUIRE(props2.p != props.p);
+        REQUIRE(props->GetCount() == props2->GetCount() - 1);
         pidx = props2->IndexOf(L"RNAME");
-        CPPUNIT_ASSERT(pidx >= 0);
+        REQUIRE(pidx >= 0);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -770,7 +470,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -784,7 +484,7 @@
 ///
 /// This test case exercises describing schemas.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_DescribeSchema()
+TEST_CASE("DescribeSchema", "[FeatureService]")
 {
     try
     {
@@ -792,27 +492,27 @@
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_DescribeSchema", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_DescribeSchema", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
         STRING schemaName = L"";
-        CPPUNIT_ASSERT_THROW_MG(pService->DescribeSchema(resource, schemaName, NULL), MgInvalidRepositoryTypeException*);
+        REQUIRE_THROWS_MG(pService->DescribeSchema(resource, schemaName, nullptr), MgInvalidRepositoryTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Geography/World.MapDefinition");
         schemaName = L"";
-        CPPUNIT_ASSERT_THROW_MG(pService->DescribeSchema(resource, schemaName, NULL), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(pService->DescribeSchema(resource, schemaName, nullptr), MgInvalidResourceTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
         schemaName = L"";
-        Ptr<MgFeatureSchemaCollection> schemaCollection = pService->DescribeSchema(resource, schemaName, NULL);
-        CPPUNIT_ASSERT(schemaCollection->GetCount() > 0);
+        Ptr<MgFeatureSchemaCollection> schemaCollection = pService->DescribeSchema(resource, schemaName, nullptr);
+        REQUIRE(schemaCollection->GetCount() > 0);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -819,7 +519,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -833,7 +533,7 @@
 /// This test case verifies modifications to returned feature schemas does not
 /// affect subsequent fetches of the same feature schemas
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_DescribeSchemaImmutability()
+TEST_CASE("DescribeSchemaImmutability", "[FeatureService]")
 {
     try
     {
@@ -841,20 +541,20 @@
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_DescribeSchema", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_DescribeSchema", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
         STRING schemaName = L"";
-        Ptr<MgFeatureSchemaCollection> schemaCollection = pService->DescribeSchema(resource, schemaName, NULL);
-        CPPUNIT_ASSERT(schemaCollection->GetCount() > 0);
+        Ptr<MgFeatureSchemaCollection> schemaCollection = pService->DescribeSchema(resource, schemaName, nullptr);
+        REQUIRE(schemaCollection->GetCount() > 0);
 
         schemaCollection->RemoveAt(0);
 
         //Verify modifications did not affect this return value
-        Ptr<MgFeatureSchemaCollection> schemaCollection2 = pService->DescribeSchema(resource, schemaName, NULL);
-        CPPUNIT_ASSERT(schemaCollection.p != schemaCollection2.p);
-        CPPUNIT_ASSERT(schemaCollection->GetCount() == schemaCollection2->GetCount() - 1);
+        Ptr<MgFeatureSchemaCollection> schemaCollection2 = pService->DescribeSchema(resource, schemaName, nullptr);
+        REQUIRE(schemaCollection.p != schemaCollection2.p);
+        REQUIRE(schemaCollection->GetCount() == schemaCollection2->GetCount() - 1);
 
         Ptr<MgFeatureSchema> schema = schemaCollection2->GetItem(0);
         Ptr<MgClassDefinitionCollection> classes = schema->GetClasses();
@@ -861,22 +561,22 @@
 
         classes->RemoveAt(0);
 
-        Ptr<MgFeatureSchemaCollection> schemaCollection3 = pService->DescribeSchema(resource, schemaName, NULL);
-        CPPUNIT_ASSERT(schemaCollection3.p != schemaCollection2.p);
-        CPPUNIT_ASSERT(schemaCollection.p != schemaCollection3.p);
-        CPPUNIT_ASSERT(schemaCollection->GetCount() == schemaCollection3->GetCount() - 1);
+        Ptr<MgFeatureSchemaCollection> schemaCollection3 = pService->DescribeSchema(resource, schemaName, nullptr);
+        REQUIRE(schemaCollection3.p != schemaCollection2.p);
+        REQUIRE(schemaCollection.p != schemaCollection3.p);
+        REQUIRE(schemaCollection->GetCount() == schemaCollection3->GetCount() - 1);
 
         Ptr<MgFeatureSchema> schema3 = schemaCollection3->GetItem(0);
         Ptr<MgClassDefinitionCollection> classes3 = schema3->GetClasses();
 
-        CPPUNIT_ASSERT(classes.p != classes3.p);
-        CPPUNIT_ASSERT(classes->GetCount() == classes3->GetCount() - 1);
+        REQUIRE(classes.p != classes3.p);
+        REQUIRE(classes->GetCount() == classes3->GetCount() - 1);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -883,7 +583,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -896,7 +596,7 @@
 ///
 /// Find the class definition by name from a class definition collection.
 ///----------------------------------------------------------------------------
-MgClassDefinition* FindClassByName(MgClassDefinitionCollection* classDefCol, STRING name)
+static MgClassDefinition* FindClassByName(MgClassDefinitionCollection* classDefCol, STRING name)
 {
     for (int i =0; i < classDefCol->GetCount(); i++)
     {
@@ -905,7 +605,7 @@
         if (temp == name)
             return classDef.Detach();
     }
-    return NULL;
+    return nullptr;
 }
 
 ///----------------------------------------------------------------------------
@@ -913,7 +613,7 @@
 ///
 /// This test case exercises applying schemas.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_ApplySchema()
+TEST_CASE("ApplySchema", "[FeatureService]")
 {
     try
     {
@@ -921,7 +621,7 @@
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_ApplySchema", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_ApplySchema", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Empty.FeatureSource");
@@ -930,7 +630,7 @@
         /// The first test case:                                           ///
         /// Delete one property in an existing feature class               ///
         //////////////////////////////////////////////////////////////////////
-        Ptr<MgFeatureSchemaCollection> oldSchemas = pService->DescribeSchema(resource, L"Schema", NULL);
+        Ptr<MgFeatureSchemaCollection> oldSchemas = pService->DescribeSchema(resource, L"Schema", nullptr);
         Ptr<MgFeatureSchema> oldSchema = oldSchemas->GetItem(0);
         Ptr<MgClassDefinitionCollection> oldSchemaClasses = oldSchema->GetClasses();
         Ptr<MgClassDefinition> oldClassDef = FindClassByName(oldSchemaClasses, L"Parcel");
@@ -940,12 +640,12 @@
         pService->ApplySchema(resource, oldSchema);
 
         // Verify results
-        Ptr<MgFeatureSchemaCollection> newSchemas = pService->DescribeSchema(resource, L"Schema", NULL);
+        Ptr<MgFeatureSchemaCollection> newSchemas = pService->DescribeSchema(resource, L"Schema", nullptr);
         Ptr<MgFeatureSchema> newSchema = newSchemas->GetItem(0);
         Ptr<MgClassDefinitionCollection> newSchemaClasses = newSchema->GetClasses();
         Ptr<MgClassDefinition> newClassDef = FindClassByName(newSchemaClasses, L"Parcel");
         Ptr<MgPropertyDefinitionCollection> newProperties = newClassDef->GetProperties();
-        CPPUNIT_ASSERT(newProperties->Contains(L"Name") == false);
+        REQUIRE(newProperties->Contains(L"Name") == false);
 
         //////////////////////////////////////////////////////////////////////
         /// The second test case:                                          ///
@@ -1012,13 +712,13 @@
         schemaClasses->Add(classDef2);
 
         pService->ApplySchema(resource, schema);
-        newSchemas = pService->DescribeSchema(resource, L"Schema", NULL);
+        newSchemas = pService->DescribeSchema(resource, L"Schema", nullptr);
 
         // Verify schema
         STRING temp;
         newSchema = newSchemas->GetItem(0);
         temp = newSchema->GetName();
-        CPPUNIT_ASSERT(temp == L"Schema");
+        REQUIRE(temp == L"Schema");
 
         schemaClasses = newSchema->GetClasses();
 
@@ -1025,62 +725,62 @@
         // Verify the first feature class
         classDef1 = FindClassByName(schemaClasses, L"FeatureClass1");
         temp = classDef1->GetName();
-        CPPUNIT_ASSERT(temp == L"FeatureClass1");
+        REQUIRE(temp == L"FeatureClass1");
         temp = classDef1->GetDescription();
-        CPPUNIT_ASSERT(temp == L"Feature class 1");
+        REQUIRE(temp == L"Feature class 1");
         temp = classDef1->GetDefaultGeometryPropertyName();
-        CPPUNIT_ASSERT(temp == L"GEOM");
+        REQUIRE(temp == L"GEOM");
 
         identityProperties1 = classDef1->GetIdentityProperties();
-        CPPUNIT_ASSERT(identityProperties1->GetCount() == 1);
+        REQUIRE(identityProperties1->GetCount() == 1);
         prop = static_cast<MgDataPropertyDefinition*>(identityProperties1->GetItem(L"KEY1"));
-        CPPUNIT_ASSERT(prop != NULL);
+        REQUIRE(prop != nullptr);
 
         properties1 = classDef1->GetProperties();
-        CPPUNIT_ASSERT(properties1->GetCount() == 3);
+        REQUIRE(properties1->GetCount() == 3);
 
         prop = static_cast<MgDataPropertyDefinition*>(properties1->GetItem(L"KEY1"));
-        CPPUNIT_ASSERT(prop != NULL);
-        CPPUNIT_ASSERT(prop->GetDataType() == MgPropertyType::Int32);
-        CPPUNIT_ASSERT(prop->IsAutoGenerated() == true);
-        CPPUNIT_ASSERT(prop->GetReadOnly() == true);
+        REQUIRE(prop != nullptr);
+        REQUIRE(prop->GetDataType() == MgPropertyType::Int32);
+        REQUIRE(prop->IsAutoGenerated() == true);
+        REQUIRE(prop->GetReadOnly() == true);
 
         prop = static_cast<MgDataPropertyDefinition*>(properties1->GetItem(L"NAME1"));
-        CPPUNIT_ASSERT(prop != NULL);
-        CPPUNIT_ASSERT(prop->GetDataType() == MgPropertyType::String);
+        REQUIRE(prop != nullptr);
+        REQUIRE(prop->GetDataType() == MgPropertyType::String);
 
         propGeom = static_cast<MgGeometricPropertyDefinition*>(properties1->GetItem(L"GEOM"));
-        CPPUNIT_ASSERT(prop != NULL);
-        CPPUNIT_ASSERT(propGeom->GetGeometryTypes() == MgFeatureGeometricType::Surface);
+        REQUIRE(prop != nullptr);
+        REQUIRE(propGeom->GetGeometryTypes() == MgFeatureGeometricType::Surface);
 
         // Verify the second feature class
         classDef2 = FindClassByName(schemaClasses, L"FeatureClass2");
         temp = classDef2->GetDescription();
-        CPPUNIT_ASSERT(temp == L"Feature class 2");
+        REQUIRE(temp == L"Feature class 2");
         temp = classDef2->GetDefaultGeometryPropertyName();
-        CPPUNIT_ASSERT(temp == L"GEOM");
+        REQUIRE(temp == L"GEOM");
 
         identityProperties2 = classDef2->GetIdentityProperties();
-        CPPUNIT_ASSERT(identityProperties2->GetCount() == 1);
+        REQUIRE(identityProperties2->GetCount() == 1);
         prop = static_cast<MgDataPropertyDefinition*>(identityProperties2->GetItem(L"KEY2"));
-        CPPUNIT_ASSERT(prop != NULL);
+        REQUIRE(prop != nullptr);
 
         properties2 = classDef2->GetProperties();
-        CPPUNIT_ASSERT(properties2->GetCount() == 3);
+        REQUIRE(properties2->GetCount() == 3);
 
         prop = static_cast<MgDataPropertyDefinition*>(properties2->GetItem(L"KEY2"));
-        CPPUNIT_ASSERT(prop != NULL);
-        CPPUNIT_ASSERT(prop->GetDataType() == MgPropertyType::Int32);
-        CPPUNIT_ASSERT(prop->IsAutoGenerated() == true);
-        CPPUNIT_ASSERT(prop->GetReadOnly() == true);
+        REQUIRE(prop != nullptr);
+        REQUIRE(prop->GetDataType() == MgPropertyType::Int32);
+        REQUIRE(prop->IsAutoGenerated() == true);
+        REQUIRE(prop->GetReadOnly() == true);
 
         prop = static_cast<MgDataPropertyDefinition*>(properties2->GetItem(L"NAME2"));
-        CPPUNIT_ASSERT(prop != NULL);
-        CPPUNIT_ASSERT(prop->GetDataType() == MgPropertyType::String);
+        REQUIRE(prop != nullptr);
+        REQUIRE(prop->GetDataType() == MgPropertyType::String);
 
         propGeom = static_cast<MgGeometricPropertyDefinition*>(properties2->GetItem(L"GEOM"));
-        CPPUNIT_ASSERT(prop != NULL);
-        CPPUNIT_ASSERT(propGeom->GetGeometryTypes() == MgFeatureGeometricType::Curve);
+        REQUIRE(prop != nullptr);
+        REQUIRE(propGeom->GetGeometryTypes() == MgFeatureGeometricType::Curve);
 
         //////////////////////////////////////////////////////////////////////
         /// The third test case:                                           ///
@@ -1107,51 +807,51 @@
 
         pService->ApplySchema(resource, newSchema);
 
-        newSchemas = pService->DescribeSchema(resource, L"Schema", NULL);
+        newSchemas = pService->DescribeSchema(resource, L"Schema", nullptr);
         newSchema = newSchemas->GetItem(0);
         temp = newSchema->GetName();
-        CPPUNIT_ASSERT(temp == L"Schema");
+        REQUIRE(temp == L"Schema");
 
         schemaClasses = newSchema->GetClasses();
 
         // Verify the first feature class
         classDef1 = FindClassByName(schemaClasses, L"FeatureClass1");
-        CPPUNIT_ASSERT(classDef1 == NULL);
+        REQUIRE(classDef1 == nullptr);
 
         classDef2 = FindClassByName(schemaClasses, L"FeatureClass2");
         temp = classDef2->GetDescription();
-        CPPUNIT_ASSERT(temp == L"Modified Feature Class");
+        REQUIRE(temp == L"Modified Feature Class");
 
         properties2 = classDef2->GetProperties();
-        CPPUNIT_ASSERT(properties2->GetCount() == 5);
+        REQUIRE(properties2->GetCount() == 5);
 
         temp = classDef2->GetDefaultGeometryPropertyName();
-        CPPUNIT_ASSERT(temp == L"GEOM");
+        REQUIRE(temp == L"GEOM");
 
         identityProperties2 = classDef2->GetIdentityProperties();
-        CPPUNIT_ASSERT(identityProperties2->GetCount() == 1);
+        REQUIRE(identityProperties2->GetCount() == 1);
         prop = static_cast<MgDataPropertyDefinition*>(identityProperties2->GetItem(L"KEY2"));
-        CPPUNIT_ASSERT(prop != NULL);
+        REQUIRE(prop != nullptr);
 
         prop = static_cast<MgDataPropertyDefinition*>(properties2->GetItem(L"ID"));
-        CPPUNIT_ASSERT(prop != NULL);
-        CPPUNIT_ASSERT(prop->GetDataType() == MgPropertyType::Int32);
-        CPPUNIT_ASSERT(prop->IsAutoGenerated() == true);
-        CPPUNIT_ASSERT(prop->GetReadOnly() == true);
+        REQUIRE(prop != nullptr);
+        REQUIRE(prop->GetDataType() == MgPropertyType::Int32);
+        REQUIRE(prop->IsAutoGenerated() == true);
+        REQUIRE(prop->GetReadOnly() == true);
 
         prop = static_cast<MgDataPropertyDefinition*>(properties2->GetItem(L"LENGTH"));
-        CPPUNIT_ASSERT(prop != NULL);
-        CPPUNIT_ASSERT(prop->GetDataType() == MgPropertyType::Single);
+        REQUIRE(prop != nullptr);
+        REQUIRE(prop->GetDataType() == MgPropertyType::Single);
 
         propGeom = static_cast<MgGeometricPropertyDefinition*>(properties2->GetItem(L"GEOM"));
-        CPPUNIT_ASSERT(prop != NULL);
-        CPPUNIT_ASSERT(propGeom->GetGeometryTypes() == MgFeatureGeometricType::Curve);
+        REQUIRE(prop != nullptr);
+        REQUIRE(propGeom->GetGeometryTypes() == MgFeatureGeometricType::Curve);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -1158,7 +858,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1172,7 +872,7 @@
 ///
 /// This test case exercises selecting features.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_SelectFeatures()
+TEST_CASE("SelectFeatures", "[FeatureService]")
 {
     try
     {
@@ -1180,19 +880,19 @@
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_SelectFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_SelectFeatures", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
         STRING className = L"";
         Ptr<MgFeatureQueryOptions> options = new MgFeatureQueryOptions();
-        CPPUNIT_ASSERT_THROW_MG(pService->SelectFeatures(resource, className, options), MgInvalidRepositoryTypeException*);
+        REQUIRE_THROWS_MG(pService->SelectFeatures(resource, className, options), MgInvalidRepositoryTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.MapDefinition");
-        CPPUNIT_ASSERT_THROW_MG(pService->SelectFeatures(resource, className, options), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(pService->SelectFeatures(resource, className, options), MgInvalidResourceTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
-        CPPUNIT_ASSERT_THROW_MG(pService->SelectFeatures(resource, className, options), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->SelectFeatures(resource, className, options), MgInvalidArgumentException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
         className = L"Parcels";
@@ -1199,13 +899,13 @@
         Ptr<MgFeatureReader> reader = pService->SelectFeatures(resource, className, options);
         bool bResult = reader->ReadNext();
         reader->Close();
-        CPPUNIT_ASSERT(bResult);
+        REQUIRE(bResult);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -1212,7 +912,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1225,7 +925,7 @@
 ///
 /// This test case exercises selecting features with a transform.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_SelectFeaturesTransformed()
+TEST_CASE("SelectFeaturesTransformed", "[FeatureService]")
 {
     try
     {
@@ -1233,7 +933,7 @@
         Ptr<MgdFeatureService> pService = dynamic_cast<MgdFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_SelectFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_SelectFeatures", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         //Create our test data store
@@ -1298,39 +998,39 @@
         Ptr<MgFeatureQueryOptions> query = new MgFeatureQueryOptions();
         Ptr<MgReader> reader = pService->SelectFeatures(fsId, L"Default:Test", query, dstWkt);
         
-        CPPUNIT_ASSERT(reader->ReadNext());
-        CPPUNIT_ASSERT(!reader->IsNull(L"Geometry"));
+        REQUIRE(reader->ReadNext());
+        REQUIRE(!reader->IsNull(L"Geometry"));
 
         Ptr<MgByteReader> txAgf1 = reader->GetGeometry(L"Geometry");
         Ptr<MgGeometry> txGeom1 = agfRw->Read(txAgf1);
         MgPoint* txPt1 = dynamic_cast<MgPoint*>(txGeom1.p);
-        CPPUNIT_ASSERT(txPt1 != NULL);
+        REQUIRE(txPt1 != nullptr);
         Ptr<MgCoordinate> txCoord1 = txPt1->GetCoordinate();
 
         //TODO: Maybe we should really check that it matches the expected transformed result
-        CPPUNIT_ASSERT(txCoord1->GetX() != -37.1020);
-        CPPUNIT_ASSERT(txCoord1->GetY() != 144.0020);
+        REQUIRE(txCoord1->GetX() != -37.1020);
+        REQUIRE(txCoord1->GetY() != 144.0020);
 
-        CPPUNIT_ASSERT(reader->ReadNext());
-        CPPUNIT_ASSERT(!reader->IsNull(L"Geometry"));
+        REQUIRE(reader->ReadNext());
+        REQUIRE(!reader->IsNull(L"Geometry"));
 
         Ptr<MgByteReader> txAgf2 = reader->GetGeometry(L"Geometry");
         Ptr<MgGeometry> txGeom2 = agfRw->Read(txAgf2);
         MgPoint* txPt2 = dynamic_cast<MgPoint*>(txGeom2.p);
-        CPPUNIT_ASSERT(txPt2 != NULL);
+        REQUIRE(txPt2 != nullptr);
         Ptr<MgCoordinate> txCoord2 = txPt2->GetCoordinate();
 
         //TODO: Maybe we should really check that it matches the expected transformed result
-        CPPUNIT_ASSERT(txCoord2->GetX() != -37.2020);
-        CPPUNIT_ASSERT(txCoord2->GetY() != 144.2020);
+        REQUIRE(txCoord2->GetX() != -37.2020);
+        REQUIRE(txCoord2->GetY() != 144.2020);
 
         reader->Close();
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -1337,7 +1037,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1350,7 +1050,7 @@
 ///
 /// This test case exercises selecting features with the scrollable reader.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_SelectScrollable()
+TEST_CASE("SelectScrollable", "[FeatureService]")
 {
     try
     {
@@ -1358,25 +1058,25 @@
         Ptr<MgdFeatureService> pService = dynamic_cast<MgdFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_SelectFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_SelectFeatures", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
         STRING className = L"";
         Ptr<MgFeatureQueryOptions> options = new MgFeatureQueryOptions();
-        CPPUNIT_ASSERT_THROW_MG(pService->SelectFeaturesExtended(resource, className, options), MgInvalidRepositoryTypeException*);
+        REQUIRE_THROWS_MG(pService->SelectFeaturesExtended(resource, className, options), MgInvalidRepositoryTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_VotingDistricts.MapDefinition");
-        CPPUNIT_ASSERT_THROW_MG(pService->SelectFeaturesExtended(resource, className, options), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(pService->SelectFeaturesExtended(resource, className, options), MgInvalidResourceTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_VotingDistricts.FeatureSource");
-        CPPUNIT_ASSERT_THROW_MG(pService->SelectFeaturesExtended(resource, className, options), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->SelectFeaturesExtended(resource, className, options), MgInvalidArgumentException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_VotingDistricts.FeatureSource");
         className = L"VotingDistricts";
         Ptr<MgdScrollableFeatureReader> reader = pService->SelectFeaturesExtended(resource, className, options);
         INT32 count = reader->Count();
-        CPPUNIT_ASSERT(11 == count);
+        REQUIRE(11 == count);
 
         Ptr<MgPropertyCollection> keys = new MgPropertyCollection();
         Ptr<MgInt32Property> keyVal = new MgInt32Property(L"FeatId", 4);
@@ -1407,22 +1107,22 @@
         bool bAfterLast = reader->ReadNext();
         reader->Close();
 
-        CPPUNIT_ASSERT(bScroll);
-        CPPUNIT_ASSERT(bScroll2);
-        CPPUNIT_ASSERT(!bScroll3);
-        CPPUNIT_ASSERT(!bScroll4);
-        CPPUNIT_ASSERT(!bScroll5);
-        CPPUNIT_ASSERT(bScroll6);
-        CPPUNIT_ASSERT(bFirst);
-        CPPUNIT_ASSERT(!bBeforeFirst);
-        CPPUNIT_ASSERT(bLast);
-        CPPUNIT_ASSERT(!bAfterLast);
+        REQUIRE(bScroll);
+        REQUIRE(bScroll2);
+        REQUIRE(!bScroll3);
+        REQUIRE(!bScroll4);
+        REQUIRE(!bScroll5);
+        REQUIRE(bScroll6);
+        REQUIRE(bFirst);
+        REQUIRE(!bBeforeFirst);
+        REQUIRE(bLast);
+        REQUIRE(!bAfterLast);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -1429,7 +1129,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1443,7 +1143,7 @@
 ///
 /// This test case exercises selecting aggregate features.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_SelectAggregate()
+TEST_CASE("SelectAggregates", "[FeatureService]")
 {
     try
     {
@@ -1451,7 +1151,7 @@
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_SelectAggregate", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_SelectAggregate", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgDataReader> reader;
@@ -1458,13 +1158,13 @@
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
         STRING className = L"";
         Ptr<MgFeatureAggregateOptions> options = new MgFeatureAggregateOptions();
-        CPPUNIT_ASSERT_THROW_MG(reader = pService->SelectAggregate(resource, className, options), MgInvalidRepositoryTypeException*);
+        REQUIRE_THROWS_MG(reader = pService->SelectAggregate(resource, className, options), MgInvalidRepositoryTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.MapDefinition");
-        CPPUNIT_ASSERT_THROW_MG(reader = pService->SelectAggregate(resource, className, options), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(reader = pService->SelectAggregate(resource, className, options), MgInvalidResourceTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
-        CPPUNIT_ASSERT_THROW_MG(reader = pService->SelectAggregate(resource, className, options), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(reader = pService->SelectAggregate(resource, className, options), MgInvalidArgumentException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
         className = L"Parcels";
@@ -1472,13 +1172,13 @@
         reader = pService->SelectAggregate(resource, className, options);
         bool bResult = reader->ReadNext();
         reader->Close();
-        CPPUNIT_ASSERT(bResult);
+        REQUIRE(bResult);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -1485,7 +1185,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1495,7 +1195,7 @@
 
 static int smTestSdfId = -1;
 
-void TestFeatureService::TestCase_InsertFeatures()
+TEST_CASE("InsertFeatures", "[FeatureService]")
 {
     try
     {
@@ -1503,7 +1203,7 @@
         Ptr<MgdFeatureService> pService = dynamic_cast<MgdFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_InsertFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_InsertFeatures", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> fsId = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels_Writable.FeatureSource");
@@ -1533,8 +1233,8 @@
         }
         fr->Close();
 
-        CPPUNIT_ASSERT(inserted == 1);
-        CPPUNIT_ASSERT(smTestSdfId != -1);
+        REQUIRE(inserted == 1);
+        REQUIRE(smTestSdfId != -1);
 
         //Do a select to verify it's definitely there
         Ptr<MgFeatureQueryOptions> query = new MgFeatureQueryOptions();
@@ -1546,17 +1246,17 @@
 
         Ptr<MgReader> reader = pService->SelectFeatures(fsId, className, query);
         bool read = reader->ReadNext();
-        CPPUNIT_ASSERT(read);
-        CPPUNIT_ASSERT(!reader->IsNull(L"Autogenerated_SDF_ID"));
-        CPPUNIT_ASSERT(!reader->IsNull(L"RNAME"));
-        CPPUNIT_ASSERT(!reader->IsNull(L"SHPGEOM"));
-        CPPUNIT_ASSERT(reader->GetInt32(L"Autogenerated_SDF_ID") == smTestSdfId);
-        CPPUNIT_ASSERT(reader->GetString(L"RNAME") == L"Hello Parcel");
+        REQUIRE(read);
+        REQUIRE(!reader->IsNull(L"Autogenerated_SDF_ID"));
+        REQUIRE(!reader->IsNull(L"RNAME"));
+        REQUIRE(!reader->IsNull(L"SHPGEOM"));
+        REQUIRE(reader->GetInt32(L"Autogenerated_SDF_ID") == smTestSdfId);
+        REQUIRE(reader->GetString(L"RNAME") == L"Hello Parcel");
 
         agf = reader->GetGeometry(L"SHPGEOM");
         poly = agfRW->Read(agf);
         STRING wkt = wktRW->Write(poly);
-        CPPUNIT_ASSERT(wkt == origWkt);
+        REQUIRE(wkt == origWkt);
 
         for (INT32 i = 0; i < reader->GetPropertyCount(); i++)
         {
@@ -1565,19 +1265,19 @@
                 propName != L"RNAME" &&
                 propName != L"SHPGEOM")
             {
-                CPPUNIT_ASSERT(reader->IsNull(propName));
-                CPPUNIT_ASSERT(reader->IsNull(i));
+                REQUIRE(reader->IsNull(propName));
+                REQUIRE(reader->IsNull(i));
             }
         }
 
-        CPPUNIT_ASSERT(!reader->ReadNext());
+        REQUIRE(!reader->ReadNext());
         reader->Close();
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -1584,7 +1284,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1592,7 +1292,7 @@
     }
 }
 
-void TestFeatureService::TestCase_InsertFeaturesBatch()
+TEST_CASE("InsertFeaturesBatch", "[FeatureService]")
 {
     try
     {
@@ -1600,12 +1300,12 @@
         Ptr<MgResourceService> pResSvc = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pResSvc == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_InsertFeaturesBatch", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_InsertFeaturesBatch", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
         Ptr<MgdFeatureService> pService = dynamic_cast<MgdFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_InsertFeaturesBatch", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_InsertFeaturesBatch", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         //Set up the feature source
@@ -1728,18 +1428,18 @@
             insertedCount++;
         }
         //We inserted 3 features
-        CPPUNIT_ASSERT(3 == insertedCount);
+        REQUIRE(3 == insertedCount);
 
         //Now query to verify all values are the same
-        Ptr<MgFeatureReader> reader = pService->SelectFeatures(fsId, L"Default:Parcels", NULL);
+        Ptr<MgFeatureReader> reader = pService->SelectFeatures(fsId, L"Default:Parcels", nullptr);
         
-        CPPUNIT_ASSERT(reader->ReadNext());
+        REQUIRE(reader->ReadNext());
 
-        CPPUNIT_ASSERT(!reader->IsNull(L"ID"));
-        CPPUNIT_ASSERT(!reader->IsNull(L"RNAME"));
-        CPPUNIT_ASSERT(!reader->IsNull(L"PRICE"));
-        CPPUNIT_ASSERT(!reader->IsNull(L"DATE"));
-        CPPUNIT_ASSERT(!reader->IsNull(L"SHPGEOM"));
+        REQUIRE(!reader->IsNull(L"ID"));
+        REQUIRE(!reader->IsNull(L"RNAME"));
+        REQUIRE(!reader->IsNull(L"PRICE"));
+        REQUIRE(!reader->IsNull(L"DATE"));
+        REQUIRE(!reader->IsNull(L"SHPGEOM"));
 
         INT32 fid = reader->GetInt32(L"ID");
         STRING frname = reader->GetString(L"RNAME");
@@ -1746,31 +1446,31 @@
         double fprice = reader->GetDouble(L"PRICE");
         Ptr<MgDateTime> fdt = reader->GetDateTime(L"DATE");
 
-        CPPUNIT_ASSERT(1 == fid);
-        CPPUNIT_ASSERT(L"Hello Parcel" == frname);
-        CPPUNIT_ASSERT(5000.0 == fprice);
-        CPPUNIT_ASSERT(2011 == fdt->GetYear());
-        CPPUNIT_ASSERT(9 == fdt->GetMonth());
-        CPPUNIT_ASSERT(14 == fdt->GetDay());
+        REQUIRE(1 == fid);
+        REQUIRE(L"Hello Parcel" == frname);
+        REQUIRE(5000.0 == fprice);
+        REQUIRE(2011 == fdt->GetYear());
+        REQUIRE(9 == fdt->GetMonth());
+        REQUIRE(14 == fdt->GetDay());
 
-        CPPUNIT_ASSERT(reader->ReadNext());
+        REQUIRE(reader->ReadNext());
 
-        CPPUNIT_ASSERT(!reader->IsNull(L"ID"));
-        CPPUNIT_ASSERT(reader->IsNull(L"RNAME"));
-        CPPUNIT_ASSERT(reader->IsNull(L"PRICE"));
-        CPPUNIT_ASSERT(reader->IsNull(L"DATE"));
-        CPPUNIT_ASSERT(!reader->IsNull(L"SHPGEOM"));
+        REQUIRE(!reader->IsNull(L"ID"));
+        REQUIRE(reader->IsNull(L"RNAME"));
+        REQUIRE(reader->IsNull(L"PRICE"));
+        REQUIRE(reader->IsNull(L"DATE"));
+        REQUIRE(!reader->IsNull(L"SHPGEOM"));
 
         fid = reader->GetInt32(L"ID");
-        CPPUNIT_ASSERT(2 == fid);
+        REQUIRE(2 == fid);
 
-        CPPUNIT_ASSERT(reader->ReadNext());
+        REQUIRE(reader->ReadNext());
 
-        CPPUNIT_ASSERT(!reader->IsNull(L"ID"));
-        CPPUNIT_ASSERT(!reader->IsNull(L"RNAME"));
-        CPPUNIT_ASSERT(!reader->IsNull(L"PRICE"));
-        CPPUNIT_ASSERT(!reader->IsNull(L"DATE"));
-        CPPUNIT_ASSERT(!reader->IsNull(L"SHPGEOM"));
+        REQUIRE(!reader->IsNull(L"ID"));
+        REQUIRE(!reader->IsNull(L"RNAME"));
+        REQUIRE(!reader->IsNull(L"PRICE"));
+        REQUIRE(!reader->IsNull(L"DATE"));
+        REQUIRE(!reader->IsNull(L"SHPGEOM"));
 
         fid = reader->GetInt32(L"ID");
         frname = reader->GetString(L"RNAME");
@@ -1777,20 +1477,20 @@
         fprice = reader->GetDouble(L"PRICE");
         fdt = reader->GetDateTime(L"DATE");
 
-        CPPUNIT_ASSERT(3 == fid);
-        CPPUNIT_ASSERT(L"Hello Parcel3" == frname);
-        CPPUNIT_ASSERT(15000.0 == fprice);
-        CPPUNIT_ASSERT(2011 == fdt->GetYear());
-        CPPUNIT_ASSERT(3 == fdt->GetMonth());
-        CPPUNIT_ASSERT(14 == fdt->GetDay());
+        REQUIRE(3 == fid);
+        REQUIRE(L"Hello Parcel3" == frname);
+        REQUIRE(15000.0 == fprice);
+        REQUIRE(2011 == fdt->GetYear());
+        REQUIRE(3 == fdt->GetMonth());
+        REQUIRE(14 == fdt->GetDay());
 
         reader->Close();
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -1797,7 +1497,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1805,7 +1505,7 @@
     }
 }
 
-void TestFeatureService::TestCase_UpdateFeatures()
+TEST_CASE("UpdateFeatures", "[FeatureService]")
 {
     try
     {
@@ -1813,7 +1513,7 @@
         Ptr<MgdFeatureService> pService = dynamic_cast<MgdFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_UpdateFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_UpdateFeatures", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> fsId = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels_Writable.FeatureSource");
@@ -1834,16 +1534,16 @@
         filter += sdfNum;
 
         int updated = pService->UpdateMatchingFeatures(fsId, className, propVals, filter);
-        CPPUNIT_ASSERT(updated == 1);
+        REQUIRE(updated == 1);
 
         Ptr<MgFeatureQueryOptions> query = new MgFeatureQueryOptions();
         query->SetFilter(filter);
 
         Ptr<MgFeatureReader> reader = pService->SelectFeatures(fsId, className, query);
-        CPPUNIT_ASSERT(reader->ReadNext());
+        REQUIRE(reader->ReadNext());
 
-        CPPUNIT_ASSERT(!reader->IsNull(L"RPROPAD"));
-        CPPUNIT_ASSERT(reader->GetString(L"RPROPAD") == L"Foo Bar");
+        REQUIRE(!reader->IsNull(L"RPROPAD"));
+        REQUIRE(reader->GetString(L"RPROPAD") == L"Foo Bar");
         
         for (INT32 i = 0; i < reader->GetPropertyCount(); i++)
         {
@@ -1852,19 +1552,19 @@
                 propName != L"RPROPAD" &&
                 propName != L"SHPGEOM")
             {
-                CPPUNIT_ASSERT(reader->IsNull(propName));
-                CPPUNIT_ASSERT(reader->IsNull(i));
+                REQUIRE(reader->IsNull(propName));
+                REQUIRE(reader->IsNull(i));
             }
         }
 
-        CPPUNIT_ASSERT(!reader->ReadNext());
+        REQUIRE(!reader->ReadNext());
         reader->Close();
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -1871,7 +1571,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1879,7 +1579,7 @@
     }
 }
 
-void TestFeatureService::TestCase_DeleteFeatures()
+TEST_CASE("DeleteFeatures", "[FeatureService]")
 {
     try
     {
@@ -1887,7 +1587,7 @@
         Ptr<MgdFeatureService> pService = dynamic_cast<MgdFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_DeleteFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_DeleteFeatures", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> fsId = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels_Writable.FeatureSource");
@@ -1899,13 +1599,13 @@
         filter += sdfNum;
 
         int deleted = pService->DeleteFeatures(fsId, className, filter);
-        CPPUNIT_ASSERT(deleted == 1);
+        REQUIRE(deleted == 1);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -1912,7 +1612,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1926,7 +1626,7 @@
 /// This test case exercises executing SQL queries containing SELECT
 /// statements.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_ExecuteSqlQuery()
+TEST_CASE("ExecuteSqlQuery", "[FeatureService]")
 {
     try
     {
@@ -1934,26 +1634,26 @@
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_ExecuteSqlQuery", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_ExecuteSqlQuery", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
         const STRING sqlQuery = L"";
-        CPPUNIT_ASSERT_THROW_MG(pService->ExecuteSqlQuery(resource, sqlQuery), MgInvalidRepositoryTypeException*);
+        REQUIRE_THROWS_MG(pService->ExecuteSqlQuery(resource, sqlQuery), MgInvalidRepositoryTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Test.MapDefinition");
-        CPPUNIT_ASSERT_THROW_MG(pService->ExecuteSqlQuery(resource, sqlQuery), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(pService->ExecuteSqlQuery(resource, sqlQuery), MgInvalidResourceTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Test.FeatureSource");
-        CPPUNIT_ASSERT_THROW_MG(pService->ExecuteSqlQuery(resource, sqlQuery), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->ExecuteSqlQuery(resource, sqlQuery), MgInvalidArgumentException*);
 
         //TODO test with correct input
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -1960,7 +1660,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1975,7 +1675,7 @@
 /// This test case exercises executing SQL queries not containing
 /// SELECT statements.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_ExecuteSqlNonQuery()
+TEST_CASE("ExecuteSqlNonQuery", "[FeatureService]")
 {
     try
     {
@@ -1983,26 +1683,26 @@
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_ExecuteSqlNonQuery", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_ExecuteSqlNonQuery", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
         const STRING sqlNonQuery = L"";
-        CPPUNIT_ASSERT_THROW_MG(pService->ExecuteSqlNonQuery(resource, sqlNonQuery), MgInvalidRepositoryTypeException*);
+        REQUIRE_THROWS_MG(pService->ExecuteSqlNonQuery(resource, sqlNonQuery), MgInvalidRepositoryTypeException*);
         
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Test.MapDefinition");
-        CPPUNIT_ASSERT_THROW_MG(pService->ExecuteSqlNonQuery(resource, sqlNonQuery), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(pService->ExecuteSqlNonQuery(resource, sqlNonQuery), MgInvalidResourceTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Test.FeatureSource");
-        CPPUNIT_ASSERT_THROW_MG(pService->ExecuteSqlNonQuery(resource, sqlNonQuery), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->ExecuteSqlNonQuery(resource, sqlNonQuery), MgInvalidArgumentException*);
 
         //TODO test with correct input
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -2009,7 +1709,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2023,7 +1723,7 @@
 ///
 /// This test case exercises getting spatial contexts.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_GetSpatialContexts()
+TEST_CASE("GetSpatialContexts", "[FeatureService]")
 {
     try
     {
@@ -2031,15 +1731,15 @@
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetSpatialContexts", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetSpatialContexts", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
         bool activeOnly = false;
-        CPPUNIT_ASSERT_THROW_MG(pService->GetSpatialContexts(resource, activeOnly), MgInvalidRepositoryTypeException*);
+        REQUIRE_THROWS_MG(pService->GetSpatialContexts(resource, activeOnly), MgInvalidRepositoryTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Geography/World.MapDefinition");
-        CPPUNIT_ASSERT_THROW_MG(pService->GetSpatialContexts(resource, activeOnly), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(pService->GetSpatialContexts(resource, activeOnly), MgInvalidResourceTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
 
@@ -2048,7 +1748,7 @@
 
         // Advance to the 1st spatial context
         bool bResult = reader->ReadNext();
-        CPPUNIT_ASSERT(bResult);
+        REQUIRE(bResult);
 
         // Get the CS name and CS WKT
         STRING csName = reader->GetName();
@@ -2055,14 +1755,14 @@
         STRING csWkt = reader->GetCoordinateSystemWkt();
         //ACE_DEBUG((LM_DEBUG, ACE_TEXT("TestFeatureService::TestCase_GetSpatialContexts()\nName: %W\nWKT: %W\n"), csName.c_str(), csWkt.c_str()));
 
-        CPPUNIT_ASSERT(wcscmp(csName.c_str(), L"WGS84 Lat/Long's, Degre") == 0);
-        CPPUNIT_ASSERT(wcscmp(csWkt.c_str(), L"GEOGCS[\"WGS84 Lat/Long's, Degrees, -180 ==> +180\",DATUM[\"D_WGS_1984\",SPHEROID[\"World_Geodetic_System_of_1984\",6378137,298.257222932867]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]]") == 0);
+        REQUIRE(wcscmp(csName.c_str(), L"WGS84 Lat/Long's, Degre") == 0);
+        REQUIRE(wcscmp(csWkt.c_str(), L"GEOGCS[\"WGS84 Lat/Long's, Degrees, -180 ==> +180\",DATUM[\"D_WGS_1984\",SPHEROID[\"World_Geodetic_System_of_1984\",6378137,298.257222932867]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]]") == 0);
 
         // Close the reader
         reader->Close();
 
         // Force the reader to be cleaned up for the next operation
-        reader = NULL;
+        reader = nullptr;
 
         // Get a valid spatial context reader, this reader will be coming from the cache
         reader = pService->GetSpatialContexts(resource, activeOnly);
@@ -2069,13 +1769,13 @@
 
         // Advance to the 1st spatial context
         bResult = reader->ReadNext();
-        CPPUNIT_ASSERT(bResult);
+        REQUIRE(bResult);
 
         // Get the CS name and CS WKT
         csName = reader->GetName();
         csWkt = reader->GetCoordinateSystemWkt();
-        CPPUNIT_ASSERT(wcscmp(csName.c_str(), L"WGS84 Lat/Long's, Degre") == 0);
-        CPPUNIT_ASSERT(wcscmp(csWkt.c_str(), L"GEOGCS[\"WGS84 Lat/Long's, Degrees, -180 ==> +180\",DATUM[\"D_WGS_1984\",SPHEROID[\"World_Geodetic_System_of_1984\",6378137,298.257222932867]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]]") == 0);
+        REQUIRE(wcscmp(csName.c_str(), L"WGS84 Lat/Long's, Degre") == 0);
+        REQUIRE(wcscmp(csWkt.c_str(), L"GEOGCS[\"WGS84 Lat/Long's, Degrees, -180 ==> +180\",DATUM[\"D_WGS_1984\",SPHEROID[\"World_Geodetic_System_of_1984\",6378137,298.257222932867]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]]") == 0);
 
         // Close the reader
         reader->Close();
@@ -2082,9 +1782,9 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -2091,7 +1791,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2105,7 +1805,7 @@
 ///
 /// This test case exercises getting long transactions.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_GetLongTransactions()
+TEST_CASE("GetLongTransactions", "[FeatureService]")
 {
     try
     {
@@ -2113,23 +1813,23 @@
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetLongTransactions", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetLongTransactions", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
         bool activeOnly = false;
-        CPPUNIT_ASSERT_THROW_MG(pService->GetLongTransactions(resource, activeOnly), MgInvalidRepositoryTypeException*);
+        REQUIRE_THROWS_MG(pService->GetLongTransactions(resource, activeOnly), MgInvalidRepositoryTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Geography/World.MapDefinition");
-        CPPUNIT_ASSERT_THROW_MG(pService->GetLongTransactions(resource, activeOnly), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(pService->GetLongTransactions(resource, activeOnly), MgInvalidResourceTypeException*);
 
         //TODO test with correct input
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -2136,7 +1836,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2150,7 +1850,7 @@
 ///
 /// This test case exercises setting long transaction names.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_SetLongTransaction()
+TEST_CASE("SetLongTransaction", "[FeatureService]")
 {
     try
     {
@@ -2158,43 +1858,43 @@
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_SetLongTransaction", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_SetLongTransaction", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         STRING longTransactionName = L"Live";
 
-        // verify exception when passing in a NULL resource
-        CPPUNIT_ASSERT_THROW_MG(pService->SetLongTransaction(NULL, longTransactionName), MgNullArgumentException*);
+        // verify exception when passing in a nullptr resource
+        REQUIRE_THROWS_MG(pService->SetLongTransaction(nullptr, longTransactionName), MgNullArgumentException*);
 
         // verify exception when passing in an invalid resource type
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
-        CPPUNIT_ASSERT_THROW_MG(pService->SetLongTransaction(resource, longTransactionName), MgInvalidRepositoryTypeException*);
+        REQUIRE_THROWS_MG(pService->SetLongTransaction(resource, longTransactionName), MgInvalidRepositoryTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Geography/World.MapDefinition");
-        CPPUNIT_ASSERT_THROW_MG(pService->SetLongTransaction(resource, longTransactionName), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(pService->SetLongTransaction(resource, longTransactionName), MgInvalidResourceTypeException*);
 
         // verify exception when session is not set
         //resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
-        //CPPUNIT_ASSERT_THROW_MG(pService->SetLongTransaction(resource, longTransactionName), MgSessionNotFoundException*);
+        //REQUIRE_THROWS_MG(pService->SetLongTransaction(resource, longTransactionName), MgSessionNotFoundException*);
 
         // set the user information for the current thread to be administrator - this
         // alone doesn't create a session
-        //CPPUNIT_ASSERT_THROW_MG(pService->SetLongTransaction(resource, longTransactionName), MgSessionNotFoundException*);
+        //REQUIRE_THROWS_MG(pService->SetLongTransaction(resource, longTransactionName), MgSessionNotFoundException*);
 
         // now set a session
-        //CPPUNIT_ASSERT(pService->SetLongTransaction(resource, longTransactionName));
+        //REQUIRE(pService->SetLongTransaction(resource, longTransactionName));
 
         // setting the same LT name twice shouldn't matter
-        //CPPUNIT_ASSERT(pService->SetLongTransaction(resource, longTransactionName));
+        //REQUIRE(pService->SetLongTransaction(resource, longTransactionName));
 
         // should be able to clear the LT name
-        //CPPUNIT_ASSERT(pService->SetLongTransaction(resource, L""));
+        //REQUIRE(pService->SetLongTransaction(resource, L""));
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -2201,7 +1901,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2222,19 +1922,19 @@
         Ptr<MgFeatureService> pService = MgdServiceFactory::CreateFeatureService();
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetFeatures", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         STRING readerId = L"0";
-        CPPUNIT_ASSERT_THROW_MG(pService->GetFeatures(readerId), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetFeatures(readerId), MgInvalidArgumentException*);
 
         //TODO test with correct input
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -2241,7 +1941,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2262,20 +1962,20 @@
         Ptr<MgFeatureService> pService = MgdServiceFactory::CreateFeatureService();
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_CloseFeatureReader", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_CloseFeatureReader", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         STRING readerId = L"0";
         bool closed = pService->CloseFeatureReader(readerId);
-        CPPUNIT_ASSERT(!closed);
+        REQUIRE(!closed);
 
         // TODO test with correct input
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -2282,7 +1982,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2303,19 +2003,19 @@
         Ptr<MgFeatureService> pService = MgdServiceFactory::CreateFeatureService();
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetSqlRows", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetSqlRows", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         STRING sqlReader = L"0";
-        CPPUNIT_ASSERT_THROW_MG(pService->GetSqlRows(sqlReader), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetSqlRows(sqlReader), MgInvalidArgumentException*);
 
         //TODO test with correct input
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -2322,7 +2022,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2343,20 +2043,20 @@
         Ptr<MgFeatureService> pService = MgdServiceFactory::CreateFeatureService();
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_CloseSqlReader", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_CloseSqlReader", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         STRING sqlReader = L"0";
         bool closed = pService->CloseSqlReader(sqlReader);
-        CPPUNIT_ASSERT(!closed);
+        REQUIRE(!closed);
 
         // TODO test with correct input
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -2363,7 +2063,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2385,21 +2085,21 @@
         Ptr<MgFeatureService> pService = MgdServiceFactory::CreateFeatureService();
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetRaster", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetRaster", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         STRING featureReader = L"0";
         INT32 xSize = 0;
         INT32 ySize = 0;
-        CPPUNIT_ASSERT_THROW_MG(pService->GetRaster(featureReader, xSize, ySize, L""), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetRaster(featureReader, xSize, ySize, L""), MgInvalidArgumentException*);
 
         //TODO test with correct input
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -2406,7 +2106,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2428,19 +2128,19 @@
         Ptr<MgFeatureService> pService = MgdServiceFactory::CreateFeatureService();
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetDataRows", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetDataRows", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         STRING dataReader = L"0";
-        CPPUNIT_ASSERT_THROW_MG(pService->GetDataRows(dataReader), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetDataRows(dataReader), MgInvalidArgumentException*);
 
         //TODO test with correct input
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -2447,7 +2147,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2468,20 +2168,20 @@
         Ptr<MgFeatureService> pService = MgdServiceFactory::CreateFeatureService();
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_CloseDataReader", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_CloseDataReader", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         STRING dataReader = L"0";
         bool closed = pService->CloseDataReader(dataReader);
-        CPPUNIT_ASSERT(!closed);
+        REQUIRE(!closed);
 
         // TODO test with correct input
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -2488,7 +2188,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2502,7 +2202,7 @@
 ///
 /// This test case exercises joining features.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_JoinFeatures()
+TEST_CASE("JoinFeatures", "[FeatureService]")
 {
     try
     {
@@ -2511,12 +2211,12 @@
         if (pService == 0)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_JoinFeatures",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> lFeatureSource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
 
-        Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"Ext1", NULL);
+        Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"Ext1", nullptr);
 
         bool bReadNextResult = reader->ReadNext();
              bReadNextResult = reader->ReadNext();
@@ -2529,17 +2229,17 @@
         // Close the reader
         reader->Close();
 
-        CPPUNIT_ASSERT(bReadNextResult);
-        CPPUNIT_ASSERT(bIsNullResult == false);
-        CPPUNIT_ASSERT(s1 == L"NIEMUTH, ROGER L.");
-        CPPUNIT_ASSERT(s2 == L"Wells Fargo");
-        CPPUNIT_ASSERT(s3 == L"10573");
+        REQUIRE(bReadNextResult);
+        REQUIRE(bIsNullResult == false);
+        REQUIRE(s1 == L"NIEMUTH, ROGER L.");
+        REQUIRE(s2 == L"Wells Fargo");
+        REQUIRE(s3 == L"10573");
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -2546,7 +2246,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2560,7 +2260,7 @@
 ///
 /// This test case exercises joining features defined as chained, inner, 1-to-many.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_JoinFeaturesChainedInner1ToMany()
+TEST_CASE("JoinFeaturesChainedInner1ToMany", "[FeatureService]")
 {
     try
     {
@@ -2569,12 +2269,12 @@
         if (pService == 0)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_JoinFeaturesChainedInner1ToMany",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> lFeatureSource = new MgResourceIdentifier(L"Library://UnitTests/Data/TestChainedInner1ToManyJoin.FeatureSource");
 
-        Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"Ext1", NULL);
+        Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"Ext1", nullptr);
 
         bool bReadNextResult = reader->ReadNext();
         bool bIsNullResult = reader->IsNull(L"Join1NAME");
@@ -2598,22 +2298,22 @@
         #endif
         */
 
-        CPPUNIT_ASSERT(bReadNextResult);
-        CPPUNIT_ASSERT(bIsNullResult == false);
-        CPPUNIT_ASSERT(bIsNullResult2 == false);
-        CPPUNIT_ASSERT(s1 == L"CITY OF SHEBOYGAN");
-        CPPUNIT_ASSERT(s2 == L"Johnson Bank");
-        CPPUNIT_ASSERT(s3 == L"30320");
-        CPPUNIT_ASSERT(s4 == L"Voting District Seven");
-        CPPUNIT_ASSERT(s5 == L"7");
+        REQUIRE(bReadNextResult);
+        REQUIRE(bIsNullResult == false);
+        REQUIRE(bIsNullResult2 == false);
+        REQUIRE(s1 == L"CITY OF SHEBOYGAN");
+        REQUIRE(s2 == L"Johnson Bank");
+        REQUIRE(s3 == L"30320");
+        REQUIRE(s4 == L"Voting District Seven");
+        REQUIRE(s5 == L"7");
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        STRING st = e->GetStackTrace(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+        STRING st = e->GetStackTrace(TestServiceFactory::TEST_LOCALE);
         message += L"\n" + st;
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -2620,7 +2320,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2634,7 +2334,7 @@
 /// This test case exercises schema description APIs against a feature source
 /// with Extended Feature Classes
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_ExtendedFeatureClass()
+TEST_CASE("ExtendedFeatureClass", "[FeatureService]")
 {
     try
     {
@@ -2643,29 +2343,29 @@
         if (pService == 0)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_ExtendedFeatureClass",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> lFeatureSource = new MgResourceIdentifier(L"Library://UnitTests/Data/TestChainedInner1ToManyJoin.FeatureSource");
 
-        Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"Ext1", NULL);
+        Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"Ext1", nullptr);
 
         //With GetIdentityProperties
         Ptr<MgPropertyDefinitionCollection> idProps = pService->GetIdentityProperties(lFeatureSource, L"SHP_Schema", L"Ext1");
-        CPPUNIT_ASSERT(NULL != idProps);
-        CPPUNIT_ASSERT(1 == idProps->GetCount());
+        REQUIRE(nullptr != idProps);
+        REQUIRE(1 == idProps->GetCount());
 
         Ptr<MgStringCollection> findClasses = new MgStringCollection();
         findClasses->Add(L"Ext1");
         Ptr<MgClassDefinitionCollection> matches = pService->GetIdentityProperties(lFeatureSource, L"SHP_Schema", findClasses);
-        CPPUNIT_ASSERT(NULL != matches);
-        CPPUNIT_ASSERT(1 == matches->GetCount());
+        REQUIRE(nullptr != matches);
+        REQUIRE(1 == matches->GetCount());
 
         Ptr<MgFeatureSchemaCollection> schemas;
         Ptr<MgFeatureSchema> schema;
         //With GetClasses
         Ptr<MgStringCollection> classNames = pService->GetClasses(lFeatureSource, L"");
-        CPPUNIT_ASSERT(classNames->GetCount() > 0);
+        REQUIRE(classNames->GetCount() > 0);
         bool bFound = false;
         for (INT32 i = 0; i < classNames->GetCount(); i++)
         {
@@ -2676,12 +2376,12 @@
                 break;
             }
         }
-        CPPUNIT_ASSERT(bFound);
+        REQUIRE(bFound);
 
         //With 1st variation of DescribeSchema()
         schemas = pService->DescribeSchema(lFeatureSource, L"");
-        CPPUNIT_ASSERT(NULL != schemas.p);
-        CPPUNIT_ASSERT(1 == schemas->GetCount());
+        REQUIRE(nullptr != schemas.p);
+        REQUIRE(1 == schemas->GetCount());
         schema = schemas->GetItem(0);
         Ptr<MgClassDefinitionCollection> classes = schema->GetClasses();
         bFound = false;
@@ -2694,12 +2394,12 @@
                 break;
             }
         }
-        CPPUNIT_ASSERT(bFound);
+        REQUIRE(bFound);
 
         //1st variation of DescribeSchema() with the actual parent schema name
         schemas = pService->DescribeSchema(lFeatureSource, L"SHP_Schema");
-        CPPUNIT_ASSERT(NULL != schemas.p);
-        CPPUNIT_ASSERT(1 == schemas->GetCount());
+        REQUIRE(nullptr != schemas.p);
+        REQUIRE(1 == schemas->GetCount());
         schema = schemas->GetItem(0);
         classes = schema->GetClasses();
         bFound = false;
@@ -2712,14 +2412,14 @@
                 break;
             }
         }
-        CPPUNIT_ASSERT(bFound);
+        REQUIRE(bFound);
         Ptr<MgStringCollection> findClassNames = new MgStringCollection();
         findClassNames->Add(L"Ext1");
 
         //2nd variation of DescribeSchema()
         schemas = pService->DescribeSchema(lFeatureSource, L"SHP_Schema", findClassNames);
-        CPPUNIT_ASSERT(NULL != schemas.p);
-        CPPUNIT_ASSERT(1 == schemas->GetCount());
+        REQUIRE(nullptr != schemas.p);
+        REQUIRE(1 == schemas->GetCount());
         schema = schemas->GetItem(0);
         classes = schema->GetClasses();
         bFound = false;
@@ -2732,10 +2432,10 @@
                 break;
             }
         }
-        CPPUNIT_ASSERT(bFound);
+        REQUIRE(bFound);
 
         Ptr<MgClassDefinition> clsDef = pService->GetClassDefinition(lFeatureSource, L"SHP_Schema", L"Ext1");
-        CPPUNIT_ASSERT(NULL != clsDef.p);
+        REQUIRE(nullptr != clsDef.p);
 
         //Custom aggregates should also work
         Ptr<MgFeatureAggregateOptions> agg = new MgFeatureAggregateOptions();
@@ -2743,18 +2443,18 @@
         Ptr<MgDataReader> dr = pService->SelectAggregate(lFeatureSource, L"Ext1", agg);
         bool bRead = dr->ReadNext();
         dr->Close();
-        CPPUNIT_ASSERT(bRead);
+        REQUIRE(bRead);
 
         //XML form should also have this class
         STRING xml = pService->DescribeSchemaAsXml(lFeatureSource, L"");
-        CPPUNIT_ASSERT(!xml.empty());
+        REQUIRE(!xml.empty());
         Ptr<MgFeatureSchemaCollection> pSchemas = pService->XmlToSchema(xml);
-        CPPUNIT_ASSERT(NULL != pSchemas.p);
-        CPPUNIT_ASSERT(1 == pSchemas->GetCount());
+        REQUIRE(nullptr != pSchemas.p);
+        REQUIRE(1 == pSchemas->GetCount());
         Ptr<MgFeatureSchema> pSchema = pSchemas->GetItem(0);
         Ptr<MgClassDefinitionCollection> pClasses = pSchema->GetClasses();
-        CPPUNIT_ASSERT(NULL != pClasses.p);
-        CPPUNIT_ASSERT(pClasses->GetCount() > 0);
+        REQUIRE(nullptr != pClasses.p);
+        REQUIRE(pClasses->GetCount() > 0);
         bFound = false;
         for (INT32 i = 0; i < pClasses->GetCount(); i++)
         {
@@ -2765,18 +2465,18 @@
                 break;
             }
         }
-        CPPUNIT_ASSERT(bFound);
+        REQUIRE(bFound);
 
         //XML form should also have this class
         xml = pService->DescribeSchemaAsXml(lFeatureSource, L"SHP_Schema");
-        CPPUNIT_ASSERT(!xml.empty());
+        REQUIRE(!xml.empty());
         pSchemas = pService->XmlToSchema(xml);
-        CPPUNIT_ASSERT(NULL != pSchemas.p);
-        CPPUNIT_ASSERT(1 == pSchemas->GetCount());
+        REQUIRE(nullptr != pSchemas.p);
+        REQUIRE(1 == pSchemas->GetCount());
         pSchema = pSchemas->GetItem(0);
         pClasses = pSchema->GetClasses();
-        CPPUNIT_ASSERT(NULL != pClasses.p);
-        CPPUNIT_ASSERT(pClasses->GetCount() > 0);
+        REQUIRE(nullptr != pClasses.p);
+        REQUIRE(pClasses->GetCount() > 0);
         bFound = false;
         for (INT32 i = 0; i < pClasses->GetCount(); i++)
         {
@@ -2787,15 +2487,15 @@
                 break;
             }
         }
-        CPPUNIT_ASSERT(bFound);
+        REQUIRE(bFound);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        STRING st = e->GetStackTrace(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+        STRING st = e->GetStackTrace(TestServiceFactory::TEST_LOCALE);
         message += L"\n" + st;
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -2802,7 +2502,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2815,7 +2515,7 @@
 ///
 /// This test case exercises the UpdateFeatures API for insertion
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_UpdateFeaturesInsert()
+TEST_CASE("UpdateFeaturesInsert", "[FeatureService]")
 {
     try
     {
@@ -2822,13 +2522,13 @@
         Ptr<MgdServiceFactory> fact = new MgdServiceFactory();
         if (fact == 0)
         {
-            throw new MgNullReferenceException(L"TestFeatureService.TestCase_SavePoint", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestFeatureService.TestCase_SavePoint", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_SavePoint", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_SavePoint", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> featureSource = new MgResourceIdentifier(L"Library://UnitTests/Data/TestInsert.FeatureSource");
@@ -2893,10 +2593,10 @@
 
         //Execute insert. Should be fine
         Ptr<MgPropertyCollection> result = pService->UpdateFeatures(featureSource, commands, true);
-        CPPUNIT_ASSERT(result->GetCount() == 1);
+        REQUIRE(result->GetCount() == 1);
         INT32 i = 0;
         Ptr<MgProperty> resItem1 = result->GetItem(i);
-        CPPUNIT_ASSERT(resItem1->GetPropertyType() == MgPropertyType::Feature);
+        REQUIRE(resItem1->GetPropertyType() == MgPropertyType::Feature);
         Ptr<MgFeatureReader> rdr = ((MgFeatureProperty*)resItem1.p)->GetValue();
         rdr->Close();
 
@@ -2904,7 +2604,7 @@
         nameVal->SetValue(L"Bar");
 
         //Execute again, expect MgFdoException due to constraint violation
-        CPPUNIT_ASSERT_THROW_MG(result = pService->UpdateFeatures(featureSource, commands, true), MgFdoException*);
+        REQUIRE_THROWS_MG(result = pService->UpdateFeatures(featureSource, commands, true), MgFdoException*);
         
         //Expect one inserted result
         Ptr<MgFeatureQueryOptions> query = new MgFeatureQueryOptions();
@@ -2912,14 +2612,14 @@
         INT32 count = 0;
         while (qryReader->ReadNext()) { count++; }
         qryReader->Close();
-        CPPUNIT_ASSERT(1 == count);
+        REQUIRE(1 == count);
 
         //Execute again, useTransaction = false. Should not throw exception, but log
         //the error as a MgStringProperty
         result = pService->UpdateFeatures(featureSource, commands, false);
-        CPPUNIT_ASSERT(result->GetCount() == 1);
+        REQUIRE(result->GetCount() == 1);
         resItem1 = result->GetItem(i);
-        CPPUNIT_ASSERT(resItem1->GetPropertyType() == MgPropertyType::String); //Errors are of type String
+        REQUIRE(resItem1->GetPropertyType() == MgPropertyType::String); //Errors are of type String
 
         //Use new id
         idVal->SetValue(2);
@@ -2926,22 +2626,22 @@
 
         //Should be fine now
         result = pService->UpdateFeatures(featureSource, commands, true);
-        CPPUNIT_ASSERT(result->GetCount() == 1);
+        REQUIRE(result->GetCount() == 1);
         resItem1 = result->GetItem(i);
-        CPPUNIT_ASSERT(resItem1->GetPropertyType() == MgPropertyType::Feature);
+        REQUIRE(resItem1->GetPropertyType() == MgPropertyType::Feature);
         rdr = ((MgFeatureProperty*)resItem1.p)->GetValue();
         rdr->Close();
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -2954,7 +2654,7 @@
 ///
 /// This test case exercises the FDO join optimization
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_JoinFdoFeatures()
+TEST_CASE("JoinFdoFeatures", "[FeatureService]")
 {
     try
     {
@@ -2963,48 +2663,48 @@
         if (pService == 0)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_JoinFdoFeatures",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> lFeatureSource = new MgResourceIdentifier(L"Library://UnitTests/Data/FdoJoin.FeatureSource");
 
-        Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"CitiesCountries", NULL);
+        Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"CitiesCountries", nullptr);
 
         INT32 count1 = 0;
         while(reader->ReadNext())
         {
-            CPPUNIT_ASSERT(reader->IsNull(L"ID") == false);
-            CPPUNIT_ASSERT(reader->IsNull(L"CountryCode") == false);
-            CPPUNIT_ASSERT(reader->IsNull(L"StateCode") == false);
-            CPPUNIT_ASSERT(reader->IsNull(L"Name") == false);
-            CPPUNIT_ASSERT(reader->IsNull(L"Population") == false);
-            CPPUNIT_ASSERT(reader->IsNull(L"CNT_CountryCode") == false);
-            CPPUNIT_ASSERT(reader->IsNull(L"CNT_Name") == false);
+            REQUIRE(reader->IsNull(L"ID") == false);
+            REQUIRE(reader->IsNull(L"CountryCode") == false);
+            REQUIRE(reader->IsNull(L"StateCode") == false);
+            REQUIRE(reader->IsNull(L"Name") == false);
+            REQUIRE(reader->IsNull(L"Population") == false);
+            REQUIRE(reader->IsNull(L"CNT_CountryCode") == false);
+            REQUIRE(reader->IsNull(L"CNT_Name") == false);
             count1++;
         }
         reader->Close();
-        CPPUNIT_ASSERT(10 == count1);
+        REQUIRE(10 == count1);
 
-        Ptr<MgFeatureReader> reader2 = pService->SelectFeatures(lFeatureSource, L"CitiesStates", NULL);
+        Ptr<MgFeatureReader> reader2 = pService->SelectFeatures(lFeatureSource, L"CitiesStates", nullptr);
 
         INT32 count2 = 0;
         while(reader2->ReadNext())
         {
-            CPPUNIT_ASSERT(reader2->IsNull(L"ID") == false);
-            CPPUNIT_ASSERT(reader2->IsNull(L"CountryCode") == false);
-            CPPUNIT_ASSERT(reader2->IsNull(L"StateCode") == false);
-            CPPUNIT_ASSERT(reader2->IsNull(L"Name") == false);
-            CPPUNIT_ASSERT(reader2->IsNull(L"Population") == false);
-            CPPUNIT_ASSERT(reader2->IsNull(L"ST_ID") == false);
-            CPPUNIT_ASSERT(reader2->IsNull(L"ST_CountryCode") == false);
-            CPPUNIT_ASSERT(reader2->IsNull(L"ST_StateCode") == false);
-            CPPUNIT_ASSERT(reader2->IsNull(L"ST_Name") == false);
+            REQUIRE(reader2->IsNull(L"ID") == false);
+            REQUIRE(reader2->IsNull(L"CountryCode") == false);
+            REQUIRE(reader2->IsNull(L"StateCode") == false);
+            REQUIRE(reader2->IsNull(L"Name") == false);
+            REQUIRE(reader2->IsNull(L"Population") == false);
+            REQUIRE(reader2->IsNull(L"ST_ID") == false);
+            REQUIRE(reader2->IsNull(L"ST_CountryCode") == false);
+            REQUIRE(reader2->IsNull(L"ST_StateCode") == false);
+            REQUIRE(reader2->IsNull(L"ST_Name") == false);
             count2++;
         }
         reader2->Close();
-        CPPUNIT_ASSERT(10 == count2);
+        REQUIRE(10 == count2);
 
-        Ptr<MgFeatureReader> reader3 = pService->SelectFeatures(lFeatureSource, L"CitiesStatesOneToOne", NULL);
+        Ptr<MgFeatureReader> reader3 = pService->SelectFeatures(lFeatureSource, L"CitiesStatesOneToOne", nullptr);
         INT32 count3 = 0;
         while(reader3->ReadNext())
         {
@@ -3011,13 +2711,13 @@
             count3++;
         }
         reader3->Close();
-        CPPUNIT_ASSERT(10 == count3);
+        REQUIRE(10 == count3);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -3024,7 +2724,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3038,7 +2738,7 @@
 ///
 /// This test case exercises creating a feature source.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_CreateFeatureSource()
+TEST_CASE("CreateFeatureSource", "[FeatureService]")
 {
     try
     {
@@ -3047,7 +2747,7 @@
         if (pService == 0)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_CreateFeatureSource",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pResourceService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
@@ -3054,7 +2754,7 @@
         if (pResourceService == 0)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_CreateFeatureSource",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         // Create class definition
@@ -3118,9 +2818,9 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -3127,7 +2827,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3140,7 +2840,7 @@
 ///
 /// This test case benchmarks selecting features.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_BenchmarkSelectFeatures()
+TEST_CASE("BenchmarkSelectFeatures", "[FeatureService]")
 {
     try
     {
@@ -3150,7 +2850,7 @@
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(factory->CreateService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_BenchmarkSelectFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_BenchmarkSelectFeatures", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
@@ -3175,7 +2875,7 @@
 
             // Close the reader
             reader->Close();
-            CPPUNIT_ASSERT(nFeatures == 17565);
+            REQUIRE(nFeatures == 17565);
         }
         clock_t clock_end = clock();
         ACE_DEBUG((LM_INFO, ACE_TEXT("  Execution Time (Average of %d runs): = %6.4f (s)\n"), iterations, ((double)(clock_end - clock_start) / CLOCKS_PER_SEC)/(double)iterations ));
@@ -3183,9 +2883,9 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -3192,7 +2892,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3200,7 +2900,8 @@
     }
 }
 
-void TestFeatureService::TestCase_SecuredCredentials()
+//TEST_CASE("SecuredCredentials", "[Skip]")
+void Skip_SecuredCredentials()
 {
     //This test requires SQL Server express with a MgUnitTest database created.
     //Once these requirements are met, fill in the required SQL Server credentials here
@@ -3212,12 +2913,12 @@
         Ptr<MgFeatureService> featSvc = dynamic_cast<MgFeatureService*>(factory->CreateService(MgServiceType::FeatureService));
         if (featSvc == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_SecuredCredentials", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_SecuredCredentials", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
         Ptr<MgdResourceService> resSvc = dynamic_cast<MgdResourceService*>(factory->CreateService(MgServiceType::ResourceService));
         if (resSvc == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_SecuredCredentials", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_SecuredCredentials", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
         
         Ptr<MgResourceIdentifier> fsId = new MgResourceIdentifier(L"Library://UnitTests/Data/SecuredCredentials.FeatureSource");
@@ -3225,7 +2926,7 @@
         try
         {
             bool bResult = featSvc->TestConnection(fsId);
-            CPPUNIT_ASSERT(false == bResult);
+            REQUIRE(false == bResult);
         }
         catch (MgFdoException* ex)
         {
@@ -3234,7 +2935,7 @@
 
         //Now apply credentials
         resSvc->SetResourceCredentials(fsId, username, password);
-        CPPUNIT_ASSERT(true == featSvc->TestConnection(fsId));
+        REQUIRE(true == featSvc->TestConnection(fsId));
 
         //Now apply bad credentials
         username = L"foo";
@@ -3244,7 +2945,7 @@
         try
         {
             bool bResult = featSvc->TestConnection(fsId);
-            CPPUNIT_ASSERT(false == bResult);
+            REQUIRE(false == bResult);
         }
         catch (MgFdoException* ex)
         {
@@ -3257,7 +2958,7 @@
         try
         {
             bool bResult = featSvc->TestConnection(fsId);
-            CPPUNIT_ASSERT(false == bResult);
+            REQUIRE(false == bResult);
         }
         catch (MgFdoException* ex)
         {
@@ -3266,9 +2967,9 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -3275,7 +2976,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3283,7 +2984,7 @@
     }
 }
 
-MgdMap* TestFeatureService::CreateTestMap()
+static MgdMap* CreateTestMap()
 {
     Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWriteable.MapDefinition");
     MgdMap* map = new MgdMap(mdfres);
@@ -3305,7 +3006,7 @@
 ///
 /// This test case exercises the InsertFeatures() convenience API
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_LayerInsertFeatures()
+TEST_CASE("LayerInsertFeatures", "[FeatureService]")
 {
     try
     {
@@ -3338,8 +3039,8 @@
         }
         fr->Close();
 
-        CPPUNIT_ASSERT(inserted == 1);
-        CPPUNIT_ASSERT(smTestSdfId != -1);
+        REQUIRE(inserted == 1);
+        REQUIRE(smTestSdfId != -1);
 
         //Do a select to verify it's definitely there
         Ptr<MgFeatureQueryOptions> query = new MgFeatureQueryOptions();
@@ -3351,17 +3052,17 @@
 
         Ptr<MgReader> reader = parcels->SelectFeatures(query);
         bool read = reader->ReadNext();
-        CPPUNIT_ASSERT(read);
-        CPPUNIT_ASSERT(!reader->IsNull(L"Autogenerated_SDF_ID"));
-        CPPUNIT_ASSERT(!reader->IsNull(L"RNAME"));
-        CPPUNIT_ASSERT(!reader->IsNull(L"SHPGEOM"));
-        CPPUNIT_ASSERT(reader->GetInt32(L"Autogenerated_SDF_ID") == smTestSdfId);
-        CPPUNIT_ASSERT(reader->GetString(L"RNAME") == L"Hello Parcel");
+        REQUIRE(read);
+        REQUIRE(!reader->IsNull(L"Autogenerated_SDF_ID"));
+        REQUIRE(!reader->IsNull(L"RNAME"));
+        REQUIRE(!reader->IsNull(L"SHPGEOM"));
+        REQUIRE(reader->GetInt32(L"Autogenerated_SDF_ID") == smTestSdfId);
+        REQUIRE(reader->GetString(L"RNAME") == L"Hello Parcel");
 
         agf = reader->GetGeometry(L"SHPGEOM");
         poly = agfRW->Read(agf);
         STRING wkt = wktRW->Write(poly);
-        CPPUNIT_ASSERT(wkt == origWkt);
+        REQUIRE(wkt == origWkt);
 
         for (INT32 i = 0; i < reader->GetPropertyCount(); i++)
         {
@@ -3370,19 +3071,19 @@
                 propName != L"RNAME" &&
                 propName != L"SHPGEOM")
             {
-                CPPUNIT_ASSERT(reader->IsNull(propName));
-                CPPUNIT_ASSERT(reader->IsNull(i));
+                REQUIRE(reader->IsNull(propName));
+                REQUIRE(reader->IsNull(i));
             }
         }
 
-        CPPUNIT_ASSERT(!reader->ReadNext());
+        REQUIRE(!reader->ReadNext());
         reader->Close();
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -3389,7 +3090,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3402,7 +3103,7 @@
 ///
 /// This test case exercises the UpdateFeatures() convenience API
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_LayerUpdateFeatures()
+TEST_CASE("LayerUpdateFeatures", "[FeatureService]")
 {
     try
     {
@@ -3426,16 +3127,16 @@
         filter += sdfNum;
 
         int updated = parcels->UpdateMatchingFeatures(propVals, filter);
-        CPPUNIT_ASSERT(updated == 1);
+        REQUIRE(updated == 1);
 
         Ptr<MgFeatureQueryOptions> query = new MgFeatureQueryOptions();
         query->SetFilter(filter);
 
         Ptr<MgFeatureReader> reader = parcels->SelectFeatures(query);
-        CPPUNIT_ASSERT(reader->ReadNext());
+        REQUIRE(reader->ReadNext());
 
-        CPPUNIT_ASSERT(!reader->IsNull(L"RPROPAD"));
-        CPPUNIT_ASSERT(reader->GetString(L"RPROPAD") == L"Foo Bar");
+        REQUIRE(!reader->IsNull(L"RPROPAD"));
+        REQUIRE(reader->GetString(L"RPROPAD") == L"Foo Bar");
         
         for (INT32 i = 0; i < reader->GetPropertyCount(); i++)
         {
@@ -3444,19 +3145,19 @@
                 propName != L"RPROPAD" &&
                 propName != L"SHPGEOM")
             {
-                CPPUNIT_ASSERT(reader->IsNull(propName));
-                CPPUNIT_ASSERT(reader->IsNull(i));
+                REQUIRE(reader->IsNull(propName));
+                REQUIRE(reader->IsNull(i));
             }
         }
 
-        CPPUNIT_ASSERT(!reader->ReadNext());
+        REQUIRE(!reader->ReadNext());
         reader->Close();
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -3463,7 +3164,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3476,7 +3177,7 @@
 ///
 /// This test case exercises the DeleteFeatures() convenience API
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_LayerDeleteFeatures()
+TEST_CASE("LayerDeleteFeatures", "[FeatureService]")
 {
     try
     {
@@ -3491,13 +3192,13 @@
         filter += sdfNum;
 
         int deleted = parcels->DeleteFeatures(filter);
-        CPPUNIT_ASSERT(deleted == 1);
+        REQUIRE(deleted == 1);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -3504,7 +3205,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3517,7 +3218,7 @@
 ///
 /// This test case exercises the SelectFeaturesExtended() convenience API
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_LayerSelectScrollable()
+TEST_CASE("LayerSelectScrollable", "[FeatureService]")
 {
     try
     {
@@ -3529,7 +3230,7 @@
         Ptr<MgFeatureQueryOptions> options = new MgFeatureQueryOptions();
         Ptr<MgdScrollableFeatureReader> reader = parcels->SelectFeaturesExtended(options);
         INT32 count = reader->Count();
-        CPPUNIT_ASSERT(17565 == count);
+        REQUIRE(17565 == count);
 
         Ptr<MgPropertyCollection> keys = new MgPropertyCollection();
         Ptr<MgInt32Property> keyVal = new MgInt32Property(L"Autogenerated_SDF_ID", 4);
@@ -3560,22 +3261,22 @@
         bool bAfterLast = reader->ReadNext();
         reader->Close();
 
-        CPPUNIT_ASSERT(bScroll);
-        CPPUNIT_ASSERT(bScroll2);
-        CPPUNIT_ASSERT(!bScroll3);
-        CPPUNIT_ASSERT(!bScroll4);
-        CPPUNIT_ASSERT(!bScroll5);
-        CPPUNIT_ASSERT(bScroll6);
-        CPPUNIT_ASSERT(bFirst);
-        CPPUNIT_ASSERT(!bBeforeFirst);
-        CPPUNIT_ASSERT(bLast);
-        CPPUNIT_ASSERT(!bAfterLast);
+        REQUIRE(bScroll);
+        REQUIRE(bScroll2);
+        REQUIRE(!bScroll3);
+        REQUIRE(!bScroll4);
+        REQUIRE(!bScroll5);
+        REQUIRE(bScroll6);
+        REQUIRE(bFirst);
+        REQUIRE(!bBeforeFirst);
+        REQUIRE(bLast);
+        REQUIRE(!bAfterLast);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -3582,7 +3283,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3590,7 +3291,7 @@
     }
 }
 
-void TestFeatureService::TestCase_BenchmarkSdfJoin()
+TEST_CASE("BenchmarkSdfJoin", "[FeatureService]")
 {
     long total = 0L;
     try
@@ -3605,21 +3306,21 @@
         if (pService == 0)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService::TestCase_BenchmarkSdfJoin",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
         Ptr<MgFeatureService> featSvc = dynamic_cast<MgFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (featSvc == 0)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService::TestCase_BenchmarkSdfJoin",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
-        pService->SetResource(fsId, fsReader, NULL);
+        pService->SetResource(fsId, fsReader, nullptr);
         Ptr<MgByteSource> fsData = new MgByteSource(L"../UnitTestFiles/ParcelsJoinTest.sdf");
         Ptr<MgByteReader> fsDataReader = fsData->GetReader();
 
         pService->SetResourceData(fsId, L"ParcelsJoinTest.sdf", L"File", fsDataReader);
-        CPPUNIT_ASSERT(featSvc->TestConnection(fsId));
+        REQUIRE(featSvc->TestConnection(fsId));
 
         Ptr<MgFeatureReader> reader;
 
@@ -3627,7 +3328,7 @@
         ACE_DEBUG((LM_INFO, ACE_TEXT("\nTestFeatureService::TestCase_BenchmarkSdfJoin() - Inner Join \n")));
         
         clock_t clock_start = clock();
-        reader = featSvc->SelectFeatures(fsId, L"ParcelsInner", NULL);
+        reader = featSvc->SelectFeatures(fsId, L"ParcelsInner", nullptr);
         while(reader->ReadNext())
         {
             total++;
@@ -3639,7 +3340,7 @@
         clock_start = clock();
         total = 0L;
 
-        reader = featSvc->SelectFeatures(fsId, L"ParcelsLeftOuter", NULL);
+        reader = featSvc->SelectFeatures(fsId, L"ParcelsLeftOuter", nullptr);
         while(reader->ReadNext())
         {
             total++;
@@ -3651,7 +3352,7 @@
         clock_start = clock();
         total = 0L;
 
-        reader = featSvc->SelectFeatures(fsId, L"ParcelsInnerOneToOne", NULL);
+        reader = featSvc->SelectFeatures(fsId, L"ParcelsInnerOneToOne", nullptr);
         while(reader->ReadNext())
         {
             total++;
@@ -3663,7 +3364,7 @@
         clock_start = clock();
         total = 0L;
 
-        reader = featSvc->SelectFeatures(fsId, L"ParcelsLeftOuterOneToOne", NULL);
+        reader = featSvc->SelectFeatures(fsId, L"ParcelsLeftOuterOneToOne", nullptr);
         while(reader->ReadNext())
         {
             total++;
@@ -3674,9 +3375,9 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -3683,7 +3384,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3691,7 +3392,7 @@
     }
 }
 
-void TestFeatureService::TestCase_BenchmarkSqliteJoin()
+TEST_CASE("BenchmarkSqliteJoin", "[FeatureService]")
 {
     try
     {
@@ -3705,21 +3406,21 @@
         if (pService == 0)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService::TestCase_BenchmarkSqliteJoin",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
         Ptr<MgFeatureService> featSvc = dynamic_cast<MgFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (featSvc == 0)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService::TestCase_BenchmarkSqliteJoin",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
-        pService->SetResource(fsId, fsReader, NULL);
+        pService->SetResource(fsId, fsReader, nullptr);
         Ptr<MgByteSource> fsData = new MgByteSource(L"../UnitTestFiles/ParcelsJoinTest.sqlite");
         Ptr<MgByteReader> fsDataReader = fsData->GetReader();
 
         pService->SetResourceData(fsId, L"ParcelsJoinTest.sqlite", L"File", fsDataReader);
-        CPPUNIT_ASSERT(featSvc->TestConnection(fsId));
+        REQUIRE(featSvc->TestConnection(fsId));
 
         Ptr<MgFeatureReader> reader;
 
@@ -3728,7 +3429,7 @@
         clock_t clock_start = clock();
         long total = 0L;
 
-        reader = featSvc->SelectFeatures(fsId, L"ParcelsInner", NULL);
+        reader = featSvc->SelectFeatures(fsId, L"ParcelsInner", nullptr);
         while(reader->ReadNext())
         {
             total++;
@@ -3740,7 +3441,7 @@
         clock_start = clock();
         total = 0L;
 
-        reader = featSvc->SelectFeatures(fsId, L"ParcelsLeftOuter", NULL);
+        reader = featSvc->SelectFeatures(fsId, L"ParcelsLeftOuter", nullptr);
         while(reader->ReadNext())
         {
             total++;
@@ -3752,7 +3453,7 @@
         clock_start = clock();
         total = 0L;
 
-        reader = featSvc->SelectFeatures(fsId, L"ParcelsInnerOneToOne", NULL);
+        reader = featSvc->SelectFeatures(fsId, L"ParcelsInnerOneToOne", nullptr);
         while(reader->ReadNext())
         {
             total++;
@@ -3764,7 +3465,7 @@
         clock_start = clock();
         total = 0L;
 
-        reader = featSvc->SelectFeatures(fsId, L"ParcelsLeftOuterOneToOne", NULL);
+        reader = featSvc->SelectFeatures(fsId, L"ParcelsLeftOuterOneToOne", nullptr);
         while(reader->ReadNext())
         {
             total++;
@@ -3775,9 +3476,9 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -3784,7 +3485,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3792,7 +3493,7 @@
     }
 }
 
-void TestFeatureService::TestCase_BenchmarkSqliteAggregateJoin()
+TEST_CASE("BenchmarkSqliteAggregateJoin", "[FeatureService]")
 {
     try
     {
@@ -3801,17 +3502,17 @@
         if (pService == 0)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService::TestCase_BenchmarkSqliteAggregateJoin",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
         Ptr<MgFeatureService> featSvc = dynamic_cast<MgFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (featSvc == 0)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService::TestCase_BenchmarkSqliteAggregateJoin",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> fsId = new MgResourceIdentifier(L"Library://UnitTests/Data/ParcelsJoinTestSQLite.FeatureSource");
-        CPPUNIT_ASSERT(featSvc->TestConnection(fsId));
+        REQUIRE(featSvc->TestConnection(fsId));
         Ptr<MgDataReader> reader;
 
         // ----- Start the tests ------- //
@@ -3832,7 +3533,7 @@
             iterations++;
         }
         reader->Close();
-        CPPUNIT_ASSERT(iterations == 1);
+        REQUIRE(iterations == 1);
         clock_t clock_end = clock();
         ACE_DEBUG((LM_INFO, ACE_TEXT("  Execution Time (%d results): = %6.4f (s)\n"), total, ((double)(clock_end - clock_start) / CLOCKS_PER_SEC) ));
         ACE_DEBUG((LM_INFO, ACE_TEXT("\nTestFeatureService::TestCase_BenchmarkSqliteAggregateJoin() - Left Outer Join \n")));
@@ -3847,7 +3548,7 @@
             iterations++;
         }
         reader->Close();
-        CPPUNIT_ASSERT(iterations == 1L);
+        REQUIRE(iterations == 1L);
         clock_end = clock();
         ACE_DEBUG((LM_INFO, ACE_TEXT("  Execution Time (%d results): = %6.4f (s)\n"), total, ((double)(clock_end - clock_start) / CLOCKS_PER_SEC) ));
         ACE_DEBUG((LM_INFO, ACE_TEXT("\nTestFeatureService::TestCase_BenchmarkSqliteAggregateJoin() - Inner Join (Forced 1:1) \n")));
@@ -3862,7 +3563,7 @@
             iterations++;
         }
         reader->Close();
-        CPPUNIT_ASSERT(iterations == 1L);
+        REQUIRE(iterations == 1L);
         clock_end = clock();
         ACE_DEBUG((LM_INFO, ACE_TEXT("  Execution Time (%d results): = %6.4f (s)\n"), total, ((double)(clock_end - clock_start) / CLOCKS_PER_SEC) ));
         ACE_DEBUG((LM_INFO, ACE_TEXT("\nTestFeatureService::TestCase_BenchmarkSqliteAggregateJoin() - Left Outer Join (Forced 1:1) \n")));
@@ -3877,15 +3578,15 @@
             iterations++;
         }
         reader->Close();
-        CPPUNIT_ASSERT(iterations == 1L);
+        REQUIRE(iterations == 1L);
         clock_end = clock();
         ACE_DEBUG((LM_INFO, ACE_TEXT("  Execution Time (%d results): = %6.4f (s)\n"), total, ((double)(clock_end - clock_start) / CLOCKS_PER_SEC) ));
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -3892,7 +3593,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3900,7 +3601,7 @@
     }
 }
 
-void TestFeatureService::TestCase_BenchmarkMergeSortJoin()
+TEST_CASE("BenchmarkMergeSortJoin", "[FeatureService]")
 {
     try
     {
@@ -3910,13 +3611,13 @@
         if (pService == 0)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService::TestCase_BenchmarkMergeSortJoin",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
         Ptr<MgdFeatureService> featSvc = dynamic_cast<MgdFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (featSvc == 0)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService::TestCase_BenchmarkMergeSortJoin",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         
@@ -3928,7 +3629,7 @@
         clock_t clock_start = clock();
         long total = 0L;
 
-        reader = featSvc->SelectFeatures(fsId, L"ParcelsInnerSortMerge", NULL);
+        reader = featSvc->SelectFeatures(fsId, L"ParcelsInnerSortMerge", nullptr);
 #ifdef DUMP_BENCHMARK_RESULTS
         Ptr<MgClassDefinition> classDefinition;
         Ptr<MgResourceIdentifier> dumpFsId;
@@ -3952,7 +3653,7 @@
         clock_start = clock();
         total = 0L;
 
-        reader = featSvc->SelectFeatures(fsId, L"ParcelsLeftOuterSortMerge", NULL);
+        reader = featSvc->SelectFeatures(fsId, L"ParcelsLeftOuterSortMerge", nullptr);
 #ifdef DUMP_BENCHMARK_RESULTS
         classDefinition = reader->GetClassDefinition();
         dumpFsId = CreateFeatureSource(featSvc, L"ParcelsLeftOuterSortMerge", classDefinition);
@@ -3972,7 +3673,7 @@
         clock_start = clock();
         total = 0L;
 
-        reader = featSvc->SelectFeatures(fsId, L"ParcelsInnerOneToOneSortMerge", NULL);
+        reader = featSvc->SelectFeatures(fsId, L"ParcelsInnerOneToOneSortMerge", nullptr);
 #ifdef DUMP_BENCHMARK_RESULTS
         classDefinition = reader->GetClassDefinition();
         dumpFsId = CreateFeatureSource(featSvc, L"ParcelsInnerOneToOneSortMerge", classDefinition);
@@ -3992,7 +3693,7 @@
         clock_start = clock();
         total = 0L;
 
-        reader = featSvc->SelectFeatures(fsId, L"ParcelsLeftOuterOneToOneSortMerge", NULL);
+        reader = featSvc->SelectFeatures(fsId, L"ParcelsLeftOuterOneToOneSortMerge", nullptr);
 #ifdef DUMP_BENCHMARK_RESULTS
         classDefinition = reader->GetClassDefinition();
         dumpFsId = CreateFeatureSource(featSvc, L"ParcelsLeftOuterOneToOneSortMerge", classDefinition);
@@ -4011,9 +3712,9 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -4020,7 +3721,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4028,7 +3729,7 @@
     }
 }
 
-void TestFeatureService::TestCase_BenchmarkBatchSortedBlockJoin()
+TEST_CASE("BenchmarkBatchSortedBlockJoin", "[FeatureService]")
 {
     try
     {
@@ -4038,13 +3739,13 @@
         if (pService == 0)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService::TestCase_BenchmarkBatchSortedBlockJoin",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
         Ptr<MgdFeatureService> featSvc = dynamic_cast<MgdFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (featSvc == 0)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService::TestCase_BenchmarkBatchSortedBlockJoin",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         
@@ -4056,7 +3757,7 @@
         clock_t clock_start = clock();
         long total = 0L;
 
-        reader = featSvc->SelectFeatures(fsId, L"ParcelsInnerBatchSortedBlock", NULL);
+        reader = featSvc->SelectFeatures(fsId, L"ParcelsInnerBatchSortedBlock", nullptr);
 #ifdef DUMP_BENCHMARK_RESULTS
         Ptr<MgClassDefinition> classDefinition;
         Ptr<MgResourceIdentifier> dumpFsId;
@@ -4080,7 +3781,7 @@
         clock_start = clock();
         total = 0L;
 
-        reader = featSvc->SelectFeatures(fsId, L"ParcelsLeftOuterBatchSortedBlock", NULL);
+        reader = featSvc->SelectFeatures(fsId, L"ParcelsLeftOuterBatchSortedBlock", nullptr);
 #ifdef DUMP_BENCHMARK_RESULTS
         classDefinition = reader->GetClassDefinition();
         dumpFsId = CreateFeatureSource(featSvc, L"ParcelsLeftOuterBatchSortedBlock", classDefinition);
@@ -4100,7 +3801,7 @@
         clock_start = clock();
         total = 0L;
 
-        reader = featSvc->SelectFeatures(fsId, L"ParcelsInnerOneToOneBatchSortedBlock", NULL);
+        reader = featSvc->SelectFeatures(fsId, L"ParcelsInnerOneToOneBatchSortedBlock", nullptr);
 #ifdef DUMP_BENCHMARK_RESULTS
         classDefinition = reader->GetClassDefinition();
         dumpFsId = CreateFeatureSource(featSvc, L"ParcelsInnerOneToOneBatchSortedBlock", classDefinition);
@@ -4120,7 +3821,7 @@
         clock_start = clock();
         total = 0L;
 
-        reader = featSvc->SelectFeatures(fsId, L"ParcelsLeftOuterOneToOneBatchSortedBlock", NULL);
+        reader = featSvc->SelectFeatures(fsId, L"ParcelsLeftOuterOneToOneBatchSortedBlock", nullptr);
 #ifdef DUMP_BENCHMARK_RESULTS
         classDefinition = reader->GetClassDefinition();
         dumpFsId = CreateFeatureSource(featSvc, L"ParcelsLeftOuterOneToOneBatchSortedBlock", classDefinition);
@@ -4139,9 +3840,9 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -4148,7 +3849,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4156,7 +3857,7 @@
     }
 }
 
-void TestFeatureService::TestCase_BenchmarkNestedLoopsSortedBlockJoin()
+TEST_CASE("BenchmarkNestedLoopSortedBlockJoin", "[FeatureService]")
 {
     try
     {
@@ -4166,13 +3867,13 @@
         if (pService == 0)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService::TestCase_BenchmarkNestedLoopsSortedBlockJoin",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
         Ptr<MgdFeatureService> featSvc = dynamic_cast<MgdFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (featSvc == 0)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService::TestCase_BenchmarkNestedLoopsSortedBlockJoin",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         
@@ -4184,7 +3885,7 @@
         clock_t clock_start = clock();
         long total = 0L;
 
-        reader = featSvc->SelectFeatures(fsId, L"ParcelsInnerNestedLoopSortedBlock", NULL);
+        reader = featSvc->SelectFeatures(fsId, L"ParcelsInnerNestedLoopSortedBlock", nullptr);
 #ifdef DUMP_BENCHMARK_RESULTS
         Ptr<MgClassDefinition> classDefinition;
         Ptr<MgResourceIdentifier> dumpFsId;
@@ -4208,7 +3909,7 @@
         clock_start = clock();
         total = 0L;
 
-        reader = featSvc->SelectFeatures(fsId, L"ParcelsLeftOuterNestedLoopSortedBlock", NULL);
+        reader = featSvc->SelectFeatures(fsId, L"ParcelsLeftOuterNestedLoopSortedBlock", nullptr);
 #ifdef DUMP_BENCHMARK_RESULTS
         classDefinition = reader->GetClassDefinition();
         dumpFsId = CreateFeatureSource(featSvc, L"ParcelsLeftOuterNestedLoopSortedBlock", classDefinition);
@@ -4228,7 +3929,7 @@
         clock_start = clock();
         total = 0L;
 
-        reader = featSvc->SelectFeatures(fsId, L"ParcelsInnerOneToOneNestedLoopSortedBlock", NULL);
+        reader = featSvc->SelectFeatures(fsId, L"ParcelsInnerOneToOneNestedLoopSortedBlock", nullptr);
 #ifdef DUMP_BENCHMARK_RESULTS
         classDefinition = reader->GetClassDefinition();
         dumpFsId = CreateFeatureSource(featSvc, L"ParcelsInnerOneToOneNestedLoopSortedBlock", classDefinition);
@@ -4248,7 +3949,7 @@
         clock_start = clock();
         total = 0L;
 
-        reader = featSvc->SelectFeatures(fsId, L"ParcelsLeftOuterOneToOneNestedLoopSortedBlock", NULL);
+        reader = featSvc->SelectFeatures(fsId, L"ParcelsLeftOuterOneToOneNestedLoopSortedBlock", nullptr);
 #ifdef DUMP_BENCHMARK_RESULTS
         classDefinition = reader->GetClassDefinition();
         dumpFsId = CreateFeatureSource(featSvc, L"ParcelsLeftOuterOneToOneNestedLoopSortedBlock", classDefinition);
@@ -4267,9 +3968,9 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -4276,7 +3977,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4284,7 +3985,7 @@
     }
 }
 
-MgResourceIdentifier* TestFeatureService::CreateFeatureSource(MgFeatureService* featSvc, CREFSTRING name, MgClassDefinition* classDefinition)
+static MgResourceIdentifier* CreateFeatureSource(MgFeatureService* featSvc, CREFSTRING name, MgClassDefinition* classDefinition)
 {
     STRING fsIdStr = L"Library://UnitTests/Data/";
     fsIdStr += name;
@@ -4338,7 +4039,7 @@
     return fsId.Detach();
 }
 
-MgPropertyCollection* TestFeatureService::Prepare(MgClassDefinition* cls)
+static MgPropertyCollection* Prepare(MgClassDefinition* cls)
 {
     Ptr<MgPropertyCollection> propVals = new MgPropertyCollection();
     Ptr<MgPropertyDefinitionCollection> clsProps = cls->GetProperties();
@@ -4348,7 +4049,7 @@
         STRING name = clsProp->GetName();
         if (clsProp->GetPropertyType() == MgFeaturePropertyType::GeometricProperty)
         {
-            Ptr<MgGeometryProperty> geomVal = new MgGeometryProperty(name, NULL);
+            Ptr<MgGeometryProperty> geomVal = new MgGeometryProperty(name, nullptr);
             geomVal->SetNull(true);
             propVals->Add(geomVal);
         }
@@ -4360,7 +4061,7 @@
             switch(dataProp->GetDataType())
             {
             case MgPropertyType::Blob:
-                dataVal = new MgBlobProperty(name, NULL);
+                dataVal = new MgBlobProperty(name, nullptr);
                 break;
             case MgPropertyType::Boolean:
                 dataVal = new MgBooleanProperty(name, false);
@@ -4369,10 +4070,10 @@
                 dataVal = new MgByteProperty(name, 0);
                 break;
             case MgPropertyType::Clob:
-                dataVal = new MgClobProperty(name, NULL);
+                dataVal = new MgClobProperty(name, nullptr);
                 break;
             case MgPropertyType::DateTime:
-                dataVal = new MgDateTimeProperty(name, NULL);
+                dataVal = new MgDateTimeProperty(name, nullptr);
                 break;
             case MgPropertyType::Decimal:
             case MgPropertyType::Double:
@@ -4401,7 +4102,7 @@
     return propVals.Detach();
 }
 
-void TestFeatureService::Insert(MgdFeatureService* featSvc, MgReader* reader, MgResourceIdentifier* fsId, CREFSTRING className, MgPropertyCollection* propVals)
+static void Insert(MgdFeatureService* featSvc, MgReader* reader, MgResourceIdentifier* fsId, CREFSTRING className, MgPropertyCollection* propVals)
 {
     for (INT32 i = 0; i < propVals->GetCount(); i++)
     {
@@ -4507,7 +4208,7 @@
         else 
         {
             MgNullableProperty* nprop = dynamic_cast<MgNullableProperty*>(prop.p);
-            if (NULL != nprop)
+            if (nullptr != nprop)
                 nprop->SetNull(true);
         }
     }
@@ -4515,7 +4216,7 @@
     fr->Close();
 }
 
-void TestFeatureService::TestCase_BenchmarkNestedLoopsJoin()
+TEST_CASE("BenchmarkNestedLoopsJoin", "[FeatureService]")
 {
     try
     {
@@ -4525,13 +4226,13 @@
         if (pService == 0)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService::TestCase_BenchmarkNestedLoopsJoin",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
         Ptr<MgdFeatureService> featSvc = dynamic_cast<MgdFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (featSvc == 0)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService::TestCase_BenchmarkNestedLoopsJoin",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         
@@ -4543,7 +4244,7 @@
         clock_t clock_start = clock();
         long total = 0L;
 
-        reader = featSvc->SelectFeatures(fsId, L"ParcelsInnerNestedLoops", NULL);
+        reader = featSvc->SelectFeatures(fsId, L"ParcelsInnerNestedLoops", nullptr);
 
 #ifdef DUMP_BENCHMARK_RESULTS
         Ptr<MgClassDefinition> classDefinition;
@@ -4568,7 +4269,7 @@
         clock_start = clock();
         total = 0L;
 
-        reader = featSvc->SelectFeatures(fsId, L"ParcelsLeftOuterNestedLoops", NULL);
+        reader = featSvc->SelectFeatures(fsId, L"ParcelsLeftOuterNestedLoops", nullptr);
 #ifdef DUMP_BENCHMARK_RESULTS
         classDefinition = reader->GetClassDefinition();
         dumpFsId = CreateFeatureSource(featSvc, L"ParcelsLeftOuterNestedLoops", classDefinition);
@@ -4588,7 +4289,7 @@
         clock_start = clock();
         total = 0L;
 
-        reader = featSvc->SelectFeatures(fsId, L"ParcelsInnerOneToOneNestedLoops", NULL);
+        reader = featSvc->SelectFeatures(fsId, L"ParcelsInnerOneToOneNestedLoops", nullptr);
 #ifdef DUMP_BENCHMARK_RESULTS
         classDefinition = reader->GetClassDefinition();
         dumpFsId = CreateFeatureSource(featSvc, L"ParcelsInnerOneToOneNestedLoops", classDefinition);
@@ -4608,7 +4309,7 @@
         clock_start = clock();
         total = 0L;
 
-        reader = featSvc->SelectFeatures(fsId, L"ParcelsLeftOuterOneToOneNestedLoops", NULL);
+        reader = featSvc->SelectFeatures(fsId, L"ParcelsLeftOuterOneToOneNestedLoops", nullptr);
 #ifdef DUMP_BENCHMARK_RESULTS
         classDefinition = reader->GetClassDefinition();
         dumpFsId = CreateFeatureSource(featSvc, L"ParcelsLeftOuterOneToOneNestedLoops", classDefinition);
@@ -4627,9 +4328,9 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -4636,7 +4337,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4650,7 +4351,7 @@
 /// This test case tests the correct response for a non-transactional failure
 /// in UpdateFeatures
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_UpdateFeaturesPartialFailure()
+TEST_CASE("UpdateFeaturesPartialFailure", "[FeatureService]")
 {
     try
     {
@@ -4657,7 +4358,7 @@
         Ptr<MgdServiceFactory> fact = new MgdServiceFactory();
         if (fact == 0)
         {
-            throw new MgNullReferenceException(L"TestFeatureService.TestCase_UpdateFeaturesPartialFailure", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestFeatureService.TestCase_UpdateFeaturesPartialFailure", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgFeatureService> featSvc = dynamic_cast<MgFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
@@ -4664,7 +4365,7 @@
         if (featSvc == 0)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_UpdateFeaturesPartialFailure",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> fsId = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
@@ -4676,7 +4377,7 @@
         cmds->Add(insert);
 
         Ptr<MgPropertyCollection> result = featSvc->UpdateFeatures(fsId, cmds, false);
-        CPPUNIT_ASSERT(result->GetCount() > 0);
+        REQUIRE(result->GetCount() > 0);
 
         bool bPartialFailure = false;
         for (INT32 i = 0; i < result->GetCount(); i++)
@@ -4689,13 +4390,13 @@
             }
         }
 
-        CPPUNIT_ASSERT(bPartialFailure);
+        REQUIRE(bPartialFailure);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -4702,7 +4403,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {

Deleted: trunk/MgDev/Desktop/UnitTest/TestFeatureService.h
===================================================================
--- trunk/MgDev/Desktop/UnitTest/TestFeatureService.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/UnitTest/TestFeatureService.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,148 +0,0 @@
-//
-//  Copyright (C) 2004-2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _TESTFEATURESERVICE_H
-#define _TESTFEATURESERVICE_H
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestFeatureService : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestFeatureService);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_GetFeatureProviders);
-    CPPUNIT_TEST(TestCase_TestConnectionSDFProvider);
-    //CPPUNIT_TEST(TestCase_TestFdoConnectionManager);
-    CPPUNIT_TEST(TestCase_GetConnectionPropertyValues);
-    CPPUNIT_TEST(TestCase_GetCapabilities);
-    CPPUNIT_TEST(TestCase_TestConnectionResourceIdentifier);
-    CPPUNIT_TEST(TestCase_GetSchemas);
-    CPPUNIT_TEST(TestCase_GetClasses);
-    CPPUNIT_TEST(TestCase_GetClassDefinition);
-    CPPUNIT_TEST(TestCase_GetClassDefinitionImmutability);
-    CPPUNIT_TEST(TestCase_DescribeSchema);
-    CPPUNIT_TEST(TestCase_DescribeSchemaImmutability);
-    CPPUNIT_TEST(TestCase_ApplySchema);
-    CPPUNIT_TEST(TestCase_CreateFeatureSource);
-    CPPUNIT_TEST(TestCase_SelectFeatures);
-    CPPUNIT_TEST(TestCase_SelectFeaturesTransformed);
-    CPPUNIT_TEST(TestCase_SelectScrollable);
-    CPPUNIT_TEST(TestCase_SelectAggregate);
-    CPPUNIT_TEST(TestCase_ExtendedFeatureClass);
-    CPPUNIT_TEST(TestCase_InsertFeatures);
-    CPPUNIT_TEST(TestCase_InsertFeaturesBatch);
-    CPPUNIT_TEST(TestCase_UpdateFeatures);
-    CPPUNIT_TEST(TestCase_UpdateFeaturesInsert);
-    CPPUNIT_TEST(TestCase_UpdateFeaturesPartialFailure);
-    CPPUNIT_TEST(TestCase_DeleteFeatures);
-//  TODO write test case when know how to make command collection
-    CPPUNIT_TEST(TestCase_ExecuteSqlQuery);
-    CPPUNIT_TEST(TestCase_ExecuteSqlNonQuery);
-    CPPUNIT_TEST(TestCase_GetSpatialContexts);
-    CPPUNIT_TEST(TestCase_GetLongTransactions);
-    CPPUNIT_TEST(TestCase_SetLongTransaction);
-    CPPUNIT_TEST(TestCase_JoinFeatures);
-    //Our sortability check has broken this for some reason
-    CPPUNIT_TEST(TestCase_JoinFeaturesChainedInner1ToMany);
-    CPPUNIT_TEST(TestCase_JoinFdoFeatures);
-    CPPUNIT_TEST(TestCase_BenchmarkSelectFeatures);
-    //CPPUNIT_TEST(TestCase_ConcurrentAccess);
-
-    //CPPUNIT_TEST(TestCase_SecuredCredentials);
-    CPPUNIT_TEST(TestCase_LayerInsertFeatures);
-    CPPUNIT_TEST(TestCase_LayerUpdateFeatures);
-    CPPUNIT_TEST(TestCase_LayerDeleteFeatures);
-    CPPUNIT_TEST(TestCase_LayerSelectScrollable);
-
-    CPPUNIT_TEST(TestCase_BenchmarkSqliteJoin);
-    CPPUNIT_TEST(TestCase_BenchmarkSqliteAggregateJoin);
-    CPPUNIT_TEST(TestCase_BenchmarkSdfJoin);
-    CPPUNIT_TEST(TestCase_BenchmarkMergeSortJoin);
-    CPPUNIT_TEST(TestCase_BenchmarkBatchSortedBlockJoin);
-    CPPUNIT_TEST(TestCase_BenchmarkNestedLoopsSortedBlockJoin);
-    CPPUNIT_TEST(TestCase_BenchmarkNestedLoopsJoin);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    void TestCase_GetFeatureProviders();
-    void TestCase_TestConnectionSDFProvider();
-    //void TestCase_TestFdoConnectionManager();
-    void TestCase_GetConnectionPropertyValues();
-    void TestCase_GetCapabilities();
-    void TestCase_TestConnectionProviderConnectionString();
-    void TestCase_TestConnectionResourceIdentifier();
-    void TestCase_GetSchemas();
-    void TestCase_GetClasses();
-    void TestCase_GetClassDefinition();
-    void TestCase_GetClassDefinitionImmutability();
-    void TestCase_DescribeSchema();
-    void TestCase_DescribeSchemaImmutability();
-    void TestCase_ApplySchema();
-    void TestCase_SelectFeatures();
-    void TestCase_SelectFeaturesTransformed();
-    void TestCase_SelectScrollable();
-    void TestCase_SelectAggregate();
-    void TestCase_UpdateFeaturesInsert();
-    void TestCase_UpdateFeaturesPartialFailure();
-    void TestCase_InsertFeatures();
-    void TestCase_InsertFeaturesBatch();
-    void TestCase_UpdateFeatures();
-    void TestCase_DeleteFeatures();
-    void TestCase_ExecuteSqlQuery();
-    void TestCase_ExecuteSqlNonQuery();
-    void TestCase_ExtendedFeatureClass();
-    void TestCase_GetSpatialContexts();
-    void TestCase_GetLongTransactions();
-    void TestCase_SetLongTransaction();
-    void TestCase_JoinFeatures();
-    void TestCase_JoinFeaturesChainedInner1ToMany();
-    void TestCase_JoinFdoFeatures();
-    void TestCase_CreateFeatureSource();
-    void TestCase_BenchmarkSelectFeatures();
-    //void TestCase_ConcurrentAccess();
-
-    void TestCase_BenchmarkSdfJoin();
-    void TestCase_BenchmarkSqliteJoin();
-    void TestCase_BenchmarkSqliteAggregateJoin();
-    void TestCase_BenchmarkMergeSortJoin();
-    void TestCase_BenchmarkBatchSortedBlockJoin();
-    void TestCase_BenchmarkNestedLoopsSortedBlockJoin();
-    void TestCase_BenchmarkNestedLoopsJoin();
-
-    void TestCase_SecuredCredentials();
-    void TestCase_LayerInsertFeatures();
-    void TestCase_LayerUpdateFeatures();
-    void TestCase_LayerDeleteFeatures();
-    void TestCase_LayerSelectScrollable();
-
-private:
-    MgdMap* CreateTestMap();
-    static MgResourceIdentifier* CreateFeatureSource(MgFeatureService* featSvc, CREFSTRING name, MgClassDefinition* classDefinition);
-    static MgPropertyCollection* Prepare(MgClassDefinition* clsDef);
-    static void Insert(MgdFeatureService* featSvc, MgReader* reader, MgResourceIdentifier* fsId, CREFSTRING className, MgPropertyCollection* propVals);
-    static bool m_bDumpJoinBenchmarkResults;
-};
-
-#endif // _TESTFEATURESERVICE_H

Modified: trunk/MgDev/Desktop/UnitTest/TestKmlService.cpp
===================================================================
--- trunk/MgDev/Desktop/UnitTest/TestKmlService.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/UnitTest/TestKmlService.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -34,20 +34,20 @@
 
     m_svcResource = dynamic_cast<MgResourceService*>(
         serviceManager->RequestService(MgServiceType::ResourceService));
-    assert(m_svcResource != NULL);
+    assert(m_svcResource != nullptr);
 
     m_svcKml = dynamic_cast<MgKmlService*>(
         serviceManager->RequestService(MgServiceType::KmlService));
-    assert(m_svcKml != NULL);
+    assert(m_svcKml != nullptr);
 
     // Initialize a site connection.
     Ptr<MgServerSiteService> svcSite = dynamic_cast<MgServerSiteService*>(
         serviceManager->RequestService(MgServiceType::SiteService));
-    assert(svcSite != NULL);
+    assert(svcSite != nullptr);
 
     Ptr<MgUserInformation> userInfo = new MgUserInformation(
         L"Administrator", L"admin");
-    userInfo->SetLocale(TEST_LOCALE);
+    userInfo->SetLocale(TestServiceFactory::TEST_LOCALE);
 
     // Set the current MgUserInformation
     // This must be done before calling CreateSession()
@@ -96,7 +96,7 @@
 
         //set user info
         Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
+        userInfo->SetLocale(TestServiceFactory::TEST_LOCALE);
         MgUserInformation::SetCurrentUserInfo(userInfo);
 
         //publish the map definition
@@ -103,39 +103,39 @@
         Ptr<MgResourceIdentifier> mapres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
         Ptr<MgByteSource> mdfsrc = new MgByteSource(L"../UnitTestFiles/UT_Sheboygan.mdf", false);
         Ptr<MgByteReader> mdfrdr = mdfsrc->GetReader();
-        m_svcResource->SetResource(mapres, mdfrdr, NULL);
+        m_svcResource->SetResource(mapres, mdfrdr, nullptr);
 
         //publish the layer definitions
         Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
         Ptr<MgByteSource> ldfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.ldf", false);
         Ptr<MgByteReader> ldfrdr1 = ldfsrc1->GetReader();
-        m_svcResource->SetResource(ldfres1, ldfrdr1, NULL);
+        m_svcResource->SetResource(ldfres1, ldfrdr1, nullptr);
 
         Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
         Ptr<MgByteSource> ldfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.ldf", false);
         Ptr<MgByteReader> ldfrdr2 = ldfsrc2->GetReader();
-        m_svcResource->SetResource(ldfres2, ldfrdr2, NULL);
+        m_svcResource->SetResource(ldfres2, ldfrdr2, nullptr);
 
         Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
         Ptr<MgByteSource> ldfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.ldf", false);
         Ptr<MgByteReader> ldfrdr3 = ldfsrc3->GetReader();
-        m_svcResource->SetResource(ldfres3, ldfrdr3, NULL);
+        m_svcResource->SetResource(ldfres3, ldfrdr3, nullptr);
 
         //publish the feature sources
         Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
         Ptr<MgByteSource> fssrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.fs", false);
         Ptr<MgByteReader> fsrdr1 = fssrc1->GetReader();
-        m_svcResource->SetResource(fsres1, fsrdr1, NULL);
+        m_svcResource->SetResource(fsres1, fsrdr1, nullptr);
 
         Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
         Ptr<MgByteSource> fssrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.fs", false);
         Ptr<MgByteReader> fsrdr2 = fssrc2->GetReader();
-        m_svcResource->SetResource(fsres2, fsrdr2, NULL);
+        m_svcResource->SetResource(fsres2, fsrdr2, nullptr);
 
         Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
         Ptr<MgByteSource> fssrc3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.fs", false);
         Ptr<MgByteReader> fsrdr3 = fssrc3->GetReader();
-        m_svcResource->SetResource(fsres3, fsrdr3, NULL);
+        m_svcResource->SetResource(fsres3, fsrdr3, nullptr);
 
         // publish the resource data
         Ptr<MgByteSource> dataSource1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.sdf", false);
@@ -152,9 +152,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -169,7 +169,7 @@
     {
         //set user info
         Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
+        userInfo->SetLocale(TestServiceFactory::TEST_LOCALE);
         MgUserInformation::SetCurrentUserInfo(userInfo);
 
         //delete the map definition
@@ -206,9 +206,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -239,7 +239,7 @@
             Ptr<MgByteReader> reader = m_svcKml->GetMapKml(map, dpi, agentUri, format);
 
             STRING mimeType = reader->GetMimeType();
-            CPPUNIT_ASSERT(mimeType.compare(MgMimeType::Kml) == 0);
+            REQUIRE(mimeType.compare(MgMimeType::Kml) == 0);
         }
         catch(MgConnectionFailedException* e)
         {
@@ -255,13 +255,13 @@
 
         //compare results against referenced content
         //TODO: Find a way to make the comparison work on Windows AND Linux
-        //CPPUNIT_ASSERT(CompareContent(reader, L"../UnitTestFiles/UT_GetMapKMLResult.txt"));
+        //REQUIRE(CompareContent(reader, L"../UnitTestFiles/UT_GetMapKMLResult.txt"));
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -290,7 +290,7 @@
             Ptr<MgByteReader> reader = m_svcKml->GetMapKml(map, dpi, agentUri, format);
 
             STRING mimeType = reader->GetMimeType();
-            CPPUNIT_ASSERT(mimeType.compare(MgMimeType::Kmz) == 0);
+            REQUIRE(mimeType.compare(MgMimeType::Kmz) == 0);
         }
         catch(MgConnectionFailedException* e)
         {
@@ -306,9 +306,9 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -340,7 +340,7 @@
             Ptr<MgByteReader> reader = m_svcKml->GetLayerKml(layer, extents, width, height, dpi, drawOrder, agentUri, format);
 
             STRING mimeType = reader->GetMimeType();
-            CPPUNIT_ASSERT(mimeType.compare(MgMimeType::Kml) == 0);
+            REQUIRE(mimeType.compare(MgMimeType::Kml) == 0);
         }
         catch(MgConnectionFailedException* e)
         {
@@ -356,13 +356,13 @@
 
         //compare results against referenced content
         //TODO: Find a way to make the comparison work on Windows AND Linux
-        //CPPUNIT_ASSERT(CompareContent(reader, L"../UnitTestFiles/UT_GetLayerKMLResult.txt"));
+        //REQUIRE(CompareContent(reader, L"../UnitTestFiles/UT_GetLayerKMLResult.txt"));
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -391,18 +391,18 @@
         Ptr<MgByteReader> reader = m_svcKml->GetFeaturesKml(layer, extents, width, height, dpi, drawOrder, format);
 
         STRING mimeType = reader->GetMimeType();
-        CPPUNIT_ASSERT(mimeType.compare(MgMimeType::Kml) == 0);
+        REQUIRE(mimeType.compare(MgMimeType::Kml) == 0);
 
         //compare results against referenced content
         //TODO: Find a way to make the comparison work on Windows AND Linux
         //TODO: Find a way to allow tolerance in floating point value comparisons
-        //CPPUNIT_ASSERT(CompareContent(reader, L"../UnitTestFiles/UT_GetFeaturesKMLResult.txt"));
+        //REQUIRE(CompareContent(reader, L"../UnitTestFiles/UT_GetFeaturesKMLResult.txt"));
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -417,7 +417,7 @@
 
     STRING sessionId;
     Ptr<MgUserInformation> userInfo = MgUserInformation::GetCurrentUserInfo();
-    if (userInfo != NULL)
+    if (userInfo != nullptr)
     {
         sessionId = userInfo->GetMgSessionId();
     }
@@ -443,7 +443,7 @@
 void TestKmlService::SaveToFile(CREFSTRING content, CREFSTRING filename)
 {
     FILE* file = ACE_OS::fopen(MG_WCHAR_TO_TCHAR(filename), ACE_TEXT("wt"));
-    if (file != NULL)
+    if (file != nullptr)
     {
         fwprintf (file, content.c_str());
         fclose (file);
@@ -455,10 +455,10 @@
 {
     STRING content;
     FILE* file = ACE_OS::fopen(MG_WCHAR_TO_TCHAR(filename), ACE_TEXT("rt"));
-    if (file != NULL)
+    if (file != nullptr)
     {
         wchar_t buffer[1024];
-        while(fgetws(buffer, 1024, file) != NULL)
+        while(fgetws(buffer, 1024, file) != nullptr)
         {
             content.append(buffer);
         }

Deleted: trunk/MgDev/Desktop/UnitTest/TestKmlService.h
===================================================================
--- trunk/MgDev/Desktop/UnitTest/TestKmlService.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/UnitTest/TestKmlService.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,62 +0,0 @@
-//
-//  Copyright (C) 2007-2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef TestKmlService_H_
-#define TestKmlService_H_
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestKmlService : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestKmlService);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_GetMapKml);
-    CPPUNIT_TEST(TestCase_GetMapKmz);
-    CPPUNIT_TEST(TestCase_GetLayerKml);
-    CPPUNIT_TEST(TestCase_GetFeaturesKml);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    TestKmlService();
-    ~TestKmlService();
-
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    void TestCase_GetMapKml();
-    void TestCase_GetMapKmz();
-    void TestCase_GetLayerKml();
-    void TestCase_GetFeaturesKml();
-
-private:
-    void PublishTheResources();
-    STRING RemoveSessionIds(CREFSTRING content);
-    void SaveToFile(CREFSTRING content, CREFSTRING filename);
-    STRING LoadFromFile(CREFSTRING filename);
-    bool CompareContent(MgByteReader* reader, CREFSTRING referenceFile);
-
-    Ptr<MgSiteConnection> m_siteConnection;
-    Ptr<MgResourceService> m_svcResource;
-    Ptr<MgKmlService> m_svcKml;
-};
-
-#endif // TestKmlService_H_

Modified: trunk/MgDev/Desktop/UnitTest/TestLogManager.cpp
===================================================================
--- trunk/MgDev/Desktop/UnitTest/TestLogManager.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/UnitTest/TestLogManager.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -16,13 +16,14 @@
 //
 
 #include "MgDesktop.h"
-#include "TestLogManager.h"
-#include "CppUnitExtensions.h"
 #include "Log/LogManager.h"
 #include "TestLogManagerThread.h"
 #include "FoundationDefs.h"
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestLogManager, "TestLogManager");
 
+#include "CatchHelperMacros.h"
+#include "TestServiceFactory.h"
+#include "catch.hpp"
+
 const wchar_t TestName[] = L"TestName.log";
 const wchar_t TestName2[] = L"TestName2.log";
 const wchar_t NewTestName[] = L"SuperCoolNewTestName.log";
@@ -50,27 +51,9 @@
 const STRING LastEntry = L"<2005-03-08T00:57:08> Entry 5\n";
 #endif
 
-void TestLogManager::setUp()
+static bool CreateFile(STRING filename, STRING contents)
 {
-}
-
-void TestLogManager::tearDown()
-{
-}
-
-void TestLogManager::TestStart()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Log Manager tests.\n")));
-}
-
-void TestLogManager::TestEnd()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nLog Manager tests completed.\n\n")));
-}
-
-bool TestLogManager::CreateFile(STRING filename, STRING contents)
-{
-    FILE* file = NULL;
+    FILE* file = nullptr;
     file = ::fopen(MG_WCHAR_TO_CHAR(filename), "wb");
 
     if (file)
@@ -91,13 +74,13 @@
 /// This test case checks to see if there is a valid MgdLogManager and that
 /// there is only 1 MgdLogManager.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_ValidLogManager()
+TEST_CASE("ValidLogManager", "[LogManager]")
 {
     MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
-    CPPUNIT_ASSERT(pMgdLogManager != NULL);
+    REQUIRE(pMgdLogManager != nullptr);
 
     MgdLogManager* pMgdLogManager2 = MgdLogManager::GetInstance();
-    CPPUNIT_ASSERT(pMgdLogManager == pMgdLogManager2);
+    REQUIRE(pMgdLogManager == pMgdLogManager2);
 }
 
 ///----------------------------------------------------------------------------
@@ -105,12 +88,12 @@
 ///
 /// This test case checks the logs path.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetLogsPath()
+TEST_CASE("GetLogsPath", "[LogManager]")
 {
     MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
     CREFSTRING path = pMgdLogManager->GetLogsPath();
 
-    CPPUNIT_ASSERT(path.length() > 0);
+    REQUIRE(path.length() > 0);
 }
 
 ///----------------------------------------------------------------------------
@@ -119,7 +102,7 @@
 /// This test case hits the log manager with multiple threads to ensure that
 /// it encounters no deadlocking.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_TestForDeadLock()
+TEST_CASE("TestForDeadLock", "[LogManager]")
 {
     try
     {
@@ -129,9 +112,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -145,7 +128,7 @@
 /// This test case enumerates the log files that are currently located in the
 /// logs directory
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_EnumerateLogs()
+TEST_CASE("EnumerateLogs", "[LogManager]")
 {
     try
     {
@@ -166,16 +149,16 @@
         Ptr<MgStringProperty> testName2Prop = new MgStringProperty(L"LogNameProperty", TestName2);
         Ptr<MgStringProperty> junkName2Prop = new MgStringProperty(L"LogNameProperty", JunkName2);
 
-        CPPUNIT_ASSERT(logs->Contains(junkNameProp));
-        CPPUNIT_ASSERT(logs->Contains(testNameProp));
-        CPPUNIT_ASSERT(logs->Contains(junkName2Prop));
-        CPPUNIT_ASSERT(logs->Contains(testName2Prop));
+        REQUIRE(logs->Contains(junkNameProp));
+        REQUIRE(logs->Contains(testNameProp));
+        REQUIRE(logs->Contains(junkName2Prop));
+        REQUIRE(logs->Contains(testName2Prop));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -189,7 +172,7 @@
 /// This test case deletes log files that were created during the running
 /// of the log manager tests
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_DeleteLog()
+TEST_CASE("DeleteLog", "[LogManager]")
 {
     try
     {
@@ -203,17 +186,17 @@
 
         Ptr<MgPropertyCollection> logs = pMgdLogManager->EnumerateLogs();
 
-        CPPUNIT_ASSERT(!logs->Contains(TestName));
-        CPPUNIT_ASSERT(!logs->Contains(NewTestName));
-        CPPUNIT_ASSERT(!logs->Contains(JunkName));
-        CPPUNIT_ASSERT(!logs->Contains(TestName2));
-        CPPUNIT_ASSERT(!logs->Contains(JunkName2));
+        REQUIRE(!logs->Contains(TestName));
+        REQUIRE(!logs->Contains(NewTestName));
+        REQUIRE(!logs->Contains(JunkName));
+        REQUIRE(!logs->Contains(TestName2));
+        REQUIRE(!logs->Contains(JunkName2));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -226,7 +209,7 @@
 /// This test case creates a file in the logs folder and then uses the api
 /// to rename it.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_RenameLog()
+TEST_CASE("RenameLog", "[LogManager]")
 {
     try
     {
@@ -242,21 +225,21 @@
         Ptr<MgPropertyCollection> logs = pMgdLogManager->EnumerateLogs();
 
         Ptr<MgStringProperty> newTestNameProp = new MgStringProperty(L"LogNameProperty", NewTestName);
-        CPPUNIT_ASSERT(logs->Contains(newTestNameProp));
+        REQUIRE(logs->Contains(newTestNameProp));
 
-        CPPUNIT_ASSERT_THROW_MG(pMgdLogManager->RenameLog(L"", NewTestName), MgNullArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pMgdLogManager->RenameLog(NewTestName, L""), MgNullArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pMgdLogManager->RenameLog(TestName, TestName), MgDuplicateFileException*);
-        CPPUNIT_ASSERT_THROW_MG(pMgdLogManager->RenameLog(L"DoesNotExist.log", L"NewDoesNotExist.log"), MgFileNotFoundException*);
+        REQUIRE_THROWS_MG(pMgdLogManager->RenameLog(L"", NewTestName), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pMgdLogManager->RenameLog(NewTestName, L""), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pMgdLogManager->RenameLog(TestName, TestName), MgDuplicateFileException*);
+        REQUIRE_THROWS_MG(pMgdLogManager->RenameLog(L"DoesNotExist.log", L"NewDoesNotExist.log"), MgFileNotFoundException*);
 #ifdef _WIN32
-        CPPUNIT_ASSERT_THROW_MG(pMgdLogManager->RenameLog(NewTestName, L"?"), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pMgdLogManager->RenameLog(NewTestName, L"?"), MgInvalidArgumentException*);
 #endif
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -269,7 +252,7 @@
 ///
 /// This test case tries to change the log info.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_SetAccessLogInfo()
+TEST_CASE("SetAccessLogInfo", "[LogManager]")
 {
     try
     {
@@ -289,15 +272,15 @@
         // Restore original info
         pMgdLogManager->SetAccessLogInfo(bOriginalEnabled, originalName, originalParams);
 
-        CPPUNIT_ASSERT(bEnabled == false);
-        CPPUNIT_ASSERT(wcscmp(name.c_str(), TestName) == 0);
-        CPPUNIT_ASSERT(wcscmp(params.c_str(), TestParameters) == 0);
+        REQUIRE(bEnabled == false);
+        REQUIRE(wcscmp(name.c_str(), TestName) == 0);
+        REQUIRE(wcscmp(params.c_str(), TestParameters) == 0);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -310,19 +293,19 @@
 ///
 /// This test case tries to clear the log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_ClearAccessLog()
+TEST_CASE("ClearAccessLog", "[LogManager]")
 {
     try
     {
         MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
         bool bResult = pMgdLogManager->ClearAccessLog();
-        CPPUNIT_ASSERT(bResult);
+        REQUIRE(bResult);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -335,7 +318,7 @@
 ///
 /// This test case tries to get the contents of the log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetAccessLog()
+TEST_CASE("GetAccessLog", "[LogManager]")
 {
     MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
     STRING path = pMgdLogManager->GetLogsPath();
@@ -361,9 +344,9 @@
     catch (MgException* e)
     {
         pMgdLogManager->SetAccessLogFileName(originalName);
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -371,8 +354,8 @@
         throw;
     }
 
-    CPPUNIT_ASSERT(logContents == contents);
-    CPPUNIT_ASSERT(lastLogEntry == LastEntry);
+    REQUIRE(logContents == contents);
+    REQUIRE(lastLogEntry == LastEntry);
 }
 
 ///----------------------------------------------------------------------------
@@ -380,7 +363,7 @@
 ///
 /// This test case tries to get the contents of the log between two dates.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetAccessLogByDate()
+TEST_CASE("GetAccessLogByDate", "[LogManager]")
 {
     MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
     STRING path = pMgdLogManager->GetLogsPath();
@@ -405,7 +388,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 54, 19, 0);
         byteReader = pMgdLogManager->GetAccessLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry1 + Entry2 + Entry3));
+        REQUIRE(logContents == (Entry1 + Entry2 + Entry3));
 
         // from & to date are the same and at exact time an entry was made
         fromDate = new MgDateTime(2005, 3, 7, 16, 51, 13, 0);
@@ -412,7 +395,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 51, 13, 0);
         byteReader = pMgdLogManager->GetAccessLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == Entry1);
+        REQUIRE(logContents == Entry1);
 
         // from & to date are the same and not at exact time an entry was made
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -419,7 +402,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
         byteReader = pMgdLogManager->GetAccessLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents.length() == 0);
+        REQUIRE(logContents.length() == 0);
 
         // from & to dates are at not at exact times an entry was made
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -426,7 +409,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 56, 0, 0);
         byteReader = pMgdLogManager->GetAccessLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry2 + Entry3 + Entry4));
+        REQUIRE(logContents == (Entry2 + Entry3 + Entry4));
 
         // spans two different files
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -433,7 +416,7 @@
         toDate = new MgDateTime(2005, 3, 8, 1, 0, 0, 0);
         byteReader = pMgdLogManager->GetAccessLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry2 + Entry3 + Entry4 + LastEntry));
+        REQUIRE(logContents == (Entry2 + Entry3 + Entry4 + LastEntry));
 
         // spans two different files, the first of which doesn't exist
         fromDate = new MgDateTime(2005, 3, 6, 23, 59, 59, 0);
@@ -440,7 +423,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
         byteReader = pMgdLogManager->GetAccessLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == Entry1);
+        REQUIRE(logContents == Entry1);
 
         // spans two different files, the second of which doesn't exist
         fromDate = new MgDateTime(2005, 3, 8, 0, 0, 0, 0);
@@ -447,7 +430,7 @@
         toDate = new MgDateTime(2005, 3, 9, 0, 0, 0, 0);
         byteReader = pMgdLogManager->GetAccessLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == LastEntry);
+        REQUIRE(logContents == LastEntry);
 
         // from date is after the latest entry in the log files
         fromDate = new MgDateTime(2006, 1, 1, 1, 0, 0, 0);
@@ -454,15 +437,15 @@
         toDate = new MgDateTime(2006, 1, 1, 1, 0, 0, 0);
         byteReader = pMgdLogManager->GetAccessLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents.length() == 0);
+        REQUIRE(logContents.length() == 0);
 
         // Use a null value for the date
-        CPPUNIT_ASSERT_THROW_MG(pMgdLogManager->GetAccessLog(NULL, toDate), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pMgdLogManager->GetAccessLog(nullptr, toDate), MgNullArgumentException*);
 
         // Use dates more than 24 hours apart
         fromDate = new MgDateTime(2005, 2, 18, 14, 0, 0, 0);
         toDate = new MgDateTime(2005, 2, 19, 18, 0, 0, 0);
-        CPPUNIT_ASSERT_THROW_MG(pMgdLogManager->GetAccessLog(fromDate, toDate), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pMgdLogManager->GetAccessLog(fromDate, toDate), MgInvalidArgumentException*);
 
         // Search a log file with an invalid log entry as the first entry
         CreateFile(path + JunkName, L"asdfasdfasdf");
@@ -469,7 +452,7 @@
         pMgdLogManager->SetAccessLogFileName(JunkName);
         fromDate = new MgDateTime(2005, 3, 8, 0, 0, 0, 0);
         toDate = new MgDateTime(2005, 3, 9, 0, 0, 0, 0);
-        CPPUNIT_ASSERT_THROW_MG(pMgdLogManager->GetAccessLog(fromDate, toDate), MgdInvalidLogEntryException*);
+        REQUIRE_THROWS_MG(pMgdLogManager->GetAccessLog(fromDate, toDate), MgdInvalidLogEntryException*);
 
         pMgdLogManager->SetAccessLogFileName(originalName);
     }
@@ -476,9 +459,9 @@
     catch (MgException* e)
     {
         pMgdLogManager->SetAccessLogFileName(originalName);
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -493,10 +476,10 @@
 /// This test case tries to get the contents of the log using an invalid
 /// argument.  An exception should be thrown.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetAccessLogInvalid()
+TEST_CASE("GetAccessLogInvalid", "[LogManager]")
 {
     MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
-    CPPUNIT_ASSERT_THROW_MG(pMgdLogManager->GetAccessLog(-1), MgArgumentOutOfRangeException*);
+    REQUIRE_THROWS_MG(pMgdLogManager->GetAccessLog(-1), MgArgumentOutOfRangeException*);
 }
 
 ///----------------------------------------------------------------------------
@@ -504,7 +487,7 @@
 ///
 /// This test case tries to change the log info.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_SetAdminLogInfo()
+TEST_CASE("SetAdminLogInfo", "[LogManager]")
 {
     try
     {
@@ -524,15 +507,15 @@
         // Restore original info
         pMgdLogManager->SetAdminLogInfo(bOriginalEnabled, originalName, originalParams);
 
-        CPPUNIT_ASSERT(bEnabled == false);
-        CPPUNIT_ASSERT(wcscmp(name.c_str(), TestName) == 0);
-        CPPUNIT_ASSERT(wcscmp(params.c_str(), TestParameters) == 0);
+        REQUIRE(bEnabled == false);
+        REQUIRE(wcscmp(name.c_str(), TestName) == 0);
+        REQUIRE(wcscmp(params.c_str(), TestParameters) == 0);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -545,19 +528,19 @@
 ///
 /// This test case tries to clear the log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_ClearAdminLog()
+TEST_CASE("ClearAdminLog", "[LogManager]")
 {
     try
     {
         MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
         bool bResult = pMgdLogManager->ClearAdminLog();
-        CPPUNIT_ASSERT(bResult);
+        REQUIRE(bResult);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -570,7 +553,7 @@
 ///
 /// This test case tries to get the contents of the log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetAdminLog()
+TEST_CASE("GetAdminLog", "[LogManager]")
 {
     MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
     STRING path = pMgdLogManager->GetLogsPath();
@@ -594,9 +577,9 @@
     catch (MgException* e)
     {
         pMgdLogManager->SetAdminLogFileName(originalName);
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -604,8 +587,8 @@
         throw;
     }
 
-    CPPUNIT_ASSERT(logContents == contents);
-    CPPUNIT_ASSERT(lastLogEntry == LastEntry);
+    REQUIRE(logContents == contents);
+    REQUIRE(lastLogEntry == LastEntry);
 }
 
 ///----------------------------------------------------------------------------
@@ -613,7 +596,7 @@
 ///
 /// This test case tries to get the contents of the log between two dates.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetAdminLogByDate()
+TEST_CASE("GetAdminLogByData", "[LogManager]")
 {
     MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
     STRING path = pMgdLogManager->GetLogsPath();
@@ -638,7 +621,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 54, 19, 0);
         byteReader = pMgdLogManager->GetAdminLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry1 + Entry2 + Entry3));
+        REQUIRE(logContents == (Entry1 + Entry2 + Entry3));
 
         // from & to date are the same and at exact time an entry was made
         fromDate = new MgDateTime(2005, 3, 7, 16, 51, 13, 0);
@@ -645,7 +628,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 51, 13, 0);
         byteReader = pMgdLogManager->GetAdminLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == Entry1);
+        REQUIRE(logContents == Entry1);
 
         // from & to date are the same and not at exact time an entry was made
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -652,7 +635,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
         byteReader = pMgdLogManager->GetAdminLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents.length() == 0);
+        REQUIRE(logContents.length() == 0);
 
         // from & to dates are at not at exact times an entry was made
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -659,7 +642,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 56, 0, 0);
         byteReader = pMgdLogManager->GetAdminLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry2 + Entry3 + Entry4));
+        REQUIRE(logContents == (Entry2 + Entry3 + Entry4));
 
         // spans two different files, the second of which doesn't exist
         fromDate = new MgDateTime(2005, 3, 8, 0, 0, 0, 0);
@@ -666,7 +649,7 @@
         toDate = new MgDateTime(2005, 3, 9, 0, 0, 0, 0);
         byteReader = pMgdLogManager->GetAdminLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == LastEntry);
+        REQUIRE(logContents == LastEntry);
 
         // from date is after the latest entry in the log files
         fromDate = new MgDateTime(2006, 1, 1, 1, 0, 0, 0);
@@ -673,15 +656,15 @@
         toDate = new MgDateTime(2006, 1, 1, 1, 0, 0, 0);
         byteReader = pMgdLogManager->GetAdminLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents.length() == 0);
+        REQUIRE(logContents.length() == 0);
 
         // Use a null value for the date
-        CPPUNIT_ASSERT_THROW_MG(pMgdLogManager->GetAdminLog(NULL, toDate), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pMgdLogManager->GetAdminLog(nullptr, toDate), MgNullArgumentException*);
 
         // Use dates more than 24 hours apart
         fromDate = new MgDateTime(2005, 2, 18, 14, 0, 0, 0);
         toDate = new MgDateTime(2005, 2, 19, 18, 0, 0, 0);
-        CPPUNIT_ASSERT_THROW_MG(pMgdLogManager->GetAdminLog(fromDate, toDate), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pMgdLogManager->GetAdminLog(fromDate, toDate), MgInvalidArgumentException*);
 
         pMgdLogManager->SetAdminLogFileName(originalName);
     }
@@ -688,9 +671,9 @@
     catch (MgException* e)
     {
         pMgdLogManager->SetAdminLogFileName(originalName);
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -705,10 +688,10 @@
 /// This test case tries to get the contents of the log using an invalid
 /// argument.  An exception should be thrown.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetAdminLogInvalid()
+TEST_CASE("GetAdminLogInvalid", "[LogManager]")
 {
     MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
-    CPPUNIT_ASSERT_THROW_MG(pMgdLogManager->GetAdminLog(-1), MgArgumentOutOfRangeException*);
+    REQUIRE_THROWS_MG(pMgdLogManager->GetAdminLog(-1), MgArgumentOutOfRangeException*);
 }
 
 ///----------------------------------------------------------------------------
@@ -716,7 +699,7 @@
 ///
 /// This test case tries to change the log info.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_SetAuthenticationLogInfo()
+TEST_CASE("SetAuthenticationLogInfo", "[LogManager]")
 {
     try
     {
@@ -736,15 +719,15 @@
         // Restore original info
         pMgdLogManager->SetAuthenticationLogInfo(bOriginalEnabled, originalName, originalParams);
 
-        CPPUNIT_ASSERT(bEnabled == false);
-        CPPUNIT_ASSERT(wcscmp(name.c_str(), TestName) == 0);
-        CPPUNIT_ASSERT(wcscmp(params.c_str(), TestParameters) == 0);
+        REQUIRE(bEnabled == false);
+        REQUIRE(wcscmp(name.c_str(), TestName) == 0);
+        REQUIRE(wcscmp(params.c_str(), TestParameters) == 0);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -757,19 +740,19 @@
 ///
 /// This test case tries to clear the log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_ClearAuthenticationLog()
+TEST_CASE("ClearAuthenticationLog", "[LogManager]")
 {
     try
     {
         MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
         bool bResult = pMgdLogManager->ClearAuthenticationLog();
-        CPPUNIT_ASSERT(bResult);
+        REQUIRE(bResult);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -782,7 +765,7 @@
 ///
 /// This test case tries to get the contents of the log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetAuthenticationLog()
+TEST_CASE("GetAuthenticationLog", "[LogManager]")
 {
     MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
     STRING path = pMgdLogManager->GetLogsPath();
@@ -806,9 +789,9 @@
     catch (MgException* e)
     {
         pMgdLogManager->SetAuthenticationLogFileName(originalName);
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -816,8 +799,8 @@
         throw;
     }
 
-    CPPUNIT_ASSERT(logContents == contents);
-    CPPUNIT_ASSERT(lastLogEntry == LastEntry);
+    REQUIRE(logContents == contents);
+    REQUIRE(lastLogEntry == LastEntry);
 }
 
 ///----------------------------------------------------------------------------
@@ -825,7 +808,7 @@
 ///
 /// This test case tries to get the contents of the log between two dates.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetAuthenticationLogByDate()
+TEST_CASE("GetAuthenticationLogByDate", "[LogManager]")
 {
     MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
     STRING path = pMgdLogManager->GetLogsPath();
@@ -850,7 +833,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 54, 19, 0);
         byteReader = pMgdLogManager->GetAuthenticationLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry1 + Entry2 + Entry3));
+        REQUIRE(logContents == (Entry1 + Entry2 + Entry3));
 
         // from & to dates are at not at exact times an entry was made
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -857,7 +840,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 56, 0, 0);
         byteReader = pMgdLogManager->GetAuthenticationLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry2 + Entry3 + Entry4));
+        REQUIRE(logContents == (Entry2 + Entry3 + Entry4));
 
         // spans two different files
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -864,7 +847,7 @@
         toDate = new MgDateTime(2005, 3, 8, 1, 0, 0, 0);
         byteReader = pMgdLogManager->GetAuthenticationLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry2 + Entry3 + Entry4 + LastEntry));
+        REQUIRE(logContents == (Entry2 + Entry3 + Entry4 + LastEntry));
 
         // spans two different files, the first of which doesn't exist
         fromDate = new MgDateTime(2005, 3, 6, 23, 59, 59, 0);
@@ -871,7 +854,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
         byteReader = pMgdLogManager->GetAuthenticationLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == Entry1);
+        REQUIRE(logContents == Entry1);
 
         // spans two different files, the second of which doesn't exist
         fromDate = new MgDateTime(2005, 3, 8, 0, 0, 0, 0);
@@ -878,7 +861,7 @@
         toDate = new MgDateTime(2005, 3, 9, 0, 0, 0, 0);
         byteReader = pMgdLogManager->GetAuthenticationLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == LastEntry);
+        REQUIRE(logContents == LastEntry);
 
         // from date is after the latest entry in the log files
         fromDate = new MgDateTime(2006, 1, 1, 1, 0, 0, 0);
@@ -885,15 +868,15 @@
         toDate = new MgDateTime(2006, 1, 1, 1, 0, 0, 0);
         byteReader = pMgdLogManager->GetAuthenticationLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents.length() == 0);
+        REQUIRE(logContents.length() == 0);
 
         // Use a null value for the date
-        CPPUNIT_ASSERT_THROW_MG(pMgdLogManager->GetAuthenticationLog(NULL, toDate), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pMgdLogManager->GetAuthenticationLog(nullptr, toDate), MgNullArgumentException*);
 
         // Use dates more than 24 hours apart
         fromDate = new MgDateTime(2005, 2, 18, 14, 0, 0, 0);
         toDate = new MgDateTime(2005, 2, 19, 18, 0, 0, 0);
-        CPPUNIT_ASSERT_THROW_MG(pMgdLogManager->GetAuthenticationLog(fromDate, toDate), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pMgdLogManager->GetAuthenticationLog(fromDate, toDate), MgInvalidArgumentException*);
 
         pMgdLogManager->SetAuthenticationLogFileName(originalName);
     }
@@ -900,9 +883,9 @@
     catch (MgException* e)
     {
         pMgdLogManager->SetAuthenticationLogFileName(originalName);
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -917,10 +900,10 @@
 /// This test case tries to get the contents of the log using an invalid
 /// argument.  An exception should be thrown.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetAuthenticationLogInvalid()
+TEST_CASE("GetAuthenticationLogInvalid", "[LogManager]")
 {
     MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
-    CPPUNIT_ASSERT_THROW_MG(pMgdLogManager->GetAuthenticationLog(-1), MgArgumentOutOfRangeException*);
+    REQUIRE_THROWS_MG(pMgdLogManager->GetAuthenticationLog(-1), MgArgumentOutOfRangeException*);
 }
 
 ///----------------------------------------------------------------------------
@@ -928,7 +911,7 @@
 ///
 /// This test case tries to change the log info.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_SetErrorLogInfo()
+TEST_CASE("SetErrorLogInfo", "[LogManager]")
 {
     try
     {
@@ -948,15 +931,15 @@
         // Restore original info
         pMgdLogManager->SetErrorLogInfo(bOriginalEnabled, originalName, originalParams);
 
-        CPPUNIT_ASSERT(bEnabled == false);
-        CPPUNIT_ASSERT(wcscmp(name.c_str(), TestName) == 0);
-        CPPUNIT_ASSERT(wcscmp(params.c_str(), TestParameters) == 0);
+        REQUIRE(bEnabled == false);
+        REQUIRE(wcscmp(name.c_str(), TestName) == 0);
+        REQUIRE(wcscmp(params.c_str(), TestParameters) == 0);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -969,19 +952,19 @@
 ///
 /// This test case tries to clear the log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_ClearErrorLog()
+TEST_CASE("ClearErrorLog", "[LogManager]")
 {
     try
     {
         MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
         bool bResult = pMgdLogManager->ClearErrorLog();
-        CPPUNIT_ASSERT(bResult);
+        REQUIRE(bResult);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -994,7 +977,7 @@
 ///
 /// This test case tries to get the contents of the log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetErrorLog()
+TEST_CASE("GetErrorLog", "[LogManager]")
 {
     MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
     STRING path = pMgdLogManager->GetLogsPath();
@@ -1018,9 +1001,9 @@
     catch (MgException* e)
     {
         pMgdLogManager->SetErrorLogFileName(originalName);
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1028,8 +1011,8 @@
         throw;
     }
 
-    CPPUNIT_ASSERT(logContents == contents);
-    CPPUNIT_ASSERT(lastLogEntry == LastEntry);
+    REQUIRE(logContents == contents);
+    REQUIRE(lastLogEntry == LastEntry);
 }
 
 ///----------------------------------------------------------------------------
@@ -1037,7 +1020,7 @@
 ///
 /// This test case tries to get the contents of the log between two dates.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetErrorLogByDate()
+TEST_CASE("GetErrorLogByDate", "[LogManager]")
 {
     MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
     STRING path = pMgdLogManager->GetLogsPath();
@@ -1062,7 +1045,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 54, 19, 0);
         byteReader = pMgdLogManager->GetErrorLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry1 + Entry2 + Entry3));
+        REQUIRE(logContents == (Entry1 + Entry2 + Entry3));
 
         // from & to dates are at not at exact times an entry was made
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -1069,7 +1052,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 56, 0, 0);
         byteReader = pMgdLogManager->GetErrorLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry2 + Entry3 + Entry4));
+        REQUIRE(logContents == (Entry2 + Entry3 + Entry4));
 
         // spans two different files
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -1076,7 +1059,7 @@
         toDate = new MgDateTime(2005, 3, 8, 1, 0, 0, 0);
         byteReader = pMgdLogManager->GetErrorLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry2 + Entry3 + Entry4 + LastEntry));
+        REQUIRE(logContents == (Entry2 + Entry3 + Entry4 + LastEntry));
 
         // spans two different files, the first of which doesn't exist
         fromDate = new MgDateTime(2005, 3, 6, 23, 59, 59, 0);
@@ -1083,7 +1066,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
         byteReader = pMgdLogManager->GetErrorLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == Entry1);
+        REQUIRE(logContents == Entry1);
 
         // spans two different files, the second of which doesn't exist
         fromDate = new MgDateTime(2005, 3, 8, 0, 0, 0, 0);
@@ -1090,7 +1073,7 @@
         toDate = new MgDateTime(2005, 3, 9, 0, 0, 0, 0);
         byteReader = pMgdLogManager->GetErrorLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == LastEntry);
+        REQUIRE(logContents == LastEntry);
 
         // from date is after the latest entry in the log files
         fromDate = new MgDateTime(2006, 1, 1, 1, 0, 0, 0);
@@ -1097,15 +1080,15 @@
         toDate = new MgDateTime(2006, 1, 1, 1, 0, 0, 0);
         byteReader = pMgdLogManager->GetErrorLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents.length() == 0);
+        REQUIRE(logContents.length() == 0);
 
         // Use a null value for the date
-        CPPUNIT_ASSERT_THROW_MG(pMgdLogManager->GetErrorLog(NULL, toDate), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pMgdLogManager->GetErrorLog(nullptr, toDate), MgNullArgumentException*);
 
         // Use dates more than 24 hours apart
         fromDate = new MgDateTime(2005, 2, 18, 14, 0, 0, 0);
         toDate = new MgDateTime(2005, 2, 19, 18, 0, 0, 0);
-        CPPUNIT_ASSERT_THROW_MG(pMgdLogManager->GetErrorLog(fromDate, toDate), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pMgdLogManager->GetErrorLog(fromDate, toDate), MgInvalidArgumentException*);
 
         pMgdLogManager->SetErrorLogFileName(originalName);
     }
@@ -1112,9 +1095,9 @@
     catch (MgException* e)
     {
         pMgdLogManager->SetErrorLogFileName(originalName);
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1129,10 +1112,10 @@
 /// This test case tries to get the contents of the log using an invalid
 /// argument.  An exception should be thrown.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetErrorLogInvalid()
+TEST_CASE("GetErrorLogInvalid", "[LogManager]")
 {
     MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
-    CPPUNIT_ASSERT_THROW_MG(pMgdLogManager->GetErrorLog(-1), MgArgumentOutOfRangeException*);
+    REQUIRE_THROWS_MG(pMgdLogManager->GetErrorLog(-1), MgArgumentOutOfRangeException*);
 }
 
 ///----------------------------------------------------------------------------
@@ -1140,7 +1123,7 @@
 ///
 /// This test case tries to change the log info.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_SetSessionLogInfo()
+TEST_CASE("SetSessionLogInfo", "[LogManager]")
 {
     try
     {
@@ -1160,15 +1143,15 @@
         // Restore original info
         pMgdLogManager->SetSessionLogInfo(bOriginalEnabled, originalName, originalParams);
 
-        CPPUNIT_ASSERT(bEnabled == false);
-        CPPUNIT_ASSERT(wcscmp(name.c_str(), TestName) == 0);
-        CPPUNIT_ASSERT(wcscmp(params.c_str(), TestParameters) == 0);
+        REQUIRE(bEnabled == false);
+        REQUIRE(wcscmp(name.c_str(), TestName) == 0);
+        REQUIRE(wcscmp(params.c_str(), TestParameters) == 0);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1181,19 +1164,19 @@
 ///
 /// This test case tries to clear the log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_ClearSessionLog()
+TEST_CASE("ClearSessionLog", "[LogManager]")
 {
     try
     {
         MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
         bool bResult = pMgdLogManager->ClearSessionLog();
-        CPPUNIT_ASSERT(bResult);
+        REQUIRE(bResult);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1206,7 +1189,7 @@
 ///
 /// This test case tries to get the contents of the log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetSessionLog()
+TEST_CASE("GetSessionLog", "[LogManager]")
 {
     MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
     STRING path = pMgdLogManager->GetLogsPath();
@@ -1230,9 +1213,9 @@
     catch (MgException* e)
     {
         pMgdLogManager->SetSessionLogFileName(originalName);
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1240,8 +1223,8 @@
         throw;
     }
 
-    CPPUNIT_ASSERT(logContents == contents);
-    CPPUNIT_ASSERT(lastLogEntry == LastEntry);
+    REQUIRE(logContents == contents);
+    REQUIRE(lastLogEntry == LastEntry);
 }
 
 ///----------------------------------------------------------------------------
@@ -1249,7 +1232,7 @@
 ///
 /// This test case tries to get the contents of the log between two dates.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetSessionLogByDate()
+TEST_CASE("GetSessionLogByDate", "[LogManager]")
 {
     MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
     STRING path = pMgdLogManager->GetLogsPath();
@@ -1274,7 +1257,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 54, 19, 0);
         byteReader = pMgdLogManager->GetSessionLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry1 + Entry2 + Entry3));
+        REQUIRE(logContents == (Entry1 + Entry2 + Entry3));
 
         // from & to dates are at not at exact times an entry was made
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -1281,7 +1264,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 56, 0, 0);
         byteReader = pMgdLogManager->GetSessionLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry2 + Entry3 + Entry4));
+        REQUIRE(logContents == (Entry2 + Entry3 + Entry4));
 
         // spans two different files
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -1288,7 +1271,7 @@
         toDate = new MgDateTime(2005, 3, 8, 1, 0, 0, 0);
         byteReader = pMgdLogManager->GetSessionLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry2 + Entry3 + Entry4 + LastEntry));
+        REQUIRE(logContents == (Entry2 + Entry3 + Entry4 + LastEntry));
 
         // spans two different files, the first of which doesn't exist
         fromDate = new MgDateTime(2005, 3, 6, 23, 59, 59, 0);
@@ -1295,7 +1278,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
         byteReader = pMgdLogManager->GetSessionLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == Entry1);
+        REQUIRE(logContents == Entry1);
 
         // spans two different files, the second of which doesn't exist
         fromDate = new MgDateTime(2005, 3, 8, 0, 0, 0, 0);
@@ -1302,7 +1285,7 @@
         toDate = new MgDateTime(2005, 3, 9, 0, 0, 0, 0);
         byteReader = pMgdLogManager->GetSessionLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == LastEntry);
+        REQUIRE(logContents == LastEntry);
 
         // from date is after the latest entry in the log files
         fromDate = new MgDateTime(2006, 1, 1, 1, 0, 0, 0);
@@ -1309,15 +1292,15 @@
         toDate = new MgDateTime(2006, 1, 1, 1, 0, 0, 0);
         byteReader = pMgdLogManager->GetSessionLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents.length() == 0);
+        REQUIRE(logContents.length() == 0);
 
         // Use a null value for the date
-        CPPUNIT_ASSERT_THROW_MG(pMgdLogManager->GetSessionLog(NULL, toDate), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pMgdLogManager->GetSessionLog(nullptr, toDate), MgNullArgumentException*);
 
         // Use dates more than 24 hours apart
         fromDate = new MgDateTime(2005, 2, 18, 14, 0, 0, 0);
         toDate = new MgDateTime(2005, 2, 19, 18, 0, 0, 0);
-        CPPUNIT_ASSERT_THROW_MG(pMgdLogManager->GetSessionLog(fromDate, toDate), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pMgdLogManager->GetSessionLog(fromDate, toDate), MgInvalidArgumentException*);
 
         pMgdLogManager->SetSessionLogFileName(originalName);
     }
@@ -1324,9 +1307,9 @@
     catch (MgException* e)
     {
         pMgdLogManager->SetSessionLogFileName(originalName);
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1341,10 +1324,10 @@
 /// This test case tries to get the contents of the log using an invalid
 /// argument.  An exception should be thrown.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetSessionLogInvalid()
+TEST_CASE("GetSessionLogInvalid", "[LogManager]")
 {
     MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
-    CPPUNIT_ASSERT_THROW_MG(pMgdLogManager->GetSessionLog(-1), MgArgumentOutOfRangeException*);
+    REQUIRE_THROWS_MG(pMgdLogManager->GetSessionLog(-1), MgArgumentOutOfRangeException*);
 }
 
 ///----------------------------------------------------------------------------
@@ -1352,7 +1335,7 @@
 ///
 /// This test case tries to change the log info.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_SetTraceLogInfo()
+TEST_CASE("SetTraceLogInfo", "[LogManager]")
 {
     try
     {
@@ -1372,15 +1355,15 @@
         // Restore original info
         pMgdLogManager->SetTraceLogInfo(bOriginalEnabled, originalName, originalParams);
 
-        CPPUNIT_ASSERT(bEnabled == false);
-        CPPUNIT_ASSERT(wcscmp(name.c_str(), TestName) == 0);
-        CPPUNIT_ASSERT(wcscmp(params.c_str(), TestParameters) == 0);
+        REQUIRE(bEnabled == false);
+        REQUIRE(wcscmp(name.c_str(), TestName) == 0);
+        REQUIRE(wcscmp(params.c_str(), TestParameters) == 0);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1393,19 +1376,19 @@
 ///
 /// This test case tries to clear the log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_ClearTraceLog()
+TEST_CASE("ClearTraceLog", "[LogManager]")
 {
     try
     {
         MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
         bool bResult = pMgdLogManager->ClearTraceLog();
-        CPPUNIT_ASSERT(bResult);
+        REQUIRE(bResult);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1418,7 +1401,7 @@
 ///
 /// This test case tries to get the contents of the log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetTraceLog()
+TEST_CASE("GetTraceLog", "[LogManager]")
 {
     MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
     STRING path = pMgdLogManager->GetLogsPath();
@@ -1442,9 +1425,9 @@
     catch (MgException* e)
     {
         pMgdLogManager->SetTraceLogFileName(originalName);
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1452,8 +1435,8 @@
         throw;
     }
 
-    CPPUNIT_ASSERT(logContents == contents);
-    CPPUNIT_ASSERT(lastLogEntry == LastEntry);
+    REQUIRE(logContents == contents);
+    REQUIRE(lastLogEntry == LastEntry);
 }
 
 ///----------------------------------------------------------------------------
@@ -1461,7 +1444,7 @@
 ///
 /// This test case tries to get the contents of the log between two dates.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetTraceLogByDate()
+TEST_CASE("GetTraceLogByDate", "[LogManager]")
 {
     MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
     STRING path = pMgdLogManager->GetLogsPath();
@@ -1486,7 +1469,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 54, 19, 0);
         byteReader = pMgdLogManager->GetTraceLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry1 + Entry2 + Entry3));
+        REQUIRE(logContents == (Entry1 + Entry2 + Entry3));
 
         // from & to dates are at not at exact times an entry was made
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -1493,7 +1476,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 56, 0, 0);
         byteReader = pMgdLogManager->GetTraceLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry2 + Entry3 + Entry4));
+        REQUIRE(logContents == (Entry2 + Entry3 + Entry4));
 
         // spans two different files
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -1500,7 +1483,7 @@
         toDate = new MgDateTime(2005, 3, 8, 1, 0, 0, 0);
         byteReader = pMgdLogManager->GetTraceLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry2 + Entry3 + Entry4 + LastEntry));
+        REQUIRE(logContents == (Entry2 + Entry3 + Entry4 + LastEntry));
 
         // spans two different files, the first of which doesn't exist
         fromDate = new MgDateTime(2005, 3, 6, 23, 59, 59, 0);
@@ -1507,7 +1490,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
         byteReader = pMgdLogManager->GetTraceLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == Entry1);
+        REQUIRE(logContents == Entry1);
 
         // spans two different files, the second of which doesn't exist
         fromDate = new MgDateTime(2005, 3, 8, 0, 0, 0, 0);
@@ -1514,7 +1497,7 @@
         toDate = new MgDateTime(2005, 3, 9, 0, 0, 0, 0);
         byteReader = pMgdLogManager->GetTraceLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == LastEntry);
+        REQUIRE(logContents == LastEntry);
 
         // from date is after the latest entry in the log files
         fromDate = new MgDateTime(2006, 1, 1, 1, 0, 0, 0);
@@ -1521,15 +1504,15 @@
         toDate = new MgDateTime(2006, 1, 1, 1, 0, 0, 0);
         byteReader = pMgdLogManager->GetTraceLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents.length() == 0);
+        REQUIRE(logContents.length() == 0);
 
         // Use a null value for the date
-        CPPUNIT_ASSERT_THROW_MG(pMgdLogManager->GetTraceLog(NULL, toDate), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pMgdLogManager->GetTraceLog(nullptr, toDate), MgNullArgumentException*);
 
         // Use dates more than 24 hours apart
         fromDate = new MgDateTime(2005, 2, 18, 14, 0, 0, 0);
         toDate = new MgDateTime(2005, 2, 19, 18, 0, 0, 0);
-        CPPUNIT_ASSERT_THROW_MG(pMgdLogManager->GetTraceLog(fromDate, toDate), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pMgdLogManager->GetTraceLog(fromDate, toDate), MgInvalidArgumentException*);
 
         pMgdLogManager->SetTraceLogFileName(originalName);
     }
@@ -1536,9 +1519,9 @@
     catch (MgException* e)
     {
         pMgdLogManager->SetTraceLogFileName(originalName);
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1553,10 +1536,10 @@
 /// This test case tries to get the contents of the log using an invalid
 /// argument.  An exception should be thrown.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetTraceLogInvalid()
+TEST_CASE("GetTraceLogInvalid", "[LogManager]")
 {
     MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
-    CPPUNIT_ASSERT_THROW_MG(pMgdLogManager->GetTraceLog(-1), MgArgumentOutOfRangeException*);
+    REQUIRE_THROWS_MG(pMgdLogManager->GetTraceLog(-1), MgArgumentOutOfRangeException*);
 }
 
 ///----------------------------------------------------------------------------
@@ -1564,7 +1547,7 @@
 ///
 /// This test case writes an entry to the log.  (Assumes that getlog works)
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_LogAccessEntry()
+TEST_CASE("LogAccessEntry", "[LogManager]")
 {
     Ptr<MgByteReader> byteReader;
     STRING logEntry;
@@ -1589,9 +1572,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
 
     }
     catch (...)
@@ -1600,7 +1583,7 @@
     }
 
     pos = logEntry.find(entry);
-    CPPUNIT_ASSERT(pos != string::npos);
+    REQUIRE(pos != string::npos);
 }
 
 ///----------------------------------------------------------------------------
@@ -1608,7 +1591,7 @@
 ///
 /// This test case writes an entry to the log.  (Assumes that getlog works)
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_LogAdminEntry()
+TEST_CASE("LogAdminEntry", "[LogManager]")
 {
     Ptr<MgByteReader> byteReader;
     STRING logEntry;
@@ -1633,9 +1616,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1643,7 +1626,7 @@
     }
 
     pos = logEntry.find(entry);
-    CPPUNIT_ASSERT(pos != string::npos);
+    REQUIRE(pos != string::npos);
 }
 
 ///----------------------------------------------------------------------------
@@ -1651,7 +1634,7 @@
 ///
 /// This test case writes an entry to the log.  (Assumes that getlog works)
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_LogAuthenticationEntry()
+TEST_CASE("LogAuthenticationEntry", "[LogManager]")
 {
     Ptr<MgByteReader> byteReader;
     STRING logEntry;
@@ -1676,9 +1659,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1686,7 +1669,7 @@
     }
 
     pos = logEntry.find(entry);
-    CPPUNIT_ASSERT(pos != string::npos);
+    REQUIRE(pos != string::npos);
 }
 
 ///----------------------------------------------------------------------------
@@ -1694,7 +1677,7 @@
 ///
 /// This test case writes an entry to the log.  (Assumes that getlog works)
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_LogErrorEntry()
+TEST_CASE("LogErrorEntry", "[LogManager]")
 {
     Ptr<MgByteReader> byteReader;
     STRING logEntry;
@@ -1719,9 +1702,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1729,7 +1712,7 @@
     }
 
     pos = logEntry.find(entry);
-    CPPUNIT_ASSERT(pos != string::npos);
+    REQUIRE(pos != string::npos);
 }
 
 ///----------------------------------------------------------------------------
@@ -1737,7 +1720,7 @@
 ///
 /// This test case writes an entry to the log.  (Assumes that getlog works)
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_LogTraceEntry()
+TEST_CASE("LogTraceEntry", "[LogManager]")
 {
     Ptr<MgByteReader> byteReader;
     STRING logEntry;
@@ -1762,9 +1745,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1772,7 +1755,7 @@
     }
 
     pos = logEntry.find(entry);
-    CPPUNIT_ASSERT(pos != string::npos);
+    REQUIRE(pos != string::npos);
 }
 
 
@@ -1781,7 +1764,7 @@
 ///
 /// This test case tries to get the contents of the specified log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetLogFile()
+TEST_CASE("GetLogFile", "[LogManager]")
 {
     MgdLogManager* pMgdLogManager = MgdLogManager::GetInstance();
     STRING path = pMgdLogManager->GetLogsPath();
@@ -1805,9 +1788,9 @@
     catch (MgException* e)
     {
         pMgdLogManager->SetAccessLogFileName(originalName);
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1815,5 +1798,5 @@
         throw;
     }
 
-    CPPUNIT_ASSERT(logContents == contents);
+    REQUIRE(logContents == contents);
 }

Deleted: trunk/MgDev/Desktop/UnitTest/TestLogManager.h
===================================================================
--- trunk/MgDev/Desktop/UnitTest/TestLogManager.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/UnitTest/TestLogManager.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,145 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _TESTLOGMANAGER_H
-#define _TESTLOGMANAGER_H
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestLogManager : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestLogManager);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_ValidLogManager);
-    CPPUNIT_TEST(TestCase_GetLogsPath);
-    CPPUNIT_TEST(TestCase_TestForDeadLock);
-
-    CPPUNIT_TEST(TestCase_EnumerateLogs);
-    CPPUNIT_TEST(TestCase_RenameLog);
-
-    CPPUNIT_TEST(TestCase_SetAccessLogInfo);
-    CPPUNIT_TEST(TestCase_ClearAccessLog);
-    CPPUNIT_TEST(TestCase_GetAccessLog);
-    CPPUNIT_TEST(TestCase_GetAccessLogByDate);
-    CPPUNIT_TEST(TestCase_GetAccessLogInvalid);
-
-    CPPUNIT_TEST(TestCase_SetAdminLogInfo);
-    CPPUNIT_TEST(TestCase_ClearAdminLog);
-    CPPUNIT_TEST(TestCase_GetAdminLog);
-    CPPUNIT_TEST(TestCase_GetAdminLogByDate);
-    CPPUNIT_TEST(TestCase_GetAdminLogInvalid);
-
-    CPPUNIT_TEST(TestCase_SetAuthenticationLogInfo);
-    CPPUNIT_TEST(TestCase_ClearAuthenticationLog);
-    CPPUNIT_TEST(TestCase_GetAuthenticationLog);
-    CPPUNIT_TEST(TestCase_GetAuthenticationLogByDate);
-    CPPUNIT_TEST(TestCase_GetAuthenticationLogInvalid);
-
-    CPPUNIT_TEST(TestCase_SetErrorLogInfo);
-    CPPUNIT_TEST(TestCase_ClearErrorLog);
-    CPPUNIT_TEST(TestCase_GetErrorLog);
-    CPPUNIT_TEST(TestCase_GetErrorLogByDate);
-    CPPUNIT_TEST(TestCase_GetErrorLogInvalid);
-
-    CPPUNIT_TEST(TestCase_SetSessionLogInfo);
-    CPPUNIT_TEST(TestCase_ClearSessionLog);
-    CPPUNIT_TEST(TestCase_GetSessionLog);
-    CPPUNIT_TEST(TestCase_GetSessionLogByDate);
-    CPPUNIT_TEST(TestCase_GetSessionLogInvalid);
-
-    CPPUNIT_TEST(TestCase_SetTraceLogInfo);
-    CPPUNIT_TEST(TestCase_ClearTraceLog);
-    CPPUNIT_TEST(TestCase_GetTraceLog);
-    CPPUNIT_TEST(TestCase_GetTraceLogByDate);
-    CPPUNIT_TEST(TestCase_GetTraceLogInvalid);
-
-    CPPUNIT_TEST(TestCase_LogAccessEntry);
-    //CPPUNIT_TEST(TestCase_LogAdminEntry);             //Not applicable for mg-desktop
-    //CPPUNIT_TEST(TestCase_LogAuthenticationEntry);    //Not applicable for mg-desktop
-    CPPUNIT_TEST(TestCase_LogErrorEntry);
-    CPPUNIT_TEST(TestCase_LogTraceEntry);
-
-    CPPUNIT_TEST(TestCase_GetLogFile);
-
-    CPPUNIT_TEST(TestCase_DeleteLog);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-    bool CreateFile(STRING filename, STRING contents);
-
-    void TestCase_ValidLogManager();
-    void TestCase_GetLogsPath();
-    void TestCase_TestForDeadLock();
-
-    void TestCase_EnumerateLogs();
-    void TestCase_DeleteLog();
-    void TestCase_RenameLog();
-
-    void TestCase_SetAccessLogInfo();
-    void TestCase_ClearAccessLog();
-    void TestCase_GetAccessLog();
-    void TestCase_GetAccessLogByDate();
-    void TestCase_GetAccessLogInvalid();
-
-    void TestCase_SetAdminLogInfo();
-    void TestCase_ClearAdminLog();
-    void TestCase_GetAdminLog();
-    void TestCase_GetAdminLogByDate();
-    void TestCase_GetAdminLogInvalid();
-
-    void TestCase_SetAuthenticationLogInfo();
-    void TestCase_ClearAuthenticationLog();
-    void TestCase_GetAuthenticationLog();
-    void TestCase_GetAuthenticationLogByDate();
-    void TestCase_GetAuthenticationLogInvalid();
-
-    void TestCase_SetErrorLogInfo();
-    void TestCase_ClearErrorLog();
-    void TestCase_GetErrorLog();
-    void TestCase_GetErrorLogByDate();
-    void TestCase_GetErrorLogInvalid();
-
-    void TestCase_SetSessionLogInfo();
-    void TestCase_ClearSessionLog();
-    void TestCase_GetSessionLog();
-    void TestCase_GetSessionLogByDate();
-    void TestCase_GetSessionLogInvalid();
-
-    void TestCase_SetTraceLogInfo();
-    void TestCase_ClearTraceLog();
-    void TestCase_GetTraceLog();
-    void TestCase_GetTraceLogByDate();
-    void TestCase_GetTraceLogInvalid();
-
-    void TestCase_LogAccessEntry();
-    void TestCase_LogAdminEntry();
-    void TestCase_LogAuthenticationEntry();
-    void TestCase_LogErrorEntry();
-    void TestCase_LogSessionEntry();
-    void TestCase_LogTraceEntry();
-
-    void TestCase_GetLogFile();
-};
-
-#endif // _TESTLOGMANAGER_H

Modified: trunk/MgDev/Desktop/UnitTest/TestLogManagerThread.cpp
===================================================================
--- trunk/MgDev/Desktop/UnitTest/TestLogManagerThread.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/UnitTest/TestLogManagerThread.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -30,9 +30,9 @@
 int TestLogManagerThread::svc()
 {
     MgdLogManager* pMan = MgdLogManager::GetInstance();
-    if (NULL == pMan)
+    if (nullptr == pMan)
     {
-        throw new MgNullReferenceException(L"TestLogManagerThread.svc", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgNullReferenceException(L"TestLogManagerThread.svc", __LINE__, __WFILE__, nullptr, L"", nullptr);
     }
 
     INT32 nResult = 0;

Modified: trunk/MgDev/Desktop/UnitTest/TestMappingService.cpp
===================================================================
--- trunk/MgDev/Desktop/UnitTest/TestMappingService.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/UnitTest/TestMappingService.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -16,192 +16,21 @@
 //
 
 #include "MgDesktop.h"
-#include "TestMappingService.h"
-#include "CppUnitExtensions.h"
 
-const STRING TEST_LOCALE = L"en";
+#include "CatchHelperMacros.h"
+#include "TestServiceFactory.h"
+#include "catch.hpp"
 
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestMappingService, "TestMappingService");
-
-
-TestMappingService::TestMappingService()
+TEST_CASE("GetMultiPlot", "[MappingService]")
 {
-    // Initialize service objects.
-    //MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-    Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
-
-    m_svcResource = dynamic_cast<MgdResourceService*>(
-        factory->CreateService(MgServiceType::ResourceService));
-    assert(m_svcResource != NULL);
-
-    m_svcMapping = dynamic_cast<MgdMappingService*>(
-        factory->CreateService(MgServiceType::MappingService));
-    assert(m_svcMapping != NULL);
-}
-
-
-TestMappingService::~TestMappingService()
-{
-}
-
-
-void TestMappingService::setUp()
-{
-}
-
-
-void TestMappingService::tearDown()
-{
-}
-
-
-void TestMappingService::TestStart()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Mapping Service tests.\n")));
-
     try
     {
-        //publish the map definition
-        Ptr<MgResourceIdentifier> mapres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
-        Ptr<MgByteSource> mdfsrc = new MgByteSource(L"../UnitTestFiles/UT_Sheboygan.mdf", false);
-        Ptr<MgByteReader> mdfrdr = mdfsrc->GetReader();
-        m_svcResource->SetResource(mapres, mdfrdr, NULL);
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
 
-        //publish the layer definitions
-        Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.ldf", false);
-        Ptr<MgByteReader> ldfrdr1 = ldfsrc1->GetReader();
-        m_svcResource->SetResource(ldfres1, ldfrdr1, NULL);
+        Ptr<MgdMappingService> pService = dynamic_cast<MgdMappingService*>(
+            factory->CreateService(MgServiceType::MappingService));
+        REQUIRE(pService.p != nullptr);
 
-        Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.ldf", false);
-        Ptr<MgByteReader> ldfrdr2 = ldfsrc2->GetReader();
-        m_svcResource->SetResource(ldfres2, ldfrdr2, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.ldf", false);
-        Ptr<MgByteReader> ldfrdr3 = ldfsrc3->GetReader();
-        m_svcResource->SetResource(ldfres3, ldfrdr3, NULL);
-
-        //publish the feature sources
-        Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
-        Ptr<MgByteSource> fssrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.fs", false);
-        Ptr<MgByteReader> fsrdr1 = fssrc1->GetReader();
-        m_svcResource->SetResource(fsres1, fsrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
-        Ptr<MgByteSource> fssrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.fs", false);
-        Ptr<MgByteReader> fsrdr2 = fssrc2->GetReader();
-        m_svcResource->SetResource(fsres2, fsrdr2, NULL);
-
-        Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
-        Ptr<MgByteSource> fssrc3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.fs", false);
-        Ptr<MgByteReader> fsrdr3 = fssrc3->GetReader();
-        m_svcResource->SetResource(fsres3, fsrdr3, NULL);
-
-        // publish the resource data
-        Ptr<MgByteSource> dataSource1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.sdf", false);
-        Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
-        m_svcResource->SetResourceData(fsres1, L"UT_HydrographicPolygons.sdf", L"File", dataReader1);
-
-        Ptr<MgByteSource> dataSource2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.sdf", false);
-        Ptr<MgByteReader> dataReader2 = dataSource2->GetReader();
-        m_svcResource->SetResourceData(fsres2, L"UT_Parcels.sdf", L"File", dataReader2);
-
-        Ptr<MgByteSource> dataSource3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.sdf", false);
-        Ptr<MgByteReader> dataReader3 = dataSource3->GetReader();
-        m_svcResource->SetResourceData(fsres3, L"UT_Rail.sdf", L"File", dataReader3);
-
-        // publish the print layouts
-        Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
-        Ptr<MgByteSource> plsrc1 = new MgByteSource(L"../UnitTestFiles/UT_AllElements.pl", false);
-        Ptr<MgByteReader> plrdr1 = plsrc1->GetReader();
-        m_svcResource->SetResource(plres1, plrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
-        Ptr<MgByteSource> plsrc2 = new MgByteSource(L"../UnitTestFiles/UT_NoLegend.pl", false);
-        Ptr<MgByteReader> plrdr2 = plsrc2->GetReader();
-        m_svcResource->SetResource(plres2, plrdr2, NULL);
-
-        // publish the symbol library
-        Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
-        Ptr<MgByteSource> slsrc1 = new MgByteSource(L"../UnitTestFiles/UT_SymbolMart.sl", false);
-        Ptr<MgByteReader> slrdr1 = slsrc1->GetReader();
-        m_svcResource->SetResource(slres1, slrdr1, NULL);
-        Ptr<MgByteSource> datasrc = new MgByteSource(L"../UnitTestFiles/UT_Symbols.dwf", false);
-        Ptr<MgByteReader> datardr = datasrc->GetReader();
-        m_svcResource->SetResourceData(slres1, L"symbols.dwf", L"File", datardr);
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-}
-
-
-void TestMappingService::TestEnd()
-{
-    try
-    {
-        //delete the map definition
-        Ptr<MgResourceIdentifier> mapres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
-        m_svcResource->DeleteResource(mapres);
-
-        //delete the layer definitions
-        Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres1);
-
-        Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres2);
-
-        Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres3);
-
-        //delete the feature sources
-        Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
-        m_svcResource->DeleteResource(fsres1);
-
-        Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
-        m_svcResource->DeleteResource(fsres2);
-
-        Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
-        m_svcResource->DeleteResource(fsres3);
-
-        // delete the print layouts
-        Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
-        m_svcResource->DeleteResource(plres1);
-
-        Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
-        m_svcResource->DeleteResource(plres2);
-
-        // delete the symbol library
-        Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
-        m_svcResource->DeleteResource(slres1);
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nMapping Service tests completed.\n\n")));
-}
-
-void TestMappingService::TestCase_GetMultiPlot()
-{
-    try
-    {
         // make a runtime map
         Ptr<MgResourceIdentifier> mapRes1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
         Ptr<MgdMap> map1 = new MgdMap(mapRes1, L"UnitTestSheboygan1");
@@ -256,11 +85,11 @@
         mapPlots->Add(mapPlot4);
 
         // call the API
-        Ptr<MgByteReader> eplot = m_svcMapping->GenerateMultiPlot(mapPlots, version);
+        Ptr<MgByteReader> eplot = pService->GenerateMultiPlot(mapPlots, version);
 
         INT64 len = eplot->GetLength();
 
-        //CPPUNIT_ASSERT(len == 7000); // TODO: determine correct length
+        //REQUIRE(len == 7000); // TODO: determine correct length
 
         //Ptr<MgByteSink> byteSink = new MgByteSink(eplot);
         //byteSink->ToFile(L"UTNewMultiPlot.dwf");
@@ -267,9 +96,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -277,11 +106,16 @@
     }
 }
 
-
-void TestMappingService::TestCase_GetPlotUsingCurrentCenterAndScale()
+TEST_CASE("GetPlotUsingCurrentCenterAndScale", "[MappingService]")
 {
     try
     {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdMappingService> pService = dynamic_cast<MgdMappingService*>(
+            factory->CreateService(MgServiceType::MappingService));
+        REQUIRE(pService.p != nullptr);
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mapRes1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
         Ptr<MgdMap> map1 = new MgdMap(mapRes1, L"UnitTestSheboygan1");
@@ -300,12 +134,12 @@
         Ptr<MgdLayout> layout = new MgdLayout(allElementsLayout, L"TestTitle", MgdUnitType::USEnglish);
 
         // call the API
-        Ptr<MgByteReader> eplot = m_svcMapping->GeneratePlot(map1, plotSpec, NULL, version);
+        Ptr<MgByteReader> eplot = pService->GeneratePlot(map1, plotSpec, nullptr, version);
         //Ptr<MgByteReader> eplot = m_svcMapping->GeneratePlot(map1, plotSpec, layout, version);
 
         INT64 len = eplot->GetLength();
 
-        // CPPUNIT_ASSERT(len == 7000); // TODO: determine correct length
+        // REQUIRE(len == 7000); // TODO: determine correct length
 
         //Ptr<MgByteSink> byteSink = new MgByteSink(eplot);
         //byteSink->ToFile(L"UTNewCurrentCentreAndScalePlot.dwf");
@@ -312,9 +146,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -322,11 +156,16 @@
     }
 }
 
-
-void TestMappingService::TestCase_GetPlotUsingOverriddenCenterAndScale()
+TEST_CASE("GetPlotUsingOverriddenCenterAndScale", "[MappingService]")
 {
     try
     {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdMappingService> pService = dynamic_cast<MgdMappingService*>(
+            factory->CreateService(MgServiceType::MappingService));
+        REQUIRE(pService.p != nullptr);
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mapRes1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
         Ptr<MgdMap> map1 = new MgdMap(mapRes1, L"UnitTestSheboygan1");
@@ -345,11 +184,11 @@
         Ptr<MgdLayout> layout = new MgdLayout(allElementsLayout, L"TestTitle", MgdUnitType::USEnglish);
 
         // call the API
-        Ptr<MgByteReader> eplot = m_svcMapping->GeneratePlot(map1, center, scale, plotSpec, layout, version);
+        Ptr<MgByteReader> eplot = pService->GeneratePlot(map1, center, scale, plotSpec, layout, version);
 
         INT64 len = eplot->GetLength();
 
-        // CPPUNIT_ASSERT(len == 7000); // TODO: determine correct length
+        // REQUIRE(len == 7000); // TODO: determine correct length
 
         //Ptr<MgByteSink> byteSink = new MgByteSink(eplot);
         //byteSink->ToFile(L"UTNewOveriddenCenterAndScalePlot.dwf");
@@ -356,9 +195,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -366,11 +205,16 @@
     }
 }
 
-
-void TestMappingService::TestCase_GetPlotUsingExtents()
+TEST_CASE("GetPlotUsingExtents", "[MappingService]")
 {
     try
     {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdMappingService> pService = dynamic_cast<MgdMappingService*>(
+            factory->CreateService(MgServiceType::MappingService));
+        REQUIRE(pService.p != nullptr);
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mapRes1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
         Ptr<MgdMap> map1 = new MgdMap(mapRes1, L"UnitTestSheboygan1");
@@ -389,11 +233,11 @@
         Ptr<MgdLayout> layout = new MgdLayout(allElementsLayout, L"TestTitle", MgdUnitType::USEnglish);
 
         // call the API
-        Ptr<MgByteReader> eplot = m_svcMapping->GeneratePlot(map1, extents, false, plotSpec, layout, version);
+        Ptr<MgByteReader> eplot = pService->GeneratePlot(map1, extents, false, plotSpec, layout, version);
 
         INT64 len = eplot->GetLength();
 
-        // CPPUNIT_ASSERT(len == 7000); // TODO: determine correct length
+        // REQUIRE(len == 7000); // TODO: determine correct length
 
         //Ptr<MgByteSink> byteSink = new MgByteSink(eplot);
         //byteSink->ToFile(L"UTNewExtentsPlot.dwf");
@@ -400,9 +244,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -410,11 +254,16 @@
     }
 }
 
-
-void TestMappingService::TestCase_GetPlotUsingExtentsAndExpandToFit()
+TEST_CASE("GetPlotUsingExtentsAndExpandToFit", "[MappingService]")
 {
     try
     {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdMappingService> pService = dynamic_cast<MgdMappingService*>(
+            factory->CreateService(MgServiceType::MappingService));
+        REQUIRE(pService.p != nullptr);
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mapRes1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
         Ptr<MgdMap> map1 = new MgdMap(mapRes1, L"UnitTestSheboygan1");
@@ -433,11 +282,11 @@
         Ptr<MgdLayout> layout = new MgdLayout(allElementsLayout, L"TestTitle", MgdUnitType::USEnglish);
 
         // call the API
-        Ptr<MgByteReader> eplot = m_svcMapping->GeneratePlot(map1, extents, true, plotSpec, NULL, version);
+        Ptr<MgByteReader> eplot = pService->GeneratePlot(map1, extents, true, plotSpec, nullptr, version);
 
         INT64 len = eplot->GetLength();
 
-        // CPPUNIT_ASSERT(len == 7000); // TODO: determine correct length
+        // REQUIRE(len == 7000); // TODO: determine correct length
 
         //Ptr<MgByteSink> byteSink = new MgByteSink(eplot);
         //byteSink->ToFile(L"UTNewExtentsExpandToFitPlot.dwf");
@@ -444,9 +293,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {

Deleted: trunk/MgDev/Desktop/UnitTest/TestMappingService.h
===================================================================
--- trunk/MgDev/Desktop/UnitTest/TestMappingService.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/UnitTest/TestMappingService.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,72 +0,0 @@
-//
-//  Copyright (C) 2004-2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef TESTMAPPINGSERVICE_H_
-#define TESTMAPPINGSERVICE_H_
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestMappingService : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestMappingService);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    //CPPUNIT_TEST(TestCase_GetMap);
-    //CPPUNIT_TEST(TestCase_GetMapUpdate);
-    //CPPUNIT_TEST(TestCase_SaveMap);
-    CPPUNIT_TEST(TestCase_GetMultiPlot);
-    CPPUNIT_TEST(TestCase_GetPlotUsingCurrentCenterAndScale);
-    CPPUNIT_TEST(TestCase_GetPlotUsingOverriddenCenterAndScale);
-    CPPUNIT_TEST(TestCase_GetPlotUsingExtents);
-    CPPUNIT_TEST(TestCase_GetPlotUsingExtentsAndExpandToFit);
-    //CPPUNIT_TEST(TestCase_GetLegendPlot);
-    //CPPUNIT_TEST(TestCase_QueryFeaturesImageMap);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-
-    TestMappingService();
-    ~TestMappingService();
-
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    //void TestCase_GetMap();
-    //void TestCase_GetMapUpdate();
-    //void TestCase_SaveMap();
-    void TestCase_GetPlot();
-    void TestCase_GetMultiPlot();
-    void TestCase_GetPlotUsingCurrentCenterAndScale();
-    void TestCase_GetPlotUsingOverriddenCenterAndScale();
-    void TestCase_GetPlotUsingExtents();
-    void TestCase_GetPlotUsingExtentsAndExpandToFit();
-    //void TestCase_GetLegendPlot();
-    //void TestCase_QueryFeaturesImageMap();
-
-private:
-
-    void PublishTheResources();
-
-    Ptr<MgdResourceService> m_svcResource;
-    Ptr<MgdMappingService> m_svcMapping;
-};
-
-#endif // TESTMAPPINGSERVICE_H_

Modified: trunk/MgDev/Desktop/UnitTest/TestPerformance.cpp
===================================================================
--- trunk/MgDev/Desktop/UnitTest/TestPerformance.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/UnitTest/TestPerformance.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -61,21 +61,21 @@
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
         if(serviceManager == 0)
         {
-            throw new MgNullReferenceException(L"TestPerformance.TestStart", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestPerformance.TestStart", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestPerformance.TestStart", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestPerformance.TestStart", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         //Set the user information for the current thread to be administrator
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
-            userInfo->SetLocale(TEST_LOCALE);
+            userInfo->SetLocale(TestServiceFactory::TEST_LOCALE);
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
             MgResourceIdentifier resourceIdentifier1(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
@@ -91,7 +91,7 @@
             //Add a new resource
             Ptr<MgByteSource> contentSource1 = new MgByteSource(resourceContentFileName1);
             Ptr<MgByteReader> contentReader1 = contentSource1->GetReader();
-            pService->SetResource(&resourceIdentifier1, contentReader1, NULL);
+            pService->SetResource(&resourceIdentifier1, contentReader1, nullptr);
 
             //Set the resource data
             Ptr<MgByteSource> dataSource1 = new MgByteSource(dataFileName1);
@@ -102,9 +102,9 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -117,7 +117,7 @@
         if(serviceManager == 0)
         {
             throw new MgNullReferenceException(L"TestPerformance.TestEnd",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
@@ -124,12 +124,12 @@
         if (pService == 0)
         {
             throw new MgServiceNotAvailableException(L"TestPerformance.TestEnd",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         // set user info
         Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
+        userInfo->SetLocale(TestServiceFactory::TEST_LOCALE);
         MgUserInformation::SetCurrentUserInfo(userInfo);
 
         // delete the feature sources definition
@@ -146,9 +146,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -172,13 +172,13 @@
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
         if(serviceManager == 0)
         {
-            throw new MgNullReferenceException(L"TestPerformance.TestCase_BenchmarkSelectFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestPerformance.TestCase_BenchmarkSelectFeatures", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestPerformance.TestCase_BenchmarkSelectFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestPerformance.TestCase_BenchmarkSelectFeatures", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
@@ -198,7 +198,7 @@
             }
 
             reader->Close();
-            CPPUNIT_ASSERT(nFeatures == 17565);
+            REQUIRE(nFeatures == 17565);
         }
 
         ACE_DEBUG((LM_INFO, ACE_TEXT("  Execution Time (Average of %d runs): = %6.4f (s)\n"), iterations, ((GetTickCount()-lStart)/1000.0)/(double)iterations ));
@@ -206,15 +206,15 @@
     }
     catch(MgResourceNotFoundException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
         ACE_DEBUG((LM_INFO, ACE_TEXT("\n%W\nAre the performance test resources installed?\n\n"), message.c_str()));
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -221,7 +221,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -243,7 +243,7 @@
         if(serviceManager == 0)
         {
             throw new MgNullReferenceException(L"TestPerformance.TestCase_BenchmarkJoinFeatures",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
@@ -250,7 +250,7 @@
         if (pService == 0)
         {
             throw new MgServiceNotAvailableException(L"TestPerformance.TestCase_BenchmarkJoinFeatures",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> lFeatureSource = new MgResourceIdentifier(L"Library://JoinTest/Data/World_Countries_Join.FeatureSource");
@@ -267,7 +267,7 @@
         for(int i=0;i<iterations;i++)
         {
             nFeatures = 0;
-            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"World_Countries", NULL);
+            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"World_Countries", nullptr);
             while(reader->ReadNext())
             {
                 STRING s1 = L"<null>";
@@ -302,7 +302,7 @@
         for(int i=0;i<iterations;i++)
         {
             nFeatures = 0;
-            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"Join", NULL);
+            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"Join", nullptr);
             while(reader->ReadNext())
             {
                 STRING s1 = L"<null>";
@@ -352,7 +352,7 @@
         for(int i=0;i<iterations;i++)
         {
             nFeatures = 0;
-            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"World_Countries", NULL);
+            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"World_Countries", nullptr);
             while(reader->ReadNext())
             {
                 INT32 n1 = 0;
@@ -387,7 +387,7 @@
         for(int i=0;i<iterations;i++)
         {
             nFeatures = 0;
-            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"Join", NULL);
+            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"Join", nullptr);
             while(reader->ReadNext())
             {
                 INT32 n1 = 0;
@@ -437,7 +437,7 @@
         for(int i=0;i<iterations;i++)
         {
             nFeatures = 0;
-            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"geonames_n83", NULL);
+            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"geonames_n83", nullptr);
             while(reader->ReadNext())
             {
                 INT32 fid = 0;
@@ -475,7 +475,7 @@
         for(int i=0;i<iterations;i++)
         {
             nFeatures = 0;
-            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"GEONAMES_N83", NULL);
+            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"GEONAMES_N83", nullptr);
             while(reader->ReadNext())
             {
                 INT32 fid = 0;
@@ -513,7 +513,7 @@
         for(int i=0;i<iterations;i++)
         {
             nFeatures = 0;
-            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"Join", NULL);
+            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"Join", nullptr);
             while(reader->ReadNext())
             {
                 INT32 fid = 0;
@@ -558,15 +558,15 @@
     }
     catch(MgResourceNotFoundException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
         ACE_DEBUG((LM_INFO, ACE_TEXT("\n%W\nAre the performance test resources installed?\n\n"), message.c_str()));
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -573,7 +573,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {

Deleted: trunk/MgDev/Desktop/UnitTest/TestPerformance.h
===================================================================
--- trunk/MgDev/Desktop/UnitTest/TestPerformance.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/UnitTest/TestPerformance.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,44 +0,0 @@
-//
-//  Copyright (C) 2004-2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _TESTPERFORMANCE_H
-#define _TESTPERFORMANCE_H
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestPerformance : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestPerformance);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_BenchmarkSelectFeatures);
-    CPPUNIT_TEST(TestCase_BenchmarkJoinFeatures);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    void TestCase_BenchmarkSelectFeatures();
-    void TestCase_BenchmarkJoinFeatures();
-};
-
-#endif // _TESTPERFORMANCE_H

Modified: trunk/MgDev/Desktop/UnitTest/TestProfilingService.cpp
===================================================================
--- trunk/MgDev/Desktop/UnitTest/TestProfilingService.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/UnitTest/TestProfilingService.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -16,408 +16,76 @@
 //
 
 #include "MgDesktop.h"
-#include "TestProfilingService.h"
 #include "StylizationDefs.h"
-const STRING TEST_LOCALE = L"en";
 
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestProfilingService, "TestProfilingService");
+#include "CatchHelperMacros.h"
+#include "TestServiceFactory.h"
+#include "catch.hpp"
 
-
-TestProfilingService::TestProfilingService()
+static MgdMap* CreateTestMap()
 {
-    // Initialize service objects.
-    Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+    MgdMap* map = new MgdMap(mdfres, L"UnitTestSheboygan");
 
-    m_svcResource = dynamic_cast<MgResourceService*>(
-        factory->CreateService(MgServiceType::ResourceService));
-    assert(m_svcResource != NULL);
+    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
+    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
+    map->SetViewCenter(ptNewCenter);
+    map->SetViewScale(75000.0);
+    map->SetDisplayDpi(96);
+    map->SetDisplayWidth(1024);
+    map->SetDisplayHeight(1024);
 
-    m_svcProfiling = dynamic_cast<MgdProfilingService*>(
-        factory->CreateService(MgServiceType::ProfilingService));
-    assert(m_svcProfiling != NULL);
+    return map;
 }
 
-
-TestProfilingService::~TestProfilingService()
+static MgdMap* CreateTestMapWithWatermark()
 {
-}
+    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWithWatermark.MapDefinition");
+    MgdMap* map = new MgdMap(mdfres, L"UnitTestSheboyganWithWatermark");
 
+    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
+    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
+    map->SetViewCenter(ptNewCenter);
+    map->SetViewScale(75000.0);
+    map->SetDisplayDpi(96);
+    map->SetDisplayWidth(1024);
+    map->SetDisplayHeight(1024);
 
-void TestProfilingService::setUp()
-{
+    return map;
 }
 
-
-void TestProfilingService::tearDown()
+static MgdSelection* CreateSelection(MgdMap* map)
 {
-}
+    // make a selection in normal map
+    STRING layerId;
+    Ptr<MgLayerCollection> layers = map->GetLayers();
 
-
-void TestProfilingService::TestStart()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Profiling Service tests.\n")));
-
-    try
+    for (int i = 0; i < layers->GetCount(); i++)
     {
-        // publish the map definition
-        Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
-        Ptr<MgByteSource> mdfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_Sheboygan.mdf", false);
-        Ptr<MgByteReader> mdfrdr1 = mdfsrc1->GetReader();
-        m_svcResource->SetResource(mapres1, mdfrdr1, NULL);
+        Ptr<MgLayerBase> layer = layers->GetItem(i);
+        if (L"HydrographicPolygons" == layer->GetName())
+        {
+            layerId = layer->GetObjectId();
+        }
+    }
+    STRING selectionStr = L"<?xml version=\"1.0\" encoding=\"UTF-8\"?><FeatureSet><Layer id=\"";
+    selectionStr.append(layerId);
+    selectionStr.append(L"\"><Class id=\"SHP_Schema:HydrographicPolygons\"><ID>HQAAAA==</ID></Class></Layer></FeatureSet>");
 
-        // publish the layer definitions
-        Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.ldf", false);
-        Ptr<MgByteReader> ldfrdr1 = ldfsrc1->GetReader();
-        m_svcResource->SetResource(ldfres1, ldfrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.ldf", false);
-        Ptr<MgByteReader> ldfrdr2 = ldfsrc2->GetReader();
-        m_svcResource->SetResource(ldfres2, ldfrdr2, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.ldf", false);
-        Ptr<MgByteReader> ldfrdr3 = ldfsrc3->GetReader();
-        m_svcResource->SetResource(ldfres3, ldfrdr3, NULL);
-
-        // publish the feature sources
-        Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
-        Ptr<MgByteSource> fssrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.fs", false);
-        Ptr<MgByteReader> fsrdr1 = fssrc1->GetReader();
-        m_svcResource->SetResource(fsres1, fsrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
-        Ptr<MgByteSource> fssrc2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.fs", false);
-        Ptr<MgByteReader> fsrdr2 = fssrc2->GetReader();
-        m_svcResource->SetResource(fsres2, fsrdr2, NULL);
-
-        Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
-        Ptr<MgByteSource> fssrc3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.fs", false);
-        Ptr<MgByteReader> fsrdr3 = fssrc3->GetReader();
-        m_svcResource->SetResource(fsres3, fsrdr3, NULL);
-
-        // publish the resource data
-        Ptr<MgByteSource> dataSource1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.sdf", false);
-        Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
-        m_svcResource->SetResourceData(fsres1, L"UT_HydrographicPolygons.sdf", L"File", dataReader1);
-
-        Ptr<MgByteSource> dataSource2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.sdf", false);
-        Ptr<MgByteReader> dataReader2 = dataSource2->GetReader();
-        m_svcResource->SetResourceData(fsres2, L"UT_Rail.sdf", L"File", dataReader2);
-
-        Ptr<MgByteSource> dataSource3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.sdf", false);
-        Ptr<MgByteReader> dataReader3 = dataSource3->GetReader();
-        m_svcResource->SetResourceData(fsres3, L"UT_Parcels.sdf", L"File", dataReader3);
-
-        // publish the print layouts
-        Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
-        Ptr<MgByteSource> plsrc1 = new MgByteSource(L"../UnitTestFiles/UT_AllElements.pl", false);
-        Ptr<MgByteReader> plrdr1 = plsrc1->GetReader();
-        m_svcResource->SetResource(plres1, plrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
-        Ptr<MgByteSource> plsrc2 = new MgByteSource(L"../UnitTestFiles/UT_NoLegend.pl", false);
-        Ptr<MgByteReader> plrdr2 = plsrc2->GetReader();
-        m_svcResource->SetResource(plres2, plrdr2, NULL);
-
-        // publish the symbol library
-        Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
-        Ptr<MgByteSource> slsrc1 = new MgByteSource(L"../UnitTestFiles/UT_SymbolMart.sl", false);
-        Ptr<MgByteReader> slrdr1 = slsrc1->GetReader();
-        m_svcResource->SetResource(slres1, slrdr1, NULL);
-        Ptr<MgByteSource> datasrc = new MgByteSource(L"../UnitTestFiles/UT_Symbols.dwf", false);
-        Ptr<MgByteReader> datardr = datasrc->GetReader();
-        m_svcResource->SetResourceData(slres1, L"symbols.dwf", L"File", datardr);
-
-        //
-        // publish symbology stuff
-        //
-
-        // the point feature source
-        Ptr<MgResourceIdentifier> fsres4 = new MgResourceIdentifier(L"Library://UnitTests/Data/Capitals.FeatureSource");
-        Ptr<MgByteSource> fssrc4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.fs", false);
-        Ptr<MgByteReader> fsrdr4 = fssrc4->GetReader();
-        m_svcResource->SetResource(fsres4, fsrdr4, NULL);
-
-        // point sdf file
-        Ptr<MgByteSource> dataSource4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.sdf", false);
-        Ptr<MgByteReader> dataReader4 = dataSource4->GetReader();
-        m_svcResource->SetResourceData(fsres4, L"UT_SymbologyPoints.sdf", L"File", dataReader4);
-
-        // point symbols
-        Ptr<MgResourceIdentifier> sdres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbol.SymbolDefinition");
-        Ptr<MgByteSource> sdsrc1 = new MgByteSource(L"../UnitTestFiles/symbol.sd", false);
-        Ptr<MgByteReader> sdrdr1 = sdsrc1->GetReader();
-        m_svcResource->SetResource(sdres1, sdrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> sdres2 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbolParam.SymbolDefinition");
-        Ptr<MgByteSource> sdsrc2 = new MgByteSource(L"../UnitTestFiles/symbolp.sd", false);
-        Ptr<MgByteReader> sdrdr2 = sdsrc2->GetReader();
-        m_svcResource->SetResource(sdres2, sdrdr2, NULL);
-
-        // point ldf
-        Ptr<MgResourceIdentifier> ldfres4 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Capitals.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.ldf", false);
-        Ptr<MgByteReader> ldfrdr4 = ldfsrc4->GetReader();
-        m_svcResource->SetResource(ldfres4, ldfrdr4, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres5 = new MgResourceIdentifier(L"Library://UnitTests/Layers/CapitalsParam.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPointsParam.ldf", false);
-        Ptr<MgByteReader> ldfrdr5 = ldfsrc5->GetReader();
-        m_svcResource->SetResource(ldfres5, ldfrdr5, NULL);
-
-        // point mdf
-        Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Capitals.MapDefinition");
-        Ptr<MgByteSource> mdfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.mdf", false);
-        Ptr<MgByteReader> mdfrdr2 = mdfsrc2->GetReader();
-        m_svcResource->SetResource(mapres2, mdfrdr2, NULL);
-
-        Ptr<MgResourceIdentifier> mapres3 = new MgResourceIdentifier(L"Library://UnitTests/Maps/CapitalsParam.MapDefinition");
-        Ptr<MgByteSource> mdfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPointsParam.mdf", false);
-        Ptr<MgByteReader> mdfrdr3 = mdfsrc3->GetReader();
-        m_svcResource->SetResource(mapres3, mdfrdr3, NULL);
-
-        // the line feature source
-        Ptr<MgResourceIdentifier> fsres5 = new MgResourceIdentifier(L"Library://UnitTests/Data/Lines.FeatureSource");
-        Ptr<MgByteSource> fssrc5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.fs", false);
-        Ptr<MgByteReader> fsrdr5 = fssrc5->GetReader();
-        m_svcResource->SetResource(fsres5, fsrdr5, NULL);
-
-        // line sdf file
-        Ptr<MgByteSource> dataSource5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.sdf", false);
-        Ptr<MgByteReader> dataReader5 = dataSource5->GetReader();
-        m_svcResource->SetResourceData(fsres5, L"UT_SymbologyLines.sdf", L"File", dataReader5);
-
-        // line symbols
-        Ptr<MgResourceIdentifier> sdres3 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/LineSymbol.SymbolDefinition");
-        Ptr<MgByteSource> sdsrc3 = new MgByteSource(L"../UnitTestFiles/linesymbol.sd", false);
-        Ptr<MgByteReader> sdrdr3 = sdsrc3->GetReader();
-        m_svcResource->SetResource(sdres3, sdrdr3, NULL);
-
-        Ptr<MgResourceIdentifier> sdres4 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/MTYP1500a.SymbolDefinition");
-        Ptr<MgByteSource> sdsrc4 = new MgByteSource(L"../UnitTestFiles/MTYP1500a.sd", false);
-        Ptr<MgByteReader> sdrdr4 = sdsrc4->GetReader();
-        m_svcResource->SetResource(sdres4, sdrdr4, NULL);
-
-        // line ldf
-        Ptr<MgResourceIdentifier> ldfres6 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Lines.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc6 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.ldf", false);
-        Ptr<MgByteReader> ldfrdr6 = ldfsrc6->GetReader();
-        m_svcResource->SetResource(ldfres6, ldfrdr6, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres7 = new MgResourceIdentifier(L"Library://UnitTests/Layers/LinesCrossTick.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc7 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLinesCrossTick.ldf", false);
-        Ptr<MgByteReader> ldfrdr7 = ldfsrc7->GetReader();
-        m_svcResource->SetResource(ldfres7, ldfrdr7, NULL);
-
-        // line mdf
-        Ptr<MgResourceIdentifier> mapres4 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Lines.MapDefinition");
-        Ptr<MgByteSource> mdfsrc4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.mdf", false);
-        Ptr<MgByteReader> mdfrdr4 = mdfsrc4->GetReader();
-        m_svcResource->SetResource(mapres4, mdfrdr4, NULL);
-
-        Ptr<MgResourceIdentifier> mapres5 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinesCrossTick.MapDefinition");
-        Ptr<MgByteSource> mdfsrc5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLinesCrossTick.mdf", false);
-        Ptr<MgByteReader> mdfrdr5 = mdfsrc5->GetReader();
-        m_svcResource->SetResource(mapres5, mdfrdr5, NULL);
-
-        // annotation ldf - this shares the point sdf
-        Ptr<MgResourceIdentifier> ldfres8 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation1.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc8 = new MgByteSource(L"../UnitTestFiles/UT_Annotation1.ldf", false);
-        Ptr<MgByteReader> ldfrdr8 = ldfsrc8->GetReader();
-        m_svcResource->SetResource(ldfres8, ldfrdr8, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres9 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation2.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc9 = new MgByteSource(L"../UnitTestFiles/UT_Annotation2.ldf", false);
-        Ptr<MgByteReader> ldfrdr9 = ldfsrc9->GetReader();
-        m_svcResource->SetResource(ldfres9, ldfrdr9, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres10 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation3.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc10 = new MgByteSource(L"../UnitTestFiles/UT_Annotation3.ldf", false);
-        Ptr<MgByteReader> ldfrdr10 = ldfsrc10->GetReader();
-        m_svcResource->SetResource(ldfres10, ldfrdr10, NULL);
-
-        // annotation mdf
-        Ptr<MgResourceIdentifier> mapres8 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation1.MapDefinition");
-        Ptr<MgByteSource> mdfsrc8 = new MgByteSource(L"../UnitTestFiles/UT_Annotation1.mdf", false);
-        Ptr<MgByteReader> mdfrdr8 = mdfsrc8->GetReader();
-        m_svcResource->SetResource(mapres8, mdfrdr8, NULL);
-
-        Ptr<MgResourceIdentifier> mapres9 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation2.MapDefinition");
-        Ptr<MgByteSource> mdfsrc9 = new MgByteSource(L"../UnitTestFiles/UT_Annotation2.mdf", false);
-        Ptr<MgByteReader> mdfrdr9 = mdfsrc9->GetReader();
-        m_svcResource->SetResource(mapres9, mdfrdr9, NULL);
-
-        Ptr<MgResourceIdentifier> mapres10 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation3.MapDefinition");
-        Ptr<MgByteSource> mdfsrc10 = new MgByteSource(L"../UnitTestFiles/UT_Annotation3.mdf", false);
-        Ptr<MgByteReader> mdfrdr10 = mdfsrc10->GetReader();
-        m_svcResource->SetResource(mapres10, mdfrdr10, NULL);
-
-        //symbology - polygons
-        Ptr<MgResourceIdentifier> mapres11 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_SymbologyPolygons.MapDefinition");
-        Ptr<MgByteSource> mdfsrc11 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPolygons.mdf", false);
-        Ptr<MgByteReader> mdfrdr11 = mdfsrc11->GetReader();
-        m_svcResource->SetResource(mapres11, mdfrdr11, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres11 = new MgResourceIdentifier(L"Library://UnitTests/Layers/SymbologyParcels.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc11 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyParcels.ldf", false);
-        Ptr<MgByteReader> ldfrdr11 = ldfsrc11->GetReader();
-        m_svcResource->SetResource(ldfres11, ldfrdr11, NULL);
-
-        Ptr<MgResourceIdentifier> sdres5 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/AreaSymbol.SymbolDefinition");
-        Ptr<MgByteSource> sdsrc5 = new MgByteSource(L"../UnitTestFiles/areasymbol.sd", false);
-        Ptr<MgByteReader> sdrdr5 = sdsrc5->GetReader();
-        m_svcResource->SetResource(sdres5, sdrdr5, NULL);
-
-        // For watermark test
-        // publish the map definition
-        Ptr<MgResourceIdentifier> mapres12 = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWithWatermark.MapDefinition");
-        Ptr<MgByteSource> mdfsrc12 = new MgByteSource(L"../UnitTestFiles/UT_SheboyganWithWatermark.mdf", false);
-        Ptr<MgByteReader> mdfrdr12 = mdfsrc12->GetReader();
-        m_svcResource->SetResource(mapres12, mdfrdr12, NULL);
-
-        // publish the watermark definition
-        Ptr<MgResourceIdentifier> wdfres1 = new MgResourceIdentifier(L"Library://UnitTests/Watermarks/PoweredByMapGuide.WatermarkDefinition");
-        Ptr<MgByteSource> wdfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_PoweredByMapGuide.wdf", false);
-        Ptr<MgByteReader> wdfrdr1 = wdfsrc1->GetReader();
-        m_svcResource->SetResource(wdfres1, wdfrdr1, NULL);
-
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
+    MgdSelection* selection = new MgdSelection(map, selectionStr);
+    return selection;
 }
 
-
-void TestProfilingService::TestEnd()
+TEST_CASE("ProfileRenderDynamicOverlay", "[ProfilingService]")
 {
     try
     {
-        // delete the map definition
-        Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
-        m_svcResource->DeleteResource(mapres1);
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
 
-        // delete the layer definitions
-        Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres1);
+        Ptr<MgdProfilingService> pService = dynamic_cast<MgdProfilingService*>(
+            factory->CreateService(MgServiceType::ProfilingService));
+        assert(pService.p != nullptr);
 
-        Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres2);
-
-        Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres3);
-
-        // delete the feature sources
-        Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
-        m_svcResource->DeleteResource(fsres1);
-
-        Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
-        m_svcResource->DeleteResource(fsres2);
-
-        Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
-        m_svcResource->DeleteResource(fsres3);
-
-        // delete the print layouts
-        Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
-        m_svcResource->DeleteResource(plres1);
-
-        Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
-        m_svcResource->DeleteResource(plres2);
-
-        // delete the symbol library
-        Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
-        m_svcResource->DeleteResource(slres1);
-
-        // delete symbology stuff
-        Ptr<MgResourceIdentifier> fsres4 = new MgResourceIdentifier(L"Library://UnitTests/Data/Capitals.FeatureSource");
-        m_svcResource->DeleteResource(fsres4);
-        Ptr<MgResourceIdentifier> sdres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbol.SymbolDefinition");
-        m_svcResource->DeleteResource(sdres1);
-        Ptr<MgResourceIdentifier> sdres2 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbolParam.SymbolDefinition");
-        m_svcResource->DeleteResource(sdres2);
-        Ptr<MgResourceIdentifier> ldfres4 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Capitals.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres4);
-        Ptr<MgResourceIdentifier> ldfres5 = new MgResourceIdentifier(L"Library://UnitTests/Layers/CapitalsParam.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres5);
-        Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Capitals.MapDefinition");
-        m_svcResource->DeleteResource(mapres2);
-        Ptr<MgResourceIdentifier> mapres3 = new MgResourceIdentifier(L"Library://UnitTests/Maps/CapitalsParam.MapDefinition");
-        m_svcResource->DeleteResource(mapres3);
-
-        Ptr<MgResourceIdentifier> fsres5 = new MgResourceIdentifier(L"Library://UnitTests/Data/Lines.FeatureSource");
-        m_svcResource->DeleteResource(fsres5);
-        Ptr<MgResourceIdentifier> sdres3 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/LineSymbol.SymbolDefinition");
-        m_svcResource->DeleteResource(sdres3);
-        Ptr<MgResourceIdentifier> sdres4 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/MTYP1500a.SymbolDefinition");
-        m_svcResource->DeleteResource(sdres4);
-        Ptr<MgResourceIdentifier> ldfres6 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Lines.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres6);
-        Ptr<MgResourceIdentifier> ldfres7 = new MgResourceIdentifier(L"Library://UnitTests/Layers/LinesCrossTick.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres7);
-        Ptr<MgResourceIdentifier> mapres4 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Lines.MapDefinition");
-        m_svcResource->DeleteResource(mapres4);
-        Ptr<MgResourceIdentifier> mapres5 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinesCrossTick.MapDefinition");
-        m_svcResource->DeleteResource(mapres5);
-
-        Ptr<MgResourceIdentifier> ldfres8 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation1.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres8);
-        Ptr<MgResourceIdentifier> ldfres9 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation2.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres9);
-        Ptr<MgResourceIdentifier> ldfres10 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation3.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres10);
-        Ptr<MgResourceIdentifier> mapres8 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation1.MapDefinition");
-        m_svcResource->DeleteResource(mapres8);
-        Ptr<MgResourceIdentifier> mapres9 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation2.MapDefinition");
-        m_svcResource->DeleteResource(mapres9);
-        Ptr<MgResourceIdentifier> mapres10 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation3.MapDefinition");
-        m_svcResource->DeleteResource(mapres10);
-
-        Ptr<MgResourceIdentifier> mapres11 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_SymbologyPolygons.MapDefinition");
-        m_svcResource->DeleteResource(mapres11);
-        Ptr<MgResourceIdentifier> ldfres11 = new MgResourceIdentifier(L"Library://UnitTests/Layers/SymbologyParcels.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres11);
-        Ptr<MgResourceIdentifier> sdres5 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/AreaSymbol.SymbolDefinition");
-        m_svcResource->DeleteResource(sdres5);
-        
-        Ptr<MgResourceIdentifier> mapres12 = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWithWatermark.MapDefinition");
-        m_svcResource->DeleteResource(mapres12);
-        Ptr<MgResourceIdentifier> wdfres1 = new MgResourceIdentifier(L"Library://UnitTests/Watermarks/PoweredByMapGuide.WatermarkDefinition");
-        m_svcResource->DeleteResource(wdfres1);
-    }
-    catch(MgFileIoException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        ACE_DEBUG((LM_INFO, ACE_TEXT("\nMgFileIoException - Possible file permission error.\nError: %W\n"), message.c_str()));
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        message += e->GetStackTrace(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nProfiling Service tests completed.\n\n")));
-}
-
-
-void TestProfilingService::TestCase_ProfileRenderDynamicOverlay()
-{
-    try
-    {
         // make a runtime normal map
         Ptr<MgdMap> map = CreateTestMap();
         Ptr<MgdSelection> selectionOnMap = CreateSelection(map);
@@ -427,29 +95,29 @@
         Ptr<MgdSelection> selectionOnMapWithWatermark = CreateSelection(mapWithWatermark);
 
         // make a rendering option
-        Ptr<MgdRenderingOptions> options = new MgdRenderingOptions(L"PNG",MgdRenderingOptions::RenderSelection| MgdRenderingOptions::RenderLayers| MgdRenderingOptions::KeepSelection,NULL);
+        Ptr<MgdRenderingOptions> options = new MgdRenderingOptions(L"PNG",MgdRenderingOptions::RenderSelection| MgdRenderingOptions::RenderLayers| MgdRenderingOptions::KeepSelection,nullptr);
         
         // profile rendering normal map
-        Ptr<MgByteReader> rdr1 = m_svcProfiling->ProfileRenderDynamicOverlay(map, NULL, options);
+        Ptr<MgByteReader> rdr1 = pService->ProfileRenderDynamicOverlay(map, nullptr, options);
         rdr1->ToFile(L"../UnitTestFiles/ProfileRenderDynamicOverlay_Normal.xml");
 
         // profile rendering normal map with selection
-        Ptr<MgByteReader> rdr2 = m_svcProfiling->ProfileRenderDynamicOverlay(map, selectionOnMap, options);
+        Ptr<MgByteReader> rdr2 = pService->ProfileRenderDynamicOverlay(map, selectionOnMap, options);
         rdr2->ToFile(L"../UnitTestFiles/ProfileRenderDynamicOverlay_Selection.xml");
 
         // profile rendering map with watermark
-        Ptr<MgByteReader> rdr3 = m_svcProfiling->ProfileRenderDynamicOverlay(mapWithWatermark, NULL, options);
+        Ptr<MgByteReader> rdr3 = pService->ProfileRenderDynamicOverlay(mapWithWatermark, nullptr, options);
         rdr3->ToFile(L"../UnitTestFiles/ProfileRenderDynamicOverlay_Watermark.xml");
 
         // profile rendering map with both watermark and selection
-        Ptr<MgByteReader> rdr4 = m_svcProfiling->ProfileRenderDynamicOverlay(mapWithWatermark, selectionOnMapWithWatermark, options);
+        Ptr<MgByteReader> rdr4 = pService->ProfileRenderDynamicOverlay(mapWithWatermark, selectionOnMapWithWatermark, options);
         rdr4->ToFile(L"../UnitTestFiles/ProfileRenderDynamicOverlay_Watermark_Selection.xml");
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -457,11 +125,16 @@
     }
 }
 
-
-void TestProfilingService::TestCase_ProfileRenderMap()
+TEST_CASE("ProfileRenderMap", "[ProfilingService]")
 {
     try
     {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdProfilingService> pService = dynamic_cast<MgdProfilingService*>(
+            factory->CreateService(MgServiceType::ProfilingService));
+        assert(pService.p != nullptr);
+
         // make a runtime normal map
         Ptr<MgdMap> map = CreateTestMap();
         Ptr<MgdSelection> selectionOnMap = CreateSelection(map);
@@ -471,32 +144,32 @@
         Ptr<MgdSelection> selectionOnMapWithWatermark = CreateSelection(mapWithWatermark);
 
         // make a rendering option
-        Ptr<MgdRenderingOptions> options = new MgdRenderingOptions(L"PNG",MgdRenderingOptions::RenderSelection| MgdRenderingOptions::RenderLayers| MgdRenderingOptions::KeepSelection,NULL);
+        Ptr<MgdRenderingOptions> options = new MgdRenderingOptions(L"PNG",MgdRenderingOptions::RenderSelection| MgdRenderingOptions::RenderLayers| MgdRenderingOptions::KeepSelection,nullptr);
 
         Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
         Ptr<MgColor> bgc = new MgColor(255, 255, 255, 255);
 
         // profile rendering normal map
-        Ptr<MgByteReader> rdr1 = m_svcProfiling->ProfileRenderMap(map, NULL, coordNewCenter, 75000, 1024, 1024, bgc, L"PNG", false);
+        Ptr<MgByteReader> rdr1 = pService->ProfileRenderMap(map, nullptr, coordNewCenter, 75000, 1024, 1024, bgc, L"PNG", false);
         rdr1->ToFile(L"../UnitTestFiles/ProfileRenderMap_Normal.xml");
 
         // profile rendering normal map with selection
-        Ptr<MgByteReader> rdr2 = m_svcProfiling->ProfileRenderMap(map, selectionOnMap, coordNewCenter, 75000, 1024, 1024, bgc, L"PNG", false);
+        Ptr<MgByteReader> rdr2 = pService->ProfileRenderMap(map, selectionOnMap, coordNewCenter, 75000, 1024, 1024, bgc, L"PNG", false);
         rdr2->ToFile(L"../UnitTestFiles/ProfileRenderMap_Selection.xml");
 
         // profile rendering normal map with watermark
-        Ptr<MgByteReader> rdr3 = m_svcProfiling->ProfileRenderMap(mapWithWatermark, NULL, coordNewCenter, 75000, 1024, 1024, bgc, L"PNG", false);
+        Ptr<MgByteReader> rdr3 = pService->ProfileRenderMap(mapWithWatermark, nullptr, coordNewCenter, 75000, 1024, 1024, bgc, L"PNG", false);
         rdr3->ToFile(L"../UnitTestFiles/ProfileRenderMap_Watermark.xml");
 
         // profile rendering normal map with watermark
-        Ptr<MgByteReader> rdr4 = m_svcProfiling->ProfileRenderMap(mapWithWatermark, selectionOnMapWithWatermark, coordNewCenter, 75000, 1024, 1024, bgc, L"PNG", false);
+        Ptr<MgByteReader> rdr4 = pService->ProfileRenderMap(mapWithWatermark, selectionOnMapWithWatermark, coordNewCenter, 75000, 1024, 1024, bgc, L"PNG", false);
         rdr4->ToFile(L"../UnitTestFiles/ProfileRenderMap_Watermark_Selection.xml");
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -503,58 +176,3 @@
         throw;
     }
 }
-
-MgdMap* TestProfilingService::CreateTestMap()
-{
-    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
-    MgdMap* map = new MgdMap(mdfres, L"UnitTestSheboygan");
-
-    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
-    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
-    map->SetViewCenter(ptNewCenter);
-    map->SetViewScale(75000.0);
-    map->SetDisplayDpi(96);
-    map->SetDisplayWidth(1024);
-    map->SetDisplayHeight(1024);
-
-    return map;
-}
-
-MgdMap* TestProfilingService::CreateTestMapWithWatermark()
-{
-    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWithWatermark.MapDefinition");
-    MgdMap* map = new MgdMap(mdfres, L"UnitTestSheboyganWithWatermark");
-
-    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
-    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
-    map->SetViewCenter(ptNewCenter);
-    map->SetViewScale(75000.0);
-    map->SetDisplayDpi(96);
-    map->SetDisplayWidth(1024);
-    map->SetDisplayHeight(1024);
-
-    return map;
-}
-
-MgdSelection* TestProfilingService::CreateSelection(MgdMap* map)
-{
-    // make a selection in normal map
-    STRING layerId;
-    Ptr<MgLayerCollection> layers = map->GetLayers();
-
-    for (int i=0; i<layers->GetCount(); i++)
-    {
-        Ptr<MgLayerBase> layer = layers->GetItem(i);
-        if(L"HydrographicPolygons" ==layer->GetName())
-        {
-            layerId = layer->GetObjectId();
-        }
-    }
-    STRING selectionStr = L"<?xml version=\"1.0\" encoding=\"UTF-8\"?><FeatureSet><Layer id=\"";
-    selectionStr.append(layerId);
-    selectionStr.append(L"\"><Class id=\"SHP_Schema:HydrographicPolygons\"><ID>HQAAAA==</ID></Class></Layer></FeatureSet>");
-
-    MgdSelection* selection = new MgdSelection(map, selectionStr);
-    return selection;
-}
-

Deleted: trunk/MgDev/Desktop/UnitTest/TestProfilingService.h
===================================================================
--- trunk/MgDev/Desktop/UnitTest/TestProfilingService.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/UnitTest/TestProfilingService.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,56 +0,0 @@
-//
-//  Copyright (C) 2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _TESTPROFILINGSERVICE_H
-#define _TESTPROFILINGSERVICE_H
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestProfilingService : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestProfilingService);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_ProfileRenderDynamicOverlay);
-    CPPUNIT_TEST(TestCase_ProfileRenderMap);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    TestProfilingService();
-    ~TestProfilingService();
-
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    void TestCase_ProfileRenderDynamicOverlay();
-    void TestCase_ProfileRenderMap();
-
-private:
-    MgdMap* CreateTestMap();
-    MgdMap* CreateTestMapWithWatermark();
-    MgdSelection* CreateSelection(MgdMap* map);
-
-private:
-    Ptr<MgResourceService> m_svcResource;
-    Ptr<MgdProfilingService> m_svcProfiling;
-};
-
-#endif // _TESTPROFILINGSERVICE_H

Modified: trunk/MgDev/Desktop/UnitTest/TestRenderingService.cpp
===================================================================
--- trunk/MgDev/Desktop/UnitTest/TestRenderingService.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/UnitTest/TestRenderingService.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -16,536 +16,126 @@
 //
 
 #include "MgDesktop.h"
-#include "TestRenderingService.h"
 #include "StylizationDefs.h"
-//#include "GDRenderer.h"
-//#include "AGGRenderer.h"
 
-const STRING TEST_LOCALE = L"en";
+#include "CatchHelperMacros.h"
+#include "TestServiceFactory.h"
+#include "catch.hpp"
 
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestRenderingService, "TestRenderingService");
-
-
-TestRenderingService::TestRenderingService()
+static STRING GetPath(CREFSTRING basePath, CREFSTRING imageFormat, CREFSTRING extension)
 {
-    Ptr<MgdServiceFactory> fact = new MgdServiceFactory();
-
-    // Initialize service objects.
-    m_svcResource = static_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
-    m_svcRendering = static_cast<MgdRenderingService*>(fact->CreateService(MgServiceType::RenderingService));
+    STRING ret;
+    ret += basePath;
+    ret += L"_";
+    ret += imageFormat;
+    ret += L".";
+    ret += extension;
+    return ret;
 }
 
-
-TestRenderingService::~TestRenderingService()
+static MgdMap* CreateTestMapWithWatermark()
 {
-}
+    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWithWatermark.MapDefinition");
+    MgdMap* map = new MgdMap(mdfres);
+    //map->Create(mdfres, L"UnitTestSheboyganWithWatermark");
 
+    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
+    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
+    map->SetViewCenter(ptNewCenter);
+    map->SetViewScale(75000.0);
+    map->SetDisplayDpi(96);
+    map->SetDisplayWidth(1024);
+    map->SetDisplayHeight(1024);
 
-void TestRenderingService::setUp()
-{
+    return map;
 }
 
+static MgdMap* CreateTestMap()
+{
+    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+    MgdMap* map = new MgdMap(mdfres);
+    //map->Create(mdfres, L"UnitTestSheboygan");
 
-void TestRenderingService::tearDown()
-{
+    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
+    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
+    map->SetViewCenter(ptNewCenter);
+    map->SetViewScale(75000.0);
+    map->SetDisplayDpi(96);
+    map->SetDisplayWidth(1024);
+    map->SetDisplayHeight(1024);
+
+    return map;
 }
 
-
-void TestRenderingService::TestStart()
+static MgdMap* CreateTestStylizationFunctionMap()
 {
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Rendering Service tests.\n")));
+    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/StylizationFuncs.MapDefinition");
+    MgdMap* map = new MgdMap(mdfres);
+    //map->Create(mdfres, L"StylizationFuncs");
 
-    try
-    {
-        // publish the map definition
-        Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
-        Ptr<MgByteSource> mdfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_Sheboygan.mdf", false);
-        Ptr<MgByteReader> mdfrdr1 = mdfsrc1->GetReader();
-        m_svcResource->SetResource(mapres1, mdfrdr1, NULL);
+    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
+    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
+    map->SetViewCenter(ptNewCenter);
+    map->SetViewScale(60000.0);
+    map->SetDisplayDpi(96);
+    map->SetDisplayWidth(1024);
+    map->SetDisplayHeight(1024);
 
-        // publish the layer definitions
-        Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.ldf", false);
-        Ptr<MgByteReader> ldfrdr1 = ldfsrc1->GetReader();
-        m_svcResource->SetResource(ldfres1, ldfrdr1, NULL);
+    return map;
+}
 
-        Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.ldf", false);
-        Ptr<MgByteReader> ldfrdr2 = ldfsrc2->GetReader();
-        m_svcResource->SetResource(ldfres2, ldfrdr2, NULL);
+static MgdMap* CreateTestTiledMap()
+{
+    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
+    MgdMap* map = new MgdMap(mdfres, L"UnitTestSheboyganTiled");
 
-        Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.ldf", false);
-        Ptr<MgByteReader> ldfrdr3 = ldfsrc3->GetReader();
-        m_svcResource->SetResource(ldfres3, ldfrdr3, NULL);
+    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
+    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
+    map->SetViewCenter(ptNewCenter);
+    map->SetViewScale(75000.0);
+    map->SetDisplayDpi(96);
+    map->SetDisplayWidth(1024);
+    map->SetDisplayHeight(1024);
 
-        // publish the feature sources
-        Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
-        Ptr<MgByteSource> fssrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.fs", false);
-        Ptr<MgByteReader> fsrdr1 = fssrc1->GetReader();
-        m_svcResource->SetResource(fsres1, fsrdr1, NULL);
+    return map;
+}
 
-        Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
-        Ptr<MgByteSource> fssrc2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.fs", false);
-        Ptr<MgByteReader> fsrdr2 = fssrc2->GetReader();
-        m_svcResource->SetResource(fsres2, fsrdr2, NULL);
+// creates a selection bounds in mapping space
+static MgPolygon* CreateSelectionPolygon(MgdMap* map, double width, double height)
+{
+    Ptr<MgPoint> centerPt = map->GetViewCenter();
+    Ptr<MgCoordinate> center = centerPt->GetCoordinate();
+    double xMin = center->GetX() - 0.5 * width;
+    double yMin = center->GetY() - 0.5 * height;
+    double xMax = center->GetX() + 0.5 * width;
+    double yMax = center->GetY() + 0.5 * height;
+    Ptr<MgCoordinateXY> c1 = new MgCoordinateXY(xMin, yMin);
+    Ptr<MgCoordinateXY> c2 = new MgCoordinateXY(xMax, yMin);
+    Ptr<MgCoordinateXY> c3 = new MgCoordinateXY(xMax, yMax);
+    Ptr<MgCoordinateXY> c4 = new MgCoordinateXY(xMin, yMax);
+    Ptr<MgCoordinateXY> c5 = new MgCoordinateXY(xMin, yMin);
 
-        Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
-        Ptr<MgByteSource> fssrc3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.fs", false);
-        Ptr<MgByteReader> fsrdr3 = fssrc3->GetReader();
-        m_svcResource->SetResource(fsres3, fsrdr3, NULL);
+    Ptr<MgCoordinateCollection> cc = new MgCoordinateCollection();
+    cc->Add(c1);
+    cc->Add(c2);
+    cc->Add(c3);
+    cc->Add(c4);
+    cc->Add(c5);
 
-        // publish the resource data
-        Ptr<MgByteSource> dataSource1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.sdf", false);
-        Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
-        m_svcResource->SetResourceData(fsres1, L"UT_HydrographicPolygons.sdf", L"File", dataReader1);
-
-        Ptr<MgByteSource> dataSource2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.sdf", false);
-        Ptr<MgByteReader> dataReader2 = dataSource2->GetReader();
-        m_svcResource->SetResourceData(fsres2, L"UT_Rail.sdf", L"File", dataReader2);
-
-        Ptr<MgByteSource> dataSource3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.sdf", false);
-        Ptr<MgByteReader> dataReader3 = dataSource3->GetReader();
-        m_svcResource->SetResourceData(fsres3, L"UT_Parcels.sdf", L"File", dataReader3);
-
-        // publish the print layouts
-        Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
-        Ptr<MgByteSource> plsrc1 = new MgByteSource(L"../UnitTestFiles/UT_AllElements.pl", false);
-        Ptr<MgByteReader> plrdr1 = plsrc1->GetReader();
-        m_svcResource->SetResource(plres1, plrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
-        Ptr<MgByteSource> plsrc2 = new MgByteSource(L"../UnitTestFiles/UT_NoLegend.pl", false);
-        Ptr<MgByteReader> plrdr2 = plsrc2->GetReader();
-        m_svcResource->SetResource(plres2, plrdr2, NULL);
-
-        // publish the symbol library
-        Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
-        Ptr<MgByteSource> slsrc1 = new MgByteSource(L"../UnitTestFiles/UT_SymbolMart.sl", false);
-        Ptr<MgByteReader> slrdr1 = slsrc1->GetReader();
-        m_svcResource->SetResource(slres1, slrdr1, NULL);
-        Ptr<MgByteSource> datasrc = new MgByteSource(L"../UnitTestFiles/UT_Symbols.dwf", false);
-        Ptr<MgByteReader> datardr = datasrc->GetReader();
-        m_svcResource->SetResourceData(slres1, L"symbols.dwf", L"File", datardr);
-
-        //
-        // publish symbology stuff
-        //
-
-        // the point feature source
-        Ptr<MgResourceIdentifier> fsres4 = new MgResourceIdentifier(L"Library://UnitTests/Data/Capitals.FeatureSource");
-        Ptr<MgByteSource> fssrc4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.fs", false);
-        Ptr<MgByteReader> fsrdr4 = fssrc4->GetReader();
-        m_svcResource->SetResource(fsres4, fsrdr4, NULL);
-
-        // point sdf file
-        Ptr<MgByteSource> dataSource4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.sdf", false);
-        Ptr<MgByteReader> dataReader4 = dataSource4->GetReader();
-        m_svcResource->SetResourceData(fsres4, L"UT_SymbologyPoints.sdf", L"File", dataReader4);
-
-        // point symbols
-        Ptr<MgResourceIdentifier> sdres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbol.SymbolDefinition");
-        Ptr<MgByteSource> sdsrc1 = new MgByteSource(L"../UnitTestFiles/symbol.sd", false);
-        Ptr<MgByteReader> sdrdr1 = sdsrc1->GetReader();
-        m_svcResource->SetResource(sdres1, sdrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> sdres2 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbolParam.SymbolDefinition");
-        Ptr<MgByteSource> sdsrc2 = new MgByteSource(L"../UnitTestFiles/symbolp.sd", false);
-        Ptr<MgByteReader> sdrdr2 = sdsrc2->GetReader();
-        m_svcResource->SetResource(sdres2, sdrdr2, NULL);
-
-        // point ldf
-        Ptr<MgResourceIdentifier> ldfres4 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Capitals.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.ldf", false);
-        Ptr<MgByteReader> ldfrdr4 = ldfsrc4->GetReader();
-        m_svcResource->SetResource(ldfres4, ldfrdr4, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres5 = new MgResourceIdentifier(L"Library://UnitTests/Layers/CapitalsParam.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPointsParam.ldf", false);
-        Ptr<MgByteReader> ldfrdr5 = ldfsrc5->GetReader();
-        m_svcResource->SetResource(ldfres5, ldfrdr5, NULL);
-
-        // point mdf
-        Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Capitals.MapDefinition");
-        Ptr<MgByteSource> mdfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.mdf", false);
-        Ptr<MgByteReader> mdfrdr2 = mdfsrc2->GetReader();
-        m_svcResource->SetResource(mapres2, mdfrdr2, NULL);
-
-        Ptr<MgResourceIdentifier> mapres3 = new MgResourceIdentifier(L"Library://UnitTests/Maps/CapitalsParam.MapDefinition");
-        Ptr<MgByteSource> mdfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPointsParam.mdf", false);
-        Ptr<MgByteReader> mdfrdr3 = mdfsrc3->GetReader();
-        m_svcResource->SetResource(mapres3, mdfrdr3, NULL);
-
-        // the line feature source
-        Ptr<MgResourceIdentifier> fsres5 = new MgResourceIdentifier(L"Library://UnitTests/Data/Lines.FeatureSource");
-        Ptr<MgByteSource> fssrc5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.fs", false);
-        Ptr<MgByteReader> fsrdr5 = fssrc5->GetReader();
-        m_svcResource->SetResource(fsres5, fsrdr5, NULL);
-
-        // line sdf file
-        Ptr<MgByteSource> dataSource5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.sdf", false);
-        Ptr<MgByteReader> dataReader5 = dataSource5->GetReader();
-        m_svcResource->SetResourceData(fsres5, L"UT_SymbologyLines.sdf", L"File", dataReader5);
-
-        // line symbols
-        Ptr<MgResourceIdentifier> sdres3 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/LineSymbol.SymbolDefinition");
-        Ptr<MgByteSource> sdsrc3 = new MgByteSource(L"../UnitTestFiles/linesymbol.sd", false);
-        Ptr<MgByteReader> sdrdr3 = sdsrc3->GetReader();
-        m_svcResource->SetResource(sdres3, sdrdr3, NULL);
-
-        Ptr<MgResourceIdentifier> sdres4 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/MTYP1500a.SymbolDefinition");
-        Ptr<MgByteSource> sdsrc4 = new MgByteSource(L"../UnitTestFiles/MTYP1500a.sd", false);
-        Ptr<MgByteReader> sdrdr4 = sdsrc4->GetReader();
-        m_svcResource->SetResource(sdres4, sdrdr4, NULL);
-
-        // line ldf
-        Ptr<MgResourceIdentifier> ldfres6 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Lines.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc6 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.ldf", false);
-        Ptr<MgByteReader> ldfrdr6 = ldfsrc6->GetReader();
-        m_svcResource->SetResource(ldfres6, ldfrdr6, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres7 = new MgResourceIdentifier(L"Library://UnitTests/Layers/LinesCrossTick.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc7 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLinesCrossTick.ldf", false);
-        Ptr<MgByteReader> ldfrdr7 = ldfsrc7->GetReader();
-        m_svcResource->SetResource(ldfres7, ldfrdr7, NULL);
-
-        // line mdf
-        Ptr<MgResourceIdentifier> mapres4 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Lines.MapDefinition");
-        Ptr<MgByteSource> mdfsrc4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.mdf", false);
-        Ptr<MgByteReader> mdfrdr4 = mdfsrc4->GetReader();
-        m_svcResource->SetResource(mapres4, mdfrdr4, NULL);
-
-        Ptr<MgResourceIdentifier> mapres5 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinesCrossTick.MapDefinition");
-        Ptr<MgByteSource> mdfsrc5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLinesCrossTick.mdf", false);
-        Ptr<MgByteReader> mdfrdr5 = mdfsrc5->GetReader();
-        m_svcResource->SetResource(mapres5, mdfrdr5, NULL);
-
-        // annotation ldf - this shares the point sdf
-        Ptr<MgResourceIdentifier> ldfres8 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation1.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc8 = new MgByteSource(L"../UnitTestFiles/UT_Annotation1.ldf", false);
-        Ptr<MgByteReader> ldfrdr8 = ldfsrc8->GetReader();
-        m_svcResource->SetResource(ldfres8, ldfrdr8, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres9 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation2.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc9 = new MgByteSource(L"../UnitTestFiles/UT_Annotation2.ldf", false);
-        Ptr<MgByteReader> ldfrdr9 = ldfsrc9->GetReader();
-        m_svcResource->SetResource(ldfres9, ldfrdr9, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres10 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation3.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc10 = new MgByteSource(L"../UnitTestFiles/UT_Annotation3.ldf", false);
-        Ptr<MgByteReader> ldfrdr10 = ldfsrc10->GetReader();
-        m_svcResource->SetResource(ldfres10, ldfrdr10, NULL);
-
-        // annotation mdf
-        Ptr<MgResourceIdentifier> mapres8 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation1.MapDefinition");
-        Ptr<MgByteSource> mdfsrc8 = new MgByteSource(L"../UnitTestFiles/UT_Annotation1.mdf", false);
-        Ptr<MgByteReader> mdfrdr8 = mdfsrc8->GetReader();
-        m_svcResource->SetResource(mapres8, mdfrdr8, NULL);
-
-        Ptr<MgResourceIdentifier> mapres9 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation2.MapDefinition");
-        Ptr<MgByteSource> mdfsrc9 = new MgByteSource(L"../UnitTestFiles/UT_Annotation2.mdf", false);
-        Ptr<MgByteReader> mdfrdr9 = mdfsrc9->GetReader();
-        m_svcResource->SetResource(mapres9, mdfrdr9, NULL);
-
-        Ptr<MgResourceIdentifier> mapres10 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation3.MapDefinition");
-        Ptr<MgByteSource> mdfsrc10 = new MgByteSource(L"../UnitTestFiles/UT_Annotation3.mdf", false);
-        Ptr<MgByteReader> mdfrdr10 = mdfsrc10->GetReader();
-        m_svcResource->SetResource(mapres10, mdfrdr10, NULL);
-
-        //symbology - polygons
-        Ptr<MgResourceIdentifier> mapres11 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_SymbologyPolygons.MapDefinition");
-        Ptr<MgByteSource> mdfsrc11 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPolygons.mdf", false);
-        Ptr<MgByteReader> mdfrdr11 = mdfsrc11->GetReader();
-        m_svcResource->SetResource(mapres11, mdfrdr11, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres11 = new MgResourceIdentifier(L"Library://UnitTests/Layers/SymbologyParcels.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc11 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyParcels.ldf", false);
-        Ptr<MgByteReader> ldfrdr11 = ldfsrc11->GetReader();
-        m_svcResource->SetResource(ldfres11, ldfrdr11, NULL);
-
-        Ptr<MgResourceIdentifier> sdres5 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/AreaSymbol.SymbolDefinition");
-        Ptr<MgByteSource> sdsrc5 = new MgByteSource(L"../UnitTestFiles/areasymbol.sd", false);
-        Ptr<MgByteReader> sdrdr5 = sdsrc5->GetReader();
-        m_svcResource->SetResource(sdres5, sdrdr5, NULL);
-
-        // For watermark test
-        // publish the map definition
-        Ptr<MgResourceIdentifier> mapres12 = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWithWatermark.MapDefinition");
-        Ptr<MgByteSource> mdfsrc12 = new MgByteSource(L"../UnitTestFiles/UT_SheboyganWithWatermark.mdf", false);
-        Ptr<MgByteReader> mdfrdr12 = mdfsrc12->GetReader();
-        m_svcResource->SetResource(mapres12, mdfrdr12, NULL);
-
-        // publish the watermark definition
-        Ptr<MgResourceIdentifier> wdfres1 = new MgResourceIdentifier(L"Library://UnitTests/Watermarks/PoweredByMapGuide.WatermarkDefinition");
-        Ptr<MgByteSource> wdfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_PoweredByMapGuide.wdf", false);
-        Ptr<MgByteReader> wdfrdr1 = wdfsrc1->GetReader();
-        m_svcResource->SetResource(wdfres1, wdfrdr1, NULL);
-
-        // ------------------------------------------------------
-        // base map source data
-        // ------------------------------------------------------
-        // publish the map definition
-        Ptr<MgResourceIdentifier> mapres13 = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
-        Ptr<MgByteSource> mdfsrc13 = new MgByteSource(L"../UnitTestFiles/UT_BaseMap.mdf", false);
-        Ptr<MgByteReader> mdfrdr13 = mdfsrc13->GetReader();
-        m_svcResource->SetResource(mapres13, mdfrdr13, NULL);
-
-        // publish the layer definitions
-        Ptr<MgResourceIdentifier> ldfres12 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RoadCenterLines.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc12 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.ldf", false);
-        Ptr<MgByteReader> ldfrdr12 = ldfsrc12->GetReader();
-        m_svcResource->SetResource(ldfres12, ldfrdr12, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres13 = new MgResourceIdentifier(L"Library://UnitTests/Layers/VotingDistricts.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc13 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.ldf", false);
-        Ptr<MgByteReader> ldfrdr13 = ldfsrc13->GetReader();
-        m_svcResource->SetResource(ldfres13, ldfrdr13, NULL);
-
-        // publish the feature sources
-        Ptr<MgResourceIdentifier> fsres6 = new MgResourceIdentifier(L"Library://UnitTests/Data/RoadCenterLines.FeatureSource");
-        Ptr<MgByteSource> fssrc6 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.fs", false);
-        Ptr<MgByteReader> fsrdr6 = fssrc6->GetReader();
-        m_svcResource->SetResource(fsres6, fsrdr6, NULL);
-
-        Ptr<MgResourceIdentifier> fsres7 = new MgResourceIdentifier(L"Library://UnitTests/Data/VotingDistricts.FeatureSource");
-        Ptr<MgByteSource> fssrc7 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.fs", false);
-        Ptr<MgByteReader> fsrdr7 = fssrc7->GetReader();
-        m_svcResource->SetResource(fsres7, fsrdr7, NULL);
-
-        // publish the resource data
-        Ptr<MgByteSource> dataSource6 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.sdf", false);
-        Ptr<MgByteReader> dataReader6 = dataSource6->GetReader();
-        m_svcResource->SetResourceData(fsres6, L"UT_RoadCenterLines.sdf", L"File", dataReader6);
-
-        Ptr<MgByteSource> dataSource7 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.sdf", false);
-        Ptr<MgByteReader> dataReader7 = dataSource7->GetReader();
-        m_svcResource->SetResourceData(fsres7, L"UT_VotingDistricts.sdf", L"File", dataReader7);
-
-        // ---------------------------------------------------------
-        // Data for exercising legend rendering
-        // ---------------------------------------------------------
-        Ptr<MgResourceIdentifier> ldfres14 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTS.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc14 = new MgByteSource(L"../UnitTestFiles/UT_MultiFTS.ldf", false);
-        Ptr<MgByteReader> ldfrdr14 = ldfsrc14->GetReader();
-        m_svcResource->SetResource(ldfres14, ldfrdr14, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres15 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTS.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc15 = new MgByteSource(L"../UnitTestFiles/UT_MultiCTS.ldf", false);
-        Ptr<MgByteReader> ldfrdr15 = ldfsrc15->GetReader();
-        m_svcResource->SetResource(ldfres15, ldfrdr15, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres16 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTSWithTheme.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc16 = new MgByteSource(L"../UnitTestFiles/UT_MultiFTSWithTheme.ldf", false);
-        Ptr<MgByteReader> ldfrdr16 = ldfsrc16->GetReader();
-        m_svcResource->SetResource(ldfres16, ldfrdr16, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres17 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTSWithTheme.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc17 = new MgByteSource(L"../UnitTestFiles/UT_MultiCTSWithTheme.ldf", false);
-        Ptr<MgByteReader> ldfrdr17 = ldfsrc17->GetReader();
-        m_svcResource->SetResource(ldfres17, ldfrdr17, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres18 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTSSingleCTS.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc18 = new MgByteSource(L"../UnitTestFiles/UT_MultiFTSSingleCTS.ldf", false);
-        Ptr<MgByteReader> ldfrdr18 = ldfsrc18->GetReader();
-        m_svcResource->SetResource(ldfres18, ldfrdr18, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres19 = new MgResourceIdentifier(L"Library://UnitTests/Layers/SingleFTSMultiCTS.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc19 = new MgByteSource(L"../UnitTestFiles/UT_SingleFTSMultiCTS.ldf", false);
-        Ptr<MgByteReader> ldfrdr19 = ldfsrc19->GetReader();
-        m_svcResource->SetResource(ldfres19, ldfrdr19, NULL);
-
-        // Data related to stylization function tests
-        Ptr<MgResourceIdentifier> ldfres20 = new MgResourceIdentifier(L"Library://UnitTests/Layers/StylizationFuncs.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc20 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistrictsFunctions.ldf", false);
-        Ptr<MgByteReader> ldfrdr20 = ldfsrc20->GetReader();
-        m_svcResource->SetResource(ldfres20, ldfrdr20, NULL);
-
-        Ptr<MgResourceIdentifier> mapres15 = new MgResourceIdentifier(L"Library://UnitTests/Maps/StylizationFuncs.MapDefinition");
-        Ptr<MgByteSource> mdfsrc15 = new MgByteSource(L"../UnitTestFiles/UT_StylizationFuncs.mdf", false);
-        Ptr<MgByteReader> mdfrdr15 = mdfsrc15->GetReader();
-        m_svcResource->SetResource(mapres15, mdfrdr15, NULL);
-
-        // For layer watermark test
-        Ptr<MgResourceIdentifier> wdfres2 = new MgResourceIdentifier(L"Library://UnitTests/Watermarks/Rail.WatermarkDefinition");
-        Ptr<MgByteSource> wdfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.wdf", false);
-        Ptr<MgByteReader> wdfrdr2 = wdfsrc2->GetReader();
-        m_svcResource->SetResource(wdfres2, wdfrdr2, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres21 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RailWatermark.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc21 = new MgByteSource(L"../UnitTestFiles/UT_Rail_Watermark.ldf", false);
-        Ptr<MgByteReader> ldfrdr21 = ldfsrc21->GetReader();
-        m_svcResource->SetResource(ldfres21, ldfrdr21, NULL);
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
+    Ptr<MgLinearRing> outer = new MgLinearRing(cc);
+    return new MgPolygon(outer, nullptr);
 }
 
-
-void TestRenderingService::TestEnd()
+static void TestCase_RenderDynamicOverlay(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
-        // delete the map definition
-        Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
-        m_svcResource->DeleteResource(mapres1);
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
 
-        // delete the layer definitions
-        Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres1);
+        Ptr<MgdRenderingService> pService = dynamic_cast<MgdRenderingService*>(
+            factory->CreateService(MgServiceType::RenderingService));
+        REQUIRE(pService.p != nullptr);
 
-        Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres2);
-
-        Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres3);
-
-        // delete the feature sources
-        Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
-        m_svcResource->DeleteResource(fsres1);
-
-        Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
-        m_svcResource->DeleteResource(fsres2);
-
-        Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
-        m_svcResource->DeleteResource(fsres3);
-
-        // delete the print layouts
-        Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
-        m_svcResource->DeleteResource(plres1);
-
-        Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
-        m_svcResource->DeleteResource(plres2);
-
-        // delete the symbol library
-        Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
-        m_svcResource->DeleteResource(slres1);
-
-        // delete symbology stuff
-        Ptr<MgResourceIdentifier> fsres4 = new MgResourceIdentifier(L"Library://UnitTests/Data/Capitals.FeatureSource");
-        m_svcResource->DeleteResource(fsres4);
-        Ptr<MgResourceIdentifier> sdres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbol.SymbolDefinition");
-        m_svcResource->DeleteResource(sdres1);
-        Ptr<MgResourceIdentifier> sdres2 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbolParam.SymbolDefinition");
-        m_svcResource->DeleteResource(sdres2);
-        Ptr<MgResourceIdentifier> ldfres4 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Capitals.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres4);
-        Ptr<MgResourceIdentifier> ldfres5 = new MgResourceIdentifier(L"Library://UnitTests/Layers/CapitalsParam.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres5);
-        Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Capitals.MapDefinition");
-        m_svcResource->DeleteResource(mapres2);
-        Ptr<MgResourceIdentifier> mapres3 = new MgResourceIdentifier(L"Library://UnitTests/Maps/CapitalsParam.MapDefinition");
-        m_svcResource->DeleteResource(mapres3);
-
-        Ptr<MgResourceIdentifier> fsres5 = new MgResourceIdentifier(L"Library://UnitTests/Data/Lines.FeatureSource");
-        m_svcResource->DeleteResource(fsres5);
-        Ptr<MgResourceIdentifier> sdres3 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/LineSymbol.SymbolDefinition");
-        m_svcResource->DeleteResource(sdres3);
-        Ptr<MgResourceIdentifier> sdres4 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/MTYP1500a.SymbolDefinition");
-        m_svcResource->DeleteResource(sdres4);
-        Ptr<MgResourceIdentifier> ldfres6 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Lines.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres6);
-        Ptr<MgResourceIdentifier> ldfres7 = new MgResourceIdentifier(L"Library://UnitTests/Layers/LinesCrossTick.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres7);
-        Ptr<MgResourceIdentifier> mapres4 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Lines.MapDefinition");
-        m_svcResource->DeleteResource(mapres4);
-        Ptr<MgResourceIdentifier> mapres5 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinesCrossTick.MapDefinition");
-        m_svcResource->DeleteResource(mapres5);
-
-        Ptr<MgResourceIdentifier> ldfres8 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation1.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres8);
-        Ptr<MgResourceIdentifier> ldfres9 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation2.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres9);
-        Ptr<MgResourceIdentifier> ldfres10 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation3.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres10);
-        Ptr<MgResourceIdentifier> mapres8 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation1.MapDefinition");
-        m_svcResource->DeleteResource(mapres8);
-        Ptr<MgResourceIdentifier> mapres9 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation2.MapDefinition");
-        m_svcResource->DeleteResource(mapres9);
-        Ptr<MgResourceIdentifier> mapres10 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation3.MapDefinition");
-        m_svcResource->DeleteResource(mapres10);
-
-        Ptr<MgResourceIdentifier> mapres11 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_SymbologyPolygons.MapDefinition");
-        m_svcResource->DeleteResource(mapres11);
-        Ptr<MgResourceIdentifier> ldfres11 = new MgResourceIdentifier(L"Library://UnitTests/Layers/SymbologyParcels.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres11);
-        Ptr<MgResourceIdentifier> sdres5 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/AreaSymbol.SymbolDefinition");
-        m_svcResource->DeleteResource(sdres5);
-        
-        Ptr<MgResourceIdentifier> mapres12 = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWithWatermark.MapDefinition");
-        m_svcResource->DeleteResource(mapres12);
-        Ptr<MgResourceIdentifier> wdfres1 = new MgResourceIdentifier(L"Library://UnitTests/Watermarks/PoweredByMapGuide.WatermarkDefinition");
-        m_svcResource->DeleteResource(wdfres1);
-
-        Ptr<MgResourceIdentifier> mapres13 = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
-        m_svcResource->DeleteResource(mapres13);
-        Ptr<MgResourceIdentifier> ldfres12 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RoadCenterLines.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres12);
-        Ptr<MgResourceIdentifier> ldfres13 = new MgResourceIdentifier(L"Library://UnitTests/Layers/VotingDistricts.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres13);
-        Ptr<MgResourceIdentifier> fsres6 = new MgResourceIdentifier(L"Library://UnitTests/Data/RoadCenterLines.FeatureSource");
-        m_svcResource->DeleteResource(fsres6);
-        Ptr<MgResourceIdentifier> fsres7 = new MgResourceIdentifier(L"Library://UnitTests/Data/VotingDistricts.FeatureSource");
-        m_svcResource->DeleteResource(fsres7);
-
-        Ptr<MgResourceIdentifier> ldfres14 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTS.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres14);
-        Ptr<MgResourceIdentifier> ldfres15 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTS.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres15);
-        Ptr<MgResourceIdentifier> ldfres16 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTSWithTheme.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres16);
-        Ptr<MgResourceIdentifier> ldfres17 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTSWithTheme.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres17);
-        Ptr<MgResourceIdentifier> ldfres18 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTSSingleCTS.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres18);
-        Ptr<MgResourceIdentifier> ldfres19 = new MgResourceIdentifier(L"Library://UnitTests/Layers/SingleFTSMultiCTS.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres19);
-
-        // Data related to stylization function tests
-        Ptr<MgResourceIdentifier> ldfres20 = new MgResourceIdentifier(L"Library://UnitTests/Layers/StylizationFuncs.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres20);
-
-        Ptr<MgResourceIdentifier> mapres15 = new MgResourceIdentifier(L"Library://UnitTests/Maps/StylizationFuncs.MapDefinition");
-        m_svcResource->DeleteResource(mapres15);
-
-        // Layer watermark test
-        Ptr<MgResourceIdentifier> wdfres2 = new MgResourceIdentifier(L"Library://UnitTests/Watermarks/Rail.WatermarkDefinition");
-        m_svcResource->DeleteResource(wdfres2);
-        Ptr<MgResourceIdentifier> ldfres21 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RailWatermark.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres21);
-    }
-    catch(MgFileIoException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        ACE_DEBUG((LM_INFO, ACE_TEXT("\nMgFileIoException - Possible file permission error.\nError: %W\n"), message.c_str()));
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        message += e->GetStackTrace(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRendering Service tests completed.\n\n")));
-}
-
-void TestRenderingService::TestCase_RenderDynamicOverlay(CREFSTRING imageFormat, CREFSTRING extension)
-{
-    try
-    {
         // make a runtime map
         Ptr<MgdMap> map = CreateTestMap();
 
@@ -556,7 +146,7 @@
 
 //        for (int i=0; i<10; i++)
 //        {
-            Ptr<MgByteReader> rdr1 = m_svcRendering->RenderDynamicOverlay(map, NULL, imageFormat);
+            Ptr<MgByteReader> rdr1 = pService->RenderDynamicOverlay(map, nullptr, imageFormat);
             rdr1->ToFile(GetPath(L"../UnitTestFiles/RenderDynamicOverlay75k", imageFormat, extension));
 //        }
 
@@ -564,7 +154,7 @@
 
 //        for (int i=0; i<100; i++)
 //        {
-            Ptr<MgByteReader> rdr2 = m_svcRendering->RenderDynamicOverlay(map, NULL, imageFormat);
+            Ptr<MgByteReader> rdr2 = pService->RenderDynamicOverlay(map, nullptr, imageFormat);
             rdr2->ToFile(GetPath(L"../UnitTestFiles/RenderDynamicOverlay12k", imageFormat, extension));
 //        }
 
@@ -573,9 +163,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -584,31 +174,37 @@
 }
 
 
-void TestRenderingService::TestCase_RenderDynamicOverlayTiledMap(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderDynamicOverlayTiledMap(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdRenderingService> pService = dynamic_cast<MgdRenderingService*>(
+            factory->CreateService(MgServiceType::RenderingService));
+        REQUIRE(pService.p != nullptr);
+
         // make a runtime map
         Ptr<MgdMap> map = CreateTestTiledMap();
 
 //        clock_t t0 = clock();
 
-        Ptr<MgdRenderingOptions> renderOpts = new MgdRenderingOptions(imageFormat, MgdRenderingOptions::RenderLayers | MgdRenderingOptions::RenderBaseLayers, NULL);
+        Ptr<MgdRenderingOptions> renderOpts = new MgdRenderingOptions(imageFormat, MgdRenderingOptions::RenderLayers | MgdRenderingOptions::RenderBaseLayers, nullptr);
 
         map->SetViewScale(12000.0);
 //        for (int i=0; i<10; i++)
 //        {
             //EXPECT: Tiled layers rendered with transparent background for applicable formats
-            Ptr<MgByteReader> rdr1 = m_svcRendering->RenderDynamicOverlay(map, NULL, renderOpts);
+            Ptr<MgByteReader> rdr1 = pService->RenderDynamicOverlay(map, nullptr, renderOpts);
             rdr1->ToFile(GetPath(L"../UnitTestFiles/RenderDynamicOverlayTiled_WithBase12k", imageFormat, extension));
 //        }
 
-        Ptr<MgdRenderingOptions> renderOpts2 = new MgdRenderingOptions(imageFormat, MgdRenderingOptions::RenderLayers, NULL);
+        Ptr<MgdRenderingOptions> renderOpts2 = new MgdRenderingOptions(imageFormat, MgdRenderingOptions::RenderLayers, nullptr);
 
 //        for (int i=0; i<100; i++)
 //        {
             //EXPECT: Nothing, with transparent background for applicable formats
-            Ptr<MgByteReader> rdr2 = m_svcRendering->RenderDynamicOverlay(map, NULL, renderOpts2);
+            Ptr<MgByteReader> rdr2 = pService->RenderDynamicOverlay(map, nullptr, renderOpts2);
             rdr2->ToFile(GetPath(L"../UnitTestFiles/RenderDynamicOverlayTiled_NoBase12k", imageFormat, extension));
 //        }
 
@@ -617,9 +213,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -628,27 +224,33 @@
 }
 
 
-void TestRenderingService::TestCase_RenderMap(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderMap(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdRenderingService> pService = dynamic_cast<MgdRenderingService*>(
+            factory->CreateService(MgServiceType::RenderingService));
+        REQUIRE(pService.p != nullptr);
+
         // make a runtime map
         Ptr<MgdMap> map = CreateTestMap();
 
         // call the API using scales of 75000 and 12000
         map->SetViewScale(75000.0);
-        Ptr<MgByteReader> rdr1 = m_svcRendering->RenderMap(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr1 = pService->RenderMap(map, nullptr, imageFormat);
         rdr1->ToFile(GetPath(L"../UnitTestFiles/RenderMap75k", imageFormat, extension));
 
         map->SetViewScale(12000.0);
-        Ptr<MgByteReader> rdr2 = m_svcRendering->RenderMap(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr2 = pService->RenderMap(map, nullptr, imageFormat);
         rdr2->ToFile(GetPath(L"../UnitTestFiles/RenderMap12k", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -656,27 +258,33 @@
     }
 }
 
-void TestRenderingService::TestCase_RenderMapWithWatermark(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderMapWithWatermark(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdRenderingService> pService = dynamic_cast<MgdRenderingService*>(
+            factory->CreateService(MgServiceType::RenderingService));
+        REQUIRE(pService.p != nullptr);
+
         // make a runtime map
         Ptr<MgdMap> map = CreateTestMapWithWatermark();
 
         // call the API using scales of 75000 and 12000
         map->SetViewScale(75000.0);
-        Ptr<MgByteReader> rdr1 = m_svcRendering->RenderMap(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr1 = pService->RenderMap(map, nullptr, imageFormat);
         rdr1->ToFile(GetPath(L"../UnitTestFiles/RenderMapWithWatermark75k", imageFormat, extension));
 
         map->SetViewScale(12000.0);
-        Ptr<MgByteReader> rdr2 = m_svcRendering->RenderMap(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr2 = pService->RenderMap(map, nullptr, imageFormat);
 		rdr2->ToFile(GetPath(L"../UnitTestFiles/RenderMapWithWatermark12k", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -685,10 +293,20 @@
 }
 
 
-void TestRenderingService::TestCase_RenderLegend(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderLegend(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdRenderingService> pService = dynamic_cast<MgdRenderingService*>(
+            factory->CreateService(MgServiceType::RenderingService));
+        REQUIRE(pService.p != nullptr);
+
+        Ptr<MgResourceService> svcResource = dynamic_cast<MgResourceService*>(
+            factory->CreateService(MgServiceType::ResourceService));
+        REQUIRE(svcResource.p != nullptr);
+
         // make a runtime map
         Ptr<MgdMap> map = CreateTestMap();
 
@@ -696,11 +314,11 @@
         Ptr<MgColor> bgc = new MgColor(255, 255, 255, 255);
 
         map->SetViewScale(75000.0);
-        Ptr<MgByteReader> rdr1 = m_svcRendering->RenderMapLegend(map, 200, 400, bgc, imageFormat);
+        Ptr<MgByteReader> rdr1 = pService->RenderMapLegend(map, 200, 400, bgc, imageFormat);
         rdr1->ToFile(GetPath(L"../UnitTestFiles/RenderLegend75k", imageFormat, extension));
 
         map->SetViewScale(12000.0);
-        Ptr<MgByteReader> rdr2 = m_svcRendering->RenderMapLegend(map, 200, 400, bgc, imageFormat);
+        Ptr<MgByteReader> rdr2 = pService->RenderMapLegend(map, 200, 400, bgc, imageFormat);
         rdr2->ToFile(GetPath(L"../UnitTestFiles/RenderLegend12k", imageFormat, extension));
 
         // add a layer group
@@ -731,13 +349,13 @@
         group3->SetDisplayInLegend(false);
         layerGroups->Add(group3);
 
-        Ptr<MgdLayer> layer = new MgdLayer(resId, m_svcResource);
+        Ptr<MgdLayer> layer = new MgdLayer(resId, svcResource);
         layer->SetName(L"HydroPolygons");
         layer->SetLegendLabel(L"HydroPolygons (Test Group)");
         layer->SetGroup(group);
         layer->SetDisplayInLegend(true);
 
-        Ptr<MgdLayer> layer2 = new MgdLayer(ldfRail, m_svcResource);
+        Ptr<MgdLayer> layer2 = new MgdLayer(ldfRail, svcResource);
         layer2->SetName(L"RailUnderNestedGroup");
         layer2->SetLegendLabel(L"Rail (Nest Child)");
         layer2->SetGroup(group2);
@@ -748,24 +366,24 @@
 
         //Re-draw at 75k. Layer group should not be there because it has no visible layers
         map->SetViewScale(75000.0);
-        Ptr<MgByteReader> rdr3 = m_svcRendering->RenderMapLegend(map, 200, 400, bgc, imageFormat);
+        Ptr<MgByteReader> rdr3 = pService->RenderMapLegend(map, 200, 400, bgc, imageFormat);
         rdr3->ToFile(GetPath(L"../UnitTestFiles/RenderLegend75kWithEmptyLayerGroup", imageFormat, extension));
 
         //Re-draw at 14000. Layer group should still not be there because it has no visible layers
         map->SetViewScale(14000.0);
-        Ptr<MgByteReader> rdr4 = m_svcRendering->RenderMapLegend(map, 200, 400, bgc, imageFormat);
+        Ptr<MgByteReader> rdr4 = pService->RenderMapLegend(map, 200, 400, bgc, imageFormat);
         rdr4->ToFile(GetPath(L"../UnitTestFiles/RenderLegend14kWithEmptyLayerGroup", imageFormat, extension));
 
         //Re-draw at 12000. Layer group should now be there because its child layer (Parcels) should be visible
         map->SetViewScale(12000.0);
-        Ptr<MgByteReader> rdr5 = m_svcRendering->RenderMapLegend(map, 200, 400, bgc, imageFormat);
+        Ptr<MgByteReader> rdr5 = pService->RenderMapLegend(map, 200, 400, bgc, imageFormat);
         rdr5->ToFile(GetPath(L"../UnitTestFiles/RenderLegend12kWithLayerGroup", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -773,10 +391,16 @@
     }
 }
 
-void TestRenderingService::TestCase_RenderLegendEmptyGroups(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderLegendEmptyGroups(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdRenderingService> pService = dynamic_cast<MgdRenderingService*>(
+            factory->CreateService(MgServiceType::RenderingService));
+        REQUIRE(pService.p != nullptr);
+
         // make a runtime map
         Ptr<MgdMap> map = CreateTestMap();
         map->SetViewScale(75000.0);
@@ -810,14 +434,14 @@
         map->Save();
 
         // Call the API
-        Ptr<MgByteReader> rdr3 = m_svcRendering->RenderMapLegend(map, 200, 400, bgc, imageFormat);
+        Ptr<MgByteReader> rdr3 = pService->RenderMapLegend(map, 200, 400, bgc, imageFormat);
         rdr3->ToFile(GetPath(L"../UnitTestFiles/RenderLegendEmptyGroups", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -825,21 +449,27 @@
     }
 }
 
-void TestRenderingService::TestCase_StylizationFunctions(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_StylizationFunctions(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdRenderingService> pService = dynamic_cast<MgdRenderingService*>(
+            factory->CreateService(MgServiceType::RenderingService));
+        REQUIRE(pService.p != nullptr);
+
         Ptr<MgdMap> map = CreateTestStylizationFunctionMap();
         
         // call the API using a scale of 75000
         map->SetViewScale(75000.0);
 
-        Ptr<MgByteReader> rdr1 = m_svcRendering->RenderDynamicOverlay(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr1 = pService->RenderDynamicOverlay(map, nullptr, imageFormat);
         rdr1->ToFile(GetPath(L"../UnitTestFiles/StylizationFunc_75k", imageFormat, extension));
 
         // call the API using a scale of 12000
         map->SetViewScale(12000);
-        Ptr<MgByteReader> rdr2 = m_svcRendering->RenderDynamicOverlay(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr2 = pService->RenderDynamicOverlay(map, nullptr, imageFormat);
         rdr2->ToFile(GetPath(L"../UnitTestFiles/StylizationFunc_12k", imageFormat, extension));
 
         // Move around
@@ -846,14 +476,14 @@
         Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733753, 43.746899);
         Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
         map->SetViewCenter(ptNewCenter);
-        Ptr<MgByteReader> rdr3 = m_svcRendering->RenderDynamicOverlay(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr3 = pService->RenderDynamicOverlay(map, nullptr, imageFormat);
         rdr3->ToFile(GetPath(L"../UnitTestFiles/StylizationFunc_12k_Moved", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -861,16 +491,26 @@
     }
 }
 
-void TestRenderingService::TestCase_RenderLegendMultiFTS(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderLegendMultiFTS(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdRenderingService> pService = dynamic_cast<MgdRenderingService*>(
+            factory->CreateService(MgServiceType::RenderingService));
+        REQUIRE(pService.p != nullptr);
+
+        Ptr<MgResourceService> svcResource = dynamic_cast<MgResourceService*>(
+            factory->CreateService(MgServiceType::ResourceService));
+        REQUIRE(svcResource.p != nullptr);
+
         // make a runtime map
         Ptr<MgdMap> map = CreateTestMap();
 
         // Insert our test layer
         Ptr<MgResourceIdentifier> layerDef = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTS.LayerDefinition");
-        Ptr<MgdLayer> layer = new MgdLayer(layerDef, m_svcResource);
+        Ptr<MgdLayer> layer = new MgdLayer(layerDef, svcResource);
         layer->SetLegendLabel(layerDef->GetName());
         Ptr<MgLayerCollection> layers = map->GetLayers();
         layers->Insert(0, layer);
@@ -880,14 +520,14 @@
         Ptr<MgColor> bgc = new MgColor(255, 255, 255, 255);
 
         map->SetViewScale(75000.0);
-        Ptr<MgByteReader> rdr1 = m_svcRendering->RenderMapLegend(map, 200, 400, bgc, imageFormat);
+        Ptr<MgByteReader> rdr1 = pService->RenderMapLegend(map, 200, 400, bgc, imageFormat);
         rdr1->ToFile(GetPath(L"../UnitTestFiles/RenderLegendMultiFTS", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -895,16 +535,26 @@
     }
 }
 
-void TestRenderingService::TestCase_RenderLegendMultiCTS(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderLegendMultiCTS(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdRenderingService> pService = dynamic_cast<MgdRenderingService*>(
+            factory->CreateService(MgServiceType::RenderingService));
+        REQUIRE(pService.p != nullptr);
+
+        Ptr<MgResourceService> svcResource = dynamic_cast<MgResourceService*>(
+            factory->CreateService(MgServiceType::ResourceService));
+        REQUIRE(svcResource.p != nullptr);
+
         // make a runtime map
         Ptr<MgdMap> map = CreateTestMap();
 
         // Insert our test layer
         Ptr<MgResourceIdentifier> layerDef = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTS.LayerDefinition");
-        Ptr<MgdLayer> layer = new MgdLayer(layerDef, m_svcResource);
+        Ptr<MgdLayer> layer = new MgdLayer(layerDef, svcResource);
         layer->SetLegendLabel(layerDef->GetName());
         Ptr<MgLayerCollection> layers = map->GetLayers();
         layers->Insert(0, layer);
@@ -914,14 +564,14 @@
         Ptr<MgColor> bgc = new MgColor(255, 255, 255, 255);
 
         map->SetViewScale(75000.0);
-        Ptr<MgByteReader> rdr1 = m_svcRendering->RenderMapLegend(map, 200, 400, bgc, imageFormat);
+        Ptr<MgByteReader> rdr1 = pService->RenderMapLegend(map, 200, 400, bgc, imageFormat);
         rdr1->ToFile(GetPath(L"../UnitTestFiles/RenderLegendMultiCTS", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -929,16 +579,26 @@
     }
 }
 
-void TestRenderingService::TestCase_RenderLegendMultiFTSWithTheme(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderLegendMultiFTSWithTheme(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdRenderingService> pService = dynamic_cast<MgdRenderingService*>(
+            factory->CreateService(MgServiceType::RenderingService));
+        REQUIRE(pService.p != nullptr);
+
+        Ptr<MgResourceService> svcResource = dynamic_cast<MgResourceService*>(
+            factory->CreateService(MgServiceType::ResourceService));
+        REQUIRE(svcResource.p != nullptr);
+
         // make a runtime map
         Ptr<MgdMap> map = CreateTestMap();
 
         // Insert our test layer
         Ptr<MgResourceIdentifier> layerDef = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTSWithTheme.LayerDefinition");
-        Ptr<MgdLayer> layer = new MgdLayer(layerDef, m_svcResource);
+        Ptr<MgdLayer> layer = new MgdLayer(layerDef, svcResource);
         layer->SetLegendLabel(layerDef->GetName());
         Ptr<MgLayerCollection> layers = map->GetLayers();
         layers->Insert(0, layer);
@@ -948,14 +608,14 @@
         Ptr<MgColor> bgc = new MgColor(255, 255, 255, 255);
 
         map->SetViewScale(75000.0);
-        Ptr<MgByteReader> rdr1 = m_svcRendering->RenderMapLegend(map, 200, 400, bgc, imageFormat);
+        Ptr<MgByteReader> rdr1 = pService->RenderMapLegend(map, 200, 400, bgc, imageFormat);
         rdr1->ToFile(GetPath(L"../UnitTestFiles/RenderLegendMultiFTSWithTheme", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -963,16 +623,26 @@
     }
 }
 
-void TestRenderingService::TestCase_RenderLegendMultiCTSWithTheme(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderLegendMultiCTSWithTheme(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdRenderingService> pService = dynamic_cast<MgdRenderingService*>(
+            factory->CreateService(MgServiceType::RenderingService));
+        REQUIRE(pService.p != nullptr);
+
+        Ptr<MgResourceService> svcResource = dynamic_cast<MgResourceService*>(
+            factory->CreateService(MgServiceType::ResourceService));
+        REQUIRE(svcResource.p != nullptr);
+
         // make a runtime map
         Ptr<MgdMap> map = CreateTestMap();
 
         // Insert our test layer
         Ptr<MgResourceIdentifier> layerDef = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTSWithTheme.LayerDefinition");
-        Ptr<MgdLayer> layer = new MgdLayer(layerDef, m_svcResource);
+        Ptr<MgdLayer> layer = new MgdLayer(layerDef, svcResource);
         layer->SetLegendLabel(layerDef->GetName());
         Ptr<MgLayerCollection> layers = map->GetLayers();
         layers->Insert(0, layer);
@@ -982,14 +652,14 @@
         Ptr<MgColor> bgc = new MgColor(255, 255, 255, 255);
 
         map->SetViewScale(75000.0);
-        Ptr<MgByteReader> rdr1 = m_svcRendering->RenderMapLegend(map, 200, 400, bgc, imageFormat);
+        Ptr<MgByteReader> rdr1 = pService->RenderMapLegend(map, 200, 400, bgc, imageFormat);
         rdr1->ToFile(GetPath(L"../UnitTestFiles/RenderLegendMultiCTSWithTheme", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -997,16 +667,26 @@
     }
 }
 
-void TestRenderingService::TestCase_RenderLegendMultiFTSSingleCTS(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderLegendMultiFTSSingleCTS(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdRenderingService> pService = dynamic_cast<MgdRenderingService*>(
+            factory->CreateService(MgServiceType::RenderingService));
+        REQUIRE(pService.p != nullptr);
+
+        Ptr<MgResourceService> svcResource = dynamic_cast<MgResourceService*>(
+            factory->CreateService(MgServiceType::ResourceService));
+        REQUIRE(svcResource.p != nullptr);
+
         // make a runtime map
         Ptr<MgdMap> map = CreateTestMap();
 
         // Insert our test layer
         Ptr<MgResourceIdentifier> layerDef = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTSSingleCTS.LayerDefinition");
-        Ptr<MgdLayer> layer = new MgdLayer(layerDef, m_svcResource);
+        Ptr<MgdLayer> layer = new MgdLayer(layerDef, svcResource);
         layer->SetLegendLabel(layerDef->GetName());
         Ptr<MgLayerCollection> layers = map->GetLayers();
         layers->Insert(0, layer);
@@ -1016,14 +696,14 @@
         Ptr<MgColor> bgc = new MgColor(255, 255, 255, 255);
 
         map->SetViewScale(75000.0);
-        Ptr<MgByteReader> rdr1 = m_svcRendering->RenderMapLegend(map, 200, 400, bgc, imageFormat);
+        Ptr<MgByteReader> rdr1 = pService->RenderMapLegend(map, 200, 400, bgc, imageFormat);
         rdr1->ToFile(GetPath(L"../UnitTestFiles/RenderLegendMultiFTSSingleCTS", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1032,16 +712,26 @@
 }
 
 
-void TestRenderingService::TestCase_RenderLegendSingleFTSMultiCTS(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderLegendSingleFTSMultiCTS(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdRenderingService> pService = dynamic_cast<MgdRenderingService*>(
+            factory->CreateService(MgServiceType::RenderingService));
+        REQUIRE(pService.p != nullptr);
+
+        Ptr<MgResourceService> svcResource = dynamic_cast<MgResourceService*>(
+            factory->CreateService(MgServiceType::ResourceService));
+        REQUIRE(svcResource.p != nullptr);
+
         // make a runtime map
         Ptr<MgdMap> map = CreateTestMap();
 
         // Insert our test layer
         Ptr<MgResourceIdentifier> layerDef = new MgResourceIdentifier(L"Library://UnitTests/Layers/SingleFTSMultiCTS.LayerDefinition");
-        Ptr<MgdLayer> layer = new MgdLayer(layerDef, m_svcResource);
+        Ptr<MgdLayer> layer = new MgdLayer(layerDef, svcResource);
         layer->SetLegendLabel(layerDef->GetName());
         Ptr<MgLayerCollection> layers = map->GetLayers();
         layers->Insert(0, layer);
@@ -1051,14 +741,14 @@
         Ptr<MgColor> bgc = new MgColor(255, 255, 255, 255);
 
         map->SetViewScale(75000.0);
-        Ptr<MgByteReader> rdr1 = m_svcRendering->RenderMapLegend(map, 200, 400, bgc, imageFormat);
+        Ptr<MgByteReader> rdr1 = pService->RenderMapLegend(map, 200, 400, bgc, imageFormat);
         rdr1->ToFile(GetPath(L"../UnitTestFiles/RenderLegendSingleFTSMultiCTS", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1066,10 +756,20 @@
     }
 }
 
-void TestRenderingService::TestCase_LayerWatermark(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_LayerWatermark(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdRenderingService> pService = dynamic_cast<MgdRenderingService*>(
+            factory->CreateService(MgServiceType::RenderingService));
+        REQUIRE(pService.p != nullptr);
+
+        Ptr<MgResourceService> svcResource = dynamic_cast<MgResourceService*>(
+            factory->CreateService(MgServiceType::ResourceService));
+        REQUIRE(svcResource.p != nullptr);
+
         // make a runtime map
         Ptr<MgdMap> map = CreateTestMap();
 
@@ -1084,7 +784,7 @@
 
         // Insert our watermarked rail layer
         Ptr<MgResourceIdentifier> layerDef = new MgResourceIdentifier(L"Library://UnitTests/Layers/RailWatermark.LayerDefinition");
-        Ptr<MgdLayer> layer = new MgdLayer(layerDef, m_svcResource);
+        Ptr<MgdLayer> layer = new MgdLayer(layerDef, svcResource);
         layer->SetName(L"Rail");
         layer->SetLegendLabel(layerDef->GetName());
         layers->Insert(0, layer);
@@ -1092,19 +792,19 @@
 
         Ptr<MgColor> selColor = new MgColor(0, 0, 255);
         Ptr<MgdRenderingOptions> renderOpts = new MgdRenderingOptions(imageFormat, MgdRenderingOptions::RenderLayers | MgdRenderingOptions::RenderBaseLayers, selColor);
-        Ptr<MgByteReader> img = m_svcRendering->RenderDynamicOverlay(map, NULL, renderOpts);
+        Ptr<MgByteReader> img = pService->RenderDynamicOverlay(map, nullptr, renderOpts);
         img->ToFile(GetPath(L"../UnitTestFiles/LayerWatermarkOn", imageFormat, extension));
 
         layer->SetVisible(false);
         map->Save();
-        img = m_svcRendering->RenderDynamicOverlay(map, NULL, renderOpts);
+        img = pService->RenderDynamicOverlay(map, nullptr, renderOpts);
         img->ToFile(GetPath(L"../UnitTestFiles/LayerWatermarkOff", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1112,141 +812,16 @@
     }
 }
 
-void TestRenderingService::TestCase_QueryFeatures()
+static void TestCase_SymbologyPoints(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
-        // make a runtime map
-        Ptr<MgdMap> map = CreateTestMap();
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
 
-        // call the API using a scale of 75000
-        map->SetViewScale(75000.0);
+        Ptr<MgdRenderingService> pService = dynamic_cast<MgdRenderingService*>(
+            factory->CreateService(MgServiceType::RenderingService));
+        REQUIRE(pService.p != nullptr);
 
-        Ptr<MgStringCollection> layerNames1 = new MgStringCollection();
-        layerNames1->Add(L"Rail");
-        layerNames1->Add(L"HydrographicPolygons");
-        Ptr<MgPolygon> poly1 = CreateSelectionPolygon(map, 0.3, 0.3);
-        Ptr<MgdFeatureInformation> fi1 = m_svcRendering->QueryFeatures(map, layerNames1, poly1, MgFeatureSpatialOperations::Within, -1);
-
-        // call the API using a scale of 12000
-        map->SetViewScale(12000.0);
-
-        Ptr<MgStringCollection> layerNames2 = new MgStringCollection();
-        layerNames2->Add(L"Rail");
-        layerNames2->Add(L"Parcels");
-        Ptr<MgPolygon> poly2 = CreateSelectionPolygon(map, 0.05, 0.05);
-        Ptr<MgdFeatureInformation> fi2 = m_svcRendering->QueryFeatures(map, layerNames2, poly2, MgFeatureSpatialOperations::Within, -1);
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-}
-
-MgdMap* TestRenderingService::CreateTestMapWithWatermark()
-{
-    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWithWatermark.MapDefinition");
-    MgdMap* map = new MgdMap(mdfres);
-    //map->Create(mdfres, L"UnitTestSheboyganWithWatermark");
-
-    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
-    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
-    map->SetViewCenter(ptNewCenter);
-    map->SetViewScale(75000.0);
-    map->SetDisplayDpi(96);
-    map->SetDisplayWidth(1024);
-    map->SetDisplayHeight(1024);
-
-    return map;
-}
-
-MgdMap* TestRenderingService::CreateTestMap()
-{
-    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
-    MgdMap* map = new MgdMap(mdfres);
-    //map->Create(mdfres, L"UnitTestSheboygan");
-
-    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
-    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
-    map->SetViewCenter(ptNewCenter);
-    map->SetViewScale(75000.0);
-    map->SetDisplayDpi(96);
-    map->SetDisplayWidth(1024);
-    map->SetDisplayHeight(1024);
-
-    return map;
-}
-
-MgdMap* TestRenderingService::CreateTestStylizationFunctionMap()
-{
-    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/StylizationFuncs.MapDefinition");
-    MgdMap* map = new MgdMap(mdfres);
-    //map->Create(mdfres, L"StylizationFuncs");
-
-    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
-    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
-    map->SetViewCenter(ptNewCenter);
-    map->SetViewScale(60000.0);
-    map->SetDisplayDpi(96);
-    map->SetDisplayWidth(1024);
-    map->SetDisplayHeight(1024);
-
-    return map;
-}
-
-MgdMap* TestRenderingService::CreateTestTiledMap()
-{
-    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
-    MgdMap* map = new MgdMap(mdfres, L"UnitTestSheboyganTiled");
-
-    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
-    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
-    map->SetViewCenter(ptNewCenter);
-    map->SetViewScale(75000.0);
-    map->SetDisplayDpi(96);
-    map->SetDisplayWidth(1024);
-    map->SetDisplayHeight(1024);
-
-    return map;
-}
-
-// creates a selection bounds in mapping space
-MgPolygon* TestRenderingService::CreateSelectionPolygon(MgdMap* map, double width, double height)
-{
-    Ptr<MgPoint> centerPt = map->GetViewCenter();
-    Ptr<MgCoordinate> center = centerPt->GetCoordinate();
-    double xMin = center->GetX() - 0.5*width;
-    double yMin = center->GetY() - 0.5*height;
-    double xMax = center->GetX() + 0.5*width;
-    double yMax = center->GetY() + 0.5*height;
-    Ptr<MgCoordinateXY> c1 = new MgCoordinateXY(xMin, yMin);
-    Ptr<MgCoordinateXY> c2 = new MgCoordinateXY(xMax, yMin);
-    Ptr<MgCoordinateXY> c3 = new MgCoordinateXY(xMax, yMax);
-    Ptr<MgCoordinateXY> c4 = new MgCoordinateXY(xMin, yMax);
-    Ptr<MgCoordinateXY> c5 = new MgCoordinateXY(xMin, yMin);
-
-    Ptr<MgCoordinateCollection> cc = new MgCoordinateCollection();
-    cc->Add(c1);
-    cc->Add(c2);
-    cc->Add(c3);
-    cc->Add(c4);
-    cc->Add(c5);
-
-    Ptr<MgLinearRing> outer = new MgLinearRing(cc);
-    return new MgPolygon(outer, NULL);
-}
-
-
-void TestRenderingService::TestCase_SymbologyPoints(CREFSTRING imageFormat, CREFSTRING extension)
-{
-    try
-    {
         // make a runtime map
         Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Capitals.MapDefinition");
         Ptr<MgdMap> map = new MgdMap(mdfres, L"UnitTestSymbology");
@@ -1257,7 +832,7 @@
         Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
         map->SetViewCenter(ptNewCenter);
         map->SetDisplayDpi(96);
-        map->SetDisplayWidth(2*pixels);
+        map->SetDisplayWidth(2 * pixels);
         map->SetDisplayHeight(pixels);
 
         // the map is a little silly -- it's in degrees but thinks it's in meters --
@@ -1267,22 +842,28 @@
         map->SetViewScale(scale);
 
         // call the API
-        Ptr<MgByteReader> rdr = m_svcRendering->RenderMap(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr = pService->RenderMap(map, nullptr, imageFormat);
         rdr->ToFile(GetPath(L"../UnitTestFiles/SymbologyPoints", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
 
-void TestRenderingService::TestCase_SymbologyPointsParam(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_SymbologyPointsParam(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdRenderingService> pService = dynamic_cast<MgdRenderingService*>(
+            factory->CreateService(MgServiceType::RenderingService));
+        REQUIRE(pService.p != nullptr);
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/CapitalsParam.MapDefinition");
         Ptr<MgdMap> map = new MgdMap(mdfres, L"UnitTestSymbology");
@@ -1293,7 +874,7 @@
         Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
         map->SetViewCenter(ptNewCenter);
         map->SetDisplayDpi(96);
-        map->SetDisplayWidth(2*pixels);
+        map->SetDisplayWidth(2 * pixels);
         map->SetDisplayHeight(pixels);
 
         // the map is a little silly -- it's in degrees but thinks it's in meters --
@@ -1303,22 +884,28 @@
         map->SetViewScale(scale);
 
         // call the API
-        Ptr<MgByteReader> rdr = m_svcRendering->RenderMap(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr = pService->RenderMap(map, nullptr, imageFormat);
         rdr->ToFile(GetPath(L"../UnitTestFiles/SymbologyPointsParam", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
 
-void TestRenderingService::TestCase_SymbologyLines(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_SymbologyLines(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdRenderingService> pService = dynamic_cast<MgdRenderingService*>(
+            factory->CreateService(MgServiceType::RenderingService));
+        REQUIRE(pService.p != nullptr);
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Lines.MapDefinition");
         Ptr<MgdMap> map = new MgdMap(mdfres, L"UnitTestSymbology");
@@ -1329,7 +916,7 @@
         Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
         map->SetViewCenter(ptNewCenter);
         map->SetDisplayDpi(96);
-        map->SetDisplayWidth(2*pixels);
+        map->SetDisplayWidth(2 * pixels);
         map->SetDisplayHeight(pixels);
 
         // the map is a little silly -- it's in degrees but thinks it's in meters --
@@ -1339,22 +926,28 @@
         map->SetViewScale(scale);
 
         // call the API
-        Ptr<MgByteReader> rdr = m_svcRendering->RenderMap(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr = pService->RenderMap(map, nullptr, imageFormat);
         rdr->ToFile(GetPath(L"../UnitTestFiles/SymbologyLines", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
 
-void TestRenderingService::TestCase_SymbologyLinesCrossTick(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_SymbologyLinesCrossTick(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdRenderingService> pService = dynamic_cast<MgdRenderingService*>(
+            factory->CreateService(MgServiceType::RenderingService));
+        REQUIRE(pService.p != nullptr);
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinesCrossTick.MapDefinition");
         Ptr<MgdMap> map = new MgdMap(mdfres, L"UnitTestSymbology");
@@ -1365,7 +958,7 @@
         Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
         map->SetViewCenter(ptNewCenter);
         map->SetDisplayDpi(96);
-        map->SetDisplayWidth(2*pixels);
+        map->SetDisplayWidth(2 * pixels);
         map->SetDisplayHeight(pixels);
 
         // the map is a little silly -- it's in degrees but thinks it's in meters --
@@ -1375,22 +968,28 @@
         map->SetViewScale(scale);
 
         // call the API
-        Ptr<MgByteReader> rdr = m_svcRendering->RenderMap(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr = pService->RenderMap(map, nullptr, imageFormat);
         rdr->ToFile(GetPath(L"../UnitTestFiles/SymbologyLinesCrossTick", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
 
-void TestRenderingService::TestCase_Annotation1(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_Annotation1(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdRenderingService> pService = dynamic_cast<MgdRenderingService*>(
+            factory->CreateService(MgServiceType::RenderingService));
+        REQUIRE(pService.p != nullptr);
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation1.MapDefinition");
         Ptr<MgdMap> map = new MgdMap(mdfres, L"UnitTestAnnotation1");
@@ -1401,7 +1000,7 @@
         Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
         map->SetViewCenter(ptNewCenter);
         map->SetDisplayDpi(96);
-        map->SetDisplayWidth(2*pixels);
+        map->SetDisplayWidth(2 * pixels);
         map->SetDisplayHeight(pixels);
 
         // the map is a little silly -- it's in degrees but thinks it's in meters --
@@ -1411,22 +1010,28 @@
         map->SetViewScale(scale);
 
         // call the API
-        Ptr<MgByteReader> rdr = m_svcRendering->RenderMap(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr = pService->RenderMap(map, nullptr, imageFormat);
         rdr->ToFile(GetPath(L"../UnitTestFiles/Annotation1", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
 
-void TestRenderingService::TestCase_Annotation2(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_Annotation2(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdRenderingService> pService = dynamic_cast<MgdRenderingService*>(
+            factory->CreateService(MgServiceType::RenderingService));
+        REQUIRE(pService.p != nullptr);
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation2.MapDefinition");
         Ptr<MgdMap> map = new MgdMap(mdfres, L"UnitTestAnnotation2");
@@ -1437,7 +1042,7 @@
         Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
         map->SetViewCenter(ptNewCenter);
         map->SetDisplayDpi(96);
-        map->SetDisplayWidth(2*pixels);
+        map->SetDisplayWidth(2 * pixels);
         map->SetDisplayHeight(pixels);
 
         // the map is a little silly -- it's in degrees but thinks it's in meters --
@@ -1447,22 +1052,28 @@
         map->SetViewScale(scale);
 
         // call the API
-        Ptr<MgByteReader> rdr = m_svcRendering->RenderMap(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr = pService->RenderMap(map, nullptr, imageFormat);
         rdr->ToFile(GetPath(L"../UnitTestFiles/Annotation2", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
 
-void TestRenderingService::TestCase_Annotation3(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_Annotation3(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdRenderingService> pService = dynamic_cast<MgdRenderingService*>(
+            factory->CreateService(MgServiceType::RenderingService));
+        REQUIRE(pService.p != nullptr);
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation3.MapDefinition");
         Ptr<MgdMap> map = new MgdMap(mdfres, L"UnitTestAnnotation3");
@@ -1473,7 +1084,7 @@
         Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
         map->SetViewCenter(ptNewCenter);
         map->SetDisplayDpi(96);
-        map->SetDisplayWidth(2*pixels);
+        map->SetDisplayWidth(2 * pixels);
         map->SetDisplayHeight(pixels);
 
         // the map is a little silly -- it's in degrees but thinks it's in meters --
@@ -1483,22 +1094,28 @@
         map->SetViewScale(scale);
 
         // call the API
-        Ptr<MgByteReader> rdr = m_svcRendering->RenderMap(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr = pService->RenderMap(map, nullptr, imageFormat);
         rdr->ToFile(GetPath(L"../UnitTestFiles/Annotation3", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
 
-void TestRenderingService::TestCase_SymbologyPolygons(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_SymbologyPolygons(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdRenderingService> pService = dynamic_cast<MgdRenderingService*>(
+            factory->CreateService(MgServiceType::RenderingService));
+        REQUIRE(pService.p != nullptr);
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_SymbologyPolygons.MapDefinition");
         Ptr<MgdMap> map = new MgdMap(mdfres, L"UnitTestSymbologyPolygons");
@@ -1511,28 +1128,17 @@
         map->SetDisplayHeight(1024);
 
         map->SetViewScale(12000.0);
-        Ptr<MgByteReader> rdr2 = m_svcRendering->RenderMap(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr2 = pService->RenderMap(map, nullptr, imageFormat);
         rdr2->ToFile(GetPath(L"../UnitTestFiles/SymbologyPolygons", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
-STRING TestRenderingService::GetPath(CREFSTRING basePath, CREFSTRING imageFormat, CREFSTRING extension)
-{
-	STRING ret;
-	ret += basePath;
-	ret += L"_";
-	ret += imageFormat;
-	ret += L".";
-	ret += extension;
-	return ret;
-}
-
 //void TestRenderingService::TestCase_RendererPerformance()
 //{
 //    /*
@@ -1556,7 +1162,7 @@
 //
 //    AGGRenderer* agg = new AGGRenderer(1024, 1024, RS_Color(0xffffffff), false, false, 0.0);
 //
-//    agg->StartMap(NULL, RS_Bounds(0,0,0,1024,1024,0), 1.0, 1.0, 1.0, NULL);
+//    agg->StartMap(nullptr, RS_Bounds(0,0,0,1024,1024,0), 1.0, 1.0, 1.0, nullptr);
 //
 //    clock_t t0 = clock();
 //
@@ -1575,7 +1181,7 @@
 //
 //    GDRenderer* gd = new GDRenderer(1024, 1024, RS_Color(0xffffffff), false);
 //
-//    gd->StartMap(NULL, RS_Bounds(0,0,0,1024,1024,0), 1.0, 1.0, 1.0, NULL);
+//    gd->StartMap(nullptr, RS_Bounds(0,0,0,1024,1024,0), 1.0, 1.0, 1.0, nullptr);
 //
 //    t0 = clock();
 //
@@ -1592,3 +1198,143 @@
 //
 //
 //}
+
+
+TEST_CASE("QueryFeatures", "[RenderingService]")
+{
+    try
+    {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgdRenderingService> pService = dynamic_cast<MgdRenderingService*>(
+            factory->CreateService(MgServiceType::RenderingService));
+        REQUIRE(pService.p != nullptr);
+
+        // make a runtime map
+        Ptr<MgdMap> map = CreateTestMap();
+
+        // call the API using a scale of 75000
+        map->SetViewScale(75000.0);
+
+        Ptr<MgStringCollection> layerNames1 = new MgStringCollection();
+        layerNames1->Add(L"Rail");
+        layerNames1->Add(L"HydrographicPolygons");
+        Ptr<MgPolygon> poly1 = CreateSelectionPolygon(map, 0.3, 0.3);
+        Ptr<MgdFeatureInformation> fi1 = pService->QueryFeatures(map, layerNames1, poly1, MgFeatureSpatialOperations::Within, -1);
+
+        // call the API using a scale of 12000
+        map->SetViewScale(12000.0);
+
+        Ptr<MgStringCollection> layerNames2 = new MgStringCollection();
+        layerNames2->Add(L"Rail");
+        layerNames2->Add(L"Parcels");
+        Ptr<MgPolygon> poly2 = CreateSelectionPolygon(map, 0.05, 0.05);
+        Ptr<MgdFeatureInformation> fi2 = pService->QueryFeatures(map, layerNames2, poly2, MgFeatureSpatialOperations::Within, -1);
+    }
+    catch (MgException* e)
+    {
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+        SAFE_RELEASE(e);
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+    }
+    catch (...)
+    {
+        throw;
+    }
+}
+
+//PNG output tests
+TEST_CASE("RenderDynamicOverlayPNG", "[RenderingService]") { TestCase_RenderDynamicOverlay(L"PNG", L"png"); }
+TEST_CASE("RenderDynamicOverlayTiledMapPNG", "[RenderingService]") { TestCase_RenderDynamicOverlayTiledMap(L"PNG", L"png"); }
+TEST_CASE("RenderMapPNG", "[RenderingService]") { TestCase_RenderMap(L"PNG", L"png"); }
+TEST_CASE("RenderMapWithWatermarkPNG", "[RenderingService]") { TestCase_RenderMapWithWatermark(L"PNG", L"png"); }
+TEST_CASE("RenderLegendPNG", "[RenderingService]") { TestCase_RenderLegend(L"PNG", L"png"); }
+TEST_CASE("RenderLegendEmptyGroupsPNG", "[RenderingService]") { TestCase_RenderLegendEmptyGroups(L"PNG", L"png"); }
+TEST_CASE("SymbologyPointsPNG", "[RenderingService]") { TestCase_SymbologyPoints(L"PNG", L"png"); }
+TEST_CASE("SymbologyPointsParamPNG", "[RenderingService]") { TestCase_SymbologyPointsParam(L"PNG", L"png"); }
+TEST_CASE("SymbologyLinesPNG", "[RenderingService]") { TestCase_SymbologyLines(L"PNG", L"png"); }
+TEST_CASE("SymbologyLinesCrossTickPNG", "[RenderingService]") { TestCase_SymbologyLinesCrossTick(L"PNG", L"png"); }
+TEST_CASE("SymbologyPolygonsPNG", "[RenderingService]") { TestCase_SymbologyPolygons(L"PNG", L"png"); }
+TEST_CASE("Annotation1PNG", "[RenderingService]") { TestCase_Annotation1(L"PNG", L"png"); }
+TEST_CASE("Annotation2PNG", "[RenderingService]") { TestCase_Annotation2(L"PNG", L"png"); }
+TEST_CASE("Annotation3PNG", "[RenderingService]") { TestCase_Annotation3(L"PNG", L"png"); }
+TEST_CASE("RenderLegendMultiFTSPNG", "[RenderingService]") { TestCase_RenderLegendMultiFTS(L"PNG", L"png"); }
+TEST_CASE("RenderLegendMultiCTSPNG", "[RenderingService]") { TestCase_RenderLegendMultiCTS(L"PNG", L"png"); }
+TEST_CASE("RenderLegendMultiFTSWithThemePNG", "[RenderingService]") { TestCase_RenderLegendMultiFTSWithTheme(L"PNG", L"png"); }
+TEST_CASE("RenderLegendMultiCTSWithThemePNG", "[RenderingService]") { TestCase_RenderLegendMultiCTSWithTheme(L"PNG", L"png"); }
+TEST_CASE("RenderLegendMultiFTSSingleCTSPNG", "[RenderingService]") { TestCase_RenderLegendMultiFTSSingleCTS(L"PNG", L"png"); }
+TEST_CASE("RenderLegendSingleFTSMultiCTSPNG", "[RenderingService]") { TestCase_RenderLegendSingleFTSMultiCTS(L"PNG", L"png"); }
+TEST_CASE("StylizationFunctionsPNG", "[RenderingService]") { TestCase_StylizationFunctions(L"PNG", L"png"); }
+TEST_CASE("LayerWatermarkPNG", "[RenderingService]") { TestCase_LayerWatermark(L"PNG", L"png"); }
+
+//PNG8 output tests
+TEST_CASE("RenderDynamicOverlayPNG8", "[RenderingService]") { TestCase_RenderDynamicOverlay(L"PNG8", L"png"); }
+TEST_CASE("RenderDynamicOverlayTiledMapPNG8", "[RenderingService]") { TestCase_RenderDynamicOverlayTiledMap(L"PNG8", L"png"); }
+TEST_CASE("RenderMapPNG8", "[RenderingService]") { TestCase_RenderMap(L"PNG8", L"png"); }
+TEST_CASE("RenderMapWithWatermarkPNG8", "[RenderingService]") { TestCase_RenderMapWithWatermark(L"PNG8", L"png"); }
+TEST_CASE("RenderLegendPNG8", "[RenderingService]") { TestCase_RenderLegend(L"PNG8", L"png"); }
+TEST_CASE("RenderLegendEmptyGroupsPNG8", "[RenderingService]") { TestCase_RenderLegendEmptyGroups(L"PNG8", L"png"); }
+TEST_CASE("SymbologyPointsPNG8", "[RenderingService]") { TestCase_SymbologyPoints(L"PNG8", L"png"); }
+TEST_CASE("SymbologyPointsParamPNG8", "[RenderingService]") { TestCase_SymbologyPointsParam(L"PNG8", L"png"); }
+TEST_CASE("SymbologyLinesPNG8", "[RenderingService]") { TestCase_SymbologyLines(L"PNG8", L"png"); }
+TEST_CASE("SymbologyLinesCrossTickPNG8", "[RenderingService]") { TestCase_SymbologyLinesCrossTick(L"PNG8", L"png"); }
+TEST_CASE("SymbologyPolygonsPNG8", "[RenderingService]") { TestCase_SymbologyPolygons(L"PNG8", L"png"); }
+TEST_CASE("Annotation1PNG8", "[RenderingService]") { TestCase_Annotation1(L"PNG8", L"png"); }
+TEST_CASE("Annotation2PNG8", "[RenderingService]") { TestCase_Annotation2(L"PNG8", L"png"); }
+TEST_CASE("Annotation3PNG8", "[RenderingService]") { TestCase_Annotation3(L"PNG8", L"png"); }
+TEST_CASE("RenderLegendMultiFTSPNG8", "[RenderingService]") { TestCase_RenderLegendMultiFTS(L"PNG8", L"png"); }
+TEST_CASE("RenderLegendMultiCTSPNG8", "[RenderingService]") { TestCase_RenderLegendMultiCTS(L"PNG8", L"png"); }
+TEST_CASE("RenderLegendMultiFTSWithThemePNG8", "[RenderingService]") { TestCase_RenderLegendMultiFTSWithTheme(L"PNG8", L"png"); }
+TEST_CASE("RenderLegendMultiCTSWithThemePNG8", "[RenderingService]") { TestCase_RenderLegendMultiCTSWithTheme(L"PNG8", L"png"); }
+TEST_CASE("RenderLegendMultiFTSSingleCTSPNG8", "[RenderingService]") { TestCase_RenderLegendMultiFTSSingleCTS(L"PNG8", L"png"); }
+TEST_CASE("RenderLegendSingleFTSMultiCTSPNG8", "[RenderingService]") { TestCase_RenderLegendSingleFTSMultiCTS(L"PNG8", L"png"); }
+TEST_CASE("StylizationFunctionsPNG8", "[RenderingService]") { TestCase_StylizationFunctions(L"PNG8", L"png"); }
+TEST_CASE("LayerWatermarkPNG8", "[RenderingService]") { TestCase_LayerWatermark(L"PNG8", L"png"); }
+
+//GIF output tests
+TEST_CASE("RenderDynamicOverlayGIF", "[RenderingService]") { TestCase_RenderDynamicOverlay(L"GIF", L"gif"); }
+TEST_CASE("RenderDynamicOverlayTiledMapGIF", "[RenderingService]") { TestCase_RenderDynamicOverlayTiledMap(L"GIF", L"gif"); }
+TEST_CASE("RenderMapGIF", "[RenderingService]") { TestCase_RenderMap(L"GIF", L"gif"); }
+TEST_CASE("RenderMapWithWatermarkGIF", "[RenderingService]") { TestCase_RenderMapWithWatermark(L"GIF", L"gif"); }
+TEST_CASE("RenderLegendGIF", "[RenderingService]") { TestCase_RenderLegend(L"GIF", L"gif"); }
+TEST_CASE("RenderLegendEmptyGroupsGIF", "[RenderingService]") { TestCase_RenderLegendEmptyGroups(L"GIF", L"gif"); }
+TEST_CASE("SymbologyPointsGIF", "[RenderingService]") { TestCase_SymbologyPoints(L"GIF", L"gif"); }
+TEST_CASE("SymbologyPointsParamGIF", "[RenderingService]") { TestCase_SymbologyPointsParam(L"GIF", L"gif"); }
+TEST_CASE("SymbologyLinesGIF", "[RenderingService]") { TestCase_SymbologyLines(L"GIF", L"gif"); }
+TEST_CASE("SymbologyLinesCrossTickGIF", "[RenderingService]") { TestCase_SymbologyLinesCrossTick(L"GIF", L"gif"); }
+TEST_CASE("SymbologyPolygonsGIF", "[RenderingService]") { TestCase_SymbologyPolygons(L"GIF", L"gif"); }
+TEST_CASE("Annotation1GIF", "[RenderingService]") { TestCase_Annotation1(L"GIF", L"gif"); }
+TEST_CASE("Annotation2GIF", "[RenderingService]") { TestCase_Annotation2(L"GIF", L"gif"); }
+TEST_CASE("Annotation3GIF", "[RenderingService]") { TestCase_Annotation3(L"GIF", L"gif"); }
+TEST_CASE("RenderLegendMultiFTSGIF", "[RenderingService]") { TestCase_RenderLegendMultiFTS(L"GIF", L"gif"); }
+TEST_CASE("RenderLegendMultiCTSGIF", "[RenderingService]") { TestCase_RenderLegendMultiCTS(L"GIF", L"gif"); }
+TEST_CASE("RenderLegendMultiFTSWithThemeGIF", "[RenderingService]") { TestCase_RenderLegendMultiFTSWithTheme(L"GIF", L"gif"); }
+TEST_CASE("RenderLegendMultiCTSWithThemeGIF", "[RenderingService]") { TestCase_RenderLegendMultiCTSWithTheme(L"GIF", L"gif"); }
+TEST_CASE("RenderLegendMultiFTSSingleCTSGIF", "[RenderingService]") { TestCase_RenderLegendMultiFTSSingleCTS(L"GIF", L"gif"); }
+TEST_CASE("RenderLegendSingleFTSMultiCTSGIF", "[RenderingService]") { TestCase_RenderLegendSingleFTSMultiCTS(L"GIF", L"gif"); }
+TEST_CASE("StylizationFunctionsGIF", "[RenderingService]") { TestCase_StylizationFunctions(L"GIF", L"gif"); }
+TEST_CASE("LayerWatermarkGIF", "[RenderingService]") { TestCase_LayerWatermark(L"GIF", L"gif"); }
+
+//JPG output tests
+TEST_CASE("RenderDynamicOverlayJPG", "[RenderingService]") { TestCase_RenderDynamicOverlay(L"JPG", L"jpg"); }
+TEST_CASE("RenderDynamicOverlayTiledMapJPG", "[RenderingService]") { TestCase_RenderDynamicOverlayTiledMap(L"JPG", L"jpg"); }
+TEST_CASE("RenderMapJPG", "[RenderingService]") { TestCase_RenderMap(L"JPG", L"jpg"); }
+TEST_CASE("RenderMapWithWatermarkJPG", "[RenderingService]") { TestCase_RenderMapWithWatermark(L"JPG", L"jpg"); }
+TEST_CASE("RenderLegendJPG", "[RenderingService]") { TestCase_RenderLegend(L"JPG", L"jpg"); }
+TEST_CASE("RenderLegendEmptyGroupsJPG", "[RenderingService]") { TestCase_RenderLegendEmptyGroups(L"JPG", L"jpg"); }
+TEST_CASE("SymbologyPointsJPG", "[RenderingService]") { TestCase_SymbologyPoints(L"JPG", L"jpg"); }
+TEST_CASE("SymbologyPointsParamJPG", "[RenderingService]") { TestCase_SymbologyPointsParam(L"JPG", L"jpg"); }
+TEST_CASE("SymbologyLinesJPG", "[RenderingService]") { TestCase_SymbologyLines(L"JPG", L"jpg"); }
+TEST_CASE("SymbologyLinesCrossTickJPG", "[RenderingService]") { TestCase_SymbologyLinesCrossTick(L"JPG", L"jpg"); }
+TEST_CASE("SymbologyPolygonsJPG", "[RenderingService]") { TestCase_SymbologyPolygons(L"JPG", L"jpg"); }
+TEST_CASE("Annotation1JPG", "[RenderingService]") { TestCase_Annotation1(L"JPG", L"jpg"); }
+TEST_CASE("Annotation2JPG", "[RenderingService]") { TestCase_Annotation2(L"JPG", L"jpg"); }
+TEST_CASE("Annotation3JPG", "[RenderingService]") { TestCase_Annotation3(L"JPG", L"jpg"); }
+TEST_CASE("RenderLegendMultiFTSJPG", "[RenderingService]") { TestCase_RenderLegendMultiFTS(L"JPG", L"jpg"); }
+TEST_CASE("RenderLegendMultiCTSJPG", "[RenderingService]") { TestCase_RenderLegendMultiCTS(L"JPG", L"jpg"); }
+TEST_CASE("RenderLegendMultiFTSWithThemeJPG", "[RenderingService]") { TestCase_RenderLegendMultiFTSWithTheme(L"JPG", L"jpg"); }
+TEST_CASE("RenderLegendMultiCTSWithThemeJPG", "[RenderingService]") { TestCase_RenderLegendMultiCTSWithTheme(L"JPG", L"jpg"); }
+TEST_CASE("RenderLegendMultiFTSSingleCTSJPG", "[RenderingService]") { TestCase_RenderLegendMultiFTSSingleCTS(L"JPG", L"jpg"); }
+TEST_CASE("RenderLegendSingleFTSMultiCTSJPG", "[RenderingService]") { TestCase_RenderLegendSingleFTSMultiCTS(L"JPG", L"jpg"); }
+TEST_CASE("StylizationFunctionsJPG", "[RenderingService]") { TestCase_StylizationFunctions(L"JPG", L"jpg"); }
+TEST_CASE("LayerWatermarkJPG", "[RenderingService]") { TestCase_LayerWatermark(L"JPG", L"jpg"); }
\ No newline at end of file

Deleted: trunk/MgDev/Desktop/UnitTest/TestRenderingService.h
===================================================================
--- trunk/MgDev/Desktop/UnitTest/TestRenderingService.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/UnitTest/TestRenderingService.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,289 +0,0 @@
-//
-//  Copyright (C) 2004-2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _TESTRENDERINGSERVICE_H
-#define _TESTRENDERINGSERVICE_H
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestRenderingService : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestRenderingService);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_StylizationFunctionsPNG);
-
-    CPPUNIT_TEST(TestCase_SymbologyPointsPNG);
-    CPPUNIT_TEST(TestCase_SymbologyPointsParamPNG);
-    CPPUNIT_TEST(TestCase_SymbologyLinesPNG);
-    CPPUNIT_TEST(TestCase_SymbologyLinesCrossTickPNG);
-    CPPUNIT_TEST(TestCase_SymbologyPolygonsPNG);
-
-    CPPUNIT_TEST(TestCase_Annotation1PNG);
-    CPPUNIT_TEST(TestCase_Annotation2PNG);
-    CPPUNIT_TEST(TestCase_Annotation3PNG);
-
-    CPPUNIT_TEST(TestCase_RenderDynamicOverlayPNG);
-    CPPUNIT_TEST(TestCase_RenderDynamicOverlayTiledMapPNG);
-    CPPUNIT_TEST(TestCase_RenderMapPNG);
-    CPPUNIT_TEST(TestCase_RenderMapWithWatermarkPNG);
-    CPPUNIT_TEST(TestCase_RenderLegendPNG);
-    CPPUNIT_TEST(TestCase_RenderLegendEmptyGroupsPNG);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiFTSPNG);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiCTSPNG);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiFTSWithThemePNG);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiCTSWithThemePNG);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiFTSSingleCTSPNG);
-    CPPUNIT_TEST(TestCase_RenderLegendSingleFTSMultiCTSPNG);
-    CPPUNIT_TEST(TestCase_LayerWatermarkPNG);
-
-    CPPUNIT_TEST(TestCase_StylizationFunctionsPNG8);
-
-	CPPUNIT_TEST(TestCase_SymbologyPointsPNG8);
-    CPPUNIT_TEST(TestCase_SymbologyPointsParamPNG8);
-    CPPUNIT_TEST(TestCase_SymbologyLinesPNG8);
-    CPPUNIT_TEST(TestCase_SymbologyLinesCrossTickPNG8);
-    CPPUNIT_TEST(TestCase_SymbologyPolygonsPNG8);
-
-    CPPUNIT_TEST(TestCase_Annotation1PNG8);
-    CPPUNIT_TEST(TestCase_Annotation2PNG8);
-    CPPUNIT_TEST(TestCase_Annotation3PNG8);
-
-    CPPUNIT_TEST(TestCase_RenderDynamicOverlayPNG8);
-    CPPUNIT_TEST(TestCase_RenderDynamicOverlayTiledMapPNG8);
-    CPPUNIT_TEST(TestCase_RenderMapPNG8);
-    CPPUNIT_TEST(TestCase_RenderMapWithWatermarkPNG8);
-    CPPUNIT_TEST(TestCase_RenderLegendPNG8);
-    CPPUNIT_TEST(TestCase_RenderLegendEmptyGroupsPNG8);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiFTSPNG8);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiCTSPNG8);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiFTSWithThemePNG8);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiCTSWithThemePNG8);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiFTSSingleCTSPNG8);
-    CPPUNIT_TEST(TestCase_RenderLegendSingleFTSMultiCTSPNG8);
-    CPPUNIT_TEST(TestCase_LayerWatermarkPNG8);
-
-    CPPUNIT_TEST(TestCase_StylizationFunctionsGIF);
-
-	CPPUNIT_TEST(TestCase_SymbologyPointsGIF);
-    CPPUNIT_TEST(TestCase_SymbologyPointsParamGIF);
-    CPPUNIT_TEST(TestCase_SymbologyLinesGIF);
-    CPPUNIT_TEST(TestCase_SymbologyLinesCrossTickGIF);
-    CPPUNIT_TEST(TestCase_SymbologyPolygonsGIF);
-
-    CPPUNIT_TEST(TestCase_Annotation1GIF);
-    CPPUNIT_TEST(TestCase_Annotation2GIF);
-    CPPUNIT_TEST(TestCase_Annotation3GIF);
-
-    CPPUNIT_TEST(TestCase_RenderDynamicOverlayGIF);
-    CPPUNIT_TEST(TestCase_RenderDynamicOverlayTiledMapGIF);
-    CPPUNIT_TEST(TestCase_RenderMapGIF);
-    CPPUNIT_TEST(TestCase_RenderMapWithWatermarkGIF);
-    CPPUNIT_TEST(TestCase_RenderLegendGIF);
-    CPPUNIT_TEST(TestCase_RenderLegendEmptyGroupsGIF);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiFTSGIF);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiCTSGIF);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiFTSWithThemeGIF);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiCTSWithThemeGIF);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiFTSSingleCTSGIF);
-    CPPUNIT_TEST(TestCase_RenderLegendSingleFTSMultiCTSGIF);
-    CPPUNIT_TEST(TestCase_LayerWatermarkGIF);
-
-    CPPUNIT_TEST(TestCase_StylizationFunctionsJPG);
-
-	CPPUNIT_TEST(TestCase_SymbologyPointsJPG);
-    CPPUNIT_TEST(TestCase_SymbologyPointsParamJPG);
-    CPPUNIT_TEST(TestCase_SymbologyLinesJPG);
-    CPPUNIT_TEST(TestCase_SymbologyLinesCrossTickJPG);
-    CPPUNIT_TEST(TestCase_SymbologyPolygonsJPG);
-
-    CPPUNIT_TEST(TestCase_Annotation1JPG);
-    CPPUNIT_TEST(TestCase_Annotation2JPG);
-    CPPUNIT_TEST(TestCase_Annotation3JPG);
-
-    CPPUNIT_TEST(TestCase_RenderDynamicOverlayJPG);
-    CPPUNIT_TEST(TestCase_RenderDynamicOverlayTiledMapJPG);
-    CPPUNIT_TEST(TestCase_RenderMapJPG);
-    CPPUNIT_TEST(TestCase_RenderMapWithWatermarkJPG);
-    CPPUNIT_TEST(TestCase_RenderLegendJPG);
-    CPPUNIT_TEST(TestCase_RenderLegendEmptyGroupsJPG);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiFTSJPG);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiCTSJPG);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiFTSWithThemeJPG);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiCTSWithThemeJPG);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiFTSSingleCTSJPG);
-    CPPUNIT_TEST(TestCase_RenderLegendSingleFTSMultiCTSJPG);
-    CPPUNIT_TEST(TestCase_LayerWatermarkJPG);
-
-    CPPUNIT_TEST(TestCase_QueryFeatures);
-
-    //CPPUNIT_TEST(TestCase_RendererPerformance);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    TestRenderingService();
-    ~TestRenderingService();
-
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    void TestCase_QueryFeatures();
-
-    //Parameterized versions that all format-specific tests call into
-    void TestCase_RenderDynamicOverlay(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_RenderDynamicOverlayTiledMap(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_RenderMap(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_RenderMapWithWatermark(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_RenderLegend(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_RenderLegendEmptyGroups(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_RenderLegendMultiFTS(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_RenderLegendMultiCTS(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_RenderLegendMultiFTSWithTheme(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_RenderLegendMultiCTSWithTheme(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_RenderLegendMultiFTSSingleCTS(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_RenderLegendSingleFTSMultiCTS(CREFSTRING imageFormat, CREFSTRING extension);
-    
-    void TestCase_LayerWatermark(CREFSTRING imageFormat, CREFSTRING extension);
-
-    void TestCase_SymbologyPoints(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_SymbologyPointsParam(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_SymbologyLines(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_SymbologyLinesCrossTick(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_SymbologyPolygons(CREFSTRING imageFormat, CREFSTRING extension);
-
-    void TestCase_Annotation1(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_Annotation2(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_Annotation3(CREFSTRING imageFormat, CREFSTRING extension);
-
-    void TestCase_StylizationFunctions(CREFSTRING imageFormat, CREFSTRING extension);
-
-    //PNG output tests
-    void TestCase_RenderDynamicOverlayPNG() { TestCase_RenderDynamicOverlay(L"PNG", L"png"); }
-    void TestCase_RenderDynamicOverlayTiledMapPNG() { TestCase_RenderDynamicOverlayTiledMap(L"PNG", L"png"); }
-    void TestCase_RenderMapPNG() { TestCase_RenderMap(L"PNG", L"png"); }
-    void TestCase_RenderMapWithWatermarkPNG() { TestCase_RenderMapWithWatermark(L"PNG", L"png"); }
-    void TestCase_RenderLegendPNG() { TestCase_RenderLegend(L"PNG", L"png"); }
-    void TestCase_RenderLegendEmptyGroupsPNG() { TestCase_RenderLegendEmptyGroups(L"PNG", L"png"); }
-    void TestCase_SymbologyPointsPNG() { TestCase_SymbologyPoints(L"PNG", L"png"); }
-    void TestCase_SymbologyPointsParamPNG() { TestCase_SymbologyPointsParam(L"PNG", L"png"); }
-    void TestCase_SymbologyLinesPNG() { TestCase_SymbologyLines(L"PNG", L"png"); }
-    void TestCase_SymbologyLinesCrossTickPNG() { TestCase_SymbologyLinesCrossTick(L"PNG", L"png"); }
-    void TestCase_SymbologyPolygonsPNG() { TestCase_SymbologyPolygons(L"PNG", L"png"); }
-    void TestCase_Annotation1PNG() { TestCase_Annotation1(L"PNG", L"png"); }
-    void TestCase_Annotation2PNG() { TestCase_Annotation2(L"PNG", L"png"); }
-    void TestCase_Annotation3PNG() { TestCase_Annotation3(L"PNG", L"png"); }
-    void TestCase_RenderLegendMultiFTSPNG() { TestCase_RenderLegendMultiFTS(L"PNG", L"png"); }
-    void TestCase_RenderLegendMultiCTSPNG() { TestCase_RenderLegendMultiCTS(L"PNG", L"png"); }
-    void TestCase_RenderLegendMultiFTSWithThemePNG() { TestCase_RenderLegendMultiFTSWithTheme(L"PNG", L"png"); }
-    void TestCase_RenderLegendMultiCTSWithThemePNG() { TestCase_RenderLegendMultiCTSWithTheme(L"PNG", L"png"); }
-    void TestCase_RenderLegendMultiFTSSingleCTSPNG() { TestCase_RenderLegendMultiFTSSingleCTS(L"PNG", L"png"); }
-    void TestCase_RenderLegendSingleFTSMultiCTSPNG() { TestCase_RenderLegendSingleFTSMultiCTS(L"PNG", L"png"); }
-    void TestCase_StylizationFunctionsPNG() { TestCase_StylizationFunctions(L"PNG", L"png"); }
-    void TestCase_LayerWatermarkPNG() { TestCase_LayerWatermark(L"PNG", L"png"); }
-
-    //PNG8 output tests
-    void TestCase_RenderDynamicOverlayPNG8() { TestCase_RenderDynamicOverlay(L"PNG8", L"png"); }
-    void TestCase_RenderDynamicOverlayTiledMapPNG8() { TestCase_RenderDynamicOverlayTiledMap(L"PNG8", L"png"); }
-    void TestCase_RenderMapPNG8() { TestCase_RenderMap(L"PNG8", L"png"); }
-    void TestCase_RenderMapWithWatermarkPNG8() { TestCase_RenderMapWithWatermark(L"PNG8", L"png"); }
-    void TestCase_RenderLegendPNG8() { TestCase_RenderLegend(L"PNG8", L"png"); }
-    void TestCase_RenderLegendEmptyGroupsPNG8() { TestCase_RenderLegendEmptyGroups(L"PNG8", L"png"); }
-    void TestCase_SymbologyPointsPNG8() { TestCase_SymbologyPoints(L"PNG8", L"png"); }
-    void TestCase_SymbologyPointsParamPNG8() { TestCase_SymbologyPointsParam(L"PNG8", L"png"); }
-    void TestCase_SymbologyLinesPNG8() { TestCase_SymbologyLines(L"PNG8", L"png"); }
-    void TestCase_SymbologyLinesCrossTickPNG8() { TestCase_SymbologyLinesCrossTick(L"PNG8", L"png"); }
-    void TestCase_SymbologyPolygonsPNG8() { TestCase_SymbologyPolygons(L"PNG8", L"png"); }
-    void TestCase_Annotation1PNG8() { TestCase_Annotation1(L"PNG8", L"png"); }
-    void TestCase_Annotation2PNG8() { TestCase_Annotation2(L"PNG8", L"png"); }
-    void TestCase_Annotation3PNG8() { TestCase_Annotation3(L"PNG8", L"png"); }
-    void TestCase_RenderLegendMultiFTSPNG8() { TestCase_RenderLegendMultiFTS(L"PNG8", L"png"); }
-    void TestCase_RenderLegendMultiCTSPNG8() { TestCase_RenderLegendMultiCTS(L"PNG8", L"png"); }
-    void TestCase_RenderLegendMultiFTSWithThemePNG8() { TestCase_RenderLegendMultiFTSWithTheme(L"PNG8", L"png"); }
-    void TestCase_RenderLegendMultiCTSWithThemePNG8() { TestCase_RenderLegendMultiCTSWithTheme(L"PNG8", L"png"); }
-    void TestCase_RenderLegendMultiFTSSingleCTSPNG8() { TestCase_RenderLegendMultiFTSSingleCTS(L"PNG8", L"png"); }
-    void TestCase_RenderLegendSingleFTSMultiCTSPNG8() { TestCase_RenderLegendSingleFTSMultiCTS(L"PNG8", L"png"); }
-    void TestCase_StylizationFunctionsPNG8() { TestCase_StylizationFunctions(L"PNG8", L"png"); }
-    void TestCase_LayerWatermarkPNG8() { TestCase_LayerWatermark(L"PNG8", L"png"); }
-
-    //GIF output tests
-    void TestCase_RenderDynamicOverlayGIF() { TestCase_RenderDynamicOverlay(L"GIF", L"gif"); }
-    void TestCase_RenderDynamicOverlayTiledMapGIF() { TestCase_RenderDynamicOverlayTiledMap(L"GIF", L"gif"); }
-    void TestCase_RenderMapGIF() { TestCase_RenderMap(L"GIF", L"gif"); }
-    void TestCase_RenderMapWithWatermarkGIF() { TestCase_RenderMapWithWatermark(L"GIF", L"gif"); }
-    void TestCase_RenderLegendGIF() { TestCase_RenderLegend(L"GIF", L"gif"); }
-    void TestCase_RenderLegendEmptyGroupsGIF() { TestCase_RenderLegendEmptyGroups(L"GIF", L"gif"); }
-    void TestCase_SymbologyPointsGIF() { TestCase_SymbologyPoints(L"GIF", L"gif"); }
-    void TestCase_SymbologyPointsParamGIF() { TestCase_SymbologyPointsParam(L"GIF", L"gif"); }
-    void TestCase_SymbologyLinesGIF() { TestCase_SymbologyLines(L"GIF", L"gif"); }
-    void TestCase_SymbologyLinesCrossTickGIF() { TestCase_SymbologyLinesCrossTick(L"GIF", L"gif"); }
-    void TestCase_SymbologyPolygonsGIF() { TestCase_SymbologyPolygons(L"GIF", L"gif"); }
-    void TestCase_Annotation1GIF() { TestCase_Annotation1(L"GIF", L"gif"); }
-    void TestCase_Annotation2GIF() { TestCase_Annotation2(L"GIF", L"gif"); }
-    void TestCase_Annotation3GIF() { TestCase_Annotation3(L"GIF", L"gif"); }
-    void TestCase_RenderLegendMultiFTSGIF() { TestCase_RenderLegendMultiFTS(L"GIF", L"gif"); }
-    void TestCase_RenderLegendMultiCTSGIF() { TestCase_RenderLegendMultiCTS(L"GIF", L"gif"); }
-    void TestCase_RenderLegendMultiFTSWithThemeGIF() { TestCase_RenderLegendMultiFTSWithTheme(L"GIF", L"gif"); }
-    void TestCase_RenderLegendMultiCTSWithThemeGIF() { TestCase_RenderLegendMultiCTSWithTheme(L"GIF", L"gif"); }
-    void TestCase_RenderLegendMultiFTSSingleCTSGIF() { TestCase_RenderLegendMultiFTSSingleCTS(L"GIF", L"gif"); }
-    void TestCase_RenderLegendSingleFTSMultiCTSGIF() { TestCase_RenderLegendSingleFTSMultiCTS(L"GIF", L"gif"); }
-    void TestCase_StylizationFunctionsGIF() { TestCase_StylizationFunctions(L"GIF", L"gif"); }
-    void TestCase_LayerWatermarkGIF() { TestCase_LayerWatermark(L"GIF", L"gif"); }
-
-    //JPG output tests
-    void TestCase_RenderDynamicOverlayJPG() { TestCase_RenderDynamicOverlay(L"JPG", L"jpg"); }
-    void TestCase_RenderDynamicOverlayTiledMapJPG() { TestCase_RenderDynamicOverlayTiledMap(L"JPG", L"jpg"); }
-    void TestCase_RenderMapJPG() { TestCase_RenderMap(L"JPG", L"jpg"); }
-    void TestCase_RenderMapWithWatermarkJPG() { TestCase_RenderMapWithWatermark(L"JPG", L"jpg"); }
-    void TestCase_RenderLegendJPG() { TestCase_RenderLegend(L"JPG", L"jpg"); }
-    void TestCase_RenderLegendEmptyGroupsJPG() { TestCase_RenderLegendEmptyGroups(L"JPG", L"jpg"); }
-    void TestCase_SymbologyPointsJPG() { TestCase_SymbologyPoints(L"JPG", L"jpg"); }
-    void TestCase_SymbologyPointsParamJPG() { TestCase_SymbologyPointsParam(L"JPG", L"jpg"); }
-    void TestCase_SymbologyLinesJPG() { TestCase_SymbologyLines(L"JPG", L"jpg"); }
-    void TestCase_SymbologyLinesCrossTickJPG() { TestCase_SymbologyLinesCrossTick(L"JPG", L"jpg"); }
-    void TestCase_SymbologyPolygonsJPG() { TestCase_SymbologyPolygons(L"JPG", L"jpg"); }
-    void TestCase_Annotation1JPG() { TestCase_Annotation1(L"JPG", L"jpg"); }
-    void TestCase_Annotation2JPG() { TestCase_Annotation2(L"JPG", L"jpg"); }
-    void TestCase_Annotation3JPG() { TestCase_Annotation3(L"JPG", L"jpg"); }
-    void TestCase_RenderLegendMultiFTSJPG() { TestCase_RenderLegendMultiFTS(L"JPG", L"jpg"); }
-    void TestCase_RenderLegendMultiCTSJPG() { TestCase_RenderLegendMultiCTS(L"JPG", L"jpg"); }
-    void TestCase_RenderLegendMultiFTSWithThemeJPG() { TestCase_RenderLegendMultiFTSWithTheme(L"JPG", L"jpg"); }
-    void TestCase_RenderLegendMultiCTSWithThemeJPG() { TestCase_RenderLegendMultiCTSWithTheme(L"JPG", L"jpg"); }
-    void TestCase_RenderLegendMultiFTSSingleCTSJPG() { TestCase_RenderLegendMultiFTSSingleCTS(L"JPG", L"jpg"); }
-    void TestCase_RenderLegendSingleFTSMultiCTSJPG() { TestCase_RenderLegendSingleFTSMultiCTS(L"JPG", L"jpg"); }
-    void TestCase_StylizationFunctionsJPG() { TestCase_StylizationFunctions(L"JPG", L"jpg"); }
-    void TestCase_LayerWatermarkJPG() { TestCase_LayerWatermark(L"JPG", L"jpg"); }
-
-    //void TestCase_RendererPerformance();
-
-private:
-    MgdMap* CreateTestMap();
-    MgdMap* CreateTestTiledMap();
-    MgdMap* CreateTestStylizationFunctionMap();
-    MgdMap* CreateTestMapWithWatermark();
-    MgPolygon* CreateSelectionPolygon(MgdMap* map, double width, double height);
-    static STRING GetPath(CREFSTRING basePath, CREFSTRING imageFormat, CREFSTRING extension);
-
-private:
-    Ptr<MgResourceService> m_svcResource;
-    Ptr<MgdRenderingService> m_svcRendering;
-};
-
-#endif // _TESTRENDERINGSERVICE_H

Modified: trunk/MgDev/Desktop/UnitTest/TestResourceService.cpp
===================================================================
--- trunk/MgDev/Desktop/UnitTest/TestResourceService.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/UnitTest/TestResourceService.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -18,11 +18,11 @@
 #include "MgDesktop.h"
 #include "Services/Resource/ResourceContentCache.h"
 #include "Fdo.h"
-#include "TestResourceService.h"
-#include "CppUnitExtensions.h"
 #include <ctime>
 
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestResourceService, "TestResourceService");
+#include "CatchHelperMacros.h"
+#include "TestServiceFactory.h"
+#include "catch.hpp"
 
 // define thread group for tiling tests
 #define THREAD_GROUP 65530
@@ -66,87 +66,12 @@
 STRING packageName = L"../UnitTestFiles/Shuttle.zip";
 #endif
 
-void TestResourceService::setUp()
-{
-}
-
-void TestResourceService::tearDown()
-{
-}
-
-void TestResourceService::TestStart()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Resource Service tests.\n")));
-
-    Ptr<MgdServiceFactory> fact = new MgdServiceFactory();
-    Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
-    if (pService == 0)
-    {
-        throw new MgServiceNotAvailableException(L"TestResourceService.TestEnd", __LINE__, __WFILE__, NULL, L"", NULL);
-    }
-
-    Ptr<MgResourceIdentifier> fs1 = new MgResourceIdentifier(L"Library://UnitTests/Data/acea.FeatureSource");
-    Ptr<MgByteSource> fs1Source = new MgByteSource(L"../UnitTestFiles/acea.fs", false);
-    Ptr<MgByteReader> fs1Reader = fs1Source->GetReader();
-    pService->SetResource(fs1, fs1Reader, NULL);
-
-    Ptr<MgByteSource> confSource = new MgByteSource(L"../UnitTestFiles/config.xml", false);
-    Ptr<MgByteReader> confReader = confSource->GetReader();
-    pService->SetResourceData(fs1, L"config.xml", MgResourceDataType::File, confReader);
-}
-
-void TestResourceService::TestEnd()
-{
-    try
-    {
-        Ptr<MgdServiceFactory> fact = new MgdServiceFactory();
-        Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
-        if (pService == 0)
-        {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestEnd", __LINE__, __WFILE__, NULL, L"", NULL);
-        }
-
-        // delete the drawing source definition
-        Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/Shuttle.DrawingSource");
-        pService->DeleteResource(mapres1);
-
-        Ptr<MgResourceIdentifier> fs1 = new MgResourceIdentifier(L"Library://UnitTests/Data/acea.FeatureSource");
-        pService->DeleteResource(fs1);
-
-        // Delete any resources created
-        if (pService->ResourceExists(&resourceIdentifier))
-            pService->DeleteResource(&resourceIdentifier);
-        
-        if (pService->ResourceExists(&resourceIdentifier2))
-            pService->DeleteResource(&resourceIdentifier2);
-
-        if (pService->ResourceExists(&resourceIdentifier3))
-            pService->DeleteResource(&resourceIdentifier3);
-
-        if (pService->ResourceExists(&resourceIdentifier4))
-            pService->DeleteResource(&resourceIdentifier4);
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nResource Service tests completed.\n\n")));
-}
-
-
 ///----------------------------------------------------------------------------
 /// Test Case Description:
 ///
 /// This test case enumerates the repositories.
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_EnumerateRepositories()
+TEST_CASE("EnumerateRepositories", "[ResourceService]")
 {
     try
     {
@@ -154,16 +79,16 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_EnumerateRepositories", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_EnumerateRepositories", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
-        CPPUNIT_ASSERT_THROW_MG(pService->EnumerateRepositories(L"Library"), MgNotImplementedException*);
+        REQUIRE_THROWS_MG(pService->EnumerateRepositories(L"Library"), MgNotImplementedException*);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -172,7 +97,7 @@
 ///
 /// This test case creates a new repository
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_CreateRepository()
+TEST_CASE("CreateRepository", "[ResourceService]")
 {
     try
     {
@@ -180,16 +105,16 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_CreateRepository", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_CreateRepository", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
-        CPPUNIT_ASSERT_THROW_MG(pService->CreateRepository(NULL, NULL, NULL), MgNotImplementedException*);
+        REQUIRE_THROWS_MG(pService->CreateRepository(nullptr, nullptr, nullptr), MgNotImplementedException*);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -198,7 +123,7 @@
 ///
 /// This test case updates the repository that was created earlier
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_UpdateRepository()
+TEST_CASE("UpdateRepository", "[ResourceService]")
 {
     try
     {
@@ -206,16 +131,16 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_UpdateRepository", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_UpdateRepository", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
-        CPPUNIT_ASSERT_THROW_MG(pService->UpdateRepository(NULL, NULL, NULL), MgNotImplementedException*);
+        REQUIRE_THROWS_MG(pService->UpdateRepository(nullptr, nullptr, nullptr), MgNotImplementedException*);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -224,7 +149,7 @@
 ///
 /// This test case gets the content of the repository created earlier
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_GetRepositoryContent()
+TEST_CASE("GetRepositoryContent", "[ResourceService]")
 {
     try
     {
@@ -232,16 +157,16 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_GetRepositoryContent", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_GetRepositoryContent", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
         
-        CPPUNIT_ASSERT_THROW_MG(pService->GetRepositoryContent(NULL), MgNotImplementedException*);
+        REQUIRE_THROWS_MG(pService->GetRepositoryContent(nullptr), MgNotImplementedException*);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -250,7 +175,7 @@
 ///
 /// This test case gets the header of the Library:// repository
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_GetRepositoryHeader()
+TEST_CASE("GetRepositoryHeader", "[ResourceService]")
 {
     try
     {
@@ -258,17 +183,17 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_GetRepositoryHeader", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_GetRepositoryHeader", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
-        //Try to get repository header using a NULL argument
-        CPPUNIT_ASSERT_THROW_MG(pService->GetRepositoryHeader(NULL), MgNotImplementedException*);
+        //Try to get repository header using a nullptr argument
+        REQUIRE_THROWS_MG(pService->GetRepositoryHeader(nullptr), MgNotImplementedException*);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -277,7 +202,7 @@
 ///
 /// This test case applies a resource package
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_ApplyResourcePackage()
+TEST_CASE("ApplyResourcePackage", "[ResourceService]")
 {
     try
     {
@@ -285,11 +210,11 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_ApplyResourcePackage", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_ApplyResourcePackage", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
-        //Try using NULL argument
-        CPPUNIT_ASSERT_THROW_MG(pService->ApplyResourcePackage(NULL), MgNullArgumentException*);
+        //Try using nullptr argument
+        REQUIRE_THROWS_MG(pService->ApplyResourcePackage(nullptr), MgNullArgumentException*);
 
         //Not try the real thing
         Ptr<MgByteSource> byteSource = new MgByteSource(packageName);
@@ -300,9 +225,9 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -312,7 +237,7 @@
 ///
 /// This test case deletes the repository created earlier
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_DeleteRepository()
+TEST_CASE("DeleteRepository", "[ResourceService]")
 {
     try
     {
@@ -320,16 +245,16 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_DeleteRepository", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_DeleteRepository", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
-        CPPUNIT_ASSERT_THROW_MG(pService->DeleteRepository(NULL), MgNotImplementedException*);
+        REQUIRE_THROWS_MG(pService->DeleteRepository(nullptr), MgNotImplementedException*);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -338,7 +263,7 @@
 ///
 /// This test case checks to see if the specified resource exists.
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_ResourceExists()
+TEST_CASE("ResourceExists", "[ResourceService]")
 {
     try
     {
@@ -345,30 +270,30 @@
         Ptr<MgdServiceFactory> fact = new MgdServiceFactory();
         Ptr<MgResourceService> service = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
 
-        if (NULL == service)
+        if (nullptr == service)
         {
             throw new MgServiceNotAvailableException(
                 L"TestResourceService.TestCase_ResourceExists",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
-        // Try to check a NULL resource.
+        // Try to check a nullptr resource.
         bool existed = false;
-        CPPUNIT_ASSERT_THROW_MG(service->ResourceExists(NULL), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(service->ResourceExists(nullptr), MgNullArgumentException*);
 
         // Try to check a resource that exists
         existed = service->ResourceExists(&libraryRepositoryIdentifier);
-        CPPUNIT_ASSERT(existed);
+        REQUIRE(existed);
 
         // Try to check a resource that does not exist.
         existed = service->ResourceExists(&resourceNotExist);
-        CPPUNIT_ASSERT(!existed);
+        REQUIRE(!existed);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -377,7 +302,7 @@
 ///
 /// This test case enumerates the resources in Library://
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_EnumerateResources()
+TEST_CASE("EnumerateResources", "[ResourceService]")
 {
     try
     {
@@ -385,22 +310,22 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_EnumerateResources", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_EnumerateResources", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
-        //Try to enumerate resources using a NULL argument
-        CPPUNIT_ASSERT_THROW_MG(pService->EnumerateResources(NULL, -1, L"", true), MgNullArgumentException*);
+        //Try to enumerate resources using a nullptr argument
+        REQUIRE_THROWS_MG(pService->EnumerateResources(nullptr, -1, L"", true), MgNullArgumentException*);
 
         // Enumerate the Library resource.
         Ptr<MgByteReader> byteReader = pService->EnumerateResources(&libraryRepositoryIdentifier, -1, L"", true);
         STRING mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 ///----------------------------------------------------------------------------
@@ -409,7 +334,7 @@
 /// This test case uses the SetResource function to add and update
 /// a resource
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_SetResource()
+TEST_CASE("SetResource", "[ResourceService]")
 {
     try
     {
@@ -417,40 +342,40 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_SetResource", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_SetResource", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgByteSource> contentSource;
-        contentSource = NULL;
+        contentSource = nullptr;
 
-        //Try to use NULL arguments
-        CPPUNIT_ASSERT_THROW_MG(pService->SetResource(NULL, NULL, NULL), MgNullArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->SetResource(&resourceIdentifier, NULL, NULL), MgNullArgumentException*);
+        //Try to use nullptr arguments
+        REQUIRE_THROWS_MG(pService->SetResource(nullptr, nullptr, nullptr), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->SetResource(&resourceIdentifier, nullptr, nullptr), MgNullArgumentException*);
 
         //Add a new resource
         contentSource = new MgByteSource(resourceContentFileName);
         Ptr<MgByteReader> contentReader = contentSource->GetReader();
-        pService->SetResource(&resourceIdentifier, contentReader, NULL);
+        pService->SetResource(&resourceIdentifier, contentReader, nullptr);
 
         //Try to add the same resource again (should be fine and just update it)
         contentSource = new MgByteSource(resourceContentFileName);
         contentReader = contentSource->GetReader();
-        pService->SetResource(&resourceIdentifier, contentReader, NULL);
+        pService->SetResource(&resourceIdentifier, contentReader, nullptr);
 
         //Add another resource layer definition, which references to the feature source. This is for cascade MoveResource test.
         contentSource = new MgByteSource(resourceContentFileName2);
         contentReader = contentSource->GetReader();
-        pService->SetResource(&resourceIdentifier4, contentReader, NULL);
+        pService->SetResource(&resourceIdentifier4, contentReader, nullptr);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
-void TestResourceService::TestCase_SetResourceInvalid()
+TEST_CASE("SetResourceInvalid", "[ResourceService]")
 {
     try
     {
@@ -458,7 +383,7 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_MoveResource", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_MoveResource", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         std::string notXml = "Not XML content";
@@ -496,28 +421,28 @@
         //TODO: We can get xerces to vet the content as being XML, but can't figure out how to get xerces
         //to validate the content model. Until we figure that out, the relevant assertions are commented
         //out. Still at this stage it's better than letting any arbitrary content get through these calls.
-        CPPUNIT_ASSERT_THROW_MG(pService->SetResource(resId, r1, NULL), MgXmlParserException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->SetResource(resId, r2, NULL), MgXmlParserException*);
-        //CPPUNIT_ASSERT_THROW_MG(pService->SetResource(resId, r3, NULL), MgXmlParserException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->SetResource(ldfId, r3, NULL), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(pService->SetResource(resId, r1, nullptr), MgXmlParserException*);
+        REQUIRE_THROWS_MG(pService->SetResource(resId, r2, nullptr), MgXmlParserException*);
+        //REQUIRE_THROWS_MG(pService->SetResource(resId, r3, nullptr), MgXmlParserException*);
+        REQUIRE_THROWS_MG(pService->SetResource(ldfId, r3, nullptr), MgInvalidResourceTypeException*);
         r3->Rewind();
-        CPPUNIT_ASSERT_THROW_MG(pService->SetResource(mdfId, r3, NULL), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(pService->SetResource(mdfId, r3, nullptr), MgInvalidResourceTypeException*);
         r3->Rewind();
-        CPPUNIT_ASSERT_THROW_MG(pService->SetResource(pltId, r3, NULL), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(pService->SetResource(pltId, r3, nullptr), MgInvalidResourceTypeException*);
         r3->Rewind();
-        CPPUNIT_ASSERT_THROW_MG(pService->SetResource(symId, r3, NULL), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(pService->SetResource(symId, r3, nullptr), MgInvalidResourceTypeException*);
         r3->Rewind();
-        CPPUNIT_ASSERT_THROW_MG(pService->SetResource(slbId, r3, NULL), MgInvalidResourceTypeException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->SetResource(resId, r4, NULL), MgInvalidResourceTypeException*);
-        //CPPUNIT_ASSERT_THROW_MG(pService->SetResource(resId, r5, NULL), MgXmlParserException*);
-        pService->SetResource(ssId, r6, NULL);
-        pService->SetResource(csId, r7, NULL);
+        REQUIRE_THROWS_MG(pService->SetResource(slbId, r3, nullptr), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(pService->SetResource(resId, r4, nullptr), MgInvalidResourceTypeException*);
+        //REQUIRE_THROWS_MG(pService->SetResource(resId, r5, nullptr), MgXmlParserException*);
+        pService->SetResource(ssId, r6, nullptr);
+        pService->SetResource(csId, r7, nullptr);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -527,7 +452,7 @@
 /// This test case moves the resource that was created earlier to a new
 /// location
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_MoveResource()
+TEST_CASE("MoveResource", "[ResourceService]")
 {
     try
     {
@@ -535,24 +460,24 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_MoveResource", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_MoveResource", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
-        //Try to use NULL arguments
-        CPPUNIT_ASSERT_THROW_MG(pService->MoveResource(NULL, NULL, true, false), MgNullArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->MoveResource(&resourceIdentifier, NULL, true, true), MgNullArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->MoveResource(NULL, &resourceIdentifier, true, false), MgNullArgumentException*);
+        //Try to use nullptr arguments
+        REQUIRE_THROWS_MG(pService->MoveResource(nullptr, nullptr, true, false), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->MoveResource(&resourceIdentifier, nullptr, true, true), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->MoveResource(nullptr, &resourceIdentifier, true, false), MgNullArgumentException*);
 
         //Try to move a resource that doesn't exist
-        CPPUNIT_ASSERT_THROW_MG(pService->MoveResource(&resourceNotExist, &resourceIdentifier2, false, true), MgResourceNotFoundException*);
+        REQUIRE_THROWS_MG(pService->MoveResource(&resourceNotExist, &resourceIdentifier2, false, true), MgResourceNotFoundException*);
 
         //Move the resource that was added earlier with cascade = true, and check referencing resource.
         pService->MoveResource(&resourceIdentifier, &resourceIdentifier2, false, true);
-        CPPUNIT_ASSERT(!pService->ResourceExists(&resourceIdentifier));
+        REQUIRE(!pService->ResourceExists(&resourceIdentifier));
         //Ptr<MgByteReader> byteReader = pService->GetResourceContent(&resourceIdentifier4, L"");
         //STRING referenceContent = byteReader->ToString();
         //STRING featureIdTag = L"<ResourceId>Library://UnitTests/Data/test-2.FeatureSource</ResourceId>";
-        //CPPUNIT_ASSERT(referenceContent.find(featureIdTag) != STRING::npos);
+        //REQUIRE(referenceContent.find(featureIdTag) != STRING::npos);
 
         //Move the resource again with cascade = false, and check referencing resource.
         pService->MoveResource(&resourceIdentifier2, &resourceIdentifier, false, false);
@@ -559,17 +484,17 @@
         //byteReader = pService->GetResourceContent(&resourceIdentifier4, L"");
         //referenceContent = byteReader->ToString();
         //featureIdTag = L"<ResourceId>Library://UnitTests/Data/test-2.FeatureSource</ResourceId>";
-        //CPPUNIT_ASSERT(referenceContent.find(featureIdTag) != STRING::npos);
-        CPPUNIT_ASSERT(!pService->ResourceExists(&resourceIdentifier2));
+        //REQUIRE(referenceContent.find(featureIdTag) != STRING::npos);
+        REQUIRE(!pService->ResourceExists(&resourceIdentifier2));
 
         //Try to move the resource into itself (ie. itself)
-        CPPUNIT_ASSERT_THROW_MG(pService->MoveResource(&resourceIdentifier, &resourceIdentifier, false), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->MoveResource(&resourceIdentifier, &resourceIdentifier, false), MgInvalidArgumentException*);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -579,7 +504,7 @@
 /// This test case copies the resource that was just moved to the original
 /// location that it was moved from.
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_CopyResource()
+TEST_CASE("CopyResource", "[ResourceService]")
 {
     try
     {
@@ -587,28 +512,28 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_CopyResource", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_CopyResource", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
-        //Try to use NULL arguments
-        CPPUNIT_ASSERT_THROW_MG(pService->CopyResource(NULL, NULL, true), MgNullArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->CopyResource(&resourceIdentifier, NULL, true), MgNullArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->CopyResource(NULL, &resourceIdentifier2, true), MgNullArgumentException*);
+        //Try to use nullptr arguments
+        REQUIRE_THROWS_MG(pService->CopyResource(nullptr, nullptr, true), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->CopyResource(&resourceIdentifier, nullptr, true), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->CopyResource(nullptr, &resourceIdentifier2, true), MgNullArgumentException*);
 
         //Try to use source & destination as the same thing
-        CPPUNIT_ASSERT_THROW_MG(pService->CopyResource(&resourceIdentifier2, &resourceIdentifier2, false), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->CopyResource(&resourceIdentifier2, &resourceIdentifier2, false), MgInvalidArgumentException*);
 
         //Copy the moved resource to another location
         pService->CopyResource(&resourceIdentifier, &resourceIdentifier2, false);
 
         //Try to copy a resource to one that should now exist
-        CPPUNIT_ASSERT_THROW_MG(pService->CopyResource(&resourceIdentifier2, &resourceIdentifier, false), MgDuplicateResourceException*);
+        REQUIRE_THROWS_MG(pService->CopyResource(&resourceIdentifier2, &resourceIdentifier, false), MgDuplicateResourceException*);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 ///----------------------------------------------------------------------------
@@ -616,7 +541,7 @@
 ///
 /// This test case gets the content of the resource
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_GetResourceContent()
+TEST_CASE("GetResourceContent", "[ResourceService]")
 {
     try
     {
@@ -624,28 +549,28 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_GetResourceContent", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_GetResourceContent", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgByteReader> byteReader;
-        byteReader = NULL;
+        byteReader = nullptr;
 
-        //Try to get the content using NULL arguments
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceContent(NULL, L""), MgNullArgumentException*);
+        //Try to get the content using nullptr arguments
+        REQUIRE_THROWS_MG(pService->GetResourceContent(nullptr, L""), MgNullArgumentException*);
 
         //Try to get the content of a resource that doesn't exist
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceContent(&resourceNotExist, L""), MgResourceNotFoundException*);
+        REQUIRE_THROWS_MG(pService->GetResourceContent(&resourceNotExist, L""), MgResourceNotFoundException*);
 
         //Get the content of the resource that was added in TestCase_SetResource
         byteReader = pService->GetResourceContent(&resourceIdentifier, L"");
         STRING mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -654,7 +579,7 @@
 ///
 /// This test case gets the contents of a collection of resources
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_GetResourceContents()
+TEST_CASE("GetResourceContents", "[ResourceService]")
 {
     try
     {
@@ -662,34 +587,34 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_GetResourceContents", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_GetResourceContents", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
-        //Try to get the contents using NULL arguments
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceContents(NULL, NULL), MgNullArgumentException*);
+        //Try to get the contents using nullptr arguments
+        REQUIRE_THROWS_MG(pService->GetResourceContents(nullptr, nullptr), MgNullArgumentException*);
 
         //Try to get the content of a resource that doesn't exist
         Ptr<MgStringCollection> resourceNotExistCol = new MgStringCollection();
         resourceNotExistCol->Add(resourceNotExist.ToString());
         resourceNotExistCol->Add(resourceIdentifier.ToString());
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceContents(resourceNotExistCol, NULL), MgResourceNotFoundException*);
+        REQUIRE_THROWS_MG(pService->GetResourceContents(resourceNotExistCol, nullptr), MgResourceNotFoundException*);
 
         //Get the content of the resource that was added in TestCase_SetResource
         Ptr<MgStringCollection> resourceIds = new MgStringCollection();
         resourceIds->Add(resourceIdentifier.ToString());
         resourceIds->Add(resourceIdentifier4.ToString());
-        Ptr<MgStringCollection> ret = pService->GetResourceContents(resourceIds, NULL);
-        CPPUNIT_ASSERT(ret->GetCount() == 2);
+        Ptr<MgStringCollection> ret = pService->GetResourceContents(resourceIds, nullptr);
+        REQUIRE(ret->GetCount() == 2);
         for(int i = 0; i < ret->GetCount(); i ++)
         {
-            CPPUNIT_ASSERT(!ret->GetItem(i).empty());
+            REQUIRE(!ret->GetItem(i).empty());
         }
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -698,7 +623,7 @@
 ///
 /// This test case gets the header of the resource
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_GetResourceHeader()
+TEST_CASE("GetResourceHeader", "[ResourceService]")
 {
     try
     {
@@ -706,16 +631,16 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_GetResourceHeader", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_GetResourceHeader", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceHeader(NULL), MgNotImplementedException*);
+        REQUIRE_THROWS_MG(pService->GetResourceHeader(nullptr), MgNotImplementedException*);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -724,7 +649,7 @@
 ///
 /// This test case enumerates the references of the resource
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_EnumerateReferences()
+TEST_CASE("EnumerateReferences", "[ResourceService]")
 {
     try
     {
@@ -732,16 +657,16 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_EnumerateReferences", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_EnumerateReferences", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
-        CPPUNIT_ASSERT_THROW_MG(pService->EnumerateReferences(NULL), MgNotImplementedException*);
+        REQUIRE_THROWS_MG(pService->EnumerateReferences(nullptr), MgNotImplementedException*);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -750,7 +675,7 @@
 ///
 /// This test case changes the owner of a resource
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_ChangeResourceOwner()
+TEST_CASE("ChangeResourceOwner", "[ResourceService]")
 {
     try
     {
@@ -758,16 +683,16 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_ChangeResourceOwner", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_ChangeResourceOwner", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
-        CPPUNIT_ASSERT_THROW_MG(pService->ChangeResourceOwner(NULL, L"", false), MgNotImplementedException*);
+        REQUIRE_THROWS_MG(pService->ChangeResourceOwner(nullptr, L"", false), MgNotImplementedException*);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -776,7 +701,7 @@
 ///
 /// This test case sets all decendants of the resource to inherit permissions
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_InheritPermissionsFrom()
+TEST_CASE("InheritPermissionsFrom", "[ResourceService]")
 {
     try
     {
@@ -784,16 +709,16 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_InheritPermissionsFrom", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_InheritPermissionsFrom", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
-        CPPUNIT_ASSERT_THROW_MG(pService->InheritPermissionsFrom(NULL), MgNotImplementedException*);
+        REQUIRE_THROWS_MG(pService->InheritPermissionsFrom(nullptr), MgNotImplementedException*);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -803,7 +728,7 @@
 /// This test case enumerates the resource data of the resource that was
 /// added earlier
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_EnumerateResourceData()
+TEST_CASE("EnumerateResourceData", "[ResourceService]")
 {
     try
     {
@@ -811,28 +736,28 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_EnumerateResourceData", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_EnumerateResourceData", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgByteReader> byteReader;
-        byteReader = NULL;
+        byteReader = nullptr;
 
-        //Try enumerating using a NULL argument
-        CPPUNIT_ASSERT_THROW_MG(pService->EnumerateResourceData(NULL), MgNullArgumentException*);
+        //Try enumerating using a nullptr argument
+        REQUIRE_THROWS_MG(pService->EnumerateResourceData(nullptr), MgNullArgumentException*);
 
         //Try enumerating using a resource that doesn't exist
-        CPPUNIT_ASSERT_THROW_MG(pService->EnumerateResourceData(&resourceNotExist), MgResourceNotFoundException*);
+        REQUIRE_THROWS_MG(pService->EnumerateResourceData(&resourceNotExist), MgResourceNotFoundException*);
 
         //Enumerate the resource data of the resource added earlier
         byteReader = pService->EnumerateResourceData(&resourceIdentifier);
         STRING mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -841,7 +766,7 @@
 ///
 /// This test case sets the data of a resource
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_SetResourceData()
+TEST_CASE("SetResourceData", "[ResourceService]")
 {
     try
     {
@@ -849,19 +774,19 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_SetResourceData", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_SetResourceData", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgByteSource> dataSource;
-        dataSource = NULL;
+        dataSource = nullptr;
 
-        //Try using a NULL identifier
-        CPPUNIT_ASSERT_THROW_MG(pService->SetResourceData(NULL, L"", L"", NULL), MgNullArgumentException*);
+        //Try using a nullptr identifier
+        REQUIRE_THROWS_MG(pService->SetResourceData(nullptr, L"", L"", nullptr), MgNullArgumentException*);
 
         //Try to name the resource data with a 0 character string
         dataSource = new MgByteSource(dataFileName);
         Ptr<MgByteReader> dataReader = dataSource->GetReader();
-        CPPUNIT_ASSERT_THROW_MG(pService->SetResourceData(&resourceIdentifier, L"", L"File", dataReader), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->SetResourceData(&resourceIdentifier, L"", L"File", dataReader), MgNullArgumentException*);
 
         //Set the resource data
         dataSource = new MgByteSource(dataFileName);
@@ -870,9 +795,9 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -881,7 +806,7 @@
 ///
 /// This test case renames a resource's data
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_RenameResourceData()
+TEST_CASE("RenameResourceData", "[ResourceService]")
 {
     try
     {
@@ -889,20 +814,20 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_RenameResourceData", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_RenameResourceData", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
         
         //Try using a null argument for the idenfier
-        CPPUNIT_ASSERT_THROW_MG(pService->RenameResourceData(NULL, resourceDataName, resourceDataName2, true), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->RenameResourceData(nullptr, resourceDataName, resourceDataName2, true), MgNullArgumentException*);
 
         //Try using a resource identifier that doesn't exist
-        CPPUNIT_ASSERT_THROW_MG(pService->RenameResourceData(&resourceNotExist, resourceDataName, resourceDataName2, true), MgResourceNotFoundException*);
+        REQUIRE_THROWS_MG(pService->RenameResourceData(&resourceNotExist, resourceDataName, resourceDataName2, true), MgResourceNotFoundException*);
 
         //Try to use a resource data name that doesn't exist
-        CPPUNIT_ASSERT_THROW_MG(pService->RenameResourceData(&resourceIdentifier, L"DoesNotExist", resourceDataName2, true), MgResourceDataNotFoundException*);
+        REQUIRE_THROWS_MG(pService->RenameResourceData(&resourceIdentifier, L"DoesNotExist", resourceDataName2, true), MgResourceDataNotFoundException*);
 
         //Try to name the resource data with a 0 character string
-        CPPUNIT_ASSERT_THROW_MG(pService->RenameResourceData(&resourceIdentifier, resourceDataName, L"", true), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->RenameResourceData(&resourceIdentifier, resourceDataName, L"", true), MgNullArgumentException*);
 
         //Try to do a valid rename
         pService->RenameResourceData(&resourceIdentifier, resourceDataName, resourceDataName2, false);
@@ -910,9 +835,9 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -921,7 +846,7 @@
 ///
 /// This test case retrieves the data of the resource
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_GetResourceData()
+TEST_CASE("GetResourceData", "[ResourceService]")
 {
     try
     {
@@ -929,23 +854,23 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_GetResourceData", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_GetResourceData", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgByteReader> byteReader;
-        byteReader = NULL;
+        byteReader = nullptr;
 
-        //Try to get resource data using a NULL identifier
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceData(NULL, resourceDataName, L""), MgNullArgumentException*);
+        //Try to get resource data using a nullptr identifier
+        REQUIRE_THROWS_MG(pService->GetResourceData(nullptr, resourceDataName, L""), MgNullArgumentException*);
 
         //Try to get resource data using an empty data name string
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceData(&resourceIdentifier, L"", L""), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetResourceData(&resourceIdentifier, L"", L""), MgNullArgumentException*);
 
         //Try to get the resource data of a resource that does not exist
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceData(&resourceNotExist, resourceDataName, L""), MgResourceNotFoundException*);
+        REQUIRE_THROWS_MG(pService->GetResourceData(&resourceNotExist, resourceDataName, L""), MgResourceNotFoundException*);
 
         //Try to get the resource data of a data name that doesn't exist
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceData(&resourceIdentifier, L"DoesNotExist", L""), MgResourceDataNotFoundException*);
+        REQUIRE_THROWS_MG(pService->GetResourceData(&resourceIdentifier, L"DoesNotExist", L""), MgResourceDataNotFoundException*);
 
         //Get resource data using valid arguments
         byteReader = pService->GetResourceData(&resourceIdentifier, resourceDataName, L"");
@@ -952,9 +877,9 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -963,7 +888,7 @@
 ///
 /// This test case deletes the data of the resource
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_DeleteResourceData()
+TEST_CASE("DeleteResourceData", "[ResourceService]")
 {
     try
     {
@@ -971,17 +896,17 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_DeleteResourceData", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_DeleteResourceData", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
-        //Try using a NULL resource identifier
-        CPPUNIT_ASSERT_THROW_MG(pService->DeleteResourceData(NULL, resourceDataName), MgNullArgumentException*);
+        //Try using a nullptr resource identifier
+        REQUIRE_THROWS_MG(pService->DeleteResourceData(nullptr, resourceDataName), MgNullArgumentException*);
 
         //Try using an empty string for the resource data name
-        CPPUNIT_ASSERT_THROW_MG(pService->DeleteResourceData(&resourceIdentifier, L""), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->DeleteResourceData(&resourceIdentifier, L""), MgNullArgumentException*);
 
         //Try deleting data that does not exist
-        CPPUNIT_ASSERT_THROW_MG(pService->DeleteResourceData(&resourceIdentifier, L"DoesNotExist"), MgResourceDataNotFoundException*);
+        REQUIRE_THROWS_MG(pService->DeleteResourceData(&resourceIdentifier, L"DoesNotExist"), MgResourceDataNotFoundException*);
 
         //Delete the resource data that was set earlier
         pService->DeleteResourceData(&resourceIdentifier, resourceDataName);
@@ -988,9 +913,9 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -1000,7 +925,7 @@
 /// This test case deletes the resources that were added and copied in the
 /// earlier tests
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_DeleteResource()
+TEST_CASE("DeleteResource", "[ResourceService]")
 {
     try
     {
@@ -1008,17 +933,17 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_DeleteResource", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_DeleteResource", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgFeatureService> pFeatureService = dynamic_cast<MgFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
         if (pFeatureService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_DeleteResource", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_DeleteResource", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
-        //Try to use a NULL argument
-        CPPUNIT_ASSERT_THROW_MG(pService->DeleteResource(NULL), MgNullArgumentException*);
+        //Try to use a nullptr argument
+        REQUIRE_THROWS_MG(pService->DeleteResource(nullptr), MgNullArgumentException*);
 
         //Try to delete a resource that doesn't exist. We allow doing this for performance reason.
         pService->DeleteResource(&resourceNotExist);
@@ -1043,7 +968,7 @@
         Ptr<MgByteSource> contentSource;
         contentSource = new MgByteSource(rcName);
         Ptr<MgByteReader> contentReader = contentSource->GetReader();
-        pService->SetResource(resource, contentReader, NULL);
+        pService->SetResource(resource, contentReader, nullptr);
 
         Ptr<MgByteSource> dataSource;
         dataSource = new MgByteSource(dfName);
@@ -1051,7 +976,7 @@
         Ptr<MgByteReader> dataReader;
         dataReader = dataSource->GetReader();
         pService->SetResourceData(resource, L"TEST.sdf", L"File", dataReader);
-        dataReader = NULL; // Holds on to the file, so must release resources!
+        dataReader = nullptr; // Holds on to the file, so must release resources!
 
         // Force an FDO exception
         Ptr<MgFeatureAggregateOptions> options = new MgFeatureAggregateOptions();
@@ -1060,10 +985,10 @@
 
         Ptr<MgDataReader> reader = pFeatureService->SelectAggregate(resource, className, options);
         bool bResult = reader->ReadNext();
-        CPPUNIT_ASSERT(bResult);
+        REQUIRE(bResult);
 
         reader->Close();
-        reader = NULL; // Holds on to the file, so must release resources!
+        reader = nullptr; // Holds on to the file, so must release resources!
 
         // Attempt to delete the resource
         pService->DeleteResource(resource);
@@ -1070,9 +995,9 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -1079,7 +1004,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1092,7 +1017,7 @@
 ///
 /// This test case enumerates the unmanaged data
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_EnumerateUnmanagedData()
+TEST_CASE("EnumerateUnmanagedData", "[ResourceService]")
 {
     try
     {
@@ -1100,28 +1025,28 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_EnumerateUnmanagedData", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_EnumerateUnmanagedData", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         // Try to enumerate mappings
         Ptr<MgByteReader> byteReader0 = pService->EnumerateUnmanagedData(L"", false, MgdUnmanagedDataType::Folders, L"");
         STRING mimeType0 = byteReader0->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType0.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType0.c_str(), MgMimeType::Xml.c_str()) == 0);
 
         // Enumerate all unmanaged data files
         Ptr<MgByteReader> byteReader1 = pService->EnumerateUnmanagedData(L"", true, MgdUnmanagedDataType::Files, L"");
         STRING mimeType1 = byteReader1->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType1.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType1.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
-void TestResourceService::TestCase_BenchmarkGetResourceContents()
+TEST_CASE("BenchmarkGetResourceContents", "[ResourceService]")
 {
     try
     {
@@ -1129,7 +1054,7 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_BenchmarkGetResourceContents", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_BenchmarkGetResourceContents", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgStringCollection> resources = new MgStringCollection();
@@ -1146,7 +1071,7 @@
             resIdStr += L".LayerDefinition";
 
             Ptr<MgResourceIdentifier> resId = new MgResourceIdentifier(resIdStr);
-            pService->SetResource(resId, reader, NULL);
+            pService->SetResource(resId, reader, nullptr);
             resources->Add(resId->ToString());
             reader->Rewind();
         }
@@ -1183,9 +1108,9 @@
         clock_start = clock();
         Ptr<MgStringCollection> contents;
         ACE_DEBUG((LM_INFO, ACE_TEXT("\nTestResourceService::TestCase_BenchmarkGetResourceContents() - Multi-threaded GetResourceContents call (cold) \n")));
-        contents = pService->GetResourceContents(resources, NULL);
-        CPPUNIT_ASSERT(NULL != contents.p);
-        CPPUNIT_ASSERT(contents->GetCount() == resources->GetCount());
+        contents = pService->GetResourceContents(resources, nullptr);
+        REQUIRE(nullptr != contents.p);
+        REQUIRE(contents->GetCount() == resources->GetCount());
         clock_end = clock();
         ACE_DEBUG((LM_INFO, ACE_TEXT("  Execution Time: = %6.4f (s)\n"), ((double)(clock_end - clock_start) / CLOCKS_PER_SEC) ));
         ACE_DEBUG((LM_INFO, ACE_TEXT(" %d resource content items in cache\n"), (cache->GetCacheSize()) ));
@@ -1192,9 +1117,9 @@
 
         clock_start = clock();
         ACE_DEBUG((LM_INFO, ACE_TEXT("\nTestResourceService::TestCase_BenchmarkGetResourceContents() - Multi-threaded GetResourceContents call (cached contents) \n")));
-        contents = pService->GetResourceContents(resources, NULL);
-        CPPUNIT_ASSERT(NULL != contents.p);
-        CPPUNIT_ASSERT(contents->GetCount() == resources->GetCount());
+        contents = pService->GetResourceContents(resources, nullptr);
+        REQUIRE(nullptr != contents.p);
+        REQUIRE(contents->GetCount() == resources->GetCount());
         clock_end = clock();
         ACE_DEBUG((LM_INFO, ACE_TEXT("  Execution Time: = %6.4f (s)\n"), ((double)(clock_end - clock_start) / CLOCKS_PER_SEC) ));
         ACE_DEBUG((LM_INFO, ACE_TEXT(" %d resource content items in cache\n"), (cache->GetCacheSize()) ));
@@ -1201,13 +1126,13 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
-void TestResourceService::TestCase_PackageNoOpUpdateRepository()
+TEST_CASE("PackageNoOpUpdateRepository", "[ResourceService]")
 {
     try
     {
@@ -1215,7 +1140,7 @@
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_PackageNoOpUpdateRepository", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_PackageNoOpUpdateRepository", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
         MgResourceIdentifier resId(L"Library://UnitTests/Package/LineSymbol.SymbolDefinition");
         if (pService->ResourceExists(&resId))
@@ -1228,17 +1153,17 @@
 
         //This package contains an UPDATEREPOSITORY directive, which should no-op when loaded by mg-desktop
         pService->ApplyResourcePackage(byteReader);
-        CPPUNIT_ASSERT(pService->ResourceExists(&resId));
+        REQUIRE(pService->ResourceExists(&resId));
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
-void TestResourceService::TestCase_AliasedConfigurationDocument()
+TEST_CASE("AliasedConfigurationDocument", "[ResourceService]")
 {
     try
     {
@@ -1246,7 +1171,7 @@
         Ptr<MgdResourceService> pService = dynamic_cast<MgdResourceService*>(fact->CreateService(MgServiceType::ResourceService));
         if (pService == 0)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_PackageNoOpUpdateRepository", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_PackageNoOpUpdateRepository", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         pService->AddAliasMapping(L"MG_TEST", L"C:/Temp");
@@ -1259,13 +1184,13 @@
         sink->ToString(xml);
 
         //It should have no alias tags as they have been substituted
-        CPPUNIT_ASSERT(xml.find(L"MG_TEST") == STRING::npos);
-        CPPUNIT_ASSERT(xml.find(L"MG_DATA_PATH_ALIAS") == STRING::npos);
+        REQUIRE(xml.find(L"MG_TEST") == STRING::npos);
+        REQUIRE(xml.find(L"MG_DATA_PATH_ALIAS") == STRING::npos);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
\ No newline at end of file

Deleted: trunk/MgDev/Desktop/UnitTest/TestResourceService.h
===================================================================
--- trunk/MgDev/Desktop/UnitTest/TestResourceService.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/UnitTest/TestResourceService.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,116 +0,0 @@
-//
-//  Copyright (C) 2004-2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef TESTRESOURCESERVICE_H_
-#define TESTRESOURCESERVICE_H_
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestResourceService : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestResourceService);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_EnumerateRepositories);
-    CPPUNIT_TEST(TestCase_CreateRepository);
-    CPPUNIT_TEST(TestCase_UpdateRepository);
-    CPPUNIT_TEST(TestCase_GetRepositoryContent);
-    CPPUNIT_TEST(TestCase_GetRepositoryHeader);
-    CPPUNIT_TEST(TestCase_ApplyResourcePackage);
-    CPPUNIT_TEST(TestCase_DeleteRepository);
-
-    CPPUNIT_TEST(TestCase_ResourceExists);
-    CPPUNIT_TEST(TestCase_EnumerateResources);
-    CPPUNIT_TEST(TestCase_SetResource);
-    CPPUNIT_TEST(TestCase_SetResourceInvalid);
-    CPPUNIT_TEST(TestCase_MoveResource);
-    CPPUNIT_TEST(TestCase_CopyResource);
-    CPPUNIT_TEST(TestCase_GetResourceContent);
-    CPPUNIT_TEST(TestCase_GetResourceContents);
-    CPPUNIT_TEST(TestCase_GetResourceHeader);
-    CPPUNIT_TEST(TestCase_EnumerateReferences);
-    CPPUNIT_TEST(TestCase_ChangeResourceOwner);
-    CPPUNIT_TEST(TestCase_InheritPermissionsFrom);
-
-    CPPUNIT_TEST(TestCase_EnumerateResourceData);
-    CPPUNIT_TEST(TestCase_SetResourceData);
-    CPPUNIT_TEST(TestCase_RenameResourceData);
-    CPPUNIT_TEST(TestCase_GetResourceData);
-    CPPUNIT_TEST(TestCase_DeleteResourceData);
-
-    CPPUNIT_TEST(TestCase_DeleteResource);
-
-    CPPUNIT_TEST(TestCase_EnumerateUnmanagedData);
-    //CPPUNIT_TEST(TestCase_RepositoryBusy);
-
-	CPPUNIT_TEST(TestCase_BenchmarkGetResourceContents);
-    CPPUNIT_TEST(TestCase_PackageNoOpUpdateRepository);
-    CPPUNIT_TEST(TestCase_AliasedConfigurationDocument);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    // Test Repository Management APIs
-    void TestCase_EnumerateRepositories();
-    void TestCase_CreateRepository();
-    void TestCase_UpdateRepository();
-    void TestCase_GetRepositoryContent();
-    void TestCase_GetRepositoryHeader();
-    void TestCase_ApplyResourcePackage();
-    void TestCase_DeleteRepository();
-
-    // Test Resource Management APIs
-    void TestCase_ResourceExists();
-    void TestCase_EnumerateResources();
-    void TestCase_SetResource();
-    void TestCase_SetResourceInvalid();
-    void TestCase_MoveResource();
-    void TestCase_CopyResource();
-    void TestCase_GetResourceContent();
-    void TestCase_GetResourceContents();
-    void TestCase_GetResourceHeader();
-    void TestCase_EnumerateReferences();
-    void TestCase_ChangeResourceOwner();
-    void TestCase_InheritPermissionsFrom();
-
-    // Test Resource Data Management APIs
-    void TestCase_EnumerateResourceData();
-    void TestCase_SetResourceData();
-    void TestCase_RenameResourceData();
-    void TestCase_GetResourceData();
-    void TestCase_DeleteResourceData();
-
-    void TestCase_DeleteResource();
-
-    void TestCase_EnumerateUnmanagedData();
-    //void TestCase_RepositoryBusy();
-
-    void TestCase_PackageNoOpUpdateRepository();
-
-	// Benchmarking
-	void TestCase_BenchmarkGetResourceContents();
-
-    void TestCase_AliasedConfigurationDocument();
-};
-
-#endif // TESTRESOURCESERVICE_H_

Copied: trunk/MgDev/Desktop/UnitTest/TestServiceFactory.cpp (from rev 9676, sandbox/jng/catch2/Desktop/UnitTest/TestServiceFactory.cpp)
===================================================================
--- trunk/MgDev/Desktop/UnitTest/TestServiceFactory.cpp	                        (rev 0)
+++ trunk/MgDev/Desktop/UnitTest/TestServiceFactory.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -0,0 +1,1560 @@
+//
+//  Copyright (C) 2004-2020 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "TestServiceFactory.h"
+#include "Services/Feature/FdoConnectionPool.h"
+
+#define CATCH_CONFIG_EXTERNAL_INTERFACES
+#include "catch.hpp"
+
+const STRING TestServiceFactory::TEST_LOCALE = L"en";
+
+std::set<std::string> TestServiceFactory::sm_suitesToRun;
+
+bool TestServiceFactory::IsRunningSuite(const std::string& suite)
+{
+    return sm_suitesToRun.find(suite) != sm_suitesToRun.end();
+}
+
+void TestServiceFactory::GetCatch2Tags(std::string& testOrTags)
+{
+    bool bFirst = true;
+    for (auto const& item : sm_suitesToRun)
+    {
+        if (bFirst)
+        {
+            bFirst = false;
+        }
+        else
+        {
+            testOrTags += ",";
+        }
+        testOrTags += item;
+    }
+}
+
+void TestServiceFactory::AddSuiteToRun(const std::string& suite)
+{
+    sm_suitesToRun.insert(suite);
+}
+
+struct TestDataSetup : Catch::TestEventListenerBase
+{
+    using TestEventListenerBase::TestEventListenerBase; // inherit constructor
+
+   // Get rid of Wweak-tables
+    ~TestDataSetup();
+
+    void testCaseStarting(Catch::TestCaseInfo const& _testInfo) override {
+        printf(">>> Starting test case: %s\n", _testInfo.name.c_str());
+    }
+
+    // The whole test run starting
+    void testRunStarting(Catch::TestRunInfo const& testRunInfo) override {
+
+        Ptr<MgdServiceFactory> fact = new MgdServiceFactory();
+        Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
+        if (pService == nullptr)
+        {
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestStart", __LINE__, __WFILE__, nullptr, L"", nullptr);
+        }
+        Ptr<MgdFeatureService> featSvc = dynamic_cast<MgdFeatureService*>(fact->CreateService(MgServiceType::FeatureService));
+        if (featSvc == nullptr)
+        {
+            throw new MgServiceNotAvailableException(L"TestFeatureService.TestStart", __LINE__, __WFILE__, nullptr, L"", nullptr);
+        }
+
+        Ptr<MgCoordinateSystemFactory> csFactory = new MgCoordinateSystemFactory();
+        Ptr<MgCoordinateSystemCatalog> csCatalog = csFactory->GetCatalog();
+        STRING dictPath = csCatalog->GetDictionaryDir();
+        ACE_DEBUG((LM_INFO, ACE_TEXT("\nCoordinate System Dictionary Path is: %W\n"), dictPath.c_str()));
+
+#ifdef _WIN32
+        //If the FDO we're using has a full providers.xml and we haven't met the dependencies
+        //of some providers (eg. OCI.dll for King.Oracle), then it's going to show a message box
+        //in our face about this that has to be manually dismissed. Not something you want to have 
+        //happen when trying to run tests in an automated fashion. This test suite only covers the
+        //SDF, SHP and SQLite providers so having such message boxes show up is intrusive.
+        //
+        //This call will suppress such message boxes when loading dlls with unmet depdendencies. It's
+        //okay to do this here because mgserver.exe would not be running as a service or long-running process
+        //when running its test suite, so this will only take effect for the duration of the test run
+        SetErrorMode(SEM_FAILCRITICALERRORS);
+#endif
+
+        printf("*******************************************\n");
+        printf("******* Setting up test environment *******\n");
+        printf("*******************************************\n");
+
+        // TestMappingService setup
+        if (TestServiceFactory::IsRunningSuite("[MappingService]"))
+        {
+            printf("Setting up data for suite: MappingService\n");
+            try
+            {
+                //publish the map definition
+                Ptr<MgResourceIdentifier> mapres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+                Ptr<MgByteSource> mdfsrc = new MgByteSource(L"../UnitTestFiles/UT_Sheboygan.mdf", false);
+                Ptr<MgByteReader> mdfrdr = mdfsrc->GetReader();
+                pService->SetResource(mapres, mdfrdr, nullptr);
+
+                //publish the layer definitions
+                Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.ldf", false);
+                Ptr<MgByteReader> ldfrdr1 = ldfsrc1->GetReader();
+                pService->SetResource(ldfres1, ldfrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.ldf", false);
+                Ptr<MgByteReader> ldfrdr2 = ldfsrc2->GetReader();
+                pService->SetResource(ldfres2, ldfrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.ldf", false);
+                Ptr<MgByteReader> ldfrdr3 = ldfsrc3->GetReader();
+                pService->SetResource(ldfres3, ldfrdr3, nullptr);
+
+                //publish the feature sources
+                Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
+                Ptr<MgByteSource> fssrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.fs", false);
+                Ptr<MgByteReader> fsrdr1 = fssrc1->GetReader();
+                pService->SetResource(fsres1, fsrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
+                Ptr<MgByteSource> fssrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.fs", false);
+                Ptr<MgByteReader> fsrdr2 = fssrc2->GetReader();
+                pService->SetResource(fsres2, fsrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
+                Ptr<MgByteSource> fssrc3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.fs", false);
+                Ptr<MgByteReader> fsrdr3 = fssrc3->GetReader();
+                pService->SetResource(fsres3, fsrdr3, nullptr);
+
+                // publish the resource data
+                Ptr<MgByteSource> dataSource1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.sdf", false);
+                Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
+                pService->SetResourceData(fsres1, L"UT_HydrographicPolygons.sdf", L"File", dataReader1);
+
+                Ptr<MgByteSource> dataSource2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.sdf", false);
+                Ptr<MgByteReader> dataReader2 = dataSource2->GetReader();
+                pService->SetResourceData(fsres2, L"UT_Parcels.sdf", L"File", dataReader2);
+
+                Ptr<MgByteSource> dataSource3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.sdf", false);
+                Ptr<MgByteReader> dataReader3 = dataSource3->GetReader();
+                pService->SetResourceData(fsres3, L"UT_Rail.sdf", L"File", dataReader3);
+
+                // publish the print layouts
+                Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
+                Ptr<MgByteSource> plsrc1 = new MgByteSource(L"../UnitTestFiles/UT_AllElements.pl", false);
+                Ptr<MgByteReader> plrdr1 = plsrc1->GetReader();
+                pService->SetResource(plres1, plrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
+                Ptr<MgByteSource> plsrc2 = new MgByteSource(L"../UnitTestFiles/UT_NoLegend.pl", false);
+                Ptr<MgByteReader> plrdr2 = plsrc2->GetReader();
+                pService->SetResource(plres2, plrdr2, nullptr);
+
+                // publish the symbol library
+                Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
+                Ptr<MgByteSource> slsrc1 = new MgByteSource(L"../UnitTestFiles/UT_SymbolMart.sl", false);
+                Ptr<MgByteReader> slrdr1 = slsrc1->GetReader();
+                pService->SetResource(slres1, slrdr1, nullptr);
+                Ptr<MgByteSource> datasrc = new MgByteSource(L"../UnitTestFiles/UT_Symbols.dwf", false);
+                Ptr<MgByteReader> datardr = datasrc->GetReader();
+                pService->SetResourceData(slres1, L"symbols.dwf", L"File", datardr);
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+            catch (...)
+            {
+                throw;
+            }
+        }
+
+        // TestRenderingService setup
+        if (TestServiceFactory::IsRunningSuite("[RenderingService]"))
+        {
+            printf("Setting up data for suite: RenderingService\n");
+            try
+            {
+                // publish the map definition
+                Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+                Ptr<MgByteSource> mdfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_Sheboygan.mdf", false);
+                Ptr<MgByteReader> mdfrdr1 = mdfsrc1->GetReader();
+                pService->SetResource(mapres1, mdfrdr1, nullptr);
+
+                // publish the layer definitions
+                Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.ldf", false);
+                Ptr<MgByteReader> ldfrdr1 = ldfsrc1->GetReader();
+                pService->SetResource(ldfres1, ldfrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.ldf", false);
+                Ptr<MgByteReader> ldfrdr2 = ldfsrc2->GetReader();
+                pService->SetResource(ldfres2, ldfrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.ldf", false);
+                Ptr<MgByteReader> ldfrdr3 = ldfsrc3->GetReader();
+                pService->SetResource(ldfres3, ldfrdr3, nullptr);
+
+                // publish the feature sources
+                Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
+                Ptr<MgByteSource> fssrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.fs", false);
+                Ptr<MgByteReader> fsrdr1 = fssrc1->GetReader();
+                pService->SetResource(fsres1, fsrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
+                Ptr<MgByteSource> fssrc2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.fs", false);
+                Ptr<MgByteReader> fsrdr2 = fssrc2->GetReader();
+                pService->SetResource(fsres2, fsrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
+                Ptr<MgByteSource> fssrc3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.fs", false);
+                Ptr<MgByteReader> fsrdr3 = fssrc3->GetReader();
+                pService->SetResource(fsres3, fsrdr3, nullptr);
+
+                // publish the resource data
+                Ptr<MgByteSource> dataSource1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.sdf", false);
+                Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
+                pService->SetResourceData(fsres1, L"UT_HydrographicPolygons.sdf", L"File", dataReader1);
+
+                Ptr<MgByteSource> dataSource2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.sdf", false);
+                Ptr<MgByteReader> dataReader2 = dataSource2->GetReader();
+                pService->SetResourceData(fsres2, L"UT_Rail.sdf", L"File", dataReader2);
+
+                Ptr<MgByteSource> dataSource3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.sdf", false);
+                Ptr<MgByteReader> dataReader3 = dataSource3->GetReader();
+                pService->SetResourceData(fsres3, L"UT_Parcels.sdf", L"File", dataReader3);
+
+                // publish the print layouts
+                Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
+                Ptr<MgByteSource> plsrc1 = new MgByteSource(L"../UnitTestFiles/UT_AllElements.pl", false);
+                Ptr<MgByteReader> plrdr1 = plsrc1->GetReader();
+                pService->SetResource(plres1, plrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
+                Ptr<MgByteSource> plsrc2 = new MgByteSource(L"../UnitTestFiles/UT_NoLegend.pl", false);
+                Ptr<MgByteReader> plrdr2 = plsrc2->GetReader();
+                pService->SetResource(plres2, plrdr2, nullptr);
+
+                // publish the symbol library
+                Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
+                Ptr<MgByteSource> slsrc1 = new MgByteSource(L"../UnitTestFiles/UT_SymbolMart.sl", false);
+                Ptr<MgByteReader> slrdr1 = slsrc1->GetReader();
+                pService->SetResource(slres1, slrdr1, nullptr);
+                Ptr<MgByteSource> datasrc = new MgByteSource(L"../UnitTestFiles/UT_Symbols.dwf", false);
+                Ptr<MgByteReader> datardr = datasrc->GetReader();
+                pService->SetResourceData(slres1, L"symbols.dwf", L"File", datardr);
+
+                //
+                // publish symbology stuff
+                //
+
+                // the point feature source
+                Ptr<MgResourceIdentifier> fsres4 = new MgResourceIdentifier(L"Library://UnitTests/Data/Capitals.FeatureSource");
+                Ptr<MgByteSource> fssrc4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.fs", false);
+                Ptr<MgByteReader> fsrdr4 = fssrc4->GetReader();
+                pService->SetResource(fsres4, fsrdr4, nullptr);
+
+                // point sdf file
+                Ptr<MgByteSource> dataSource4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.sdf", false);
+                Ptr<MgByteReader> dataReader4 = dataSource4->GetReader();
+                pService->SetResourceData(fsres4, L"UT_SymbologyPoints.sdf", L"File", dataReader4);
+
+                // point symbols
+                Ptr<MgResourceIdentifier> sdres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbol.SymbolDefinition");
+                Ptr<MgByteSource> sdsrc1 = new MgByteSource(L"../UnitTestFiles/symbol.sd", false);
+                Ptr<MgByteReader> sdrdr1 = sdsrc1->GetReader();
+                pService->SetResource(sdres1, sdrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> sdres2 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbolParam.SymbolDefinition");
+                Ptr<MgByteSource> sdsrc2 = new MgByteSource(L"../UnitTestFiles/symbolp.sd", false);
+                Ptr<MgByteReader> sdrdr2 = sdsrc2->GetReader();
+                pService->SetResource(sdres2, sdrdr2, nullptr);
+
+                // point ldf
+                Ptr<MgResourceIdentifier> ldfres4 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Capitals.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.ldf", false);
+                Ptr<MgByteReader> ldfrdr4 = ldfsrc4->GetReader();
+                pService->SetResource(ldfres4, ldfrdr4, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres5 = new MgResourceIdentifier(L"Library://UnitTests/Layers/CapitalsParam.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPointsParam.ldf", false);
+                Ptr<MgByteReader> ldfrdr5 = ldfsrc5->GetReader();
+                pService->SetResource(ldfres5, ldfrdr5, nullptr);
+
+                // point mdf
+                Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Capitals.MapDefinition");
+                Ptr<MgByteSource> mdfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.mdf", false);
+                Ptr<MgByteReader> mdfrdr2 = mdfsrc2->GetReader();
+                pService->SetResource(mapres2, mdfrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> mapres3 = new MgResourceIdentifier(L"Library://UnitTests/Maps/CapitalsParam.MapDefinition");
+                Ptr<MgByteSource> mdfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPointsParam.mdf", false);
+                Ptr<MgByteReader> mdfrdr3 = mdfsrc3->GetReader();
+                pService->SetResource(mapres3, mdfrdr3, nullptr);
+
+                // the line feature source
+                Ptr<MgResourceIdentifier> fsres5 = new MgResourceIdentifier(L"Library://UnitTests/Data/Lines.FeatureSource");
+                Ptr<MgByteSource> fssrc5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.fs", false);
+                Ptr<MgByteReader> fsrdr5 = fssrc5->GetReader();
+                pService->SetResource(fsres5, fsrdr5, nullptr);
+
+                // line sdf file
+                Ptr<MgByteSource> dataSource5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.sdf", false);
+                Ptr<MgByteReader> dataReader5 = dataSource5->GetReader();
+                pService->SetResourceData(fsres5, L"UT_SymbologyLines.sdf", L"File", dataReader5);
+
+                // line symbols
+                Ptr<MgResourceIdentifier> sdres3 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/LineSymbol.SymbolDefinition");
+                Ptr<MgByteSource> sdsrc3 = new MgByteSource(L"../UnitTestFiles/linesymbol.sd", false);
+                Ptr<MgByteReader> sdrdr3 = sdsrc3->GetReader();
+                pService->SetResource(sdres3, sdrdr3, nullptr);
+
+                Ptr<MgResourceIdentifier> sdres4 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/MTYP1500a.SymbolDefinition");
+                Ptr<MgByteSource> sdsrc4 = new MgByteSource(L"../UnitTestFiles/MTYP1500a.sd", false);
+                Ptr<MgByteReader> sdrdr4 = sdsrc4->GetReader();
+                pService->SetResource(sdres4, sdrdr4, nullptr);
+
+                // line ldf
+                Ptr<MgResourceIdentifier> ldfres6 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Lines.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc6 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.ldf", false);
+                Ptr<MgByteReader> ldfrdr6 = ldfsrc6->GetReader();
+                pService->SetResource(ldfres6, ldfrdr6, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres7 = new MgResourceIdentifier(L"Library://UnitTests/Layers/LinesCrossTick.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc7 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLinesCrossTick.ldf", false);
+                Ptr<MgByteReader> ldfrdr7 = ldfsrc7->GetReader();
+                pService->SetResource(ldfres7, ldfrdr7, nullptr);
+
+                // line mdf
+                Ptr<MgResourceIdentifier> mapres4 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Lines.MapDefinition");
+                Ptr<MgByteSource> mdfsrc4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.mdf", false);
+                Ptr<MgByteReader> mdfrdr4 = mdfsrc4->GetReader();
+                pService->SetResource(mapres4, mdfrdr4, nullptr);
+
+                Ptr<MgResourceIdentifier> mapres5 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinesCrossTick.MapDefinition");
+                Ptr<MgByteSource> mdfsrc5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLinesCrossTick.mdf", false);
+                Ptr<MgByteReader> mdfrdr5 = mdfsrc5->GetReader();
+                pService->SetResource(mapres5, mdfrdr5, nullptr);
+
+                // annotation ldf - this shares the point sdf
+                Ptr<MgResourceIdentifier> ldfres8 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation1.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc8 = new MgByteSource(L"../UnitTestFiles/UT_Annotation1.ldf", false);
+                Ptr<MgByteReader> ldfrdr8 = ldfsrc8->GetReader();
+                pService->SetResource(ldfres8, ldfrdr8, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres9 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation2.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc9 = new MgByteSource(L"../UnitTestFiles/UT_Annotation2.ldf", false);
+                Ptr<MgByteReader> ldfrdr9 = ldfsrc9->GetReader();
+                pService->SetResource(ldfres9, ldfrdr9, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres10 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation3.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc10 = new MgByteSource(L"../UnitTestFiles/UT_Annotation3.ldf", false);
+                Ptr<MgByteReader> ldfrdr10 = ldfsrc10->GetReader();
+                pService->SetResource(ldfres10, ldfrdr10, nullptr);
+
+                // annotation mdf
+                Ptr<MgResourceIdentifier> mapres8 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation1.MapDefinition");
+                Ptr<MgByteSource> mdfsrc8 = new MgByteSource(L"../UnitTestFiles/UT_Annotation1.mdf", false);
+                Ptr<MgByteReader> mdfrdr8 = mdfsrc8->GetReader();
+                pService->SetResource(mapres8, mdfrdr8, nullptr);
+
+                Ptr<MgResourceIdentifier> mapres9 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation2.MapDefinition");
+                Ptr<MgByteSource> mdfsrc9 = new MgByteSource(L"../UnitTestFiles/UT_Annotation2.mdf", false);
+                Ptr<MgByteReader> mdfrdr9 = mdfsrc9->GetReader();
+                pService->SetResource(mapres9, mdfrdr9, nullptr);
+
+                Ptr<MgResourceIdentifier> mapres10 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation3.MapDefinition");
+                Ptr<MgByteSource> mdfsrc10 = new MgByteSource(L"../UnitTestFiles/UT_Annotation3.mdf", false);
+                Ptr<MgByteReader> mdfrdr10 = mdfsrc10->GetReader();
+                pService->SetResource(mapres10, mdfrdr10, nullptr);
+
+                //symbology - polygons
+                Ptr<MgResourceIdentifier> mapres11 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_SymbologyPolygons.MapDefinition");
+                Ptr<MgByteSource> mdfsrc11 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPolygons.mdf", false);
+                Ptr<MgByteReader> mdfrdr11 = mdfsrc11->GetReader();
+                pService->SetResource(mapres11, mdfrdr11, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres11 = new MgResourceIdentifier(L"Library://UnitTests/Layers/SymbologyParcels.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc11 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyParcels.ldf", false);
+                Ptr<MgByteReader> ldfrdr11 = ldfsrc11->GetReader();
+                pService->SetResource(ldfres11, ldfrdr11, nullptr);
+
+                Ptr<MgResourceIdentifier> sdres5 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/AreaSymbol.SymbolDefinition");
+                Ptr<MgByteSource> sdsrc5 = new MgByteSource(L"../UnitTestFiles/areasymbol.sd", false);
+                Ptr<MgByteReader> sdrdr5 = sdsrc5->GetReader();
+                pService->SetResource(sdres5, sdrdr5, nullptr);
+
+                // For watermark test
+                // publish the map definition
+                Ptr<MgResourceIdentifier> mapres12 = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWithWatermark.MapDefinition");
+                Ptr<MgByteSource> mdfsrc12 = new MgByteSource(L"../UnitTestFiles/UT_SheboyganWithWatermark.mdf", false);
+                Ptr<MgByteReader> mdfrdr12 = mdfsrc12->GetReader();
+                pService->SetResource(mapres12, mdfrdr12, nullptr);
+
+                // publish the watermark definition
+                Ptr<MgResourceIdentifier> wdfres1 = new MgResourceIdentifier(L"Library://UnitTests/Watermarks/PoweredByMapGuide.WatermarkDefinition");
+                Ptr<MgByteSource> wdfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_PoweredByMapGuide.wdf", false);
+                Ptr<MgByteReader> wdfrdr1 = wdfsrc1->GetReader();
+                pService->SetResource(wdfres1, wdfrdr1, nullptr);
+
+                // ------------------------------------------------------
+                // base map source data
+                // ------------------------------------------------------
+                // publish the map definition
+                Ptr<MgResourceIdentifier> mapres13 = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
+                Ptr<MgByteSource> mdfsrc13 = new MgByteSource(L"../UnitTestFiles/UT_BaseMap.mdf", false);
+                Ptr<MgByteReader> mdfrdr13 = mdfsrc13->GetReader();
+                pService->SetResource(mapres13, mdfrdr13, nullptr);
+
+                // publish the layer definitions
+                Ptr<MgResourceIdentifier> ldfres12 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RoadCenterLines.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc12 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.ldf", false);
+                Ptr<MgByteReader> ldfrdr12 = ldfsrc12->GetReader();
+                pService->SetResource(ldfres12, ldfrdr12, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres13 = new MgResourceIdentifier(L"Library://UnitTests/Layers/VotingDistricts.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc13 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.ldf", false);
+                Ptr<MgByteReader> ldfrdr13 = ldfsrc13->GetReader();
+                pService->SetResource(ldfres13, ldfrdr13, nullptr);
+
+                // publish the feature sources
+                Ptr<MgResourceIdentifier> fsres6 = new MgResourceIdentifier(L"Library://UnitTests/Data/RoadCenterLines.FeatureSource");
+                Ptr<MgByteSource> fssrc6 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.fs", false);
+                Ptr<MgByteReader> fsrdr6 = fssrc6->GetReader();
+                pService->SetResource(fsres6, fsrdr6, nullptr);
+
+                Ptr<MgResourceIdentifier> fsres7 = new MgResourceIdentifier(L"Library://UnitTests/Data/VotingDistricts.FeatureSource");
+                Ptr<MgByteSource> fssrc7 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.fs", false);
+                Ptr<MgByteReader> fsrdr7 = fssrc7->GetReader();
+                pService->SetResource(fsres7, fsrdr7, nullptr);
+
+                // publish the resource data
+                Ptr<MgByteSource> dataSource6 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.sdf", false);
+                Ptr<MgByteReader> dataReader6 = dataSource6->GetReader();
+                pService->SetResourceData(fsres6, L"UT_RoadCenterLines.sdf", L"File", dataReader6);
+
+                Ptr<MgByteSource> dataSource7 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.sdf", false);
+                Ptr<MgByteReader> dataReader7 = dataSource7->GetReader();
+                pService->SetResourceData(fsres7, L"UT_VotingDistricts.sdf", L"File", dataReader7);
+
+                // ---------------------------------------------------------
+                // Data for exercising legend rendering
+                // ---------------------------------------------------------
+                Ptr<MgResourceIdentifier> ldfres14 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTS.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc14 = new MgByteSource(L"../UnitTestFiles/UT_MultiFTS.ldf", false);
+                Ptr<MgByteReader> ldfrdr14 = ldfsrc14->GetReader();
+                pService->SetResource(ldfres14, ldfrdr14, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres15 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTS.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc15 = new MgByteSource(L"../UnitTestFiles/UT_MultiCTS.ldf", false);
+                Ptr<MgByteReader> ldfrdr15 = ldfsrc15->GetReader();
+                pService->SetResource(ldfres15, ldfrdr15, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres16 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTSWithTheme.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc16 = new MgByteSource(L"../UnitTestFiles/UT_MultiFTSWithTheme.ldf", false);
+                Ptr<MgByteReader> ldfrdr16 = ldfsrc16->GetReader();
+                pService->SetResource(ldfres16, ldfrdr16, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres17 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTSWithTheme.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc17 = new MgByteSource(L"../UnitTestFiles/UT_MultiCTSWithTheme.ldf", false);
+                Ptr<MgByteReader> ldfrdr17 = ldfsrc17->GetReader();
+                pService->SetResource(ldfres17, ldfrdr17, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres18 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTSSingleCTS.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc18 = new MgByteSource(L"../UnitTestFiles/UT_MultiFTSSingleCTS.ldf", false);
+                Ptr<MgByteReader> ldfrdr18 = ldfsrc18->GetReader();
+                pService->SetResource(ldfres18, ldfrdr18, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres19 = new MgResourceIdentifier(L"Library://UnitTests/Layers/SingleFTSMultiCTS.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc19 = new MgByteSource(L"../UnitTestFiles/UT_SingleFTSMultiCTS.ldf", false);
+                Ptr<MgByteReader> ldfrdr19 = ldfsrc19->GetReader();
+                pService->SetResource(ldfres19, ldfrdr19, nullptr);
+
+                // Data related to stylization function tests
+                Ptr<MgResourceIdentifier> ldfres20 = new MgResourceIdentifier(L"Library://UnitTests/Layers/StylizationFuncs.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc20 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistrictsFunctions.ldf", false);
+                Ptr<MgByteReader> ldfrdr20 = ldfsrc20->GetReader();
+                pService->SetResource(ldfres20, ldfrdr20, nullptr);
+
+                Ptr<MgResourceIdentifier> mapres15 = new MgResourceIdentifier(L"Library://UnitTests/Maps/StylizationFuncs.MapDefinition");
+                Ptr<MgByteSource> mdfsrc15 = new MgByteSource(L"../UnitTestFiles/UT_StylizationFuncs.mdf", false);
+                Ptr<MgByteReader> mdfrdr15 = mdfsrc15->GetReader();
+                pService->SetResource(mapres15, mdfrdr15, nullptr);
+
+                // For layer watermark test
+                Ptr<MgResourceIdentifier> wdfres2 = new MgResourceIdentifier(L"Library://UnitTests/Watermarks/Rail.WatermarkDefinition");
+                Ptr<MgByteSource> wdfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.wdf", false);
+                Ptr<MgByteReader> wdfrdr2 = wdfsrc2->GetReader();
+                pService->SetResource(wdfres2, wdfrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres21 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RailWatermark.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc21 = new MgByteSource(L"../UnitTestFiles/UT_Rail_Watermark.ldf", false);
+                Ptr<MgByteReader> ldfrdr21 = ldfsrc21->GetReader();
+                pService->SetResource(ldfres21, ldfrdr21, nullptr);
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+            catch (...)
+            {
+                throw;
+            }
+        }
+
+        // TestTileService setup
+        if (TestServiceFactory::IsRunningSuite("[TileService]"))
+        {
+            printf("Setting up data for suite: TileService\n");
+            try
+            {
+                // ------------------------------------------------------
+        // base map source data
+        // ------------------------------------------------------
+
+        // publish the map definition
+                Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
+                Ptr<MgByteSource> mdfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_BaseMap.mdf", false);
+                Ptr<MgByteReader> mdfrdr1 = mdfsrc1->GetReader();
+                pService->SetResource(mapres1, mdfrdr1, nullptr);
+
+                // publish the layer definitions
+                Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RoadCenterLines.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.ldf", false);
+                Ptr<MgByteReader> ldfrdr1 = ldfsrc1->GetReader();
+                pService->SetResource(ldfres1, ldfrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.ldf", false);
+                Ptr<MgByteReader> ldfrdr2 = ldfsrc2->GetReader();
+                pService->SetResource(ldfres2, ldfrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/VotingDistricts.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.ldf", false);
+                Ptr<MgByteReader> ldfrdr3 = ldfsrc3->GetReader();
+                pService->SetResource(ldfres3, ldfrdr3, nullptr);
+
+                // publish the feature sources
+                Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/RoadCenterLines.FeatureSource");
+                Ptr<MgByteSource> fssrc1 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.fs", false);
+                Ptr<MgByteReader> fsrdr1 = fssrc1->GetReader();
+                pService->SetResource(fsres1, fsrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
+                Ptr<MgByteSource> fssrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.fs", false);
+                Ptr<MgByteReader> fsrdr2 = fssrc2->GetReader();
+                pService->SetResource(fsres2, fsrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/VotingDistricts.FeatureSource");
+                Ptr<MgByteSource> fssrc3 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.fs", false);
+                Ptr<MgByteReader> fsrdr3 = fssrc3->GetReader();
+                pService->SetResource(fsres3, fsrdr3, nullptr);
+
+                // publish the resource data
+                Ptr<MgByteSource> dataSource1 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.sdf", false);
+                Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
+                pService->SetResourceData(fsres1, L"UT_RoadCenterLines.sdf", L"File", dataReader1);
+
+                Ptr<MgByteSource> dataSource2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.sdf", false);
+                Ptr<MgByteReader> dataReader2 = dataSource2->GetReader();
+                pService->SetResourceData(fsres2, L"UT_Parcels.sdf", L"File", dataReader2);
+
+                Ptr<MgByteSource> dataSource3 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.sdf", false);
+                Ptr<MgByteReader> dataReader3 = dataSource3->GetReader();
+                pService->SetResourceData(fsres3, L"UT_VotingDistricts.sdf", L"File", dataReader3);
+
+                // set up temporary directory for tile images
+                MgFileUtil::CreateDirectory(L"./temp_tiles", false);
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+            catch (...)
+            {
+                throw;
+            }
+        }
+
+        // TestResourceService setup
+        if (TestServiceFactory::IsRunningSuite("[ResourceService]"))
+        {
+            Ptr<MgResourceIdentifier> fs1 = new MgResourceIdentifier(L"Library://UnitTests/Data/acea.FeatureSource");
+            Ptr<MgByteSource> fs1Source = new MgByteSource(L"../UnitTestFiles/acea.fs", false);
+            Ptr<MgByteReader> fs1Reader = fs1Source->GetReader();
+            pService->SetResource(fs1, fs1Reader, nullptr);
+
+            Ptr<MgByteSource> confSource = new MgByteSource(L"../UnitTestFiles/config.xml", false);
+            Ptr<MgByteReader> confReader = confSource->GetReader();
+            pService->SetResourceData(fs1, L"config.xml", MgResourceDataType::File, confReader);
+        }
+
+        // TestProfilingService setup
+        if (TestServiceFactory::IsRunningSuite("[ProfilingService]"))
+        {
+            printf("Setting up data for suite: ProfilingService\n");
+            try
+            {
+                // publish the map definition
+                Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+                Ptr<MgByteSource> mdfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_Sheboygan.mdf", false);
+                Ptr<MgByteReader> mdfrdr1 = mdfsrc1->GetReader();
+                pService->SetResource(mapres1, mdfrdr1, nullptr);
+
+                // publish the layer definitions
+                Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.ldf", false);
+                Ptr<MgByteReader> ldfrdr1 = ldfsrc1->GetReader();
+                pService->SetResource(ldfres1, ldfrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.ldf", false);
+                Ptr<MgByteReader> ldfrdr2 = ldfsrc2->GetReader();
+                pService->SetResource(ldfres2, ldfrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.ldf", false);
+                Ptr<MgByteReader> ldfrdr3 = ldfsrc3->GetReader();
+                pService->SetResource(ldfres3, ldfrdr3, nullptr);
+
+                // publish the feature sources
+                Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
+                Ptr<MgByteSource> fssrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.fs", false);
+                Ptr<MgByteReader> fsrdr1 = fssrc1->GetReader();
+                pService->SetResource(fsres1, fsrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
+                Ptr<MgByteSource> fssrc2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.fs", false);
+                Ptr<MgByteReader> fsrdr2 = fssrc2->GetReader();
+                pService->SetResource(fsres2, fsrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
+                Ptr<MgByteSource> fssrc3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.fs", false);
+                Ptr<MgByteReader> fsrdr3 = fssrc3->GetReader();
+                pService->SetResource(fsres3, fsrdr3, nullptr);
+
+                // publish the resource data
+                Ptr<MgByteSource> dataSource1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.sdf", false);
+                Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
+                pService->SetResourceData(fsres1, L"UT_HydrographicPolygons.sdf", L"File", dataReader1);
+
+                Ptr<MgByteSource> dataSource2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.sdf", false);
+                Ptr<MgByteReader> dataReader2 = dataSource2->GetReader();
+                pService->SetResourceData(fsres2, L"UT_Rail.sdf", L"File", dataReader2);
+
+                Ptr<MgByteSource> dataSource3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.sdf", false);
+                Ptr<MgByteReader> dataReader3 = dataSource3->GetReader();
+                pService->SetResourceData(fsres3, L"UT_Parcels.sdf", L"File", dataReader3);
+
+                // publish the print layouts
+                Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
+                Ptr<MgByteSource> plsrc1 = new MgByteSource(L"../UnitTestFiles/UT_AllElements.pl", false);
+                Ptr<MgByteReader> plrdr1 = plsrc1->GetReader();
+                pService->SetResource(plres1, plrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
+                Ptr<MgByteSource> plsrc2 = new MgByteSource(L"../UnitTestFiles/UT_NoLegend.pl", false);
+                Ptr<MgByteReader> plrdr2 = plsrc2->GetReader();
+                pService->SetResource(plres2, plrdr2, nullptr);
+
+                // publish the symbol library
+                Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
+                Ptr<MgByteSource> slsrc1 = new MgByteSource(L"../UnitTestFiles/UT_SymbolMart.sl", false);
+                Ptr<MgByteReader> slrdr1 = slsrc1->GetReader();
+                pService->SetResource(slres1, slrdr1, nullptr);
+                Ptr<MgByteSource> datasrc = new MgByteSource(L"../UnitTestFiles/UT_Symbols.dwf", false);
+                Ptr<MgByteReader> datardr = datasrc->GetReader();
+                pService->SetResourceData(slres1, L"symbols.dwf", L"File", datardr);
+
+                //
+                // publish symbology stuff
+                //
+
+                // the point feature source
+                Ptr<MgResourceIdentifier> fsres4 = new MgResourceIdentifier(L"Library://UnitTests/Data/Capitals.FeatureSource");
+                Ptr<MgByteSource> fssrc4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.fs", false);
+                Ptr<MgByteReader> fsrdr4 = fssrc4->GetReader();
+                pService->SetResource(fsres4, fsrdr4, nullptr);
+
+                // point sdf file
+                Ptr<MgByteSource> dataSource4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.sdf", false);
+                Ptr<MgByteReader> dataReader4 = dataSource4->GetReader();
+                pService->SetResourceData(fsres4, L"UT_SymbologyPoints.sdf", L"File", dataReader4);
+
+                // point symbols
+                Ptr<MgResourceIdentifier> sdres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbol.SymbolDefinition");
+                Ptr<MgByteSource> sdsrc1 = new MgByteSource(L"../UnitTestFiles/symbol.sd", false);
+                Ptr<MgByteReader> sdrdr1 = sdsrc1->GetReader();
+                pService->SetResource(sdres1, sdrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> sdres2 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbolParam.SymbolDefinition");
+                Ptr<MgByteSource> sdsrc2 = new MgByteSource(L"../UnitTestFiles/symbolp.sd", false);
+                Ptr<MgByteReader> sdrdr2 = sdsrc2->GetReader();
+                pService->SetResource(sdres2, sdrdr2, nullptr);
+
+                // point ldf
+                Ptr<MgResourceIdentifier> ldfres4 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Capitals.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.ldf", false);
+                Ptr<MgByteReader> ldfrdr4 = ldfsrc4->GetReader();
+                pService->SetResource(ldfres4, ldfrdr4, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres5 = new MgResourceIdentifier(L"Library://UnitTests/Layers/CapitalsParam.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPointsParam.ldf", false);
+                Ptr<MgByteReader> ldfrdr5 = ldfsrc5->GetReader();
+                pService->SetResource(ldfres5, ldfrdr5, nullptr);
+
+                // point mdf
+                Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Capitals.MapDefinition");
+                Ptr<MgByteSource> mdfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.mdf", false);
+                Ptr<MgByteReader> mdfrdr2 = mdfsrc2->GetReader();
+                pService->SetResource(mapres2, mdfrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> mapres3 = new MgResourceIdentifier(L"Library://UnitTests/Maps/CapitalsParam.MapDefinition");
+                Ptr<MgByteSource> mdfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPointsParam.mdf", false);
+                Ptr<MgByteReader> mdfrdr3 = mdfsrc3->GetReader();
+                pService->SetResource(mapres3, mdfrdr3, nullptr);
+
+                // the line feature source
+                Ptr<MgResourceIdentifier> fsres5 = new MgResourceIdentifier(L"Library://UnitTests/Data/Lines.FeatureSource");
+                Ptr<MgByteSource> fssrc5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.fs", false);
+                Ptr<MgByteReader> fsrdr5 = fssrc5->GetReader();
+                pService->SetResource(fsres5, fsrdr5, nullptr);
+
+                // line sdf file
+                Ptr<MgByteSource> dataSource5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.sdf", false);
+                Ptr<MgByteReader> dataReader5 = dataSource5->GetReader();
+                pService->SetResourceData(fsres5, L"UT_SymbologyLines.sdf", L"File", dataReader5);
+
+                // line symbols
+                Ptr<MgResourceIdentifier> sdres3 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/LineSymbol.SymbolDefinition");
+                Ptr<MgByteSource> sdsrc3 = new MgByteSource(L"../UnitTestFiles/linesymbol.sd", false);
+                Ptr<MgByteReader> sdrdr3 = sdsrc3->GetReader();
+                pService->SetResource(sdres3, sdrdr3, nullptr);
+
+                Ptr<MgResourceIdentifier> sdres4 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/MTYP1500a.SymbolDefinition");
+                Ptr<MgByteSource> sdsrc4 = new MgByteSource(L"../UnitTestFiles/MTYP1500a.sd", false);
+                Ptr<MgByteReader> sdrdr4 = sdsrc4->GetReader();
+                pService->SetResource(sdres4, sdrdr4, nullptr);
+
+                // line ldf
+                Ptr<MgResourceIdentifier> ldfres6 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Lines.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc6 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.ldf", false);
+                Ptr<MgByteReader> ldfrdr6 = ldfsrc6->GetReader();
+                pService->SetResource(ldfres6, ldfrdr6, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres7 = new MgResourceIdentifier(L"Library://UnitTests/Layers/LinesCrossTick.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc7 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLinesCrossTick.ldf", false);
+                Ptr<MgByteReader> ldfrdr7 = ldfsrc7->GetReader();
+                pService->SetResource(ldfres7, ldfrdr7, nullptr);
+
+                // line mdf
+                Ptr<MgResourceIdentifier> mapres4 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Lines.MapDefinition");
+                Ptr<MgByteSource> mdfsrc4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.mdf", false);
+                Ptr<MgByteReader> mdfrdr4 = mdfsrc4->GetReader();
+                pService->SetResource(mapres4, mdfrdr4, nullptr);
+
+                Ptr<MgResourceIdentifier> mapres5 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinesCrossTick.MapDefinition");
+                Ptr<MgByteSource> mdfsrc5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLinesCrossTick.mdf", false);
+                Ptr<MgByteReader> mdfrdr5 = mdfsrc5->GetReader();
+                pService->SetResource(mapres5, mdfrdr5, nullptr);
+
+                // annotation ldf - this shares the point sdf
+                Ptr<MgResourceIdentifier> ldfres8 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation1.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc8 = new MgByteSource(L"../UnitTestFiles/UT_Annotation1.ldf", false);
+                Ptr<MgByteReader> ldfrdr8 = ldfsrc8->GetReader();
+                pService->SetResource(ldfres8, ldfrdr8, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres9 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation2.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc9 = new MgByteSource(L"../UnitTestFiles/UT_Annotation2.ldf", false);
+                Ptr<MgByteReader> ldfrdr9 = ldfsrc9->GetReader();
+                pService->SetResource(ldfres9, ldfrdr9, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres10 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation3.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc10 = new MgByteSource(L"../UnitTestFiles/UT_Annotation3.ldf", false);
+                Ptr<MgByteReader> ldfrdr10 = ldfsrc10->GetReader();
+                pService->SetResource(ldfres10, ldfrdr10, nullptr);
+
+                // annotation mdf
+                Ptr<MgResourceIdentifier> mapres8 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation1.MapDefinition");
+                Ptr<MgByteSource> mdfsrc8 = new MgByteSource(L"../UnitTestFiles/UT_Annotation1.mdf", false);
+                Ptr<MgByteReader> mdfrdr8 = mdfsrc8->GetReader();
+                pService->SetResource(mapres8, mdfrdr8, nullptr);
+
+                Ptr<MgResourceIdentifier> mapres9 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation2.MapDefinition");
+                Ptr<MgByteSource> mdfsrc9 = new MgByteSource(L"../UnitTestFiles/UT_Annotation2.mdf", false);
+                Ptr<MgByteReader> mdfrdr9 = mdfsrc9->GetReader();
+                pService->SetResource(mapres9, mdfrdr9, nullptr);
+
+                Ptr<MgResourceIdentifier> mapres10 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation3.MapDefinition");
+                Ptr<MgByteSource> mdfsrc10 = new MgByteSource(L"../UnitTestFiles/UT_Annotation3.mdf", false);
+                Ptr<MgByteReader> mdfrdr10 = mdfsrc10->GetReader();
+                pService->SetResource(mapres10, mdfrdr10, nullptr);
+
+                //symbology - polygons
+                Ptr<MgResourceIdentifier> mapres11 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_SymbologyPolygons.MapDefinition");
+                Ptr<MgByteSource> mdfsrc11 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPolygons.mdf", false);
+                Ptr<MgByteReader> mdfrdr11 = mdfsrc11->GetReader();
+                pService->SetResource(mapres11, mdfrdr11, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres11 = new MgResourceIdentifier(L"Library://UnitTests/Layers/SymbologyParcels.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc11 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyParcels.ldf", false);
+                Ptr<MgByteReader> ldfrdr11 = ldfsrc11->GetReader();
+                pService->SetResource(ldfres11, ldfrdr11, nullptr);
+
+                Ptr<MgResourceIdentifier> sdres5 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/AreaSymbol.SymbolDefinition");
+                Ptr<MgByteSource> sdsrc5 = new MgByteSource(L"../UnitTestFiles/areasymbol.sd", false);
+                Ptr<MgByteReader> sdrdr5 = sdsrc5->GetReader();
+                pService->SetResource(sdres5, sdrdr5, nullptr);
+
+                // For watermark test
+                // publish the map definition
+                Ptr<MgResourceIdentifier> mapres12 = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWithWatermark.MapDefinition");
+                Ptr<MgByteSource> mdfsrc12 = new MgByteSource(L"../UnitTestFiles/UT_SheboyganWithWatermark.mdf", false);
+                Ptr<MgByteReader> mdfrdr12 = mdfsrc12->GetReader();
+                pService->SetResource(mapres12, mdfrdr12, nullptr);
+
+                // publish the watermark definition
+                Ptr<MgResourceIdentifier> wdfres1 = new MgResourceIdentifier(L"Library://UnitTests/Watermarks/PoweredByMapGuide.WatermarkDefinition");
+                Ptr<MgByteSource> wdfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_PoweredByMapGuide.wdf", false);
+                Ptr<MgByteReader> wdfrdr1 = wdfsrc1->GetReader();
+                pService->SetResource(wdfres1, wdfrdr1, nullptr);
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+            catch (...)
+            {
+                throw;
+            }
+        }
+
+        // TestFeatureService setup
+        if (TestServiceFactory::IsRunningSuite("[FeatureService]"))
+        {
+            printf("Setting up data for suite: FeatureService\n");
+            try
+            {
+                // publish the map definition
+                Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWriteable.MapDefinition");
+                Ptr<MgByteSource> mdfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_Sheboygan_Writeable.mdf", false);
+                Ptr<MgByteReader> mdfrdr1 = mdfsrc1->GetReader();
+                pService->SetResource(mapres1, mdfrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/ParcelsWriteable.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels_Writeable.ldf", false);
+                Ptr<MgByteReader> ldfrdr3 = ldfsrc3->GetReader();
+                pService->SetResource(ldfres3, ldfrdr3, nullptr);
+
+                Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/ParcelsWriteable.FeatureSource");
+                Ptr<MgByteSource> fssrc3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels_writeable.fs", false);
+                Ptr<MgByteReader> fsrdr3 = fssrc3->GetReader();
+                pService->SetResource(fsres3, fsrdr3, nullptr);
+
+                Ptr<MgByteSource> fsSource3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.sdf", false);
+                Ptr<MgByteReader> fsReader3 = fsSource3->GetReader();
+                pService->SetResourceData(fsres3, L"UT_Parcels.sdf", L"File", fsReader3);
+
+                MgResourceIdentifier resourceIdentifier1(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
+                MgResourceIdentifier resourceIdentifier2(L"Library://UnitTests/Data/Redding_Parcels.FeatureSource");
+                MgResourceIdentifier resourceIdentifier3(L"Library://UnitTests/Data/Sheboygan_BuildingOutlines.FeatureSource");
+                MgResourceIdentifier resourceIdentifier4(L"Library://UnitTests/Data/Sheboygan_VotingDistricts.FeatureSource");
+                MgResourceIdentifier resourceIdentifier5(L"Library://UnitTests/Data/TestChainedInner1ToManyJoin.FeatureSource");
+                MgResourceIdentifier resourceIdentifier6(L"Library://UnitTests/Data/Empty.FeatureSource");
+                MgResourceIdentifier resourceIdentifier7(L"Library://UnitTests/Data/Sheboygan_Parcels_Writable.FeatureSource");
+                MgResourceIdentifier resourceIdentifier8(L"Library://UnitTests/Data/FdoJoin.FeatureSource");
+                MgResourceIdentifier resourceIdentifier9(L"Library://UnitTests/Data/SecuredCredentials.FeatureSource");
+#ifdef _WIN32
+                STRING resourceContentFileName1 = L"..\\UnitTestFiles\\Sheboygan_Parcels.FeatureSource";
+                STRING resourceContentFileName2 = L"..\\UnitTestFiles\\Redding_Parcels.FeatureSource";
+                STRING resourceContentFileName3 = L"..\\UnitTestFiles\\Sheboygan_BuildingOutlines.FeatureSource";
+                STRING resourceContentFileName4 = L"..\\UnitTestFiles\\Sheboygan_VotingDistricts.FeatureSource";
+                STRING resourceContentFileName5 = L"..\\UnitTestFiles\\TESTChainedInner1ToManyJoin.FeatureSource";
+                STRING resourceContentFileName6 = L"..\\UnitTestFiles\\Empty.FeatureSource";
+                STRING resourceContentFileName7 = L"..\\UnitTestFiles\\Sheboygan_Parcels_Writable.FeatureSource";
+                STRING resourceContentFileName8 = L"..\\UnitTestFiles\\UT_FdoJoin.FeatureSource";
+                STRING resourceContentFileName9 = L"..\\UnitTestFiles\\SecuredCredentials.fs";
+                STRING dataFileName1 = L"..\\UnitTestFiles\\Sheboygan_Parcels.sdf";
+                STRING dataFileName2 = L"..\\UnitTestFiles\\Redding_Parcels.shp";
+                STRING dataFileName3 = L"..\\UnitTestFiles\\Redding_Parcels.dbf";
+                STRING dataFileName4 = L"..\\UnitTestFiles\\Redding_Parcels.shx";
+                STRING dataFileName5 = L"..\\UnitTestFiles\\Sheboygan_BuildingOutlines.sdf";
+                STRING dataFileName6 = L"..\\UnitTestFiles\\Sheboygan_VotingDistricts.sdf";
+                STRING dataFileName7 = L"..\\UnitTestFiles\\Empty.sdf";
+                STRING dataFileName8 = L"..\\UnitTestFiles\\JoinTest.sqlite";
+#else
+                STRING resourceContentFileName1 = L"../UnitTestFiles/Sheboygan_Parcels.FeatureSource";
+                STRING resourceContentFileName2 = L"../UnitTestFiles/Redding_Parcels.FeatureSource";
+                STRING resourceContentFileName3 = L"../UnitTestFiles/Sheboygan_BuildingOutlines.FeatureSource";
+                STRING resourceContentFileName4 = L"../UnitTestFiles/Sheboygan_VotingDistricts.FeatureSource";
+                STRING resourceContentFileName5 = L"../UnitTestFiles/TESTChainedInner1ToManyJoin.FeatureSource";
+                STRING resourceContentFileName6 = L"../UnitTestFiles/Empty.FeatureSource";
+                STRING resourceContentFileName7 = L"../UnitTestFiles/Sheboygan_Parcels_Writable.FeatureSource";
+                STRING resourceContentFileName8 = L"../UnitTestFiles/UT_FdoJoin.FeatureSource";
+                STRING resourceContentFileName9 = L"../UnitTestFiles/SecuredCredentials.fs";
+                STRING dataFileName1 = L"../UnitTestFiles/Sheboygan_Parcels.sdf";
+                STRING dataFileName2 = L"../UnitTestFiles/Redding_Parcels.shp";
+                STRING dataFileName3 = L"../UnitTestFiles/Redding_Parcels.dbf";
+                STRING dataFileName4 = L"../UnitTestFiles/Redding_Parcels.shx";
+                STRING dataFileName5 = L"../UnitTestFiles/Sheboygan_BuildingOutlines.sdf";
+                STRING dataFileName6 = L"../UnitTestFiles/Sheboygan_VotingDistricts.sdf";
+                STRING dataFileName7 = L"../UnitTestFiles/Empty.sdf";
+                STRING dataFileName8 = L"../UnitTestFiles/JoinTest.sqlite";
+#endif
+
+                //Add a new resource
+                Ptr<MgByteSource> contentSource1 = new MgByteSource(resourceContentFileName1);
+                Ptr<MgByteReader> contentReader1 = contentSource1->GetReader();
+                pService->SetResource(&resourceIdentifier1, contentReader1, nullptr);
+
+                Ptr<MgByteSource> contentSource2 = new MgByteSource(resourceContentFileName2);
+                Ptr<MgByteReader> contentReader2 = contentSource2->GetReader();
+                pService->SetResource(&resourceIdentifier2, contentReader2, nullptr);
+
+                Ptr<MgByteSource> contentSource3 = new MgByteSource(resourceContentFileName3);
+                Ptr<MgByteReader> contentReader3 = contentSource3->GetReader();
+                pService->SetResource(&resourceIdentifier3, contentReader3, nullptr);
+
+                Ptr<MgByteSource> contentSource4 = new MgByteSource(resourceContentFileName4);
+                Ptr<MgByteReader> contentReader4 = contentSource4->GetReader();
+                pService->SetResource(&resourceIdentifier4, contentReader4, nullptr);
+
+                Ptr<MgByteSource> contentSource5 = new MgByteSource(resourceContentFileName5);
+                Ptr<MgByteReader> contentReader5 = contentSource5->GetReader();
+                pService->SetResource(&resourceIdentifier5, contentReader5, nullptr);
+
+                Ptr<MgByteSource> contentSource6 = new MgByteSource(resourceContentFileName6);
+                Ptr<MgByteReader> contentReader6 = contentSource6->GetReader();
+                pService->SetResource(&resourceIdentifier6, contentReader6, nullptr);
+
+                Ptr<MgByteSource> contentSource7 = new MgByteSource(resourceContentFileName7);
+                Ptr<MgByteReader> contentReader7 = contentSource7->GetReader();
+                pService->SetResource(&resourceIdentifier7, contentReader7, nullptr);
+
+                Ptr<MgByteSource> contentSource8 = new MgByteSource(resourceContentFileName8);
+                Ptr<MgByteReader> contentReader8 = contentSource8->GetReader();
+                pService->SetResource(&resourceIdentifier8, contentReader8, nullptr);
+
+                Ptr<MgByteSource> contentSource9 = new MgByteSource(resourceContentFileName9);
+                Ptr<MgByteReader> contentReader9 = contentSource9->GetReader();
+                pService->SetResource(&resourceIdentifier9, contentReader9, nullptr);
+
+                //Set the resource data
+                Ptr<MgByteSource> dataSource1 = new MgByteSource(dataFileName1);
+                Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
+                pService->SetResourceData(&resourceIdentifier1, L"Sheboygan_Parcels.sdf", L"File", dataReader1);
+
+                Ptr<MgByteSource> dataSource2 = new MgByteSource(dataFileName2);
+                Ptr<MgByteReader> dataReader2 = dataSource2->GetReader();
+                pService->SetResourceData(&resourceIdentifier2, L"Redding_Parcels.shp", L"File", dataReader2);
+
+                Ptr<MgByteSource> dataSource3 = new MgByteSource(dataFileName3);
+                Ptr<MgByteReader> dataReader3 = dataSource3->GetReader();
+                pService->SetResourceData(&resourceIdentifier2, L"Redding_Parcels.dbf", L"File", dataReader3);
+
+                Ptr<MgByteSource> dataSource4 = new MgByteSource(dataFileName4);
+                Ptr<MgByteReader> dataReader4 = dataSource4->GetReader();
+                pService->SetResourceData(&resourceIdentifier2, L"Redding_Parcels.shx", L"File", dataReader4);
+
+                Ptr<MgByteSource> dataSource5 = new MgByteSource(dataFileName5);
+                Ptr<MgByteReader> dataReader5 = dataSource5->GetReader();
+                pService->SetResourceData(&resourceIdentifier3, L"Sheboygan_BuildingOutlines.sdf", L"File", dataReader5);
+
+                Ptr<MgByteSource> dataSource6 = new MgByteSource(dataFileName6);
+                Ptr<MgByteReader> dataReader6 = dataSource6->GetReader();
+                pService->SetResourceData(&resourceIdentifier4, L"Sheboygan_VotingDistricts.sdf", L"File", dataReader6);
+
+                Ptr<MgByteSource> dataSource7 = new MgByteSource(dataFileName1);
+                Ptr<MgByteReader> dataReader7 = dataSource7->GetReader();
+                pService->SetResourceData(&resourceIdentifier5, L"Sheboygan_Parcels.sdf", L"File", dataReader7);
+
+                Ptr<MgByteSource> dataSource8 = new MgByteSource(dataFileName7);
+                Ptr<MgByteReader> dataReader8 = dataSource8->GetReader();
+                pService->SetResourceData(&resourceIdentifier6, L"Empty.sdf", L"File", dataReader8);
+
+                Ptr<MgByteSource> dataSource9 = new MgByteSource(dataFileName1);
+                Ptr<MgByteReader> dataReader9 = dataSource9->GetReader();
+                pService->SetResourceData(&resourceIdentifier7, L"Sheboygan_Parcels.sdf", L"File", dataReader9);
+
+                Ptr<MgByteSource> dataSource10 = new MgByteSource(dataFileName8);
+                Ptr<MgByteReader> dataReader10 = dataSource10->GetReader();
+                pService->SetResourceData(&resourceIdentifier8, L"JoinTest.sqlite", L"File", dataReader10);
+
+                //Sortable Right side data set
+                Ptr<MgResourceIdentifier> fsId = new MgResourceIdentifier(L"Library://UnitTests/Data/SortableRight.FeatureSource");
+                Ptr<MgByteSource> fsContent = new MgByteSource(L"../UnitTestFiles/UT_Sortable_Right.fs");
+                Ptr<MgByteReader> fsReader = fsContent->GetReader();
+
+                pService->SetResource(fsId, fsReader, nullptr);
+                Ptr<MgByteSource> fsData = new MgByteSource(L"../UnitTestFiles/SortableRight.sqlite");
+                Ptr<MgByteReader> fsDataReader = fsData->GetReader();
+
+                pService->SetResourceData(fsId, L"SortableRight.sqlite", L"File", fsDataReader);
+                //REQUIRE(featSvc->TestConnection(fsId));
+
+                //Sortable Left side data set
+                fsId = new MgResourceIdentifier(L"Library://UnitTests/Data/SortableLeft.FeatureSource");
+                fsContent = new MgByteSource(L"../UnitTestFiles/UT_Sortable_Left.fs");
+                fsReader = fsContent->GetReader();
+
+                pService->SetResource(fsId, fsReader, nullptr);
+                fsData = new MgByteSource(L"../UnitTestFiles/SortableLeft.sqlite");
+                fsDataReader = fsData->GetReader();
+
+                pService->SetResourceData(fsId, L"SortableLeft.sqlite", L"File", fsDataReader);
+                //REQUIRE(featSvc->TestConnection(fsId));
+
+                //Unsortable Right side data set
+                fsId = new MgResourceIdentifier(L"Library://UnitTests/Data/UnsortableRight.FeatureSource");
+                fsContent = new MgByteSource(L"../UnitTestFiles/UT_Unsortable_Right.fs");
+                fsReader = fsContent->GetReader();
+
+                pService->SetResource(fsId, fsReader, nullptr);
+                fsData = new MgByteSource(L"../UnitTestFiles/UnsortableRight.sdf");
+                fsDataReader = fsData->GetReader();
+
+                pService->SetResourceData(fsId, L"UnsortableRight.sdf", L"File", fsDataReader);
+                //REQUIRE(featSvc->TestConnection(fsId));
+
+                //Unsortable Left side data set
+                fsId = new MgResourceIdentifier(L"Library://UnitTests/Data/UnsortableLeft.FeatureSource");
+                fsContent = new MgByteSource(L"../UnitTestFiles/UT_Unsortable_Left.fs");
+                fsReader = fsContent->GetReader();
+
+                pService->SetResource(fsId, fsReader, nullptr);
+                fsData = new MgByteSource(L"../UnitTestFiles/UnsortableLeft.sdf");
+                fsDataReader = fsData->GetReader();
+
+                pService->SetResourceData(fsId, L"UnsortableLeft.sdf", L"File", fsDataReader);
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+        }
+    }
+
+    // The whole test run ending
+    void testRunEnded(Catch::TestRunStats const& testRunStats) override {
+        Ptr<MgdServiceFactory> factory = new MgdServiceFactory();
+
+        Ptr<MgResourceService> pService = dynamic_cast<MgdResourceService*>(
+            factory->CreateService(MgServiceType::ResourceService));
+        assert(pService.p != nullptr);
+
+        printf("Tearing down test data\n");
+
+        printf("***************************************\n");
+        printf("**** Tearing down test environment ****\n");
+        printf("***************************************\n");
+
+        // TestMappingService teardown
+        if (TestServiceFactory::IsRunningSuite("[MappingService]"))
+        {
+            printf("Tearing down data for suite: MappingService\n");
+            try
+            {
+                //delete the map definition
+                Ptr<MgResourceIdentifier> mapres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+                pService->DeleteResource(mapres);
+
+                //delete the layer definitions
+                Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
+                pService->DeleteResource(ldfres1);
+
+                Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
+                pService->DeleteResource(ldfres2);
+
+                Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
+                pService->DeleteResource(ldfres3);
+
+                //delete the feature sources
+                Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
+                pService->DeleteResource(fsres1);
+
+                Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
+                pService->DeleteResource(fsres2);
+
+                Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
+                pService->DeleteResource(fsres3);
+
+                // delete the print layouts
+                Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
+                pService->DeleteResource(plres1);
+
+                Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
+                pService->DeleteResource(plres2);
+
+                // delete the symbol library
+                Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
+                pService->DeleteResource(slres1);
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+            catch (...)
+            {
+                throw;
+            }
+        }
+
+        // TestProfilingService teardown
+        if (TestServiceFactory::IsRunningSuite("[ProfilingService]"))
+        {
+            printf("Tearing down data for suite: ProfilingService\n");
+            try
+            {
+                // delete the map definition
+                Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+                pService->DeleteResource(mapres1);
+
+                // delete the layer definitions
+                Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
+                pService->DeleteResource(ldfres1);
+
+                Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
+                pService->DeleteResource(ldfres2);
+
+                Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
+                pService->DeleteResource(ldfres3);
+
+                // delete the feature sources
+                Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
+                pService->DeleteResource(fsres1);
+
+                Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
+                pService->DeleteResource(fsres2);
+
+                Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
+                pService->DeleteResource(fsres3);
+
+                // delete the print layouts
+                Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
+                pService->DeleteResource(plres1);
+
+                Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
+                pService->DeleteResource(plres2);
+
+                // delete the symbol library
+                Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
+                pService->DeleteResource(slres1);
+
+                // delete symbology stuff
+                Ptr<MgResourceIdentifier> fsres4 = new MgResourceIdentifier(L"Library://UnitTests/Data/Capitals.FeatureSource");
+                pService->DeleteResource(fsres4);
+                Ptr<MgResourceIdentifier> sdres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbol.SymbolDefinition");
+                pService->DeleteResource(sdres1);
+                Ptr<MgResourceIdentifier> sdres2 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbolParam.SymbolDefinition");
+                pService->DeleteResource(sdres2);
+                Ptr<MgResourceIdentifier> ldfres4 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Capitals.LayerDefinition");
+                pService->DeleteResource(ldfres4);
+                Ptr<MgResourceIdentifier> ldfres5 = new MgResourceIdentifier(L"Library://UnitTests/Layers/CapitalsParam.LayerDefinition");
+                pService->DeleteResource(ldfres5);
+                Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Capitals.MapDefinition");
+                pService->DeleteResource(mapres2);
+                Ptr<MgResourceIdentifier> mapres3 = new MgResourceIdentifier(L"Library://UnitTests/Maps/CapitalsParam.MapDefinition");
+                pService->DeleteResource(mapres3);
+
+                Ptr<MgResourceIdentifier> fsres5 = new MgResourceIdentifier(L"Library://UnitTests/Data/Lines.FeatureSource");
+                pService->DeleteResource(fsres5);
+                Ptr<MgResourceIdentifier> sdres3 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/LineSymbol.SymbolDefinition");
+                pService->DeleteResource(sdres3);
+                Ptr<MgResourceIdentifier> sdres4 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/MTYP1500a.SymbolDefinition");
+                pService->DeleteResource(sdres4);
+                Ptr<MgResourceIdentifier> ldfres6 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Lines.LayerDefinition");
+                pService->DeleteResource(ldfres6);
+                Ptr<MgResourceIdentifier> ldfres7 = new MgResourceIdentifier(L"Library://UnitTests/Layers/LinesCrossTick.LayerDefinition");
+                pService->DeleteResource(ldfres7);
+                Ptr<MgResourceIdentifier> mapres4 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Lines.MapDefinition");
+                pService->DeleteResource(mapres4);
+                Ptr<MgResourceIdentifier> mapres5 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinesCrossTick.MapDefinition");
+                pService->DeleteResource(mapres5);
+
+                Ptr<MgResourceIdentifier> ldfres8 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation1.LayerDefinition");
+                pService->DeleteResource(ldfres8);
+                Ptr<MgResourceIdentifier> ldfres9 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation2.LayerDefinition");
+                pService->DeleteResource(ldfres9);
+                Ptr<MgResourceIdentifier> ldfres10 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation3.LayerDefinition");
+                pService->DeleteResource(ldfres10);
+                Ptr<MgResourceIdentifier> mapres8 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation1.MapDefinition");
+                pService->DeleteResource(mapres8);
+                Ptr<MgResourceIdentifier> mapres9 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation2.MapDefinition");
+                pService->DeleteResource(mapres9);
+                Ptr<MgResourceIdentifier> mapres10 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation3.MapDefinition");
+                pService->DeleteResource(mapres10);
+
+                Ptr<MgResourceIdentifier> mapres11 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_SymbologyPolygons.MapDefinition");
+                pService->DeleteResource(mapres11);
+                Ptr<MgResourceIdentifier> ldfres11 = new MgResourceIdentifier(L"Library://UnitTests/Layers/SymbologyParcels.LayerDefinition");
+                pService->DeleteResource(ldfres11);
+                Ptr<MgResourceIdentifier> sdres5 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/AreaSymbol.SymbolDefinition");
+                pService->DeleteResource(sdres5);
+
+                Ptr<MgResourceIdentifier> mapres12 = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWithWatermark.MapDefinition");
+                pService->DeleteResource(mapres12);
+                Ptr<MgResourceIdentifier> wdfres1 = new MgResourceIdentifier(L"Library://UnitTests/Watermarks/PoweredByMapGuide.WatermarkDefinition");
+                pService->DeleteResource(wdfres1);
+            }
+            catch (MgFileIoException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                ACE_DEBUG((LM_INFO, ACE_TEXT("\nMgFileIoException - Possible file permission error.\nError: %W\n"), message.c_str()));
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                message += e->GetStackTrace(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+            catch (...)
+            {
+                throw;
+            }
+        }
+
+        // TestRenderingService teardown
+        if (TestServiceFactory::IsRunningSuite("[RenderingService]"))
+        {
+            printf("Tearing down data for suite: RenderingService\n");
+            try
+            {
+                // delete the map definition
+                Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+                pService->DeleteResource(mapres1);
+
+                // delete the layer definitions
+                Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
+                pService->DeleteResource(ldfres1);
+
+                Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
+                pService->DeleteResource(ldfres2);
+
+                Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
+                pService->DeleteResource(ldfres3);
+
+                // delete the feature sources
+                Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
+                pService->DeleteResource(fsres1);
+
+                Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
+                pService->DeleteResource(fsres2);
+
+                Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
+                pService->DeleteResource(fsres3);
+
+                // delete the print layouts
+                Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
+                pService->DeleteResource(plres1);
+
+                Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
+                pService->DeleteResource(plres2);
+
+                // delete the symbol library
+                Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
+                pService->DeleteResource(slres1);
+
+                // delete symbology stuff
+                Ptr<MgResourceIdentifier> fsres4 = new MgResourceIdentifier(L"Library://UnitTests/Data/Capitals.FeatureSource");
+                pService->DeleteResource(fsres4);
+                Ptr<MgResourceIdentifier> sdres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbol.SymbolDefinition");
+                pService->DeleteResource(sdres1);
+                Ptr<MgResourceIdentifier> sdres2 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbolParam.SymbolDefinition");
+                pService->DeleteResource(sdres2);
+                Ptr<MgResourceIdentifier> ldfres4 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Capitals.LayerDefinition");
+                pService->DeleteResource(ldfres4);
+                Ptr<MgResourceIdentifier> ldfres5 = new MgResourceIdentifier(L"Library://UnitTests/Layers/CapitalsParam.LayerDefinition");
+                pService->DeleteResource(ldfres5);
+                Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Capitals.MapDefinition");
+                pService->DeleteResource(mapres2);
+                Ptr<MgResourceIdentifier> mapres3 = new MgResourceIdentifier(L"Library://UnitTests/Maps/CapitalsParam.MapDefinition");
+                pService->DeleteResource(mapres3);
+
+                Ptr<MgResourceIdentifier> fsres5 = new MgResourceIdentifier(L"Library://UnitTests/Data/Lines.FeatureSource");
+                pService->DeleteResource(fsres5);
+                Ptr<MgResourceIdentifier> sdres3 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/LineSymbol.SymbolDefinition");
+                pService->DeleteResource(sdres3);
+                Ptr<MgResourceIdentifier> sdres4 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/MTYP1500a.SymbolDefinition");
+                pService->DeleteResource(sdres4);
+                Ptr<MgResourceIdentifier> ldfres6 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Lines.LayerDefinition");
+                pService->DeleteResource(ldfres6);
+                Ptr<MgResourceIdentifier> ldfres7 = new MgResourceIdentifier(L"Library://UnitTests/Layers/LinesCrossTick.LayerDefinition");
+                pService->DeleteResource(ldfres7);
+                Ptr<MgResourceIdentifier> mapres4 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Lines.MapDefinition");
+                pService->DeleteResource(mapres4);
+                Ptr<MgResourceIdentifier> mapres5 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinesCrossTick.MapDefinition");
+                pService->DeleteResource(mapres5);
+
+                Ptr<MgResourceIdentifier> ldfres8 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation1.LayerDefinition");
+                pService->DeleteResource(ldfres8);
+                Ptr<MgResourceIdentifier> ldfres9 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation2.LayerDefinition");
+                pService->DeleteResource(ldfres9);
+                Ptr<MgResourceIdentifier> ldfres10 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation3.LayerDefinition");
+                pService->DeleteResource(ldfres10);
+                Ptr<MgResourceIdentifier> mapres8 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation1.MapDefinition");
+                pService->DeleteResource(mapres8);
+                Ptr<MgResourceIdentifier> mapres9 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation2.MapDefinition");
+                pService->DeleteResource(mapres9);
+                Ptr<MgResourceIdentifier> mapres10 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation3.MapDefinition");
+                pService->DeleteResource(mapres10);
+
+                Ptr<MgResourceIdentifier> mapres11 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_SymbologyPolygons.MapDefinition");
+                pService->DeleteResource(mapres11);
+                Ptr<MgResourceIdentifier> ldfres11 = new MgResourceIdentifier(L"Library://UnitTests/Layers/SymbologyParcels.LayerDefinition");
+                pService->DeleteResource(ldfres11);
+                Ptr<MgResourceIdentifier> sdres5 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/AreaSymbol.SymbolDefinition");
+                pService->DeleteResource(sdres5);
+
+                Ptr<MgResourceIdentifier> mapres12 = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWithWatermark.MapDefinition");
+                pService->DeleteResource(mapres12);
+                Ptr<MgResourceIdentifier> wdfres1 = new MgResourceIdentifier(L"Library://UnitTests/Watermarks/PoweredByMapGuide.WatermarkDefinition");
+                pService->DeleteResource(wdfres1);
+
+                Ptr<MgResourceIdentifier> mapres13 = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
+                pService->DeleteResource(mapres13);
+                Ptr<MgResourceIdentifier> ldfres12 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RoadCenterLines.LayerDefinition");
+                pService->DeleteResource(ldfres12);
+                Ptr<MgResourceIdentifier> ldfres13 = new MgResourceIdentifier(L"Library://UnitTests/Layers/VotingDistricts.LayerDefinition");
+                pService->DeleteResource(ldfres13);
+                Ptr<MgResourceIdentifier> fsres6 = new MgResourceIdentifier(L"Library://UnitTests/Data/RoadCenterLines.FeatureSource");
+                pService->DeleteResource(fsres6);
+                Ptr<MgResourceIdentifier> fsres7 = new MgResourceIdentifier(L"Library://UnitTests/Data/VotingDistricts.FeatureSource");
+                pService->DeleteResource(fsres7);
+
+                Ptr<MgResourceIdentifier> ldfres14 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTS.LayerDefinition");
+                pService->DeleteResource(ldfres14);
+                Ptr<MgResourceIdentifier> ldfres15 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTS.LayerDefinition");
+                pService->DeleteResource(ldfres15);
+                Ptr<MgResourceIdentifier> ldfres16 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTSWithTheme.LayerDefinition");
+                pService->DeleteResource(ldfres16);
+                Ptr<MgResourceIdentifier> ldfres17 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTSWithTheme.LayerDefinition");
+                pService->DeleteResource(ldfres17);
+                Ptr<MgResourceIdentifier> ldfres18 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTSSingleCTS.LayerDefinition");
+                pService->DeleteResource(ldfres18);
+                Ptr<MgResourceIdentifier> ldfres19 = new MgResourceIdentifier(L"Library://UnitTests/Layers/SingleFTSMultiCTS.LayerDefinition");
+                pService->DeleteResource(ldfres19);
+
+                // Data related to stylization function tests
+                Ptr<MgResourceIdentifier> ldfres20 = new MgResourceIdentifier(L"Library://UnitTests/Layers/StylizationFuncs.LayerDefinition");
+                pService->DeleteResource(ldfres20);
+
+                Ptr<MgResourceIdentifier> mapres15 = new MgResourceIdentifier(L"Library://UnitTests/Maps/StylizationFuncs.MapDefinition");
+                pService->DeleteResource(mapres15);
+
+                // Layer watermark test
+                Ptr<MgResourceIdentifier> wdfres2 = new MgResourceIdentifier(L"Library://UnitTests/Watermarks/Rail.WatermarkDefinition");
+                pService->DeleteResource(wdfres2);
+                Ptr<MgResourceIdentifier> ldfres21 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RailWatermark.LayerDefinition");
+                pService->DeleteResource(ldfres21);
+            }
+            catch (MgFileIoException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                ACE_DEBUG((LM_INFO, ACE_TEXT("\nMgFileIoException - Possible file permission error.\nError: %W\n"), message.c_str()));
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                message += e->GetStackTrace(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+            catch (...)
+            {
+                throw;
+            }
+        }
+
+        // TestTileService teardown
+        if (TestServiceFactory::IsRunningSuite("[TileService]"))
+        {
+            printf("Tearing down data for suite: TileService\n");
+            try
+            {
+                // ------------------------------------------------------
+                // base map source data
+                // ------------------------------------------------------
+
+                // delete the map definition
+                Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
+                pService->DeleteResource(mapres1);
+
+                // delete the layer definitions
+                Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RoadCenterLines.LayerDefinition");
+                pService->DeleteResource(ldfres1);
+
+                Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
+                pService->DeleteResource(ldfres2);
+
+                Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/VotingDistricts.LayerDefinition");
+                pService->DeleteResource(ldfres3);
+
+                // delete the feature sources
+                Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/RoadCenterLines.FeatureSource");
+                pService->DeleteResource(fsres1);
+
+                Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
+                pService->DeleteResource(fsres2);
+
+                Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/VotingDistricts.FeatureSource");
+                pService->DeleteResource(fsres3);
+
+                // remove temporary directory for tile images
+                MgFileUtil::DeleteDirectory(L"./temp_tiles", true, false);
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+            catch (...)
+            {
+                throw;
+            }
+        }
+
+        // TestResourceService teardown
+        if (TestServiceFactory::IsRunningSuite("[ResourceService]"))
+        {
+            printf("Tearing down data for suite: ResourceService\n");
+            try
+            {
+                // delete the drawing source definition
+                Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/Shuttle.DrawingSource");
+                pService->DeleteResource(mapres1);
+
+                Ptr<MgResourceIdentifier> fs1 = new MgResourceIdentifier(L"Library://UnitTests/Data/acea.FeatureSource");
+                pService->DeleteResource(fs1);
+
+                MgResourceIdentifier resourceIdentifier(L"Library://UnitTests/Data/test-1.FeatureSource"); // Original resource added
+                MgResourceIdentifier resourceIdentifier2(L"Library://UnitTests/Data/test-2.FeatureSource"); // Used in copy and move
+                MgResourceIdentifier resourceIdentifier3(L"Library://UnitTests/Data/World.DrawingSource"); // Added by package
+                MgResourceIdentifier resourceIdentifier4(L"Library://UnitTests/Layer/test-1.LayerDefinition"); // For cascade move resource
+
+                // Delete any resources created
+                if (pService->ResourceExists(&resourceIdentifier))
+                    pService->DeleteResource(&resourceIdentifier);
+
+                if (pService->ResourceExists(&resourceIdentifier2))
+                    pService->DeleteResource(&resourceIdentifier2);
+
+                if (pService->ResourceExists(&resourceIdentifier3))
+                    pService->DeleteResource(&resourceIdentifier3);
+
+                if (pService->ResourceExists(&resourceIdentifier4))
+                    pService->DeleteResource(&resourceIdentifier4);
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+            catch (...)
+            {
+                throw;
+            }
+        }
+
+        // TestFeatureService teardown
+        if (TestServiceFactory::IsRunningSuite("[FeatureService]"))
+        {
+            printf("Tearing down data for suite: FeatureService\n");
+            try
+            {
+                // delete the feature sources definition
+                Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
+                pService->DeleteResource(fsres1);
+
+                Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Redding_Parcels.FeatureSource");
+                pService->DeleteResource(fsres2);
+
+                Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_BuildingOutlines.FeatureSource");
+                pService->DeleteResource(fsres3);
+
+                Ptr<MgResourceIdentifier> fsres4 = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_VotingDistricts.FeatureSource");
+                pService->DeleteResource(fsres4);
+
+                Ptr<MgResourceIdentifier> fsres5 = new MgResourceIdentifier(L"Library://UnitTests/Data/TestChainedInner1ToManyJoin.FeatureSource");
+                pService->DeleteResource(fsres5);
+
+                Ptr<MgResourceIdentifier> fsres6 = new MgResourceIdentifier(L"Library://UnitTests/Data/Empty.FeatureSource");
+                pService->DeleteResource(fsres6);
+
+                Ptr<MgResourceIdentifier> fsres7 = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels_Writable.FeatureSource");
+                pService->DeleteResource(fsres7);
+
+                Ptr<MgResourceIdentifier> fsres8 = new MgResourceIdentifier(L"Library://UnitTests/Data/FdoJoin.FeatureSource");
+                pService->DeleteResource(fsres8);
+
+                Ptr<MgResourceIdentifier> fsres9 = new MgResourceIdentifier(L"Library://UnitTests/Data/SecuredCredentials.FeatureSource");
+                pService->DeleteResource(fsres9);
+
+                //Ptr<MgResourceIdentifier> folder = new MgResourceIdentifier(L"Library://UnitTests/");
+                //pService->DeleteResource(folder);
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+            catch (...)
+            {
+                throw;
+            }
+        }
+
+#ifdef DEBUG
+        ACE_DEBUG((LM_INFO, ACE_TEXT("\nConnection Pool status: \n\n")));
+        std::vector<PoolCacheEntry*> entries;
+        MgdFdoConnectionPool::GetCacheInfo(entries);
+        for (std::vector<PoolCacheEntry*>::iterator it = entries.begin(); it != entries.end(); it++)
+        {
+            STRING resId = (*it)->ResourceId;
+            ACE_DEBUG((LM_INFO, ACE_TEXT(" - %W (%d Open, %d Closed)\n"), resId.c_str(), (*it)->OpenCount, (*it)->ClosedCount));
+        }
+#endif
+    }
+};
+
+CATCH_REGISTER_LISTENER(TestDataSetup)
+
+// Get rid of Wweak-tables
+TestDataSetup::~TestDataSetup() {}
\ No newline at end of file

Copied: trunk/MgDev/Desktop/UnitTest/TestServiceFactory.h (from rev 9676, sandbox/jng/catch2/Desktop/UnitTest/TestServiceFactory.h)
===================================================================
--- trunk/MgDev/Desktop/UnitTest/TestServiceFactory.h	                        (rev 0)
+++ trunk/MgDev/Desktop/UnitTest/TestServiceFactory.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -0,0 +1,41 @@
+//
+//  Copyright (C) 2004-2020 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _TESTSERVICEFACTORY_H
+#define _TESTSERVICEFACTORY_H
+
+#include "MgDesktop.h"
+
+#include <string>
+#include <set>
+
+class TestServiceFactory
+{
+public:
+    static const STRING TEST_LOCALE;
+
+    static void AddSuiteToRun(const std::string& suite);
+
+    static void GetCatch2Tags(std::string& testOrTags);
+
+    static bool IsRunningSuite(const std::string& suite);
+
+private:
+    static std::set<std::string> sm_suitesToRun;
+};
+
+#endif

Modified: trunk/MgDev/Desktop/UnitTest/TestTileService.cpp
===================================================================
--- trunk/MgDev/Desktop/UnitTest/TestTileService.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/UnitTest/TestTileService.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -16,9 +16,11 @@
 //
 
 #include "MgDesktop.h"
-#include "TestTileService.h"
-#include "CppUnitExtensions.h"
 
+#include "CatchHelperMacros.h"
+#include "TestServiceFactory.h"
+#include "catch.hpp"
+
 #define PATH_LEN 512
 
 // determines the number of requests to make, as a factor of the number of tiles
@@ -29,186 +31,41 @@
 
 static const INT32 MG_TEST_THREADS = 4;
 
-const STRING TEST_LOCALE = L"en";
-
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestTileService, "TestTileService");
-
-
-TestTileService::TestTileService()
+////////////////////////////////////////////////////////////////
+/// Helpers
+////////////////////////////////////////////////////////////////
+static MgdMap* CreateMap(CREFSTRING mapName = L"")
 {
-    Ptr<MgdServiceFactory> fact = new MgdServiceFactory();
+    // set a default name if not supplied
+    STRING name = (mapName.empty()) ? L"UnitTestBaseMap" : mapName;
 
-    // store references to the various services we use
-    m_svcResource = static_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
-    assert(m_svcResource != NULL);
+    // make a runtime map
+    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
+    MgdMap* map = new MgdMap(mdfres, name);
 
-    m_svcTile = static_cast<MgdTileService*>(fact->CreateService(MgServiceType::TileService));
-    assert(m_svcTile != NULL);
-}
+    // set the view
+    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.723636, 43.715015);
+    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
+    map->SetViewCenter(ptNewCenter);
+    map->SetDisplayDpi(96);
+    map->SetDisplayWidth(1024);
+    map->SetDisplayHeight(1024);
 
+    // render at a scale of 1:12500
+    map->SetViewScale(12500.0);
 
-TestTileService::~TestTileService()
-{
+    return map;
 }
 
 
-void TestTileService::setUp()
+// returns a random integer in the range 0 to n-1
+static INT32 Rand(INT32 n)
 {
+    double numer = (double)rand() + 0.5;
+    double denom = (double)RAND_MAX + 1.0;
+    return (INT32)(numer / denom * n);
 }
 
-
-void TestTileService::tearDown()
-{
-}
-
-
-void TestTileService::TestStart()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Tile Service tests.\n")));
-
-    try
-    {
-        /*
-        #ifdef _DEBUG
-        MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
-        if(pFdoConnectionManager)
-        {
-            pFdoConnectionManager->ShowCache();
-        }
-        #endif
-        */
-
-        // ------------------------------------------------------
-        // base map source data
-        // ------------------------------------------------------
-
-        // publish the map definition
-        Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
-        Ptr<MgByteSource> mdfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_BaseMap.mdf", false);
-        Ptr<MgByteReader> mdfrdr1 = mdfsrc1->GetReader();
-        m_svcResource->SetResource(mapres1, mdfrdr1, NULL);
-
-        // publish the layer definitions
-        Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RoadCenterLines.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.ldf", false);
-        Ptr<MgByteReader> ldfrdr1 = ldfsrc1->GetReader();
-        m_svcResource->SetResource(ldfres1, ldfrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.ldf", false);
-        Ptr<MgByteReader> ldfrdr2 = ldfsrc2->GetReader();
-        m_svcResource->SetResource(ldfres2, ldfrdr2, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/VotingDistricts.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.ldf", false);
-        Ptr<MgByteReader> ldfrdr3 = ldfsrc3->GetReader();
-        m_svcResource->SetResource(ldfres3, ldfrdr3, NULL);
-
-        // publish the feature sources
-        Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/RoadCenterLines.FeatureSource");
-        Ptr<MgByteSource> fssrc1 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.fs", false);
-        Ptr<MgByteReader> fsrdr1 = fssrc1->GetReader();
-        m_svcResource->SetResource(fsres1, fsrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
-        Ptr<MgByteSource> fssrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.fs", false);
-        Ptr<MgByteReader> fsrdr2 = fssrc2->GetReader();
-        m_svcResource->SetResource(fsres2, fsrdr2, NULL);
-
-        Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/VotingDistricts.FeatureSource");
-        Ptr<MgByteSource> fssrc3 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.fs", false);
-        Ptr<MgByteReader> fsrdr3 = fssrc3->GetReader();
-        m_svcResource->SetResource(fsres3, fsrdr3, NULL);
-
-        // publish the resource data
-        Ptr<MgByteSource> dataSource1 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.sdf", false);
-        Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
-        m_svcResource->SetResourceData(fsres1, L"UT_RoadCenterLines.sdf", L"File", dataReader1);
-
-        Ptr<MgByteSource> dataSource2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.sdf", false);
-        Ptr<MgByteReader> dataReader2 = dataSource2->GetReader();
-        m_svcResource->SetResourceData(fsres2, L"UT_Parcels.sdf", L"File", dataReader2);
-
-        Ptr<MgByteSource> dataSource3 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.sdf", false);
-        Ptr<MgByteReader> dataReader3 = dataSource3->GetReader();
-        m_svcResource->SetResourceData(fsres3, L"UT_VotingDistricts.sdf", L"File", dataReader3);
-
-        // set up temporary directory for tile images
-        MgFileUtil::CreateDirectory(L"./temp_tiles", false);
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-}
-
-
-void TestTileService::TestEnd()
-{
-    try
-    {
-        // ------------------------------------------------------
-        // base map source data
-        // ------------------------------------------------------
-
-        // delete the map definition
-        Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
-        m_svcResource->DeleteResource(mapres1);
-
-        // delete the layer definitions
-        Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RoadCenterLines.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres1);
-
-        Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres2);
-
-        Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/VotingDistricts.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres3);
-
-        // delete the feature sources
-        Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/RoadCenterLines.FeatureSource");
-        m_svcResource->DeleteResource(fsres1);
-
-        Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
-        m_svcResource->DeleteResource(fsres2);
-
-        Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/VotingDistricts.FeatureSource");
-        m_svcResource->DeleteResource(fsres3);
-
-        // remove temporary directory for tile images
-        MgFileUtil::DeleteDirectory(L"./temp_tiles", true, false);
-
-        /*
-        #ifdef _DEBUG
-        MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
-        if(pFdoConnectionManager)
-        {
-            pFdoConnectionManager->ShowCache();
-        }
-        #endif
-        */
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nTile Service tests completed.\n\n")));
-}
-
-
 // data structure which is passed to each thread
 struct TileThreadData
 {
@@ -227,7 +84,7 @@
 
 
 // the method which gets executed by the ACE worker thread
-ACE_THR_FUNC_RETURN GetTileWorker(void* param)
+static ACE_THR_FUNC_RETURN GetTileWorker(void* param)
 {
     // get the data for this thread
     TileThreadData* threadData = (TileThreadData*)param;
@@ -245,7 +102,7 @@
         // get the tile service instance
         Ptr<MgdServiceFactory> fact = new MgdServiceFactory();
         Ptr<MgdTileService> svcTile = static_cast<MgdTileService*>(fact->CreateService(MgServiceType::TileService));
-        assert(svcTile != NULL);
+        assert(svcTile != nullptr);
 
         // get the tile
         Ptr<MgByteReader> img = svcTile->GetTile(map, L"BaseLayers", tileCol, tileRow);
@@ -260,9 +117,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -277,8 +134,7 @@
     return 0;
 }
 
-
-void TestTileService::TestCase_GetTile()
+TEST_CASE("GetTile", "[TileService]")
 {
     // specify the number of threads to use
     const INT32 numThreads = MG_TEST_THREADS;
@@ -333,8 +189,8 @@
             Ptr<MgLayerCollection> mapLayers = map->GetLayers();
             Ptr<MgLayerCollection> newMapLayers = newMap->GetLayers();
 
-            CPPUNIT_ASSERT(mapLayers->GetCount() == newMapLayers->GetCount());
-            CPPUNIT_ASSERT(mapGroups->GetCount() == newMapGroups->GetCount());
+            REQUIRE(mapLayers->GetCount() == newMapLayers->GetCount());
+            REQUIRE(mapGroups->GetCount() == newMapGroups->GetCount());
 
             threadData[i].threadId = i;
             threadData[i].done     = true;
@@ -374,7 +230,7 @@
                         threadData[i].tileCol  = tileCols[nTile];
 
                         // spawn a new thread using a specific group id
-                        int thid = manager->spawn(ACE_THR_FUNC(GetTileWorker), &threadData[i], 0, NULL, NULL, 0, THREAD_GROUP);
+                        int thid = manager->spawn(ACE_THR_FUNC(GetTileWorker), &threadData[i], 0, nullptr, nullptr, 0, THREAD_GROUP);
                         nRequest++;
                     }
 
@@ -408,9 +264,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -425,7 +281,7 @@
 
 
 // the method which gets executed by the ACE worker thread
-ACE_THR_FUNC_RETURN SetTileWorker(void* param)
+static ACE_THR_FUNC_RETURN SetTileWorker(void* param)
 {
     // get the data for this thread
     TileThreadData* threadData = (TileThreadData*)param;
@@ -442,7 +298,7 @@
         // get the tile service instance
         Ptr<MgdServiceFactory> fact = new MgdServiceFactory();
         Ptr<MgdTileService> svcTile = static_cast<MgdTileService*>(fact->CreateService(MgServiceType::TileService));
-        assert(svcTile != NULL);
+        assert(svcTile != nullptr);
 
         // find the finite display scale closest to the requested map scale
         double scale = map->GetViewScale();
@@ -464,9 +320,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -481,8 +337,7 @@
     return 0;
 }
 
-
-void TestTileService::TestCase_SetTile()
+TEST_CASE("SetTile", "[TileService]")
 {
     // specify the number of threads to use
     const INT32 numThreads = MG_TEST_THREADS;
@@ -560,7 +415,7 @@
                         threadData[i].tileCol = tileCols[nRequest];
 
                         // spawn a new thread using a specific group id
-                        int thid = manager->spawn(ACE_THR_FUNC(SetTileWorker), &threadData[i], 0, NULL, NULL, 0, THREAD_GROUP);
+                        int thid = manager->spawn(ACE_THR_FUNC(SetTileWorker), &threadData[i], 0, nullptr, nullptr, 0, THREAD_GROUP);
                         nRequest++;
                     }
 
@@ -623,7 +478,7 @@
                         threadData[i].tileCol = tileCols[nTile];
 
                         // spawn a new thread using a specific group id
-                        int thid = manager->spawn(ACE_THR_FUNC(SetTileWorker), &threadData[i], 0, NULL, NULL, 0, THREAD_GROUP);
+                        int thid = manager->spawn(ACE_THR_FUNC(SetTileWorker), &threadData[i], 0, nullptr, nullptr, 0, THREAD_GROUP);
                         nRequest++;
                     }
 
@@ -657,9 +512,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -671,9 +526,7 @@
 ////////////////////////////////////////////////////////////////
 /// GetSetTile methods
 ////////////////////////////////////////////////////////////////
-
-
-void TestTileService::TestCase_GetSetTile()
+TEST_CASE("GetSetTile", "[TileService]")
 {
     // specify the number of threads to use
     const INT32 numThreads = MG_TEST_THREADS;
@@ -756,9 +609,9 @@
                         // spawn a new thread - 75% of the calls are gets, 25% are sets
                         int thid;
                         if ((double)rand() < 0.75 * (double)RAND_MAX)
-                            thid = manager->spawn(ACE_THR_FUNC(GetTileWorker), &threadData[i], 0, NULL, NULL, 0, THREAD_GROUP);
+                            thid = manager->spawn(ACE_THR_FUNC(GetTileWorker), &threadData[i], 0, nullptr, nullptr, 0, THREAD_GROUP);
                         else
-                            thid = manager->spawn(ACE_THR_FUNC(SetTileWorker), &threadData[i], 0, NULL, NULL, 0, THREAD_GROUP);
+                            thid = manager->spawn(ACE_THR_FUNC(SetTileWorker), &threadData[i], 0, nullptr, nullptr, 0, THREAD_GROUP);
                         nRequest++;
                     }
 
@@ -792,9 +645,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -806,15 +659,16 @@
 ////////////////////////////////////////////////////////////////
 /// ClearCache methods
 ////////////////////////////////////////////////////////////////
-
-
-void TestTileService::TestCase_ClearCache()
+TEST_CASE("ClearCache", "[TileService]")
 {
     try
     {
-        // call the API with a NULL argument
-        CPPUNIT_ASSERT_THROW_MG(m_svcTile->ClearCache(NULL), MgNullArgumentException*);
+        Ptr<MgdServiceFactory> fact = new MgdServiceFactory();
+        Ptr<MgdTileService> m_svcTile = dynamic_cast<MgdTileService*>(fact->CreateService(MgServiceType::TileService));
 
+        // call the API with a nullptr argument
+        REQUIRE_THROWS_MG(m_svcTile->ClearCache(nullptr), MgNullArgumentException*);
+
         // call the API with a map having a different name
         Ptr<MgdMap> map = CreateMap(L"blah");
         m_svcTile->ClearCache(map);
@@ -828,9 +682,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -837,41 +691,3 @@
         throw;
     }
 }
-
-
-////////////////////////////////////////////////////////////////
-/// Helpers
-////////////////////////////////////////////////////////////////
-
-
-MgdMap* TestTileService::CreateMap(CREFSTRING mapName)
-{
-    // set a default name if not supplied
-    STRING name = (mapName.empty())? L"UnitTestBaseMap" : mapName;
-
-    // make a runtime map
-    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
-    MgdMap* map = new MgdMap(mdfres, name);
-
-    // set the view
-    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.723636, 43.715015);
-    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
-    map->SetViewCenter(ptNewCenter);
-    map->SetDisplayDpi(96);
-    map->SetDisplayWidth(1024);
-    map->SetDisplayHeight(1024);
-
-    // render at a scale of 1:12500
-    map->SetViewScale(12500.0);
-
-    return map;
-}
-
-
-// returns a random integer in the range 0 to n-1
-INT32 TestTileService::Rand(INT32 n)
-{
-    double numer = (double)rand() + 0.5;
-    double denom = (double)RAND_MAX + 1.0;
-    return (INT32)(numer / denom * n);
-}

Deleted: trunk/MgDev/Desktop/UnitTest/TestTileService.h
===================================================================
--- trunk/MgDev/Desktop/UnitTest/TestTileService.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/UnitTest/TestTileService.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,59 +0,0 @@
-//
-//  Copyright (C) 2004-2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _TESTTILESERVICE_H
-#define _TESTTILESERVICE_H
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestTileService : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestTileService);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_GetTile);
-    CPPUNIT_TEST(TestCase_SetTile);
-    CPPUNIT_TEST(TestCase_GetSetTile);
-    CPPUNIT_TEST(TestCase_ClearCache);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    TestTileService();
-    ~TestTileService();
-
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    void TestCase_GetTile();
-    void TestCase_SetTile();
-    void TestCase_GetSetTile();
-    void TestCase_ClearCache();
-
-private:
-    MgdMap* CreateMap(CREFSTRING mapName = L"");
-    INT32 Rand(INT32 n);
-
-private:
-    Ptr<MgResourceService> m_svcResource;
-    Ptr<MgdTileService> m_svcTile;
-};
-
-#endif

Modified: trunk/MgDev/Desktop/UnitTest/UnitTest.vcxproj
===================================================================
--- trunk/MgDev/Desktop/UnitTest/UnitTest.vcxproj	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/UnitTest/UnitTest.vcxproj	2020-07-21 09:28:07 UTC (rev 9677)
@@ -76,7 +76,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>..\..\Common\Foundation;..\..\Common\PlatformBase;..\..\Common\Geometry;..\..\Common\MdfModel;..\..\Common\MdfParser;..\..\Oem\ACE\ACE_wrappers;..\..\Oem\dbxml\xerces-c-src\src;..\..\Oem\FDO\Inc;..\..\Oem\FDO\Inc\ExpressionEngine;..\..\Common\Renderers;..\..\Common\Stylization;..\..\Oem\DWFTK\develop\global\src;..\..\Oem\DWFTK\develop\global\src\dwf;..\..\Oem\CppUnit-1.9.14\include;..\MgDesktop;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\..\Common\Foundation;..\..\Common\PlatformBase;..\..\Common\Geometry;..\..\Common\MdfModel;..\..\Common\MdfParser;..\..\Oem\ACE\ACE_wrappers;..\..\Oem\dbxml\xerces-c-src\src;..\..\Oem\FDO\Inc;..\..\Oem\FDO\Inc\ExpressionEngine;..\..\Common\Renderers;..\..\Common\Stylization;..\..\Oem\DWFTK\develop\global\src;..\..\Oem\DWFTK\develop\global\src\dwf;..\..\Oem\catch2;..\MgDesktop;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -85,8 +85,8 @@
       <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>cppunitd.lib;MgDesktopd.lib;FDO.lib;FDOCommon.lib;ACEd.lib;MgFoundationd.lib;MgGeometryd.lib;MgMdfModeld.lib;MgMdfParserd.lib;MgPlatformBased.lib;MgRenderersd.lib;MgStylizationd.lib;xerces-c_3mgD.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <AdditionalLibraryDirectories>..\..\Oem\ACE\ACE_wrappers\lib\$(Configuration);..\..\Oem\FDO\Lib;..\..\Oem\DWFTK\develop\global\lib\static\$(Configuration);..\..\Oem\dbxml\xerces-c-src\Build\$(Configuration);..\..\Common\lib\$(Configuration);..\Lib\debug;..\..\Oem\CppUnit-1.9.14\lib\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalDependencies>MgDesktopd.lib;FDO.lib;FDOCommon.lib;ACEd.lib;MgFoundationd.lib;MgGeometryd.lib;MgMdfModeld.lib;MgMdfParserd.lib;MgPlatformBased.lib;MgRenderersd.lib;MgStylizationd.lib;xerces-c_3mgD.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>..\..\Oem\ACE\ACE_wrappers\lib\$(Configuration);..\..\Oem\FDO\Lib;..\..\Oem\DWFTK\develop\global\lib\static\$(Configuration);..\..\Oem\dbxml\xerces-c-src\Build\$(Configuration);..\..\Common\lib\$(Configuration);..\Lib\debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <TargetMachine>MachineX86</TargetMachine>
     </Link>
@@ -124,7 +124,7 @@
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>..\..\Common\Foundation;..\..\Common\PlatformBase;..\..\Common\Geometry;..\..\Common\MdfModel;..\..\Common\MdfParser;..\..\Oem\ACE\ACE_wrappers;..\..\Oem\dbxml\xerces-c-src\src;..\..\Oem\FDO\Inc;..\..\Oem\FDO\Inc\ExpressionEngine;..\..\Common\Renderers;..\..\Common\Stylization;..\..\Oem\DWFTK\develop\global\src;..\..\Oem\DWFTK\develop\global\src\dwf;..\..\Oem\CppUnit-1.9.14\include;..\MgDesktop;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\..\Common\Foundation;..\..\Common\PlatformBase;..\..\Common\Geometry;..\..\Common\MdfModel;..\..\Common\MdfParser;..\..\Oem\ACE\ACE_wrappers;..\..\Oem\dbxml\xerces-c-src\src;..\..\Oem\FDO\Inc;..\..\Oem\FDO\Inc\ExpressionEngine;..\..\Common\Renderers;..\..\Common\Stylization;..\..\Oem\DWFTK\develop\global\src;..\..\Oem\DWFTK\develop\global\src\dwf;..\..\Oem\catch2;..\MgDesktop;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -133,8 +133,8 @@
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>cppunitd.lib;MgDesktopd.lib;FDO.lib;FDOCommon.lib;ACEd.lib;MgFoundationd.lib;MgGeometryd.lib;MgMdfModeld.lib;MgMdfParserd.lib;MgPlatformBased.lib;MgRenderersd.lib;MgStylizationd.lib;xerces-c_3mgD.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <AdditionalLibraryDirectories>..\..\Oem\ACE\ACE_wrappers\lib64\$(Configuration);..\..\Oem\FDO\Lib64;..\..\Oem\DWFTK\develop\global\lib\static\$(Configuration)64;..\..\Oem\dbxml\xerces-c-src\Build\$(Configuration)64;..\..\Common\lib\$(Configuration)64;..\Lib\debug64;..\..\Oem\CppUnit-1.9.14\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalDependencies>MgDesktopd.lib;FDO.lib;FDOCommon.lib;ACEd.lib;MgFoundationd.lib;MgGeometryd.lib;MgMdfModeld.lib;MgMdfParserd.lib;MgPlatformBased.lib;MgRenderersd.lib;MgStylizationd.lib;xerces-c_3mgD.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>..\..\Oem\ACE\ACE_wrappers\lib64\$(Configuration);..\..\Oem\FDO\Lib64;..\..\Oem\DWFTK\develop\global\lib\static\$(Configuration)64;..\..\Oem\dbxml\xerces-c-src\Build\$(Configuration)64;..\..\Common\lib\$(Configuration)64;..\Lib\debug64</AdditionalLibraryDirectories>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <TargetMachine>MachineX64</TargetMachine>
     </Link>
@@ -170,7 +170,7 @@
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>..\..\Common\Foundation;..\..\Common\PlatformBase;..\..\Common\Geometry;..\..\Common\MdfModel;..\..\Common\MdfParser;..\..\Oem\ACE\ACE_wrappers;..\..\Oem\dbxml\xerces-c-src\src;..\..\Oem\FDO\Inc;..\..\Oem\FDO\Inc\ExpressionEngine;..\..\Common\Renderers;..\..\Common\Stylization;..\..\Oem\DWFTK\develop\global\src;..\..\Oem\DWFTK\develop\global\src\dwf;..\..\Oem\CppUnit-1.9.14\include;..\MgDesktop;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\..\Common\Foundation;..\..\Common\PlatformBase;..\..\Common\Geometry;..\..\Common\MdfModel;..\..\Common\MdfParser;..\..\Oem\ACE\ACE_wrappers;..\..\Oem\dbxml\xerces-c-src\src;..\..\Oem\FDO\Inc;..\..\Oem\FDO\Inc\ExpressionEngine;..\..\Common\Renderers;..\..\Common\Stylization;..\..\Oem\DWFTK\develop\global\src;..\..\Oem\DWFTK\develop\global\src\dwf;..\..\Oem\catch2;..\MgDesktop;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
@@ -178,8 +178,8 @@
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>cppunit.lib;MgDesktop.lib;FDO.lib;FDOCommon.lib;ACE.lib;MgFoundation.lib;MgGeometry.lib;MgMdfModel.lib;MgMdfParser.lib;MgPlatformBase.lib;MgRenderers.lib;MgStylization.lib;xerces-c_3mg.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <AdditionalLibraryDirectories>..\..\Oem\ACE\ACE_wrappers\lib\$(Configuration);..\..\Oem\FDO\Lib;..\..\Oem\DWFTK\develop\global\lib\static\$(Configuration);..\..\Oem\dbxml\xerces-c-src\Build\$(Configuration);..\..\Common\lib\$(Configuration);..\Lib\release;..\..\Oem\CppUnit-1.9.14\lib\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalDependencies>MgDesktop.lib;FDO.lib;FDOCommon.lib;ACE.lib;MgFoundation.lib;MgGeometry.lib;MgMdfModel.lib;MgMdfParser.lib;MgPlatformBase.lib;MgRenderers.lib;MgStylization.lib;xerces-c_3mg.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>..\..\Oem\ACE\ACE_wrappers\lib\$(Configuration);..\..\Oem\FDO\Lib;..\..\Oem\DWFTK\develop\global\lib\static\$(Configuration);..\..\Oem\dbxml\xerces-c-src\Build\$(Configuration);..\..\Common\lib\$(Configuration);..\Lib\release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <DelayLoadDLLs>FDO.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <OptimizeReferences>true</OptimizeReferences>
@@ -222,7 +222,7 @@
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>..\..\Common\Foundation;..\..\Common\PlatformBase;..\..\Common\Geometry;..\..\Common\MdfModel;..\..\Common\MdfParser;..\..\Oem\ACE\ACE_wrappers;..\..\Oem\dbxml\xerces-c-src\src;..\..\Oem\FDO\Inc;..\..\Oem\FDO\Inc\ExpressionEngine;..\..\Common\Renderers;..\..\Common\Stylization;..\..\Oem\DWFTK\develop\global\src;..\..\Oem\DWFTK\develop\global\src\dwf;..\..\Oem\CppUnit-1.9.14\include;..\MgDesktop;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\..\Common\Foundation;..\..\Common\PlatformBase;..\..\Common\Geometry;..\..\Common\MdfModel;..\..\Common\MdfParser;..\..\Oem\ACE\ACE_wrappers;..\..\Oem\dbxml\xerces-c-src\src;..\..\Oem\FDO\Inc;..\..\Oem\FDO\Inc\ExpressionEngine;..\..\Common\Renderers;..\..\Common\Stylization;..\..\Oem\DWFTK\develop\global\src;..\..\Oem\DWFTK\develop\global\src\dwf;..\..\Oem\catch2;..\MgDesktop;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
@@ -230,8 +230,8 @@
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>cppunit.lib;MgDesktop.lib;FDO.lib;FDOCommon.lib;ACE.lib;MgFoundation.lib;MgGeometry.lib;MgMdfModel.lib;MgMdfParser.lib;MgPlatformBase.lib;MgRenderers.lib;MgStylization.lib;xerces-c_3mg.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <AdditionalLibraryDirectories>..\..\Oem\ACE\ACE_wrappers\lib64\$(Configuration);..\..\Oem\FDO\Lib64;..\..\Oem\DWFTK\develop\global\lib\static\$(Configuration)64;..\..\Oem\dbxml\xerces-c-src\Build\$(Configuration)64;..\..\Common\lib\$(Configuration)64;..\Lib\release64;..\..\Oem\CppUnit-1.9.14\lib64\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalDependencies>MgDesktop.lib;FDO.lib;FDOCommon.lib;ACE.lib;MgFoundation.lib;MgGeometry.lib;MgMdfModel.lib;MgMdfParser.lib;MgPlatformBase.lib;MgRenderers.lib;MgStylization.lib;xerces-c_3mg.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>..\..\Oem\ACE\ACE_wrappers\lib64\$(Configuration);..\..\Oem\FDO\Lib64;..\..\Oem\DWFTK\develop\global\lib\static\$(Configuration)64;..\..\Oem\dbxml\xerces-c-src\Build\$(Configuration)64;..\..\Common\lib\$(Configuration)64;..\Lib\release64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <DelayLoadDLLs>FDO.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <OptimizeReferences>true</OptimizeReferences>
@@ -288,20 +288,13 @@
     <ClCompile Include="TestProfilingService.cpp" />
     <ClCompile Include="TestRenderingService.cpp" />
     <ClCompile Include="TestResourceService.cpp" />
+    <ClCompile Include="TestServiceFactory.cpp" />
     <ClCompile Include="TestTileService.cpp" />
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="CppUnitExtensions.h" />
-    <ClInclude Include="TestFeatureService.h" />
-    <ClInclude Include="TestKmlService.h" />
-    <ClInclude Include="TestLogManager.h" />
+    <ClInclude Include="CatchHelperMacros.h" />
     <ClInclude Include="TestLogManagerThread.h" />
-    <ClInclude Include="TestMappingService.h" />
-    <ClInclude Include="TestPerformance.h" />
-    <ClInclude Include="TestProfilingService.h" />
-    <ClInclude Include="TestRenderingService.h" />
-    <ClInclude Include="TestResourceService.h" />
-    <ClInclude Include="TestTileService.h" />
+    <ClInclude Include="TestServiceFactory.h" />
     <ClInclude Include="UnitTesting.h" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

Modified: trunk/MgDev/Desktop/UnitTest/UnitTest.vcxproj.filters
===================================================================
--- trunk/MgDev/Desktop/UnitTest/UnitTest.vcxproj.filters	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/UnitTest/UnitTest.vcxproj.filters	2020-07-21 09:28:07 UTC (rev 9677)
@@ -48,43 +48,22 @@
     <ClCompile Include="TestLogManagerThread.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="TestServiceFactory.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="CppUnitExtensions.h">
+    <ClInclude Include="UnitTesting.h">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="TestFeatureService.h">
+    <ClInclude Include="TestLogManagerThread.h">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="TestKmlService.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="TestMappingService.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="TestPerformance.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="TestRenderingService.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="TestResourceService.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="TestTileService.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="UnitTesting.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="TestProfilingService.h">
+    <ClInclude Include="TestServiceFactory.h">
       <Filter>Source Files</Filter>
     </ClInclude>
-    <ClInclude Include="TestLogManagerThread.h">
+    <ClInclude Include="CatchHelperMacros.h">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="TestLogManager.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
   </ItemGroup>
 </Project>
\ No newline at end of file

Modified: trunk/MgDev/Desktop/UnitTest/main.cpp
===================================================================
--- trunk/MgDev/Desktop/UnitTest/main.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Desktop/UnitTest/main.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,12 +1,25 @@
+//
+//  Copyright (C) 2004-2020 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#define CATCH_CONFIG_RUNNER
+#include "catch.hpp"
 #include "MgDesktop.h"
+#include "TestServiceFactory.h"
 #include <fstream>
-#include <cppunit/TestResult.h>
-#include <cppunit/TestResultCollector.h>
-#include <cppunit/TextOutputter.h>
-#include <cppunit/XmlOutputter.h>
-#include <cppunit/BriefTestProgressListener.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <cppunit/TextTestRunner.h>
 
 // for memory leak detection
 #if defined(_WIN32) && defined(_DEBUG)
@@ -67,63 +80,20 @@
 
     ACE_DEBUG((LM_INFO, ACE_TEXT("MENTOR_DICTIONARY_PATH is: %s\n"), dictDir.c_str()));
 
-    CppUnit::TextTestRunner runner;
-
-    // Add all of the tests
+    TestServiceFactory::AddSuiteToRun("[FeatureService]");
     //NOTE: Leave trace log off, otherwise one of the tests here will fail
-#if TEST_LOG_MANAGER == 1
-    runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestLogManager").makeTest());
-#endif
-#if TEST_RESOURCE_SERVICE == 1
-    runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestResourceService").makeTest());
-#endif
-#if TEST_RENDERING_SERVICE == 1
-    runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestRenderingService").makeTest());
-#endif
-#if TEST_FEATURE_SERVICE == 1
-    runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestFeatureService").makeTest());
-#endif
-#if TEST_MAPPING_SERVICE == 1
-    runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestMappingService").makeTest());
-#endif
-#if TEST_PROFILING_SERVICE == 1
-	runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestProfilingService").makeTest());
-#endif
-#if TEST_TILE_SERVICE == 1
-    //This causes access violations in Visual Leak Detector when run in debug mode. Only uncommment
+    TestServiceFactory::AddSuiteToRun("[LogManager]");
+    TestServiceFactory::AddSuiteToRun("[MappingService]");
+    TestServiceFactory::AddSuiteToRun("[ProfilingService]");
+    TestServiceFactory::AddSuiteToRun("[RenderingService]");
+    TestServiceFactory::AddSuiteToRun("[ResourceService]");
+    //This may cause access violations in Visual Leak Detector when run in debug mode. Only uncommment
     //to verify functionality, but don't use VLD for memory leak detection. Seek an alternate tool/library
     //in this case.
-    runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestTileService").makeTest());
-#endif
+    TestServiceFactory::AddSuiteToRun("[TileService]");
 
-    STRING fileName = L"UnitTestResults.xml";
-    if (fileName.size() > 0)
-    {
-        ofstream outfile(MG_WCHAR_TO_CHAR(fileName.c_str()));
-
-        if (outfile.is_open())
-        {
-            runner.setOutputter(new CppUnit::XmlOutputter(&runner.result(), outfile, "ISO-8859-1"));
-            //This is what we have to do to get detailed non-dotted test output 
-            //during execution like we get with FDO's unit tests
-            CppUnit::BriefTestProgressListener listener;
-            runner.eventManager().addListener(&listener);
-            runner.run("", false, true, false);
-            outfile.close();
-        }
-    }
-    else
-    {
-        runner.setOutputter(new CppUnit::TextOutputter(&runner.result(), std::cout));
-        //This is what we have to do to get detailed non-dotted test output 
-        //during execution like we get with FDO's unit tests
-        CppUnit::BriefTestProgressListener listener;
-        runner.eventManager().addListener(&listener);
-        runner.run("", false, true, false);
-    }
-
-    int nResult = runner.result().testFailuresTotal();
-
+    Catch::Session session;
+    int nResult = session.run(argc, argv);
     MgdPlatform::Terminate();
 
     return nResult;

Modified: trunk/MgDev/Server/src/Core/TestCommand.cpp
===================================================================
--- trunk/MgDev/Server/src/Core/TestCommand.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/Core/TestCommand.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -83,7 +83,7 @@
         }
         else
         {
-            ACE_DEBUG((LM_INFO, ACE_TEXT("Cannot open library: %s\n"), library.c_str()));
+            ACE_DEBUG((LM_INFO, ACE_TEXT("Cannot open library: %s (reason: %s)\n"), library.c_str(), dlerror()));
             throw new MgUnclassifiedException(L"MgTestCommand.Execute", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 #endif // _WIN32

Modified: trunk/MgDev/Server/src/UnitTesting/CMakeLists.txt
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/CMakeLists.txt	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/CMakeLists.txt	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,5 +1,5 @@
 include_directories(${ACE_INCLUDE_DIR}
-    ${CPPUNIT_INCLUDE_DIR}
+    ${MG_OEM_CATCH2_INCLUDE_DIR}
     ${XERCESC_INCLUDE_DIR}
     ${MG_COMMON_DIR}/Foundation
     ${MG_COMMON_DIR}/Geometry
@@ -32,11 +32,13 @@
     TestLogManagerThread.cpp
     TestMappingService.cpp
     TestMdfModel.cpp
+    TestMisc.cpp
     TestPerformance.cpp
     TestRenderingService.cpp
     TestResourceService.cpp
     TestServerAdminService.cpp
     TestServerManager.cpp
+    TestServiceFactory.cpp
     TestServiceManager.cpp
     TestSiteManager.cpp
     TestSiteService.cpp

Copied: trunk/MgDev/Server/src/UnitTesting/CatchHelperMacros.h (from rev 9676, sandbox/jng/catch2/Server/src/UnitTesting/CatchHelperMacros.h)
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/CatchHelperMacros.h	                        (rev 0)
+++ trunk/MgDev/Server/src/UnitTesting/CatchHelperMacros.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -0,0 +1,26 @@
+//
+//  Copyright (C) 2004-2020 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "catch.hpp"
+#define REQUIRE_THROWS_MG(action, extype) \
+    try { \
+        action; \
+        FAIL("Expected exception to be thrown"); \
+    } \
+    catch (extype ex) { \
+        SAFE_RELEASE(ex); \
+    }

Deleted: trunk/MgDev/Server/src/UnitTesting/CppUnitExtensions.h
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/CppUnitExtensions.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/CppUnitExtensions.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,78 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _CPPUNIT_EXTENSIONS_H
-#define _CPPUNIT_EXTENSIONS_H
-
-/** Asserts that the given expression throws an exception of the specified type.
- * \ingroup Assertions
- * Example of usage:
- * \code
- *   std::out_of_range exception;
- *   std::vector<int> v;
- *  CPPUNIT_ASSERT_THROW_EX( v.at( 50 ), std::out_of_range, exception );
- * \endcode
- */
-# define CPPUNIT_ASSERT_THROW_EX( expression, ExceptionType, exception )    \
-   do {                                                                     \
-      bool cpputExceptionThrown_ = false;                                   \
-      try {                                                                 \
-         expression;                                                        \
-      } catch ( ExceptionType & ex_) {                                      \
-         cpputExceptionThrown_ = true;                                      \
-         exception = ex_;                                                   \
-      }                                                                     \
-                                                                            \
-      if ( cpputExceptionThrown_ )                                          \
-         break;                                                             \
-                                                                            \
-      CPPUNIT_NS::Asserter::fail(                                           \
-                     "Expected exception: " #ExceptionType                  \
-                     " not thrown.",                                        \
-                     CPPUNIT_SOURCELINE() );                                \
-   } while ( false )
-
-
-/** Asserts that the given expression throws an MgException of the specified type.
- * \ingroup Assertions
- * Example of usage:
- * \code
- *   MgLogManager* pMgLogManager = MgLogManager::GetInstance();
- *   CPPUNIT_ASSERT_THROW_MG(mgr->DeleteLog(L""), MgNullArgumentException*);
- * \endcode
- */
-# define CPPUNIT_ASSERT_THROW_MG( expression, MgExceptionType )             \
-   do {                                                                     \
-      Ptr<MgException> exception;                                           \
-      bool cpputExceptionThrown_ = false;                                   \
-      try {                                                                 \
-         expression;                                                        \
-      } catch ( MgExceptionType & ex_) {                                    \
-         cpputExceptionThrown_ = true;                                      \
-         exception = ex_;                                                   \
-      }                                                                     \
-                                                                            \
-      if ( cpputExceptionThrown_ )                                          \
-         break;                                                             \
-                                                                            \
-      CPPUNIT_NS::Asserter::fail(                                           \
-                     "Expected exception: " #MgExceptionType                \
-                     " not thrown.",                                        \
-                     CPPUNIT_SOURCELINE() );                                \
-   } while ( false )
-
-#endif // _CPPUNIT_EXTENSIONS_H

Modified: trunk/MgDev/Server/src/UnitTesting/TestCoordinateSystem.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestCoordinateSystem.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestCoordinateSystem.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -16,10 +16,11 @@
 //
 
 #include "MapGuideCommon.h"
-#include "TestCoordinateSystem.h"
-#include "CppUnitExtensions.h"
 #include "FoundationDefs.h"
 
+#include "CatchHelperMacros.h"
+#include "catch.hpp"
+
 #ifndef _WIN32
 #define stricmp strcasecmp
 
@@ -67,34 +68,90 @@
 const double XNewYork = 583924.3730;
 const double YNewYork = 4507502.589;
 
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestCoordinateSystem, "TestCoordinateSystem");
+class FileAutoBackup
+{
+private:
 
-//static _CrtMemState state;
+    STRING m_sFilename;
+    STRING m_sRotateSuffix;
+    STRING m_sBackupFilename;
+    bool m_bRotated;
+    bool m_bKeepFile;
 
-void TestCoordinateSystem::setUp()
-{
-}
+public:
+    FileAutoBackup(const CREFSTRING filename, const CREFSTRING rotateSuffix, bool keepFile = false)
+        : m_sFilename(filename), m_sRotateSuffix(rotateSuffix), m_bRotated(false), m_bKeepFile(keepFile)
+    {
+        struct _stat64 fileStatus;
+        bool fileExists = MgFileUtil::GetFileStatus(filename, fileStatus);
 
-void TestCoordinateSystem::tearDown()
-{
-}
+        this->m_sBackupFilename = (this->m_sFilename + this->m_sRotateSuffix);
 
-void TestCoordinateSystem::TestStart()
+        ACE_DEBUG((LM_INFO, ACE_TEXT("\nBacking up file\n%W\n-->\n%W\n"), this->m_sFilename.c_str(), this->m_sBackupFilename.c_str()));
+
+        MgFileUtil::DeleteFile(this->m_sBackupFilename);
+        if (fileExists)
+        {
+            if (!this->m_bKeepFile)
+            {
+                MgFileUtil::RenameFile(this->m_sFilename, this->m_sBackupFilename);
+            }
+            else
+            {
+                MgFileUtil::CopyFile(this->m_sFilename, this->m_sBackupFilename);
+            }
+
+            this->m_bRotated = true;
+        }
+    }
+
+    ~FileAutoBackup()
+    {
+        MgFileUtil::DeleteFile(this->m_sFilename);
+        if (this->m_bRotated)
+        {
+            ACE_DEBUG((LM_INFO, ACE_TEXT("\nRestoring file\n%W\n-->\n%W\n"), this->m_sBackupFilename.c_str(), this->m_sFilename.c_str()));
+            MgFileUtil::RenameFile(this->m_sBackupFilename, this->m_sFilename, true);
+        }
+        else
+        {
+            ACE_DEBUG((LM_INFO, ACE_TEXT("\nDid not restore file\n%W\nas it did not exist before\n"), this->m_sFilename.c_str()));
+        }
+    }
+};
+
+static bool SetDefaultUserDictionaryDir()
 {
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Coordinate System tests. (Mentor)\n")));
-    Ptr<MgCoordinateSystemFactory> csFactory = new MgCoordinateSystemFactory();
-    Ptr<MgCoordinateSystemCatalog> csCatalog = csFactory->GetCatalog();
-    STRING dictPath = csCatalog->GetDictionaryDir();
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nCoordinate System Dictionary Path is: %W\n"), dictPath.c_str()));
-//    memset(&state, 0, sizeof(_CrtMemState));
-//    _CrtMemCheckpoint(&state);
-}
+    MG_TRY()
 
-void TestCoordinateSystem::TestEnd()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nCoordinate System tests completed.\n\n")));
-//    _CrtDumpMemoryLeaks();
-//    _CrtMemDumpAllObjectsSince(&state);
+    MgCoordinateSystemFactory mgCsFactory;
+    Ptr<MgCoordinateSystemCatalog> pCsCatalog = mgCsFactory.GetCatalog();
+
+    STRING defUserDictionaryDir = pCsCatalog->GetDefaultUserDictionaryDir();
+    if (defUserDictionaryDir.empty())
+    {
+        defUserDictionaryDir = MgFileUtil::GetTempPath();
+        if (defUserDictionaryDir.empty())
+            return false;
+
+        defUserDictionaryDir += L"User Geospatial Coordinate Systems/";
+    }
+
+     //create the directory to make sure, [SetUserDictionaryDir]
+    //can succeed
+    if (!MgFileUtil::PathnameExists(defUserDictionaryDir))
+        MgFileUtil::CreateDirectory(defUserDictionaryDir, false, true);
+    pCsCatalog->SetUserDictionaryDir(defUserDictionaryDir);
+
+    MG_CATCH(L"SetDefaultUserDictionaryDir")
+
+    if (NULL != mgException.p)
+    {
+        STRING errDetails = mgException->GetDetails();
+        ACE_DEBUG((LM_INFO, ACE_TEXT("Exception setting user dictionary dir: %W"), errDetails.c_str()));
+        return false;
+    }
+    return true;
 }
 
 ///----------------------------------------------------------------------------
@@ -109,7 +166,7 @@
     class MgCsType, class MgCsDictionaryType,
     STRING (MgCsType::*GetCode)(),
     MgCsDictionaryType* (MgCoordinateSystemCatalog::*MgGetDictionaryFunc)()>
-void TestReadAllDefinitions(wchar_t const* pzswDefType)
+static void TestReadAllDefinitions(wchar_t const* pzswDefType)
 {
     ACE_DEBUG((LM_INFO, ACE_TEXT("\nReading all %W, ... "), pzswDefType));
 
@@ -120,7 +177,7 @@
     Ptr<MgCoordinateSystemEnum> pCsEnum = pCsDictionary->GetEnum();
     UINT32 size = pCsDictionary->GetSize();
 
-    CPPUNIT_ASSERT(size > 0); //by default, we're assuming to have 'something' in each dictionary
+    REQUIRE(size > 0); //by default, we're assuming to have 'something' in each dictionary
 
     std::vector<STRING> allCodes;
 
@@ -129,12 +186,12 @@
     do
     {
         pNextCsDefinitions = pCsEnum->Next(size);
-        CPPUNIT_ASSERT(pNextCsDefinitions);
+        REQUIRE(pNextCsDefinitions);
 
         const INT32 defCount = pNextCsDefinitions->GetCount();
         if (firstFullSetDone)
         {
-            CPPUNIT_ASSERT(0 == defCount);
+            REQUIRE(0 == defCount);
         }
         else
         {
@@ -147,16 +204,16 @@
             Ptr<MgDisposable> pCsDisposable = pNextCsDefinitions->GetItem(i);
 
             MgCsType* pDefinition = dynamic_cast<MgCsType*>(pCsDisposable.p);
-            CPPUNIT_ASSERT(pDefinition); //the collection must only contain objects of the required type
+            REQUIRE(pDefinition); //the collection must only contain objects of the required type
 
             STRING code = CALL_MEMBER_FN(pDefinition, GetCode)();
-            CPPUNIT_ASSERT(!code.empty());
+            REQUIRE(!code.empty());
             allCodes.push_back(code);
         }
 
     } while (pNextCsDefinitions->GetCount() > 0);
 
-    CPPUNIT_ASSERT(allCodes.size() == pCsDictionary->GetSize());
+    REQUIRE(allCodes.size() == pCsDictionary->GetSize());
 
     for(size_t i = 0; i < allCodes.size(); ++i)
     {
@@ -163,15 +220,15 @@
         STRING const& code = allCodes[i];
         Ptr<MgDisposable> pDictionaryDef = pCsDictionary->Get(code);
         MgCsType *pConcreteDef = dynamic_cast<MgCsType*>(pDictionaryDef.p);
-        CPPUNIT_ASSERT(pConcreteDef);
+        REQUIRE(pConcreteDef);
 
         STRING codeFromDef = CALL_MEMBER_FN(pConcreteDef, GetCode)();
-        CPPUNIT_ASSERT(0 == _wcsicmp(codeFromDef.c_str(), code.c_str()));
+        REQUIRE(0 == _wcsicmp(codeFromDef.c_str(), code.c_str()));
     }
 }
 
 /// (1) Read all Coordinate systems
-void TestCoordinateSystem::TestCase_ReadAllCoordinateSystems()
+TEST_CASE("ReadAllCoordinateSystems", "[CoordinateSystem]")
 {
     TestReadAllDefinitions<MgCoordinateSystem, MgCoordinateSystemDictionary,
         &MgCoordinateSystem::GetCsCode,
@@ -179,7 +236,7 @@
 }
 
 /// (2) Read all datums
-void TestCoordinateSystem::TestCase_ReadAllDatums()
+TEST_CASE("ReadAllDatums", "[CoordinateSystem]")
 {
     TestReadAllDefinitions<MgCoordinateSystemDatum, MgCoordinateSystemDatumDictionary,
         &MgCoordinateSystemDatum::GetDtCode,
@@ -187,7 +244,7 @@
 }
 
 /// (3) Read all ellipsoids
-void TestCoordinateSystem::TestCase_ReadAllEllipsoids()
+TEST_CASE("ReadAllEllipsoids", "[CoordinateSystem]")
 {
     TestReadAllDefinitions<MgCoordinateSystemEllipsoid, MgCoordinateSystemEllipsoidDictionary,
         &MgCoordinateSystemEllipsoid::GetElCode,
@@ -195,7 +252,7 @@
 }
 
 /// (4) Read all categories
-void TestCoordinateSystem::TestCase_ReadAllCategories()
+TEST_CASE("ReadAllCategories", "[CoordinateSystem]")
 {
     TestReadAllDefinitions<MgCoordinateSystemCategory, MgCoordinateSystemCategoryDictionary,
         &MgCoordinateSystemCategory::GetName,
@@ -203,7 +260,7 @@
 }
 
 /// (5) Read all geodetic transformations
-void TestCoordinateSystem::TestCase_ReadAllGeodeticTransformations()
+TEST_CASE("ReadAllGeodeticTransformations", "[CoordinateSystem]")
 {
     TestReadAllDefinitions<MgCoordinateSystemGeodeticTransformDef, MgCoordinateSystemGeodeticTransformDefDictionary,
         &MgCoordinateSystemGeodeticTransformDef::GetTransformName,
@@ -211,7 +268,7 @@
 }
 
 /// (6) Read all geodetic paths
-void TestCoordinateSystem::TestCase_ReadAllGeodeticPaths()
+TEST_CASE("ReadAllGeodeticPaths", "[CoordinateSystem]")
 {
     TestReadAllDefinitions<MgCoordinateSystemGeodeticPath, MgCoordinateSystemGeodeticPathDictionary,
         &MgCoordinateSystemGeodeticPath::GetPathName,
@@ -256,7 +313,7 @@
 
     if (TWithUserDefDir)
     {
-        TestCoordinateSystem::SetDefaultUserDictionaryDir();
+        SetDefaultUserDictionaryDir();
     }
     else
     {
@@ -268,22 +325,22 @@
     Ptr<MgCoordinateSystemEnum> pCsEnum = pCsDictionary->GetEnum();
     UINT32 size = pCsDictionary->GetSize();
 
-    CPPUNIT_ASSERT(size > 0); //by default, we're assuming to have 'something' in each dictionary
+    REQUIRE(size > 0); //by default, we're assuming to have 'something' in each dictionary
 
     Ptr<MgDisposableCollection> pNextCsDefinitions;
     pNextCsDefinitions = pCsEnum->Next(1);
 
     INT32 definitionCount = pNextCsDefinitions->GetCount();
-    CPPUNIT_ASSERT(1 == definitionCount);
+    REQUIRE(1 == definitionCount);
 
     Ptr<MgDisposable> pMgDefinition = pNextCsDefinitions->GetItem(0);
-    CPPUNIT_ASSERT(pMgDefinition);
+    REQUIRE(pMgDefinition);
 
     MgCsType* pTypedDef = dynamic_cast<MgCsType*>(pMgDefinition.p);
-    CPPUNIT_ASSERT(NULL != pTypedDef);
+    REQUIRE(NULL != pTypedDef);
 
     STRING code = CALL_MEMBER_FN(pTypedDef, GetCode)();
-    CPPUNIT_ASSERT(!code.empty());
+    REQUIRE(!code.empty());
 
     ACE_DEBUG((LM_INFO, ACE_TEXT("trying with %W ... "), code.c_str()));
 
@@ -296,7 +353,7 @@
     {
         pMgDefinition = CloneDefFunc(pTypedDef);
         pTypedDef = dynamic_cast<MgCsType*>(pMgDefinition.p);
-        CPPUNIT_ASSERT(NULL != pTypedDef);
+        REQUIRE(NULL != pTypedDef);
     }
 
     STRING newCode = (code + L"_MOD");
@@ -305,22 +362,22 @@
     STRING csdFile = pCsDictionary->GetPath();
     //backup the current CSD file and automatically restore it after we are done; or delete the newly created CSD file
     //make sure, we keep the current file
-    TestCoordinateSystem::FileAutoBackup csdFileBackup(csdFile, L".UNIT_TEST_SAVE", true);
+    FileAutoBackup csdFileBackup(csdFile, L".UNIT_TEST_SAVE", true);
 
     pCsDictionary->Add(pTypedDef);
 
     Ptr<MgDisposable> pAddedDefinition = pCsDictionary->Get(newCode);
-    CPPUNIT_ASSERT(pAddedDefinition);
+    REQUIRE(pAddedDefinition);
 
     ACE_DEBUG((LM_INFO, ACE_TEXT("OK")));
 
-    CPPUNIT_ASSERT( pCsDictionary->Has(newCode) );
+    REQUIRE( pCsDictionary->Has(newCode) );
 
     if (TAutoRemove)
     {
         ACE_DEBUG((LM_INFO, ACE_TEXT("... Remove it again... ")));
         pCsDictionary->Remove(newCode);
-        CPPUNIT_ASSERT( !pCsDictionary->Has(newCode) );
+        REQUIRE( !pCsDictionary->Has(newCode) );
 
         ACE_DEBUG((LM_INFO, ACE_TEXT("OK")));
     }
@@ -329,7 +386,7 @@
 }
 
 /// (1) Update a coordinate system
-void TestCoordinateSystem::TestCase_UpdateCoordinateSystems()
+TEST_CASE("UpdateCoordinateSystems", "[CoordinateSystem]")
 {
     TestUpdateDefinition<
         true, /* compile as 'auto-remove function' */
@@ -341,7 +398,7 @@
 }
 
 /// (2) Update a datum
-void TestCoordinateSystem::TestCase_UpdateDatums()
+TEST_CASE("UpdateDatums", "[CoordinateSystem]")
 {
     TestUpdateDefinition<
         true, /* compile as 'auto-remove function' */
@@ -353,7 +410,7 @@
 }
 
 /// (3) Update an ellipsoid
-void TestCoordinateSystem::TestCase_UpdateEllipsoids()
+TEST_CASE("UpdateEllipsoids", "[CoordinateSystem]")
 {
     TestUpdateDefinition<
         true, /* compile as 'auto-remove function' */
@@ -365,7 +422,7 @@
 }
 
 /// (4) Update a category
-void TestCoordinateSystem::TestCase_UpdateCategories()
+TEST_CASE("UpdateCategories", "[CoordinateSystem]")
 {
     TestUpdateDefinition<
         true, /* compile as 'auto-remove function' */
@@ -377,7 +434,7 @@
 }
 
 /// (5) Update a geodetic transformation
-void TestCoordinateSystem::TestCase_UpdateGeodeticTransformations()
+TEST_CASE("UpdateGeodeticTransformations", "[CoordinateSystem]")
 {
     TestUpdateDefinition<
         true, /* compile as 'auto-remove function' */
@@ -389,7 +446,7 @@
 }
 
 /// (5) Update a geodetic path
-void TestCoordinateSystem::TestCase_UpdateGeodeticPaths()
+TEST_CASE("UpdateGeodeticPaths", "[CoordinateSystem]")
 {
     TestUpdateDefinition<
         true, /* compile as 'auto-remove function' */
@@ -405,7 +462,7 @@
 ///
 /// Tries setting a user dictionary path where to store CS user information into
 ///----------------------------------------------------------------------------
-void TestCoordinateSystem::TestCase_InitializeValidUserDictionaryDir()
+TEST_CASE("InitializeValidUserDictionaryDir", "[CoordinateSystem]")
 {
     MgCoordinateSystemFactory mgCsFactory;
     Ptr<MgCoordinateSystemCatalog> pCsCatalog = mgCsFactory.GetCatalog();
@@ -420,11 +477,11 @@
 
     pCsCatalog->SetUserDictionaryDir(userDictionaryDir);
     STRING setUserDictionaryDir = pCsCatalog->GetUserDictionaryDir();
-    CPPUNIT_ASSERT(setUserDictionaryDir == userDictionaryDir);
+    REQUIRE(setUserDictionaryDir == userDictionaryDir);
 
     pCsCatalog->SetUserDictionaryDir(L"");
     setUserDictionaryDir = pCsCatalog->GetUserDictionaryDir();
-    CPPUNIT_ASSERT(setUserDictionaryDir.empty());
+    REQUIRE(setUserDictionaryDir.empty());
 }
 
 ///----------------------------------------------------------------------------
@@ -432,7 +489,7 @@
 ///
 /// Tries setting an invalid user dictionary path where to store CS user information into
 ///----------------------------------------------------------------------------
-void TestCoordinateSystem::TestCase_InitializeInvalidUserDictionaryDir()
+TEST_CASE("InitializeInvalidUserDictionaryDir", "[CoordinateSystem]")
 {
     MgCoordinateSystemFactory mgCsFactory;
     Ptr<MgCoordinateSystemCatalog> pCsCatalog = mgCsFactory.GetCatalog();
@@ -454,10 +511,10 @@
 
     MG_CATCH_AND_RELEASE()
 
-    CPPUNIT_ASSERT(NULL != mgException); //this *must* result in an exception
+    REQUIRE(nullptr != mgException.p); //this *must* result in an exception
 
     STRING currentUserDictionaryDir = pCsCatalog->GetUserDictionaryDir();
-    CPPUNIT_ASSERT(setUserDictionaryDir == currentUserDictionaryDir); //the current user dictionary path must not have changed
+    REQUIRE(setUserDictionaryDir == currentUserDictionaryDir); //the current user dictionary path must not have changed
 }
 
 ///----------------------------------------------------------------------------
@@ -468,40 +525,6 @@
 ///----------------------------------------------------------------------------
 ///
 
-bool TestCoordinateSystem::SetDefaultUserDictionaryDir()
-{
-    MG_TRY()
-
-    MgCoordinateSystemFactory mgCsFactory;
-    Ptr<MgCoordinateSystemCatalog> pCsCatalog = mgCsFactory.GetCatalog();
-
-    STRING defUserDictionaryDir = pCsCatalog->GetDefaultUserDictionaryDir();
-    if (defUserDictionaryDir.empty())
-    {
-        defUserDictionaryDir = MgFileUtil::GetTempPath();
-        if (defUserDictionaryDir.empty())
-            return false;
-
-        defUserDictionaryDir += L"User Geospatial Coordinate Systems/";
-    }
-
-     //create the directory to make sure, [SetUserDictionaryDir]
-    //can succeed
-    if (!MgFileUtil::PathnameExists(defUserDictionaryDir))
-        MgFileUtil::CreateDirectory(defUserDictionaryDir, false, true);
-    pCsCatalog->SetUserDictionaryDir(defUserDictionaryDir);
-
-    MG_CATCH(L"TestCoordinateSystem.SetDefaultUserDictionaryDir")
-
-    if (NULL != mgException.p)
-    {
-        STRING errDetails = mgException->GetDetails();
-        ACE_DEBUG((LM_INFO, ACE_TEXT("Exception setting user dictionary dir: %W"), errDetails.c_str()));
-        return false;
-    }
-    return true;
-}
-
 template<
     class MgCsType, class MgCsDictionaryType,
     STRING (MgCsType::*GetCode)(),
@@ -513,7 +536,7 @@
 {
     ACE_DEBUG((LM_INFO, ACE_TEXT("\nTrying to set the default user dictionary path ...\n")));
 
-    bool userDirSet = TestCoordinateSystem::SetDefaultUserDictionaryDir();
+    bool userDirSet = SetDefaultUserDictionaryDir();
     if (!userDirSet)
     {
         ACE_DEBUG((LM_WARNING, ACE_TEXT("\nCould not set the default user dictionary path. Current test will be skipped\n")));
@@ -527,8 +550,8 @@
     const STRING& csCsdFilename = pCsDictionary->GetFileName();
 
     STRING csCsdFile = pCsDictionary->GetPath();
-    CPPUNIT_ASSERT(!csCsdFile.empty());
-    CPPUNIT_ASSERT(MgFileUtil::IsFile(csCsdFile));
+    REQUIRE(!csCsdFile.empty());
+    REQUIRE(MgFileUtil::IsFile(csCsdFile));
 
     const INT64 csdFileSize = MgFileUtil::GetFileSize(csCsdFile);
 
@@ -538,7 +561,7 @@
     STRING addedCode;
     {
         //backup the current user CSD file and automatically restore it after we are done; or delete the newly created CSD file
-        TestCoordinateSystem::FileAutoBackup csdFileBackup(csCsdUserFile, L".UNIT_TEST_SAVE");
+        FileAutoBackup csdFileBackup(csCsdUserFile, L".UNIT_TEST_SAVE");
 
         addedCode = TestUpdateDefinition<
             false /* compile as 'no-auto-remove' */,
@@ -549,23 +572,23 @@
             MgGetDictionaryFunc>(pzswDefType, UnprotecDefFunc, CloneDefFunc);
 
         const INT64 updateCsdFileSize = MgFileUtil::GetFileSize(csCsdFile);
-        CPPUNIT_ASSERT(updateCsdFileSize == csdFileSize);
+        REQUIRE(updateCsdFileSize == csdFileSize);
 
         //the user CSD file now must exist
         struct _stat64 fileStatus;
         bool fileExists = MgFileUtil::GetFileStatus(csCsdUserFile, fileStatus);
-        CPPUNIT_ASSERT(fileExists && fileStatus.st_size);
+        REQUIRE((fileExists && fileStatus.st_size));
 
-        CPPUNIT_ASSERT(!addedCode.empty());
-        CPPUNIT_ASSERT(pCsDictionary->Has(addedCode));
+        REQUIRE(!addedCode.empty());
+        REQUIRE(pCsDictionary->Has(addedCode));
     }
 
     //now, that the user file had been deleted, our newly added definition must have been gone, too
     pCsDictionary->SetFileName(pCsDictionary->GetFileName()); //force the Mg dictionary to update is cache
-    CPPUNIT_ASSERT(!pCsDictionary->Has(addedCode));
+    REQUIRE(!pCsDictionary->Has(addedCode));
 }
 
-void TestCoordinateSystem::TestCase_UpdateUserCoordinateSystems()
+TEST_CASE("UpdateUserCoordinateSystems", "[CoordinateSystem]")
 {
     TestUpdateUserDefinition<
         MgCoordinateSystem, MgCoordinateSystemDictionary,
@@ -574,7 +597,7 @@
         &MgCoordinateSystemCatalog::GetCoordinateSystemDictionary>(L"Coordinate System");
 }
 
-void TestCoordinateSystem::TestCase_UpdateUserDatums()
+TEST_CASE("UpdateUserDatums", "[CoordinateSystem]")
 {
     TestUpdateUserDefinition<
         MgCoordinateSystemDatum, MgCoordinateSystemDatumDictionary,
@@ -583,7 +606,7 @@
         &MgCoordinateSystemCatalog::GetDatumDictionary>(L"Datum");
 }
 
-void TestCoordinateSystem::TestCase_UpdateUserEllipsoids()
+TEST_CASE("UpdateUserEllipsoids", "[CoordinateSystem]")
 {
     TestUpdateUserDefinition<
         MgCoordinateSystemEllipsoid, MgCoordinateSystemEllipsoidDictionary,
@@ -592,7 +615,7 @@
         &MgCoordinateSystemCatalog::GetEllipsoidDictionary>(L"Ellipsoid");
 }
 
-void TestCoordinateSystem::TestCase_UpdateUserCategories()
+TEST_CASE("UpdateUserCategories", "[CoordinateSystem]")
 {
     TestUpdateUserDefinition<
         MgCoordinateSystemCategory, MgCoordinateSystemCategoryDictionary,
@@ -601,7 +624,7 @@
         &MgCoordinateSystemCatalog::GetCategoryDictionary>(L"Category", NULL, NULL);
 }
 
-void TestCoordinateSystem::TestCase_UpdateUserGeodeticTransformations()
+TEST_CASE("UpdateUserGeodeticTransformations", "[CoordinateSystem]")
 {
     TestUpdateUserDefinition<
         MgCoordinateSystemGeodeticTransformDef, MgCoordinateSystemGeodeticTransformDefDictionary,
@@ -610,7 +633,7 @@
         &MgCoordinateSystemCatalog::GetGeodeticTransformDefDictionary>(L"Geodetic Transformation", NULL, CloneDefinition);
 }
 
-void TestCoordinateSystem::TestCase_UpdateUserGeodeticPaths()
+TEST_CASE("UpdateUserGeodeticPaths", "[CoordinateSystem]")
 {
     TestUpdateUserDefinition<
         MgCoordinateSystemGeodeticPath, MgCoordinateSystemGeodeticPathDictionary,
@@ -625,7 +648,7 @@
 /// This test case loads OGC WKT coordinate systems from an external file and
 /// tries to validate them.
 ///----------------------------------------------------------------------------
-void TestCoordinateSystem::TestCase_CheckCoordinateSystems()
+TEST_CASE("CheckCoordinateSystems", "[SlowTests]")
 {
     try
     {
@@ -713,7 +736,7 @@
         else
         {
             ACE_DEBUG((LM_INFO, ACE_TEXT("Could not open coordinate system test file: %C\n"), OgcWktTestFile));
-            CPPUNIT_ASSERT(false);
+            REQUIRE(false);
         }
 
         ACE_DEBUG((LM_INFO, ACE_TEXT("\nTotal coordinate system OGC WKTs tested: %d/%d (Passed/Total)\n"), nCoordinateSystemsPassed, nCoordinateSystemsTested));
@@ -723,7 +746,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -736,7 +759,7 @@
 ///
 /// This test case creates a valid coordinate system.
 ///----------------------------------------------------------------------------
-void TestCoordinateSystem::TestCase_CreateValidCoordinateSystem()
+TEST_CASE("CreateValidCoordinateSystem", "[CoordinateSystem]")
 {
     try
     {
@@ -743,73 +766,73 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         // Test if entry is cached
         ogcWkt = ArbitraryWkt;
         pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         ogcWkt = ArbitraryWkt_Alternate1;
         pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         // Test if entry is cached
         ogcWkt = ArbitraryWkt_Alternate1;
         pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         ogcWkt = ArbitraryWkt_Alternate2;
         pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         // Test if entry is cached
         ogcWkt = ArbitraryWkt_Alternate2;
         pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         ogcWkt = GeographicWkt;
         pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         // Test if entry is cached
         ogcWkt = GeographicWkt;
         pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         ogcWkt = ProjectedWkt;
         pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         // Test if entry is cached
         ogcWkt = ProjectedWkt;
         pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         ogcWkt = InvalidWkt;
-        CPPUNIT_ASSERT_THROW_MG(pCoordinateSystem = factory.Create(ogcWkt), MgCoordinateSystemConversionFailedException*);
+        REQUIRE_THROWS_MG(pCoordinateSystem = factory.Create(ogcWkt), MgCoordinateSystemConversionFailedException*);
 
         ogcWkt = ArbitraryWkt_Feet;
         pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         ogcWkt = ArbitraryWkt_Meter;
         pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         ogcWkt = GeographicWkt_LL84;
         pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         ogcWkt = ProjectedWkt_GAW;
         pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -822,7 +845,7 @@
 ///
 /// This test case creates an invalid coordinate system.
 ///----------------------------------------------------------------------------
-void TestCoordinateSystem::TestCase_CreateInvalidCoordinateSystem()
+TEST_CASE("CreateInvalidCoordinateSystem", "[CoordinateSystem]")
 {
     try
     {
@@ -829,7 +852,7 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = InvalidWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
     }
     catch(MgCoordinateSystemConversionFailedException* e)
     {
@@ -840,7 +863,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -848,7 +871,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_EnumerateCategories()
+TEST_CASE("EnumerateCategories", "[SlowTests]")
 {
     try
     {
@@ -903,7 +926,7 @@
                                 // Perform round trip test
                                 STRING wkt = factory.ConvertCoordinateSystemCodeToWkt(pProperty->GetValue());
                                 STRING code = factory.ConvertWktToCoordinateSystemCode(wkt);
-                                CPPUNIT_ASSERT(_wcsicmp(pProperty->GetValue().c_str(), code.c_str()) == 0);
+                                REQUIRE(_wcsicmp(pProperty->GetValue().c_str(), code.c_str()) == 0);
 
                                 nTotalCoordinateSystemsPassed++;
                             }
@@ -947,7 +970,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -955,7 +978,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_EnumerateCoordSys()
+TEST_CASE("EnumerateCoordSys", "[CoordinateSystem]")
 {
     try
     {
@@ -962,18 +985,18 @@
         MgCoordinateSystemFactory factory;
         Ptr<MgBatchPropertyCollection> coordSystems;
         coordSystems = factory.EnumerateCoordinateSystems(L"Lat Longs");
-        CPPUNIT_ASSERT(coordSystems);
-        CPPUNIT_ASSERT(coordSystems->GetCount() > 0);
+        REQUIRE(coordSystems);
+        REQUIRE(coordSystems->GetCount() > 0);
 
         coordSystems = factory.EnumerateCoordinateSystems(L"lat longs");
-        CPPUNIT_ASSERT(coordSystems);
-        CPPUNIT_ASSERT(coordSystems->GetCount() > 0);
+        REQUIRE(coordSystems);
+        REQUIRE(coordSystems->GetCount() > 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -981,22 +1004,22 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_GetBaseLibrary()
+TEST_CASE("GetBaseLibrary", "[CoordinateSystem]")
 {
     try
     {
         STRING library;
         Ptr<MgCoordinateSystemFactory> factory = new MgCoordinateSystemFactory();
-        CPPUNIT_ASSERT(factory);
+        REQUIRE(factory);
 
         library = factory->GetBaseLibrary();
-        CPPUNIT_ASSERT(library == L"Mentor Coordinate System Library");
+        REQUIRE(library == L"Mentor Coordinate System Library");
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1004,7 +1027,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_IsValid()
+TEST_CASE("IsValid", "[CoordinateSystem]")
 {
     try
     {
@@ -1011,18 +1034,18 @@
         bool bResult;
         MgCoordinateSystemFactory factory;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(EPSG_4326_Wkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         bResult = pCoordinateSystem->IsValid();
-        CPPUNIT_ASSERT(bResult == true);
+        REQUIRE(bResult == true);
 
-        CPPUNIT_ASSERT_THROW_MG(pCoordinateSystem = factory.Create(InvalidWkt), MgCoordinateSystemConversionFailedException*);
+        REQUIRE_THROWS_MG(pCoordinateSystem = factory.Create(InvalidWkt), MgCoordinateSystemConversionFailedException*);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1035,7 +1058,7 @@
 ///
 /// This test case
 ///----------------------------------------------------------------------------
-void TestCoordinateSystem::TestCase_ValidateCoordinateSystemArbitrary()
+TEST_CASE("ValidateCoordinateSystemArbitrary", "[CoordinateSystem]")
 {
     try
     {
@@ -1042,20 +1065,20 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
-        CPPUNIT_ASSERT(pCoordinateSystem->GetType() == MgCoordinateSystemType::Arbitrary);
+        REQUIRE(pCoordinateSystem->GetType() == MgCoordinateSystemType::Arbitrary);
 
         Ptr<MgCoordinateSystem> pCoordinateSystemAlt = factory.Create(pCoordinateSystem->ToString());
-        CPPUNIT_ASSERT(pCoordinateSystemAlt);
+        REQUIRE(pCoordinateSystemAlt);
 
-        CPPUNIT_ASSERT(pCoordinateSystem->GetCsCode() == pCoordinateSystemAlt->GetCsCode());
+        REQUIRE(pCoordinateSystem->GetCsCode() == pCoordinateSystemAlt->GetCsCode());
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1068,7 +1091,7 @@
 ///
 /// This test case
 ///----------------------------------------------------------------------------
-void TestCoordinateSystem::TestCase_Arbitrary_ConvertFromLonLat()
+TEST_CASE("Arbitrary_ConvertFromLonLat", "[CoordinateSystem]")
 {
     try
     {
@@ -1075,7 +1098,7 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double lon = 45.0;
         double lat = 90.0;
@@ -1086,8 +1109,8 @@
         pCoordinateSystem->ConvertToLonLat(x, y, x, y);
 
         // The values shouldn't change
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(lon, x));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(lat, y));
+        REQUIRE(MgUtil::ValuesEqual(lon, x));
+        REQUIRE(MgUtil::ValuesEqual(lat, y));
 
         Ptr<MgCoordinate> coord = new MgCoordinateXY(45.0, 90.0);
         coord = pCoordinateSystem->ConvertFromLonLat(coord.p);
@@ -1096,14 +1119,14 @@
         coord = pCoordinateSystem->ConvertToLonLat(coord.p);
 
         // The values shouldn't change
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(coord->GetX(), 45.0));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(coord->GetY(), 90.0));
+        REQUIRE(MgUtil::ValuesEqual(coord->GetX(), 45.0));
+        REQUIRE(MgUtil::ValuesEqual(coord->GetY(), 90.0));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1116,7 +1139,7 @@
 ///
 /// This test case
 ///----------------------------------------------------------------------------
-void TestCoordinateSystem::TestCase_Arbitrary_ConvertFromLonLatArray()
+TEST_CASE("Arbitrary_ConvertFromLatLonArray", "[CoordinateSystem]")
 {
     try
     {
@@ -1123,7 +1146,7 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double lon[4] = { 45.0, 30.0, 15.0, 0.0 };
         double lat[4] = { 90.0, 75.0, 60.0, 55.0 };
@@ -1134,20 +1157,20 @@
         pCoordinateSystem->ConvertToLonLat(x, y, x, y, 4);
 
         // The values shouldn't change
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(lon[0], x[0]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(lat[0], y[0]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(lon[1], x[1]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(lat[1], y[1]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(lon[2], x[2]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(lat[2], y[2]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(lon[3], x[3]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(lat[3], y[3]));
+        REQUIRE(MgUtil::ValuesEqual(lon[0], x[0]));
+        REQUIRE(MgUtil::ValuesEqual(lat[0], y[0]));
+        REQUIRE(MgUtil::ValuesEqual(lon[1], x[1]));
+        REQUIRE(MgUtil::ValuesEqual(lat[1], y[1]));
+        REQUIRE(MgUtil::ValuesEqual(lon[2], x[2]));
+        REQUIRE(MgUtil::ValuesEqual(lat[2], y[2]));
+        REQUIRE(MgUtil::ValuesEqual(lon[3], x[3]));
+        REQUIRE(MgUtil::ValuesEqual(lat[3], y[3]));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1160,7 +1183,7 @@
 ///
 /// This test case
 ///----------------------------------------------------------------------------
-void TestCoordinateSystem::TestCase_Arbitrary_ConvertToLonLat()
+TEST_CASE("Arbitrary_ConvertToLonLat", "[CoordinateSystem]")
 {
     try
     {
@@ -1167,7 +1190,7 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double x = 45.0;
         double y = 90.0;
@@ -1178,8 +1201,8 @@
         pCoordinateSystem->ConvertFromLonLat(lon, lat, lon, lat);
 
         // The values shouldn't change
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(lon, x));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(lat, y));
+        REQUIRE(MgUtil::ValuesEqual(lon, x));
+        REQUIRE(MgUtil::ValuesEqual(lat, y));
 
         Ptr<MgCoordinate> coord = new MgCoordinateXY(45.0, 90.0);
         coord = pCoordinateSystem->ConvertToLonLat(coord.p);
@@ -1188,14 +1211,14 @@
         coord = pCoordinateSystem->ConvertFromLonLat(coord.p);
 
         // The values shouldn't change
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(coord->GetX(), 45.0));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(coord->GetY(), 90.0));
+        REQUIRE(MgUtil::ValuesEqual(coord->GetX(), 45.0));
+        REQUIRE(MgUtil::ValuesEqual(coord->GetY(), 90.0));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1208,7 +1231,7 @@
 ///
 /// This test case
 ///----------------------------------------------------------------------------
-void TestCoordinateSystem::TestCase_Arbitrary_ConvertToLonLatArray()
+TEST_CASE("Arbitrary_ConvertToLonLatArray", "[CoordinateSystem]")
 {
     try
     {
@@ -1215,7 +1238,7 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double x[4] = { 45.0, 30.0, 15.0, 0.0 };
         double y[4] = { 90.0, 75.0, 60.0, 55.0 };
@@ -1226,20 +1249,20 @@
         pCoordinateSystem->ConvertFromLonLat(lon, lat, lon, lat, 4);
 
         // The values shouldn't change
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(lon[0], x[0]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(lat[0], y[0]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(lon[1], x[1]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(lat[1], y[1]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(lon[2], x[2]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(lat[2], y[2]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(lon[3], x[3]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(lat[3], y[3]));
+        REQUIRE(MgUtil::ValuesEqual(lon[0], x[0]));
+        REQUIRE(MgUtil::ValuesEqual(lat[0], y[0]));
+        REQUIRE(MgUtil::ValuesEqual(lon[1], x[1]));
+        REQUIRE(MgUtil::ValuesEqual(lat[1], y[1]));
+        REQUIRE(MgUtil::ValuesEqual(lon[2], x[2]));
+        REQUIRE(MgUtil::ValuesEqual(lat[2], y[2]));
+        REQUIRE(MgUtil::ValuesEqual(lon[3], x[3]));
+        REQUIRE(MgUtil::ValuesEqual(lat[3], y[3]));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1252,7 +1275,7 @@
 ///
 /// This test case
 ///----------------------------------------------------------------------------
-void TestCoordinateSystem::TestCase_Arbitrary_ConvertCoordinateSystemUnitsToMeters()
+TEST_CASE("Arbitrary_ConvertCoordinateSystemUnitsToMeters", "[CoordinateSystem]")
 {
     try
     {
@@ -1259,16 +1282,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double meters = pCoordinateSystem->ConvertCoordinateSystemUnitsToMeters(1.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1609.344, meters));
+        REQUIRE(MgUtil::ValuesEqual(1609.344, meters));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1281,7 +1304,7 @@
 ///
 /// This test case
 ///----------------------------------------------------------------------------
-void TestCoordinateSystem::TestCase_Arbitrary_ConvertMetersToCoordinateSystemUnits()
+TEST_CASE("Arbitrary_ConvertMetersToCoordinateSystemUnits", "[CoordinateSystem]")
 {
     try
     {
@@ -1288,16 +1311,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double units = pCoordinateSystem->ConvertMetersToCoordinateSystemUnits(1609.344);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1.0, units));
+        REQUIRE(MgUtil::ValuesEqual(1.0, units));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1310,7 +1333,7 @@
 ///
 /// This test case
 ///----------------------------------------------------------------------------
-void TestCoordinateSystem::TestCase_Arbitrary_MeasureEuclideanDistance()
+TEST_CASE("Arbitrary_MeasureEuclideanDistance", "[CoordinateSystem]")
 {
     try
     {
@@ -1317,25 +1340,25 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         MgCoordinateXY coord1(0.0, 0.0);
         MgCoordinateXY coord2(4.0, 3.0);
 
         double distance = pCoordinateSystem->MeasureEuclideanDistance(&coord1, &coord2);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(5.0, distance));
+        REQUIRE(MgUtil::ValuesEqual(5.0, distance));
 
         double distance2 = pCoordinateSystem->MeasureEuclideanDistance(0.0, 0.0, 4.0, 3.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(distance, distance2));
+        REQUIRE(MgUtil::ValuesEqual(distance, distance2));
 
         double meters = pCoordinateSystem->ConvertCoordinateSystemUnitsToMeters(distance);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(8046.72, meters));
+        REQUIRE(MgUtil::ValuesEqual(8046.72, meters));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1348,7 +1371,7 @@
 ///
 /// This test case
 ///----------------------------------------------------------------------------
-void TestCoordinateSystem::TestCase_Arbitrary_MeasureGreatCircleDistance()
+TEST_CASE("Arbitrary_MeasureGreatCircleDistance", "[CoordinateSystem]")
 {
     try
     {
@@ -1355,18 +1378,18 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         MgCoordinateXY coord1(0.0, 0.0);
         MgCoordinateXY coord2(4.0, 3.0);
 
-        CPPUNIT_ASSERT_THROW_MG(double meters = pCoordinateSystem->MeasureGreatCircleDistance(&coord1, &coord2), MgInvalidCoordinateSystemTypeException*);
+        REQUIRE_THROWS_MG(double meters = pCoordinateSystem->MeasureGreatCircleDistance(&coord1, &coord2), MgInvalidCoordinateSystemTypeException*);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1379,7 +1402,7 @@
 ///
 /// This test case
 ///----------------------------------------------------------------------------
-void TestCoordinateSystem::TestCase_Arbitrary_GetAzimuth()
+TEST_CASE("Arbitrary_GetAzimuth", "[CoordinateSystem]")
 {
     try
     {
@@ -1386,39 +1409,39 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         MgCoordinateXY coord1(0.0, 0.0);
         MgCoordinateXY coord2(4.0, 3.0);
 
         double degrees = pCoordinateSystem->GetAzimuth(&coord1, &coord2);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(36.86989765, degrees));
+        REQUIRE(MgUtil::ValuesEqual(36.86989765, degrees));
 
         double degrees2 = pCoordinateSystem->GetAzimuth(0.0, 0.0, 4.0, 3.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(degrees, degrees2));
+        REQUIRE(MgUtil::ValuesEqual(degrees, degrees2));
 
         // Test all 4 quadrants
         // Top right
         degrees = pCoordinateSystem->GetAzimuth(0.0, 0.0, 4.0, 3.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(36.86989765, degrees));
+        REQUIRE(MgUtil::ValuesEqual(36.86989765, degrees));
 
         // Top left
         degrees = pCoordinateSystem->GetAzimuth(0.0, 0.0, -4.0, 3.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(143.1301024, degrees));
+        REQUIRE(MgUtil::ValuesEqual(143.1301024, degrees));
 
         // Bottom right
         degrees = pCoordinateSystem->GetAzimuth(0.0, 0.0, 4.0, -3.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-36.86989765, degrees));
+        REQUIRE(MgUtil::ValuesEqual(-36.86989765, degrees));
 
         // Bottom left
         degrees = pCoordinateSystem->GetAzimuth(0.0, 0.0, -4.0, -3.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-143.1301024, degrees));
+        REQUIRE(MgUtil::ValuesEqual(-143.1301024, degrees));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1431,7 +1454,7 @@
 ///
 /// This test case
 ///----------------------------------------------------------------------------
-void TestCoordinateSystem::TestCase_Arbitrary_GetCoordinate()
+TEST_CASE("Arbitrary_GetCoordinate", "[CoordinateSystem]")
 {
     try
     {
@@ -1438,7 +1461,7 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         Ptr<MgCoordinate> pCoord;
         MgCoordinateXY coord(0.0, 0.0);
@@ -1446,29 +1469,29 @@
         // Test all 4 quadrants
         // Top right
         pCoord = pCoordinateSystem->GetCoordinate(&coord, 36.86989765, 5.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(4.0, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(3.0, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(4.0, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(3.0, pCoord->GetY()));
 
         // Top left
         pCoord = pCoordinateSystem->GetCoordinate(&coord, 143.13010235, 5.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-4.0, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(3.0, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(-4.0, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(3.0, pCoord->GetY()));
 
         // Bottom right
         pCoord = pCoordinateSystem->GetCoordinate(&coord, -36.86989765, 5.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(4.0, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-3.0, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(4.0, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(-3.0, pCoord->GetY()));
 
         // Bottom left
         pCoord = pCoordinateSystem->GetCoordinate(&coord, -143.13010235, 5.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-4.0, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-3.0, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(-4.0, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(-3.0, pCoord->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1476,7 +1499,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_ConvertCode()
+TEST_CASE("Arbitrary_ConvertCode", "[CoordinateSystem]")
 {
     try
     {
@@ -1484,27 +1507,27 @@
 
         MgCoordinateSystemFactory factory;
         STRING code = factory.ConvertWktToCoordinateSystemCode(ogcWkt);
-        CPPUNIT_ASSERT(_wcsicmp(L"XY-MI", code.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"XY-MI", code.c_str()) == 0);
         STRING wkt = factory.ConvertCoordinateSystemCodeToWkt(code);
-        CPPUNIT_ASSERT(wkt.length() > 0);
+        REQUIRE(wkt.length() > 0);
 
         wkt = factory.ConvertCoordinateSystemCodeToWkt(L"XY-MI");
-        CPPUNIT_ASSERT(wkt.length() > 0);
+        REQUIRE(wkt.length() > 0);
 
         wkt = factory.ConvertCoordinateSystemCodeToWkt(L"*xy-mi*");
-        CPPUNIT_ASSERT(wkt.length() > 0);
+        REQUIRE(wkt.length() > 0);
 
         ogcWkt = ArbitraryWkt_Meter;
         code = factory.ConvertWktToCoordinateSystemCode(ogcWkt);
-        CPPUNIT_ASSERT(_wcsicmp(L"XY-M", code.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"XY-M", code.c_str()) == 0);
         wkt = factory.ConvertCoordinateSystemCodeToWkt(code);
-        CPPUNIT_ASSERT(wkt.length() > 0);
+        REQUIRE(wkt.length() > 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1512,7 +1535,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_GetUnits()
+TEST_CASE("Arbitrary_GetUnits", "[CoordinateSystem]")
 {
     try
     {
@@ -1519,16 +1542,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING units = pCoordinateSystem->GetUnits();
-        CPPUNIT_ASSERT(_wcsicmp(L"Mile", units.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"Mile", units.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1536,7 +1559,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_GetUnitScale()
+TEST_CASE("Arbitrary_GetUnitScale", "[CoordinateSystem]")
 {
     try
     {
@@ -1543,16 +1566,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double scale = pCoordinateSystem->GetUnitScale();
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1609.344, scale));
+        REQUIRE(MgUtil::ValuesEqual(1609.344, scale));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1560,7 +1583,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_GetMinX()
+TEST_CASE("Arbitrary_GetMinX", "[CoordinateSystem]")
 {
     try
     {
@@ -1567,16 +1590,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double value = pCoordinateSystem->GetMinX();
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-10000000.0, value));
+        REQUIRE(MgUtil::ValuesEqual(-10000000.0, value));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1584,7 +1607,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_GetMinY()
+TEST_CASE("Arbitrary_GetMinY", "[CoordinateSystem]")
 {
     try
     {
@@ -1591,16 +1614,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double value = pCoordinateSystem->GetMinY();
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-10000000.0, value));
+        REQUIRE(MgUtil::ValuesEqual(-10000000.0, value));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1608,7 +1631,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_GetMaxX()
+TEST_CASE("Arbitrary_GetMaxX", "[CoordinateSystem]")
 {
     try
     {
@@ -1615,16 +1638,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double value = pCoordinateSystem->GetMaxX();
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(10000000.0, value));
+        REQUIRE(MgUtil::ValuesEqual(10000000.0, value));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1632,7 +1655,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_GetMaxY()
+TEST_CASE("Arbitrary_GetMaxY", "[CoordinateSystem]")
 {
     try
     {
@@ -1639,16 +1662,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double value = pCoordinateSystem->GetMaxY();
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(10000000.0, value));
+        REQUIRE(MgUtil::ValuesEqual(10000000.0, value));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1656,7 +1679,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_GetCsCode()
+TEST_CASE("Arbitrary_GetCsCode", "[CoordinateSystem]")
 {
     try
     {
@@ -1663,37 +1686,37 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING value = pCoordinateSystem->GetCsCode();
-        CPPUNIT_ASSERT(_wcsicmp(L"XY-MI", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"XY-MI", value.c_str()) == 0);
 
         ogcWkt = ArbitraryWkt_Alternate1;
         pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         value = pCoordinateSystem->GetCsCode();
-        CPPUNIT_ASSERT(_wcsicmp(L"XY-MI", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"XY-MI", value.c_str()) == 0);
 
         ogcWkt = ArbitraryWkt_Alternate2;
         pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         value = pCoordinateSystem->GetCsCode();
-        CPPUNIT_ASSERT(_wcsicmp(L"XY-MI", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"XY-MI", value.c_str()) == 0);
 
         ogcWkt = ArbitraryWkt_Meter;
         pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         value = pCoordinateSystem->GetCsCode();
-        CPPUNIT_ASSERT(_wcsicmp(L"XY-M", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"XY-M", value.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1701,7 +1724,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_GetDescription()
+TEST_CASE("Arbitrary_GetDescription", "[CoordinateSystem]")
 {
     try
     {
@@ -1708,23 +1731,23 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING value = pCoordinateSystem->GetDescription();
-        CPPUNIT_ASSERT(_wcsicmp(L"Arbitrary X-Y Coordinates (U.S.Survey Miles)", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"Arbitrary X-Y Coordinates (U.S.Survey Miles)", value.c_str()) == 0);
 
         ogcWkt = ArbitraryWkt_Meter;
         pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         value = pCoordinateSystem->GetDescription();
-        CPPUNIT_ASSERT(_wcsicmp(L"Arbitrary X-Y Coordinates (Meters)", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"Arbitrary X-Y Coordinates (Meters)", value.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1732,7 +1755,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_GetProjection()
+TEST_CASE("Arbitrary_GetProjection", "[CoordinateSystem]")
 {
     try
     {
@@ -1739,23 +1762,23 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING value = pCoordinateSystem->GetProjection();
-        CPPUNIT_ASSERT(_wcsicmp(L"NERTH", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"NERTH", value.c_str()) == 0);
 
         ogcWkt = ArbitraryWkt_Meter;
         pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         value = pCoordinateSystem->GetProjection();
-        CPPUNIT_ASSERT(_wcsicmp(L"NERTH", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"NERTH", value.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1763,7 +1786,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_GetProjectionDescription()
+TEST_CASE("Arbitrary_GetProjectionDescription", "[CoordinateSystem]")
 {
     try
     {
@@ -1770,23 +1793,23 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING value = pCoordinateSystem->GetProjectionDescription();
-        CPPUNIT_ASSERT(_wcsicmp(L"Non-georeferenced (aka non-earth) coordinate system", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"Non-georeferenced (aka non-earth) coordinate system", value.c_str()) == 0);
 
         ogcWkt = ArbitraryWkt_Meter;
         pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         value = pCoordinateSystem->GetProjectionDescription();
-        CPPUNIT_ASSERT(_wcsicmp(L"Non-georeferenced (aka non-earth) coordinate system", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"Non-georeferenced (aka non-earth) coordinate system", value.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1794,7 +1817,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_GetDatum()
+TEST_CASE("Arbitrary_GetDatum", "[CoordinateSystem]")
 {
     try
     {
@@ -1801,23 +1824,23 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING value = pCoordinateSystem->GetDatum();
-        CPPUNIT_ASSERT(_wcsicmp(L"Local Datum", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"Local Datum", value.c_str()) == 0);
 
         ogcWkt = ArbitraryWkt_Meter;
         pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         value = pCoordinateSystem->GetDatum();
-        CPPUNIT_ASSERT(_wcsicmp(L"Local Datum", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"Local Datum", value.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1825,7 +1848,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_GetDatumDescription()
+TEST_CASE("Arbitrary_GetDatumDescription", "[CoordinateSystem]")
 {
     try
     {
@@ -1832,23 +1855,23 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING value = pCoordinateSystem->GetDatumDescription();
-        CPPUNIT_ASSERT(_wcsicmp(L"", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"", value.c_str()) == 0);
 
         ogcWkt = ArbitraryWkt_Meter;
         pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         value = pCoordinateSystem->GetDatumDescription();
-        CPPUNIT_ASSERT(_wcsicmp(L"", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"", value.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1856,7 +1879,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_GetEllipsoid()
+TEST_CASE("Arbitrary_GetEllipsoid", "[CoordinateSystem]")
 {
     try
     {
@@ -1863,23 +1886,23 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING value = pCoordinateSystem->GetEllipsoid();
-        CPPUNIT_ASSERT(_wcsicmp(L"", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"", value.c_str()) == 0);
 
         ogcWkt = ArbitraryWkt_Meter;
         pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         value = pCoordinateSystem->GetEllipsoid();
-        CPPUNIT_ASSERT(_wcsicmp(L"", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"", value.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1887,7 +1910,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_GetEllipsoidDescription()
+TEST_CASE("Arbitrary_GetEllipsoidDescription", "[CoordinateSystem]")
 {
     try
     {
@@ -1894,23 +1917,23 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING value = pCoordinateSystem->GetEllipsoidDescription();
-        CPPUNIT_ASSERT(_wcsicmp(L"", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"", value.c_str()) == 0);
 
         ogcWkt = ArbitraryWkt_Meter;
         pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         value = pCoordinateSystem->GetEllipsoidDescription();
-        CPPUNIT_ASSERT(_wcsicmp(L"", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"", value.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1918,7 +1941,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_GetCategory()
+TEST_CASE("Arbitrary_GetCategory", "[CoordinateSystem]")
 {
     try
     {
@@ -1925,23 +1948,23 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         Ptr<MgStringCollection> value = pCoordinateSystem->GetCategories();
-        CPPUNIT_ASSERT(value->Contains(L"Arbitrary X-Y Coordinate Systems"));
+        REQUIRE(value->Contains(L"Arbitrary X-Y Coordinate Systems"));
 
         ogcWkt = ArbitraryWkt_Meter;
         pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         value = pCoordinateSystem->GetCategories();
-        CPPUNIT_ASSERT(value->Contains(L"Arbitrary X-Y Coordinate Systems"));
+        REQUIRE(value->Contains(L"Arbitrary X-Y Coordinate Systems"));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1949,7 +1972,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_ValidateCoordinateSystemGeographic()
+TEST_CASE("ValidateCoordinateSystemGeographic", "[CoordinateSystem]")
 {
     try
     {
@@ -1956,21 +1979,21 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
-        CPPUNIT_ASSERT(pCoordinateSystem->GetType() == MgCoordinateSystemType::Geographic);
+        REQUIRE(pCoordinateSystem->GetType() == MgCoordinateSystemType::Geographic);
         STRING actualWkt = pCoordinateSystem->ToString();
         std::string msg = "Comparison Failure.\n>> Expect: ";
         msg += MgUtil::WideCharToMultiByte(ogcWkt);
         msg += "\n>> Actual: ";
         msg += MgUtil::WideCharToMultiByte(actualWkt);
-        CPPUNIT_ASSERT_MESSAGE(msg, actualWkt == ogcWkt);
+        REQUIRE(actualWkt == ogcWkt);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1978,7 +2001,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_ConvertFromLonLat()
+TEST_CASE("Geographic_ConvertFromLonLat", "[CoordinateSystem]")
 {
     try
     {
@@ -1985,7 +2008,7 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double lon = 45.0;
         double lat = 90.0;
@@ -1993,21 +2016,21 @@
         pCoordinateSystem->ConvertFromLonLat(lon, lat, x, y);
 
         // The values shouldn't change
-        CPPUNIT_ASSERT(lat == y);
-        CPPUNIT_ASSERT(lon == x);
+        REQUIRE(lat == y);
+        REQUIRE(lon == x);
 
         MgCoordinateXY coord(45.0, 90.0);
         Ptr<MgCoordinate> pCoord = pCoordinateSystem->ConvertFromLonLat(&coord);
 
         // The values shouldn't change
-        CPPUNIT_ASSERT(coord.GetX() == 45.0);
-        CPPUNIT_ASSERT(coord.GetY() == 90.0);
+        REQUIRE(coord.GetX() == 45.0);
+        REQUIRE(coord.GetY() == 90.0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2015,7 +2038,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_ConvertFromLonLatArray()
+TEST_CASE("Geographic_ConvertFromLonLatArray", "[CoordinateSystem]")
 {
     try
     {
@@ -2022,7 +2045,7 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double lon[4] = { 45.0, 30.0, 15.0, 0.0 };
         double lat[4] = { 90.0, 75.0, 60.0, 55.0 };
@@ -2030,20 +2053,20 @@
         pCoordinateSystem->ConvertFromLonLat(lon, lat, x, y, 4);
 
         // The values shouldn't change
-        CPPUNIT_ASSERT(lon[0] == x[0]);
-        CPPUNIT_ASSERT(lat[0] == y[0]);
-        CPPUNIT_ASSERT(lon[1] == x[1]);
-        CPPUNIT_ASSERT(lat[1] == y[1]);
-        CPPUNIT_ASSERT(lon[2] == x[2]);
-        CPPUNIT_ASSERT(lat[2] == y[2]);
-        CPPUNIT_ASSERT(lon[3] == x[3]);
-        CPPUNIT_ASSERT(lat[3] == y[3]);
+        REQUIRE(lon[0] == x[0]);
+        REQUIRE(lat[0] == y[0]);
+        REQUIRE(lon[1] == x[1]);
+        REQUIRE(lat[1] == y[1]);
+        REQUIRE(lon[2] == x[2]);
+        REQUIRE(lat[2] == y[2]);
+        REQUIRE(lon[3] == x[3]);
+        REQUIRE(lat[3] == y[3]);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2051,7 +2074,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_ConvertToLonLat()
+TEST_CASE("Geographic_ConvertToLonLat", "[CoordinateSystem]")
 {
     try
     {
@@ -2058,7 +2081,7 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double x = 45.0;
         double y = 90.0;
@@ -2066,21 +2089,21 @@
         pCoordinateSystem->ConvertToLonLat(x, y, lon, lat);
 
         // The values shouldn't change
-        CPPUNIT_ASSERT(lat == y);
-        CPPUNIT_ASSERT(lon == x);
+        REQUIRE(lat == y);
+        REQUIRE(lon == x);
 
         MgCoordinateXY coord(45.0, 90.0);
         Ptr<MgCoordinate> pCoord = pCoordinateSystem->ConvertToLonLat(&coord);
 
         // The values shouldn't change
-        CPPUNIT_ASSERT(coord.GetX() == 45.0);
-        CPPUNIT_ASSERT(coord.GetY() == 90.0);
+        REQUIRE(coord.GetX() == 45.0);
+        REQUIRE(coord.GetY() == 90.0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2088,7 +2111,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_ConvertToLonLatArray()
+TEST_CASE("Geographic_ConvertToLonLatArray", "[CoordinateSystem]")
 {
     try
     {
@@ -2095,7 +2118,7 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double x[4] = { 45.0, 30.0, 15.0, 0.0 };
         double y[4] = { 90.0, 75.0, 60.0, 55.0 };
@@ -2103,20 +2126,20 @@
         pCoordinateSystem->ConvertToLonLat(x, y, lon, lat, 4);
 
         // The values shouldn't change
-        CPPUNIT_ASSERT(lon[0] == x[0]);
-        CPPUNIT_ASSERT(lat[0] == y[0]);
-        CPPUNIT_ASSERT(lon[1] == x[1]);
-        CPPUNIT_ASSERT(lat[1] == y[1]);
-        CPPUNIT_ASSERT(lon[2] == x[2]);
-        CPPUNIT_ASSERT(lat[2] == y[2]);
-        CPPUNIT_ASSERT(lon[3] == x[3]);
-        CPPUNIT_ASSERT(lat[3] == y[3]);
+        REQUIRE(lon[0] == x[0]);
+        REQUIRE(lat[0] == y[0]);
+        REQUIRE(lon[1] == x[1]);
+        REQUIRE(lat[1] == y[1]);
+        REQUIRE(lon[2] == x[2]);
+        REQUIRE(lat[2] == y[2]);
+        REQUIRE(lon[3] == x[3]);
+        REQUIRE(lat[3] == y[3]);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2124,7 +2147,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_ConvertCoordinateSystemUnitsToMeters()
+TEST_CASE("Geographic_ConvertCoordinateSystemUnitsToMeters", "[CoordinateSystem]")
 {
     try
     {
@@ -2131,16 +2154,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double meters = pCoordinateSystem->ConvertCoordinateSystemUnitsToMeters(1.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(111319.4908, meters));
+        REQUIRE(MgUtil::ValuesEqual(111319.4908, meters));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2148,7 +2171,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_ConvertMetersToCoordinateSystemUnits()
+TEST_CASE("Geographic_ConvertMetersToCoordinateSystemUnits", "[CoordinateSystem]")
 {
     try
     {
@@ -2155,16 +2178,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double units = pCoordinateSystem->ConvertMetersToCoordinateSystemUnits(111319.4908);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1.0, units));
+        REQUIRE(MgUtil::ValuesEqual(1.0, units));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2172,7 +2195,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_MeasureEuclideanDistance()
+TEST_CASE("Geographic_MeasureEuclideanDistance", "[CoordinateSystem]")
 {
     try
     {
@@ -2179,25 +2202,25 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         MgCoordinateXY coord1(0.0, 0.0);
         MgCoordinateXY coord2(4.0, 3.0);
 
         double distance = pCoordinateSystem->MeasureEuclideanDistance(&coord1, &coord2);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(5.0, distance));
+        REQUIRE(MgUtil::ValuesEqual(5.0, distance));
 
         double distance2 = pCoordinateSystem->MeasureEuclideanDistance(0.0, 0.0, 4.0, 3.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(distance, distance2));
+        REQUIRE(MgUtil::ValuesEqual(distance, distance2));
 
         double meters = pCoordinateSystem->ConvertCoordinateSystemUnitsToMeters(distance);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(556597.4540, meters));
+        REQUIRE(MgUtil::ValuesEqual(556597.4540, meters));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2205,7 +2228,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_MeasureGreatCircleDistance()
+TEST_CASE("Geographic_MeasureGreatCircleDistance", "[CoordinateSystem]")
 {
     try
     {
@@ -2212,25 +2235,25 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         MgCoordinateXY coord1(0.0, 0.0);
         MgCoordinateXY coord2(4.0, 3.0);
 
         double distance = pCoordinateSystem->MeasureGreatCircleDistance(&coord1, &coord2);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(4.986535473, distance));
+        REQUIRE(MgUtil::ValuesEqual(4.986535473, distance));
 
         double distance2 = pCoordinateSystem->MeasureGreatCircleDistance(0.0, 0.0, 4.0, 3.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(distance, distance2));
+        REQUIRE(MgUtil::ValuesEqual(distance, distance2));
 
         double meters = pCoordinateSystem->ConvertCoordinateSystemUnitsToMeters(distance);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(555098.5897, meters));
+        REQUIRE(MgUtil::ValuesEqual(555098.5897, meters));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2238,7 +2261,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_GetAzimuth()
+TEST_CASE("Geographic_GetAzimuth", "[CoordinateSystem]")
 {
     try
     {
@@ -2245,19 +2268,19 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         MgCoordinateXY coord1(0.0, 0.0);
         MgCoordinateXY coord2(4.0, 3.0);
 
         double degrees = pCoordinateSystem->GetAzimuth(&coord1, &coord2);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(53.26700666, degrees));
+        REQUIRE(MgUtil::ValuesEqual(53.26700666, degrees));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2265,7 +2288,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_GetCoordinate()
+TEST_CASE("Geographic_GetCoordinate", "[CoordinateSystem]")
 {
     try
     {
@@ -2272,18 +2295,18 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         MgCoordinateXY coord(0.0, 0.0);
         Ptr<MgCoordinate> pCoord = pCoordinateSystem->GetCoordinate(&coord, 36.86989765, 5.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(3.004913619, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(4.025035767, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(3.004913619, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(4.025035767, pCoord->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2291,7 +2314,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_ValidateCoordinateSystemProjected()
+TEST_CASE("ValidateCoordinateSystemProjected", "[CoordinateSystem]")
 {
     try
     {
@@ -2298,16 +2321,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
-        CPPUNIT_ASSERT(pCoordinateSystem->GetType() == MgCoordinateSystemType::Projected);
-        CPPUNIT_ASSERT(pCoordinateSystem->ToString() == ogcWkt);
+        REQUIRE(pCoordinateSystem->GetType() == MgCoordinateSystemType::Projected);
+        REQUIRE(pCoordinateSystem->ToString() == ogcWkt);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2315,7 +2338,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_ConvertFromLonLat()
+TEST_CASE("Projected_ConvertFromLonLat", "[CoordinateSystem]")
 {
     try
     {
@@ -2322,25 +2345,25 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double lon = -84.46;
         double lat = 33.89;
         double x,y;
         pCoordinateSystem->ConvertFromLonLat(lon, lat, x, y);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(410983.2513, x));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1415078.441, y));
+        REQUIRE(MgUtil::ValuesEqual(410983.2513, x));
+        REQUIRE(MgUtil::ValuesEqual(1415078.441, y));
 
         MgCoordinateXY coord(-84.46, 33.89);
         Ptr<MgCoordinate> pCoord = pCoordinateSystem->ConvertFromLonLat(&coord);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(410983.2513, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(410983.2513, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2348,7 +2371,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_ConvertFromLonLatArray()
+TEST_CASE("Projected_ConvertFromLonLatArray", "[CoordinateSystem]")
 {
     try
     {
@@ -2355,26 +2378,26 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double lon[4] = { -84.46, -84.0, -83.0, -82.0 };
         double lat[4] = { 33.89, 33.0, 32.0, 31.0 };
         double x[4],y[4];
         pCoordinateSystem->ConvertFromLonLat(lon, lat, x, y, 4);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(410983.2513, x[0]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1415078.441, y[0]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(551096.7774, x[1]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1091213.712, y[1]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(861668.2135, x[2]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(729342.553, y[2]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1178912.136, x[3]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(370280.4158, y[3]));
+        REQUIRE(MgUtil::ValuesEqual(410983.2513, x[0]));
+        REQUIRE(MgUtil::ValuesEqual(1415078.441, y[0]));
+        REQUIRE(MgUtil::ValuesEqual(551096.7774, x[1]));
+        REQUIRE(MgUtil::ValuesEqual(1091213.712, y[1]));
+        REQUIRE(MgUtil::ValuesEqual(861668.2135, x[2]));
+        REQUIRE(MgUtil::ValuesEqual(729342.553, y[2]));
+        REQUIRE(MgUtil::ValuesEqual(1178912.136, x[3]));
+        REQUIRE(MgUtil::ValuesEqual(370280.4158, y[3]));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2382,7 +2405,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_ConvertToLonLat()
+TEST_CASE("Projected_ConvertToLonLat", "[CoordinateSystem]")
 {
     try
     {
@@ -2389,12 +2412,12 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         MgCoordinateXY coord(410961.8644, 1415078.441);
         Ptr<MgCoordinate> pCoord = pCoordinateSystem->ConvertToLonLat(&coord);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-84.46, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(33.89, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(-84.46, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(33.89, pCoord->GetY()));
 
     }
     catch(MgException* e)
@@ -2401,7 +2424,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2409,7 +2432,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_ConvertToLonLatArray()
+TEST_CASE("Projected_ConvertToLonLatArray", "[CoordinateSystem]")
 {
     try
     {
@@ -2416,7 +2439,7 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double x[4] = { 410961.8644, 551096.7774, 861668.2135, 1178912.136 };
         double y[4] = { 1415078.441, 1091213.712, 729342.553, 370280.4158 };
@@ -2423,20 +2446,20 @@
         double lon[4],lat[4];
 
         pCoordinateSystem->ConvertToLonLat(x, y, lon, lat, 4);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-84.46, lon[0]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(33.89, lat[0]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-84.0, lon[1]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(33.0, lat[1]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-83.0, lon[2]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(32.0, lat[2]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-82.0, lon[3]));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(31.0, lat[3]));
+        REQUIRE(MgUtil::ValuesEqual(-84.46, lon[0]));
+        REQUIRE(MgUtil::ValuesEqual(33.89, lat[0]));
+        REQUIRE(MgUtil::ValuesEqual(-84.0, lon[1]));
+        REQUIRE(MgUtil::ValuesEqual(33.0, lat[1]));
+        REQUIRE(MgUtil::ValuesEqual(-83.0, lon[2]));
+        REQUIRE(MgUtil::ValuesEqual(32.0, lat[2]));
+        REQUIRE(MgUtil::ValuesEqual(-82.0, lon[3]));
+        REQUIRE(MgUtil::ValuesEqual(31.0, lat[3]));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2444,7 +2467,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_ConvertCoordinateSystemUnitsToMeters()
+TEST_CASE("Projected_ConvertCoordinateSystemUnitsToMeters", "[CoordinateSystem]")
 {
     try
     {
@@ -2451,16 +2474,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double meters = pCoordinateSystem->ConvertCoordinateSystemUnitsToMeters(1.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(0.30480061, meters));
+        REQUIRE(MgUtil::ValuesEqual(0.30480061, meters));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2468,7 +2491,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_ConvertMetersToCoordinateSystemUnits()
+TEST_CASE("Projected_ConvertMetersToCoordinateSystemUnits", "[CoordinateSystem]")
 {
     try
     {
@@ -2475,16 +2498,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double units = pCoordinateSystem->ConvertMetersToCoordinateSystemUnits(0.30480061);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1.0, units));
+        REQUIRE(MgUtil::ValuesEqual(1.0, units));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2492,7 +2515,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_MeasureEuclideanDistance()
+TEST_CASE("Projected_MeasureEuclideanDistance", "[CoordinateSystem]")
 {
     try
     {
@@ -2499,25 +2522,25 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         MgCoordinateXY coord1(0.0, 0.0);
         MgCoordinateXY coord2(4.0, 3.0);
 
         double distance = pCoordinateSystem->MeasureEuclideanDistance(&coord1, &coord2);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(5.0, distance));
+        REQUIRE(MgUtil::ValuesEqual(5.0, distance));
 
         double distance2 = pCoordinateSystem->MeasureEuclideanDistance(0.0, 0.0, 4.0, 3.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(distance, distance2));
+        REQUIRE(MgUtil::ValuesEqual(distance, distance2));
 
         double meters = pCoordinateSystem->ConvertCoordinateSystemUnitsToMeters(distance);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1.52400305, meters));
+        REQUIRE(MgUtil::ValuesEqual(1.52400305, meters));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2525,7 +2548,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_MeasureGreatCircleDistance()
+TEST_CASE("Projected_MeasureGreatCircleDistance", "[CoordinateSystem]")
 {
     try
     {
@@ -2532,25 +2555,25 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         MgCoordinateXY coord1(410961.8644, 1415078.441);
         MgCoordinateXY coord2(432415.4557, 1362302.051);
 
         double distance = pCoordinateSystem->MeasureGreatCircleDistance(&coord1, &coord2);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(56975.49704, distance));
+        REQUIRE(MgUtil::ValuesEqual(56975.49704, distance));
 
         double distance2 = pCoordinateSystem->MeasureGreatCircleDistance(410961.8644, 1415078.441, 432415.4557, 1362302.051);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(distance, distance2));
+        REQUIRE(MgUtil::ValuesEqual(distance, distance2));
 
         double meters = pCoordinateSystem->ConvertCoordinateSystemUnitsToMeters(distance);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(17366.16623, meters));
+        REQUIRE(MgUtil::ValuesEqual(17366.16623, meters));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2558,7 +2581,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_GetAzimuth()
+TEST_CASE("Projected_GetAzimuth", "[CoordinateSystem]")
 {
     try
     {
@@ -2565,19 +2588,19 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         MgCoordinateXY coord1(410961.8644, 1415078.441);
         MgCoordinateXY coord2(432415.4557, 1362302.051);
 
         double degrees = pCoordinateSystem->GetAzimuth(&coord1, &coord2);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(157.7149495, degrees));
+        REQUIRE(MgUtil::ValuesEqual(157.7149495, degrees));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2585,7 +2608,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_GetCoordinate()
+TEST_CASE("Projected_GetCoordinate", "[CoordinateSystem]")
 {
     try
     {
@@ -2592,18 +2615,18 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         MgCoordinateXY coord(410961.8644, 1415078.441);
         Ptr<MgCoordinate> pCoord = pCoordinateSystem->GetCoordinate(&coord, 157.7491121, 57002.22092);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(432415.4557, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1362302.051, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(432415.4557, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(1362302.051, pCoord->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2611,7 +2634,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_Measure_GetDistance()
+TEST_CASE("Arbitrary_Measure_GetDistance", "[CoordinateSystem]")
 {
     try
     {
@@ -2618,25 +2641,25 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         Ptr<MgCoordinateSystemMeasure> measure = pCoordinateSystem->GetMeasure();
-        CPPUNIT_ASSERT(measure);
+        REQUIRE(measure);
 
         MgCoordinateXY coord1(0.0, 0.0);
         MgCoordinateXY coord2(4.0, 3.0);
         double distance = measure->GetDistance(&coord1, &coord2);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(5.0, distance));
+        REQUIRE(MgUtil::ValuesEqual(5.0, distance));
 
         Ptr<MgCoordinateSystem> coordSys = measure->GetCoordSys();
         double meters = coordSys->ConvertCoordinateSystemUnitsToMeters(distance);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(8046.72, meters));
+        REQUIRE(MgUtil::ValuesEqual(8046.72, meters));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2644,7 +2667,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_Measure_GetAzimuth()
+TEST_CASE("Arbitrary_Measure_GetAzimuth", "[CoordinateSystem]")
 {
     try
     {
@@ -2651,22 +2674,22 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         Ptr<MgCoordinateSystemMeasure> measure = pCoordinateSystem->GetMeasure();
-        CPPUNIT_ASSERT(measure);
+        REQUIRE(measure);
 
         MgCoordinateXY coord1(0.0, 0.0);
         MgCoordinateXY coord2(5.0, 5.0);
 
         double degrees = measure->GetAzimuth(&coord1, &coord2);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(45.0, degrees));
+        REQUIRE(MgUtil::ValuesEqual(45.0, degrees));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2674,7 +2697,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_Measure_GetCoordinate()
+TEST_CASE("Arbitrary_Measure_GetCoordinate", "[CoordinateSystem]")
 {
     try
     {
@@ -2681,21 +2704,21 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ArbitraryWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         Ptr<MgCoordinateSystemMeasure> measure = pCoordinateSystem->GetMeasure();
-        CPPUNIT_ASSERT(measure);
+        REQUIRE(measure);
 
         MgCoordinateXY coord(0.0, 0.0);
         Ptr<MgCoordinate> pCoord = measure->GetCoordinate(&coord, 45.0, 10.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(7.071067812, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(7.071067812, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(7.071067812, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(7.071067812, pCoord->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2703,7 +2726,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_Measure_GetDistance()
+TEST_CASE("Geographic_Measure_GetDistance", "[CoordinateSystem]")
 {
     try
     {
@@ -2710,25 +2733,25 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         Ptr<MgCoordinateSystemMeasure> measure = pCoordinateSystem->GetMeasure();
-        CPPUNIT_ASSERT(measure);
+        REQUIRE(measure);
 
         MgCoordinateXY coord1(0.0, 0.0);
         MgCoordinateXY coord2(4.0, 3.0);
 
         double distance = measure->GetDistance(&coord1, &coord2);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(4.986535473, distance));
+        REQUIRE(MgUtil::ValuesEqual(4.986535473, distance));
 
         double meters = pCoordinateSystem->ConvertCoordinateSystemUnitsToMeters(distance);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(555098.5897, meters));
+        REQUIRE(MgUtil::ValuesEqual(555098.5897, meters));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2736,7 +2759,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_Measure_GetAzimuth()
+TEST_CASE("Geographic_Measure_GetAzimuth", "[CoordinateSystem]")
 {
     try
     {
@@ -2743,22 +2766,22 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         Ptr<MgCoordinateSystemMeasure> measure = pCoordinateSystem->GetMeasure();
-        CPPUNIT_ASSERT(measure);
+        REQUIRE(measure);
 
         MgCoordinateXY coord1(0.0, 0.0);
         MgCoordinateXY coord2(4.0, 3.0);
 
         double degrees = measure->GetAzimuth(&coord1, &coord2);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(53.26700666, degrees));
+        REQUIRE(MgUtil::ValuesEqual(53.26700666, degrees));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2766,7 +2789,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_Measure_GetCoordinate()
+TEST_CASE("Geographic_Measure_GetCoordinate", "[CoordinateSystem]")
 {
     try
     {
@@ -2773,21 +2796,21 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         Ptr<MgCoordinateSystemMeasure> measure = pCoordinateSystem->GetMeasure();
-        CPPUNIT_ASSERT(measure);
+        REQUIRE(measure);
 
         MgCoordinateXY coord(0.0, 0.0);
         Ptr<MgCoordinate> pCoord = measure->GetCoordinate(&coord, 60.0, 10.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(8.682351371, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(5.014236434, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(8.682351371, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(5.014236434, pCoord->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2795,7 +2818,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_ConvertCode()
+TEST_CASE("Geographic_ConvertCode", "[CoordinateSystem]")
 {
     try
     {
@@ -2803,18 +2826,18 @@
 
         MgCoordinateSystemFactory factory;
         STRING code = factory.ConvertWktToCoordinateSystemCode(ogcWkt);
-        CPPUNIT_ASSERT(_wcsicmp(L"LL84", code.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"LL84", code.c_str()) == 0);
         STRING wkt = factory.ConvertCoordinateSystemCodeToWkt(code);
-        CPPUNIT_ASSERT(wkt.length() > 0);
+        REQUIRE(wkt.length() > 0);
 
         wkt = factory.ConvertCoordinateSystemCodeToWkt(L"ll84");
-        CPPUNIT_ASSERT(wkt.length() > 0);
+        REQUIRE(wkt.length() > 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2822,7 +2845,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_GetUnits()
+TEST_CASE("Geographic_GetUnits", "[CoordinateSystem]")
 {
     try
     {
@@ -2829,16 +2852,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING units = pCoordinateSystem->GetUnits();
-        CPPUNIT_ASSERT(_wcsicmp(L"Degree", units.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"Degree", units.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2846,7 +2869,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_GetUnitScale()
+TEST_CASE("Geographic_GetUnitScale", "[CoordinateSystem]")
 {
     try
     {
@@ -2853,16 +2876,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double scale = pCoordinateSystem->GetUnitScale();
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(111319.4908, scale));
+        REQUIRE(MgUtil::ValuesEqual(111319.4908, scale));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2870,7 +2893,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_GetMinX()
+TEST_CASE("Geographic_GetMinX", "[Broken]")
 {
     try
     {
@@ -2877,19 +2900,19 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double value = pCoordinateSystem->GetMinX();
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-180.0, value));
+        REQUIRE(MgUtil::ValuesEqual(-180.0, value));
 
         value = pCoordinateSystem->GetLonMin();
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-180.0, value));
+        REQUIRE(MgUtil::ValuesEqual(-180.0, value));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2897,7 +2920,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_GetMinY()
+TEST_CASE("Geographic_GetMinY", "[CoordinateSystem]")
 {
     try
     {
@@ -2904,19 +2927,19 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double value = pCoordinateSystem->GetMinY();
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-90.0, value));
+        REQUIRE(MgUtil::ValuesEqual(-90.0, value));
 
         value = pCoordinateSystem->GetLatMin();
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-90.0, value));
+        REQUIRE(MgUtil::ValuesEqual(-90.0, value));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2924,7 +2947,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_GetMaxX()
+TEST_CASE("Geographic_GetMaxX", "[Broken]")
 {
     try
     {
@@ -2931,19 +2954,19 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double value = pCoordinateSystem->GetMaxX();
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(180.0, value));
+        REQUIRE(MgUtil::ValuesEqual(180.0, value));
 
         value = pCoordinateSystem->GetLonMax();
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(180.0, value));
+        REQUIRE(MgUtil::ValuesEqual(180.0, value));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2951,7 +2974,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_GetMaxY()
+TEST_CASE("Geographic_GetMaxY", "[CoordinateSystem]")
 {
     try
     {
@@ -2958,19 +2981,19 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double value = pCoordinateSystem->GetMaxY();
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(90.0, value));
+        REQUIRE(MgUtil::ValuesEqual(90.0, value));
 
         value = pCoordinateSystem->GetLatMax();
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(90.0, value));
+        REQUIRE(MgUtil::ValuesEqual(90.0, value));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2978,7 +3001,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_GetCsCode()
+TEST_CASE("Geographic_GetCsCode", "[CoordinateSystem]")
 {
     try
     {
@@ -2985,16 +3008,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING value = pCoordinateSystem->GetCsCode();
-        CPPUNIT_ASSERT(_wcsicmp(L"LL84", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"LL84", value.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3002,7 +3025,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_GetDescription()
+TEST_CASE("Geographic_GetDescription", "[CoordinateSystem]")
 {
     try
     {
@@ -3009,16 +3032,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING value = pCoordinateSystem->GetDescription();
-        CPPUNIT_ASSERT(_wcsicmp(L"WGS84 datum, Latitude-Longitude; Degrees", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"WGS84 datum, Latitude-Longitude; Degrees", value.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3026,7 +3049,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_GetProjection()
+TEST_CASE("Geographic_GetProjection", "[CoordinateSystem]")
 {
     try
     {
@@ -3033,16 +3056,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING value = pCoordinateSystem->GetProjection();
-        CPPUNIT_ASSERT(_wcsicmp(L"LL", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"LL", value.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3050,7 +3073,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_GetProjectionDescription()
+TEST_CASE("Geographic_GetProjectionDescription", "[CoordinateSystem]")
 {
     try
     {
@@ -3057,16 +3080,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING value = pCoordinateSystem->GetProjectionDescription();
-        CPPUNIT_ASSERT(_wcsicmp(L"Null Projection, produces/processes Latitude & Longitude", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"Null Projection, produces/processes Latitude & Longitude", value.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3074,7 +3097,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_GetDatum()
+TEST_CASE("Geographic_GetDatum", "[CoordinateSystem]")
 {
     try
     {
@@ -3081,16 +3104,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING value = pCoordinateSystem->GetDatum();
-        CPPUNIT_ASSERT(_wcsicmp(L"WGS84", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"WGS84", value.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3098,7 +3121,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_GetDatumDescription()
+TEST_CASE("Geographic_GetDatumDescription", "[CoordinateSystem]")
 {
     try
     {
@@ -3105,16 +3128,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING value = pCoordinateSystem->GetDatumDescription();
-        CPPUNIT_ASSERT(_wcsicmp(L"World Geodetic System of 1984", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"World Geodetic System of 1984", value.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3122,7 +3145,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_GetEllipsoid()
+TEST_CASE("Geographic_GetEllipsoid", "[CoordinateSystem]")
 {
     try
     {
@@ -3129,16 +3152,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING value = pCoordinateSystem->GetEllipsoid();
-        CPPUNIT_ASSERT(_wcsicmp(L"WGS84", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"WGS84", value.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3146,7 +3169,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_GetEllipsoidDescription()
+TEST_CASE("Geographic_GetEllipsoidDescription", "[CoordinateSystem]")
 {
     try
     {
@@ -3153,16 +3176,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING value = pCoordinateSystem->GetEllipsoidDescription();
-        CPPUNIT_ASSERT(_wcsicmp(L"World Geodetic System of 1984, GEM 10C", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"World Geodetic System of 1984, GEM 10C", value.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3170,7 +3193,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_GetCategory()
+TEST_CASE("Geographic_GetCategory", "[CoordinateSystem]")
 {
     try
     {
@@ -3177,16 +3200,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         Ptr<MgStringCollection> value = pCoordinateSystem->GetCategories();
-        CPPUNIT_ASSERT(value->Contains(L"Lat Longs"));
+        REQUIRE(value->Contains(L"Lat Longs"));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3194,7 +3217,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_Measure_GetDistance()
+TEST_CASE("Projected_Measure_GetDistance", "[CoordinateSystem]")
 {
     try
     {
@@ -3201,25 +3224,25 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         Ptr<MgCoordinateSystemMeasure> measure = pCoordinateSystem->GetMeasure();
-        CPPUNIT_ASSERT(measure);
+        REQUIRE(measure);
 
         MgCoordinateXY coord1(410961.8644, 1415078.441);
         MgCoordinateXY coord2(432415.4557, 1362302.051);
 
         double distance = measure->GetDistance(&coord1, &coord2);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(56975.49704, distance));
+        REQUIRE(MgUtil::ValuesEqual(56975.49704, distance));
 
         double meters = pCoordinateSystem->ConvertCoordinateSystemUnitsToMeters(distance);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(17366.16623, meters));
+        REQUIRE(MgUtil::ValuesEqual(17366.16623, meters));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3227,7 +3250,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_Measure_GetAzimuth()
+TEST_CASE("Projected_Measure_GetAzimuth", "[CoordinateSystem]")
 {
     try
     {
@@ -3234,22 +3257,22 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         Ptr<MgCoordinateSystemMeasure> measure = pCoordinateSystem->GetMeasure();
-        CPPUNIT_ASSERT(measure);
+        REQUIRE(measure);
 
         MgCoordinateXY coord1(410961.8644, 1415078.441);
         MgCoordinateXY coord2(432415.4557, 1362302.051);
 
         double degrees = measure->GetAzimuth(&coord1, &coord2);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(157.7149495, degrees));
+        REQUIRE(MgUtil::ValuesEqual(157.7149495, degrees));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3257,7 +3280,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_Measure_GetCoordinate()
+TEST_CASE("Projected_Measure_GetCoordinate", "[CoordinateSystem]")
 {
     try
     {
@@ -3264,21 +3287,21 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         Ptr<MgCoordinateSystemMeasure> measure = pCoordinateSystem->GetMeasure();
-        CPPUNIT_ASSERT(measure);
+        REQUIRE(measure);
 
         MgCoordinateXY coord(410961.8644, 1415078.441);
         Ptr<MgCoordinate> pCoord = measure->GetCoordinate(&coord, 157.7491121, 57002.220920);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(432415.4557, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1362302.051, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(432415.4557, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(1362302.051, pCoord->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3286,7 +3309,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_ConvertCode()
+TEST_CASE("Projected_ConvertCode", "[CoordinateSystem]")
 {
     try
     {
@@ -3294,18 +3317,18 @@
 
         MgCoordinateSystemFactory factory;
         STRING code = factory.ConvertWktToCoordinateSystemCode(ogcWkt);
-        CPPUNIT_ASSERT(_wcsicmp(L"GA-W", code.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"GA-W", code.c_str()) == 0);
         STRING wkt = factory.ConvertCoordinateSystemCodeToWkt(code);
-        CPPUNIT_ASSERT(wkt.length() > 0);
+        REQUIRE(wkt.length() > 0);
 
         wkt = factory.ConvertCoordinateSystemCodeToWkt(L"ga-w");
-        CPPUNIT_ASSERT(wkt.length() > 0);
+        REQUIRE(wkt.length() > 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3313,7 +3336,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_GetUnits()
+TEST_CASE("Projected_GetUnits", "[CoordinateSystem]")
 {
     try
     {
@@ -3320,16 +3343,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING units = pCoordinateSystem->GetUnits();
-        CPPUNIT_ASSERT(_wcsicmp(L"FOOT", units.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"FOOT", units.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3337,7 +3360,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_GetUnitScale()
+TEST_CASE("Projected_GetUnitScale", "[CoordinateSystem]")
 {
     try
     {
@@ -3344,16 +3367,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double scale = pCoordinateSystem->GetUnitScale();
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(0.30480061, scale));
+        REQUIRE(MgUtil::ValuesEqual(0.30480061, scale));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3361,7 +3384,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_GetMinX()
+TEST_CASE("Projected_GetMinX", "[Broken]")
 {
     try
     {
@@ -3368,16 +3391,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double value = pCoordinateSystem->GetMinX();
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-171305.5915, value));
+        REQUIRE(MgUtil::ValuesEqual(-171305.5915, value));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3385,7 +3408,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_GetMinY()
+TEST_CASE("Projected_GetMinY", "[Broken]")
 {
     try
     {
@@ -3392,16 +3415,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double value = pCoordinateSystem->GetMinY();
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(0.0, value));
+        REQUIRE(MgUtil::ValuesEqual(0.0, value));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3409,7 +3432,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_GetMaxX()
+TEST_CASE("Projected_GetMaxX", "[Broken]")
 {
     try
     {
@@ -3416,16 +3439,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double value = pCoordinateSystem->GetMaxX();
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1171305.5915, value));
+        REQUIRE(MgUtil::ValuesEqual(1171305.5915, value));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3433,7 +3456,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_GetMaxY()
+TEST_CASE("Projected_GetMaxY", "[Broken]")
 {
     try
     {
@@ -3440,16 +3463,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         double value = pCoordinateSystem->GetMaxY();
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(21920187.62, value));
+        REQUIRE(MgUtil::ValuesEqual(21920187.62, value));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3457,7 +3480,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_GetCsCode()
+TEST_CASE("Projected_GetCsCode", "[CoordinateSystem]")
 {
     try
     {
@@ -3464,16 +3487,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING value = pCoordinateSystem->GetCsCode();
-        CPPUNIT_ASSERT(_wcsicmp(L"GA-W", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"GA-W", value.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3481,7 +3504,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_GetDescription()
+TEST_CASE("Projected_GetDescription", "[CoordinateSystem]")
 {
     try
     {
@@ -3488,16 +3511,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING value = pCoordinateSystem->GetDescription();
-        CPPUNIT_ASSERT(_wcsicmp(L"NAD27 Georgia State Planes, West Zone(1002), US Foot", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"NAD27 Georgia State Planes, West Zone(1002), US Foot", value.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3505,7 +3528,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_GetProjection()
+TEST_CASE("Projected_GetProjection", "[CoordinateSystem]")
 {
     try
     {
@@ -3512,16 +3535,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING value = pCoordinateSystem->GetProjection();
-        CPPUNIT_ASSERT(_wcsicmp(L"TM", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"TM", value.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3529,7 +3552,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_GetProjectionDescription()
+TEST_CASE("Projected_GetProjectionDescription", "[CoordinateSystem]")
 {
     try
     {
@@ -3536,16 +3559,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING value = pCoordinateSystem->GetProjectionDescription();
-        CPPUNIT_ASSERT(_wcsicmp(L"Transverse Mercator or Gauss Kruger Projection", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"Transverse Mercator or Gauss Kruger Projection", value.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3553,7 +3576,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_GetDatum()
+TEST_CASE("Projected_GetDatum", "[CoordinateSystem]")
 {
     try
     {
@@ -3560,16 +3583,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING value = pCoordinateSystem->GetDatum();
-        CPPUNIT_ASSERT(_wcsicmp(L"NAD27", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"NAD27", value.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3577,7 +3600,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_GetDatumDescription()
+TEST_CASE("Projected_GetDatumDescription", "[CoordinateSystem]")
 {
     try
     {
@@ -3584,16 +3607,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING value = pCoordinateSystem->GetDatumDescription();
-        CPPUNIT_ASSERT(_wcsicmp(L"NAD 1927, mean Values, Continental United States", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"NAD 1927, mean Values, Continental United States", value.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3601,7 +3624,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_GetEllipsoid()
+TEST_CASE("Projected_GetEllipsoid", "[CoordinateSystem]")
 {
     try
     {
@@ -3608,16 +3631,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING value = pCoordinateSystem->GetEllipsoid();
-        CPPUNIT_ASSERT(_wcsicmp(L"CLRK66", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"CLRK66", value.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3625,7 +3648,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_GetEllipsoidDescription()
+TEST_CASE("Projected_GetEllipsoidDescription", "[CoordinateSystem]")
 {
     try
     {
@@ -3632,16 +3655,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         STRING value = pCoordinateSystem->GetEllipsoidDescription();
-        CPPUNIT_ASSERT(_wcsicmp(L"Clarke 1866, Benoit Ratio", value.c_str()) == 0);
+        REQUIRE(_wcsicmp(L"Clarke 1866, Benoit Ratio", value.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3649,7 +3672,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_GetCategory()
+TEST_CASE("Projected_GetCategory", "[CoordinateSystem]")
 {
     try
     {
@@ -3656,16 +3679,16 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = ProjectedWkt;
         Ptr<MgCoordinateSystem> pCoordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(pCoordinateSystem);
+        REQUIRE(pCoordinateSystem);
 
         Ptr<MgStringCollection> value = pCoordinateSystem->GetCategories();
-        CPPUNIT_ASSERT(value->Contains(L"USA, Georgia"));
+        REQUIRE(value->Contains(L"USA, Georgia"));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3673,7 +3696,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_To_Arbitrary_Transform_XY()
+TEST_CASE("Arbitrary_To_Arbitrary_Transform_XY", "[CoordinateSystem]")
 {
     try
     {
@@ -3680,24 +3703,24 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ArbitraryWkt_Meter;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ArbitraryWkt_Feet;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         Ptr<MgCoordinate> pCoord = transform->Transform(10.0, 5.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(32.80833333, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(16.40416667, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(32.80833333, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(16.40416667, pCoord->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3705,7 +3728,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_To_Arbitrary_Transform_XYZ()
+TEST_CASE("Arbitrary_To_Arbitrary_Transform_XYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -3712,25 +3735,25 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ArbitraryWkt_Meter;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ArbitraryWkt_Feet;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         Ptr<MgCoordinate> pCoord = transform->Transform(10.0, 5.0, 1.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(32.80833333, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(16.40416667, pCoord->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(3.280833333, pCoord->GetZ()));
+        REQUIRE(MgUtil::ValuesEqual(32.80833333, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(16.40416667, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(3.280833333, pCoord->GetZ()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3738,7 +3761,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_To_Arbitrary_Transform_CoordinateXY()
+TEST_CASE("Arbitrary_To_Arbitrary_Transform_CoordinateXY", "[CoordinateSystem]")
 {
     try
     {
@@ -3745,25 +3768,25 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ArbitraryWkt_Meter;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ArbitraryWkt_Feet;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         MgCoordinateXY coord(10.0, 5.0);
         Ptr<MgCoordinate> pCoord = transform->Transform(&coord);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(32.80833333, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(16.40416667, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(32.80833333, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(16.40416667, pCoord->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3771,7 +3794,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_To_Arbitrary_Transform_CoordinateXYM()
+TEST_CASE("Arbitrary_To_Arbitrary_Transform_CoordinateXYM", "[CoordinateSystem]")
 {
     try
     {
@@ -3778,26 +3801,26 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ArbitraryWkt_Meter;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ArbitraryWkt_Feet;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         MgCoordinateXYM coord(10.0, 5.0, 100.0);
         Ptr<MgCoordinate> pCoord = transform->Transform(&coord);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(32.80833333, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(16.40416667, pCoord->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(328.0833333, pCoord->GetM()));
+        REQUIRE(MgUtil::ValuesEqual(32.80833333, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(16.40416667, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(328.0833333, pCoord->GetM()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3805,7 +3828,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_To_Arbitrary_Transform_CoordinateXYZ()
+TEST_CASE("Arbitrary_To_Arbitrary_Transform_CoordinateXYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -3812,26 +3835,26 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ArbitraryWkt_Meter;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ArbitraryWkt_Feet;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         MgCoordinateXYZ coord(10.0, 5.0, 1.0);
         Ptr<MgCoordinate> pCoord = transform->Transform(&coord);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(32.80833333, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(16.40416667, pCoord->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(3.280833333, pCoord->GetZ()));
+        REQUIRE(MgUtil::ValuesEqual(32.80833333, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(16.40416667, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(3.280833333, pCoord->GetZ()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3839,7 +3862,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_To_Arbitrary_Transform_CoordinateXYZM()
+TEST_CASE("Arbitrary_To_Arbitrary_Transform_CoordinateXYZM", "[CoordinateSystem]")
 {
     try
     {
@@ -3846,27 +3869,27 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ArbitraryWkt_Meter;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ArbitraryWkt_Feet;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         MgCoordinateXYZM coord(10.0, 5.0, 1.0, 100.0);
         Ptr<MgCoordinate> pCoord = transform->Transform(&coord);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(32.80833333, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(16.40416667, pCoord->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(3.280833333, pCoord->GetZ()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(328.0833333, pCoord->GetM()));
+        REQUIRE(MgUtil::ValuesEqual(32.80833333, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(16.40416667, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(3.280833333, pCoord->GetZ()));
+        REQUIRE(MgUtil::ValuesEqual(328.0833333, pCoord->GetM()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3874,7 +3897,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_To_Arbitrary_Transform_EnvelopeXY()
+TEST_CASE("Arbitrary_To_Arbitrary_Transform_EnvelopeXY", "[CoordinateSystem]")
 {
     try
     {
@@ -3881,14 +3904,14 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ArbitraryWkt_Meter;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ArbitraryWkt_Feet;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         Ptr<MgCoordinate> coord1 = new MgCoordinateXY(0.0, 1.0);
         Ptr<MgCoordinate> coord2 = new MgCoordinateXY(10.0, 5.0);
@@ -3898,16 +3921,16 @@
         Ptr<MgCoordinate> ur = envelopeTarget->GetUpperRightCoordinate();
         Ptr<MgCoordinate> ll = envelopeTarget->GetLowerLeftCoordinate();
 
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(32.80833333, ur->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(16.40416667, ur->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(0.0, ll->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(3.280833333, ll->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(32.80833333, ur->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(16.40416667, ur->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(0.0, ll->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(3.280833333, ll->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3915,7 +3938,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_To_Arbitrary_Transform_EnvelopeXYZ()
+TEST_CASE("Arbitrary_To_Arbitrary_Transform_EnvelopeXYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -3922,14 +3945,14 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ArbitraryWkt_Meter;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ArbitraryWkt_Feet;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         Ptr<MgCoordinate> coord1 = new MgCoordinateXYZ(0.0, 1.0, 1.0);
         Ptr<MgCoordinate> coord2 = new MgCoordinateXYZ(10.0, 5.0, 2.0);
@@ -3939,18 +3962,18 @@
         Ptr<MgCoordinate> ur = envelopeTarget->GetUpperRightCoordinate();
         Ptr<MgCoordinate> ll = envelopeTarget->GetLowerLeftCoordinate();
 
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(32.80833333, ur->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(16.40416667, ur->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(2.0, ur->GetZ()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(0.0, ll->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(3.280833333, ll->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1.0, ll->GetZ()));
+        REQUIRE(MgUtil::ValuesEqual(32.80833333, ur->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(16.40416667, ur->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(2.0, ur->GetZ()));
+        REQUIRE(MgUtil::ValuesEqual(0.0, ll->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(3.280833333, ll->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(1.0, ll->GetZ()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3958,7 +3981,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_To_Geographic_Transform_XY()
+TEST_CASE("Arbitrary_To_Geographic_Transform_XY", "[CoordinateSystem]")
 {
     try
     {
@@ -3965,11 +3988,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ArbitraryWkt_Meter;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -3984,7 +4007,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3992,7 +4015,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_To_Geographic_Transform_XYZ()
+TEST_CASE("Arbitrary_To_Geographic_Transform_XYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -3999,11 +4022,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ArbitraryWkt_Meter;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -4018,7 +4041,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4026,7 +4049,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_To_Geographic_Transform_CoordinateXY()
+TEST_CASE("Arbitrary_To_Geographic_Transform_CoordinateXY", "[CoordinateSystem]")
 {
     try
     {
@@ -4033,11 +4056,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ArbitraryWkt_Meter;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -4052,7 +4075,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4060,7 +4083,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_To_Geographic_Transform_CoordinateXYM()
+TEST_CASE("Arbitrary_To_Geographic_Transform_CoordinateXYM", "[CoordinateSystem]")
 {
     try
     {
@@ -4067,11 +4090,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ArbitraryWkt_Meter;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -4086,7 +4109,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4094,7 +4117,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_To_Geographic_Transform_CoordinateXYZ()
+TEST_CASE("Arbitrary_To_Geographic_Transform_CoordinateXYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -4101,11 +4124,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ArbitraryWkt_Meter;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -4120,7 +4143,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4128,7 +4151,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_To_Geographic_Transform_CoordinateXYZM()
+TEST_CASE("Arbitrary_To_Geographic_Transform_CoordinateXYZM", "[CoordinateSystem]")
 {
     try
     {
@@ -4135,11 +4158,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ArbitraryWkt_Meter;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -4154,7 +4177,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4162,7 +4185,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_To_Geographic_Transform_EnvelopeXY()
+TEST_CASE("Arbitrary_To_Geographic_Transform_EnvelopeXY", "[CoordinateSystem]")
 {
     try
     {
@@ -4169,11 +4192,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ArbitraryWkt_Meter;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -4188,7 +4211,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4196,7 +4219,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_To_Geographic_Transform_EnvelopeXYZ()
+TEST_CASE("Arbitrary_To_Geographic_Transform_EnvelopeXYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -4203,11 +4226,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ArbitraryWkt_Meter;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -4222,7 +4245,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4230,7 +4253,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_To_Projected_Transform_XY()
+TEST_CASE("Arbitrary_To_Projected_Transform_XY", "[CoordinateSystem]")
 {
     try
     {
@@ -4237,11 +4260,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ArbitraryWkt_Meter;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -4256,7 +4279,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4264,7 +4287,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_To_Projected_Transform_XYZ()
+TEST_CASE("Arbitrary_To_Projected_Transform_XYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -4271,11 +4294,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ArbitraryWkt_Meter;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -4290,7 +4313,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4298,7 +4321,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_To_Projected_Transform_CoordinateXY()
+TEST_CASE("Arbitrary_To_Projected_Transform_CoordinateXY", "[CoordinateSystem]")
 {
     try
     {
@@ -4305,11 +4328,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ArbitraryWkt_Meter;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -4324,7 +4347,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4332,7 +4355,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_To_Projected_Transform_CoordinateXYM()
+TEST_CASE("Arbitrary_To_Projected_Transform_CoordinateXYM", "[CoordinateSystem]")
 {
     try
     {
@@ -4339,11 +4362,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ArbitraryWkt_Meter;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -4358,7 +4381,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4366,7 +4389,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_To_Projected_Transform_CoordinateXYZ()
+TEST_CASE("Arbitrary_To_Projected_Transform_CoordinateXYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -4373,11 +4396,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ArbitraryWkt_Meter;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -4392,7 +4415,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4400,7 +4423,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_To_Projected_Transform_CoordinateXYZM()
+TEST_CASE("Arbitrary_To_Projected_Transform_CoordinateXYZM", "[CoordinateSystem]")
 {
     try
     {
@@ -4407,11 +4430,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ArbitraryWkt_Meter;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -4426,7 +4449,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4434,7 +4457,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_To_Projected_Transform_EnvelopeXY()
+TEST_CASE("Arbitrary_To_Projected_Transform_EnvelopeXY", "[CoordinateSystem]")
 {
     try
     {
@@ -4441,11 +4464,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ArbitraryWkt_Meter;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -4460,7 +4483,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4468,7 +4491,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Arbitrary_To_Projected_Transform_EnvelopeXYZ()
+TEST_CASE("Arbitrary_To_Projected_Transform_EnvelopeXYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -4475,11 +4498,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ArbitraryWkt_Meter;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -4494,7 +4517,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4502,7 +4525,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_To_Arbitrary_Transform_XY()
+TEST_CASE("Geographic_To_Arbitrary_Transform_XY", "[CoordinateSystem]")
 {
     try
     {
@@ -4509,11 +4532,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ArbitraryWkt_Feet;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -4528,7 +4551,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4536,7 +4559,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_To_Arbitrary_Transform_XYZ()
+TEST_CASE("Geographic_To_Arbitrary_Transform_XYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -4543,11 +4566,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ArbitraryWkt_Feet;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -4562,7 +4585,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4570,7 +4593,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_To_Arbitrary_Transform_CoordinateXY()
+TEST_CASE("Geographic_To_Arbitrary_Transform_CoordinateXY", "[CoordinateSystem]")
 {
     try
     {
@@ -4577,11 +4600,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ArbitraryWkt_Feet;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -4596,7 +4619,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4604,7 +4627,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_To_Arbitrary_Transform_CoordinateXYM()
+TEST_CASE("Geographic_To_Arbitrary_Transform_CoordinateXYM", "[CoordinateSystem]")
 {
     try
     {
@@ -4611,11 +4634,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ArbitraryWkt_Feet;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -4630,7 +4653,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4638,7 +4661,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_To_Arbitrary_Transform_CoordinateXYZ()
+TEST_CASE("Geographic_To_Arbitrary_Transform_CoordinateXYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -4645,11 +4668,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ArbitraryWkt_Feet;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -4664,7 +4687,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4672,7 +4695,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_To_Arbitrary_Transform_CoordinateXYZM()
+TEST_CASE("Geographic_To_Arbitrary_Transform_CoordinateXYZM", "[CoordinateSystem]")
 {
     try
     {
@@ -4679,11 +4702,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ArbitraryWkt_Feet;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -4698,7 +4721,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4706,7 +4729,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_To_Arbitrary_Transform_EnvelopeXY()
+TEST_CASE("Geographic_To_Arbitrary_Transform_EnvelopeXY", "[CoordinateSystem]")
 {
     try
     {
@@ -4713,11 +4736,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ArbitraryWkt_Feet;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -4732,7 +4755,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4740,7 +4763,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_To_Arbitrary_Transform_EnvelopeXYZ()
+TEST_CASE("Geographic_To_Arbitrary_Transform_EnvelopeXYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -4747,11 +4770,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ArbitraryWkt_Feet;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -4766,7 +4789,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4774,7 +4797,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_To_Geographic_Transform_XY()
+TEST_CASE("Geographic_To_Geographic_Transform_XY", "[CoordinateSystem]")
 {
     try
     {
@@ -4781,24 +4804,24 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         Ptr<MgCoordinate> pCoord = transform->Transform(10.0, 5.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(10.0, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(5.0, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(10.0, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(5.0, pCoord->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4806,7 +4829,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_To_Geographic_Transform_XYZ()
+TEST_CASE("Geographic_To_Geographic_Transform_XYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -4813,25 +4836,25 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         Ptr<MgCoordinate> pCoord = transform->Transform(10.0, 5.0, 1.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(10.0, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(5.0, pCoord->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1.0, pCoord->GetZ()));
+        REQUIRE(MgUtil::ValuesEqual(10.0, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(5.0, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(1.0, pCoord->GetZ()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4839,7 +4862,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_To_Geographic_Transform_CoordinateXY()
+TEST_CASE("Geographic_To_Geographic_Transform_CoordinateXY", "[CoordinateSystem]")
 {
     try
     {
@@ -4846,25 +4869,25 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         MgCoordinateXY coord(10.0, 5.0);
         Ptr<MgCoordinate> pCoord = transform->Transform(&coord);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(10.0, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(5.0, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(10.0, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(5.0, pCoord->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4872,7 +4895,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_To_Geographic_Transform_CoordinateXYM()
+TEST_CASE("Geographic_To_Geographic_Transform_CoordinateXYM", "[CoordinateSystem]")
 {
     try
     {
@@ -4879,26 +4902,26 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         MgCoordinateXYM coord(10.0, 5.0, 1.0);
         Ptr<MgCoordinate> pCoord = transform->Transform(&coord);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(10.0, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(5.0, pCoord->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1.0, pCoord->GetM()));
+        REQUIRE(MgUtil::ValuesEqual(10.0, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(5.0, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(1.0, pCoord->GetM()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4906,7 +4929,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_To_Geographic_Transform_CoordinateXYZ()
+TEST_CASE("Geographic_To_Geographic_Transform_CoordinateXYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -4913,26 +4936,26 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         MgCoordinateXYZ coord(10.0, 5.0, 1.0);
         Ptr<MgCoordinate> pCoord = transform->Transform(&coord);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(10.0, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(5.0, pCoord->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1.0, pCoord->GetZ()));
+        REQUIRE(MgUtil::ValuesEqual(10.0, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(5.0, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(1.0, pCoord->GetZ()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4940,7 +4963,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_To_Geographic_Transform_CoordinateXYZM()
+TEST_CASE("Geographic_To_Geographic_Transform_CoordinateXYZM", "[CoordinateSystem]")
 {
     try
     {
@@ -4947,27 +4970,27 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         MgCoordinateXYZM coord(10.0, 5.0, 1.0, 1.0);
         Ptr<MgCoordinate> pCoord = transform->Transform(&coord);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(10.0, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(5.0, pCoord->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1.0, pCoord->GetZ()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1.0, pCoord->GetM()));
+        REQUIRE(MgUtil::ValuesEqual(10.0, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(5.0, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(1.0, pCoord->GetZ()));
+        REQUIRE(MgUtil::ValuesEqual(1.0, pCoord->GetM()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -4975,7 +4998,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_To_Geographic_Transform_EnvelopeXY()
+TEST_CASE("Geographic_To_Geographic_Transform_EnvelopeXY", "[CoordinateSystem]")
 {
     try
     {
@@ -4982,14 +5005,14 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         Ptr<MgCoordinate> coord1 = new MgCoordinateXY(0.0, 1.0);
         Ptr<MgCoordinate> coord2 = new MgCoordinateXY(10.0, 5.0);
@@ -4999,16 +5022,16 @@
         Ptr<MgCoordinate> ur = envelopeTarget->GetUpperRightCoordinate();
         Ptr<MgCoordinate> ll = envelopeTarget->GetLowerLeftCoordinate();
 
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(10.0, ur->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(5.0, ur->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(0.0, ll->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1.0, ll->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(10.0, ur->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(5.0, ur->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(0.0, ll->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(1.0, ll->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5016,7 +5039,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_To_Geographic_Transform_EnvelopeXYZ()
+TEST_CASE("Geographic_To_Geographic_Transform_EnvelopeXYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -5023,14 +5046,14 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         Ptr<MgCoordinate> coord1 = new MgCoordinateXYZ(0.0, 1.0, 1.0);
         Ptr<MgCoordinate> coord2 = new MgCoordinateXYZ(10.0, 5.0, 2.0);
@@ -5040,18 +5063,18 @@
         Ptr<MgCoordinate> ur = envelopeTarget->GetUpperRightCoordinate();
         Ptr<MgCoordinate> ll = envelopeTarget->GetLowerLeftCoordinate();
 
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(10.0, ur->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(5.0, ur->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(2.0, ur->GetZ()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(0.0, ll->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1.0, ll->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1.0, ll->GetZ()));
+        REQUIRE(MgUtil::ValuesEqual(10.0, ur->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(5.0, ur->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(2.0, ur->GetZ()));
+        REQUIRE(MgUtil::ValuesEqual(0.0, ll->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(1.0, ll->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(1.0, ll->GetZ()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5059,7 +5082,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_To_Projected_Transform_XY()
+TEST_CASE("Geographic_To_Projected_Transform_XY", "[CoordinateSystem]")
 {
     try
     {
@@ -5066,24 +5089,24 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         Ptr<MgCoordinate> pCoord = transform->Transform(-84.46, 33.89);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(410961.8644, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(410961.8644, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5091,7 +5114,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_To_Projected_Transform_XYZ()
+TEST_CASE("Geographic_To_Projected_Transform_XYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -5098,26 +5121,26 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         Ptr<MgCoordinate> pCoord = transform->Transform(-84.46, 33.89, 1.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(410961.8644, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(410961.8644, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
         // TODO: Commented out because Mentor gives different results on Linux
-//        CPPUNIT_ASSERT(MgUtil::ValuesEqual(3.116561399, pCoord->GetZ()));
+//        REQUIRE(MgUtil::ValuesEqual(3.116561399, pCoord->GetZ()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5125,7 +5148,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_To_Projected_Transform_CoordinateXY()
+TEST_CASE("Geographic_To_Projected_Transform_CoordinateXY", "[CoordinateSystem]")
 {
     try
     {
@@ -5132,25 +5155,25 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         MgCoordinateXY coord(-84.46, 33.89);
         Ptr<MgCoordinate> pCoord = transform->Transform(&coord);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(410961.8644, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(410961.8644, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5158,7 +5181,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_To_Projected_Transform_CoordinateXYM()
+TEST_CASE("Geographic_To_Projected_Transform_CoordinateXYM", "[CoordinateSystem]")
 {
     try
     {
@@ -5165,26 +5188,26 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         MgCoordinateXYM coord(-84.46, 33.89, 1.0);
         Ptr<MgCoordinate> pCoord = transform->Transform(&coord);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(410961.8644, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(365220.6956, pCoord->GetM()));
+        REQUIRE(MgUtil::ValuesEqual(410961.8644, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(365220.6956, pCoord->GetM()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5192,7 +5215,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_To_Projected_Transform_CoordinateXYZ()
+TEST_CASE("Geographic_To_Projected_Transform_CoordinateXYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -5199,27 +5222,27 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         MgCoordinateXYZ coord(-84.46, 33.89, 1.0);
         Ptr<MgCoordinate> pCoord = transform->Transform(&coord);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(410961.8644, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(410961.8644, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
         // TODO: Commented out because Mentor gives different results on Linux
-//        CPPUNIT_ASSERT(MgUtil::ValuesEqual(3.116561399, pCoord->GetZ()));
+//        REQUIRE(MgUtil::ValuesEqual(3.116561399, pCoord->GetZ()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5227,7 +5250,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_To_Projected_Transform_CoordinateXYZM()
+TEST_CASE("Geographic_To_Projected_Transform_CoordinateXYZM", "[CoordinateSystem]")
 {
     try
     {
@@ -5234,29 +5257,29 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         MgCoordinateXYZM coord(-84.46, 33.89, 1.0, 1.0);
         Ptr<MgCoordinate> pCoord = transform->Transform(&coord);
 
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(410961.8644, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(410961.8644, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
         // TODO: Commented out because Mentor gives different results on Linux
-//        CPPUNIT_ASSERT(MgUtil::ValuesEqual(3.116561399, pCoord->GetZ()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(365220.6956, pCoord->GetM()));
+//        REQUIRE(MgUtil::ValuesEqual(3.116561399, pCoord->GetZ()));
+        REQUIRE(MgUtil::ValuesEqual(365220.6956, pCoord->GetM()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5264,7 +5287,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_To_Projected_Transform_EnvelopeXY()
+TEST_CASE("Geographic_To_Projected_Transform_EnvelopeXY", "[CoordinateSystem]")
 {
     try
     {
@@ -5271,14 +5294,14 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         Ptr<MgCoordinate> coord1 = new MgCoordinateXY(-83.0, 34.0);
         Ptr<MgCoordinate> coord2 = new MgCoordinateXY(-85.0, 33.0);
@@ -5288,16 +5311,16 @@
         Ptr<MgCoordinate> ur = envelopeTarget->GetUpperRightCoordinate();
         Ptr<MgCoordinate> ll = envelopeTarget->GetLowerLeftCoordinate();
 
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(853597.4323, ur->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1457027.613, ur->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(244492.8335, ll->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1092185.195, ll->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(853597.4323, ur->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(1457027.613, ur->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(244492.8335, ll->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(1092185.195, ll->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5305,7 +5328,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_To_Projected_Transform_EnvelopeXYZ()
+TEST_CASE("Geographic_To_Projected_Transform_EnvelopeXYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -5312,14 +5335,14 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         //#2787: We get datum shift warnings if Z coordinates are involved
         transform->IgnoreDatumShiftWarning(true);
@@ -5331,18 +5354,18 @@
 
         Ptr<MgCoordinate> ur = envelopeTarget->GetUpperRightCoordinate();
         Ptr<MgCoordinate> ll = envelopeTarget->GetLowerLeftCoordinate();
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(853597.4323, ur->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1457027.613, ur->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(2.0, ur->GetZ()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(551096.7774, ll->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1091213.712, ll->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1.0, ll->GetZ()));
+        REQUIRE(MgUtil::ValuesEqual(853597.4323, ur->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(1457027.613, ur->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(2.0, ur->GetZ()));
+        REQUIRE(MgUtil::ValuesEqual(551096.7774, ll->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(1091213.712, ll->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(1.0, ll->GetZ()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5350,7 +5373,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_To_Arbitrary_Transform_XY()
+TEST_CASE("Projected_To_Arbitrary_Transform_XY", "[CoordinateSystem]")
 {
     try
     {
@@ -5357,11 +5380,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ArbitraryWkt_Feet;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -5376,7 +5399,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5384,7 +5407,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_To_Arbitrary_Transform_XYZ()
+TEST_CASE("Projected_To_Arbitrary_Transform_XYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -5391,11 +5414,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ArbitraryWkt_Feet;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -5410,7 +5433,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5418,7 +5441,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_To_Arbitrary_Transform_CoordinateXY()
+TEST_CASE("Projected_To_Arbitrary_Transform_CoordinateXY", "[CoordinateSystem]")
 {
     try
     {
@@ -5425,11 +5448,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ArbitraryWkt_Feet;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -5444,7 +5467,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5452,7 +5475,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_To_Arbitrary_Transform_CoordinateXYM()
+TEST_CASE("Projected_To_Arbitrary_Transform_CoordinateXYM", "[CoordinateSystem]")
 {
     try
     {
@@ -5459,11 +5482,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ArbitraryWkt_Feet;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -5478,7 +5501,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5486,7 +5509,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_To_Arbitrary_Transform_CoordinateXYZ()
+TEST_CASE("Projected_To_Arbitrary_Transform_CoordinateXYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -5493,11 +5516,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ArbitraryWkt_Feet;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -5512,7 +5535,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5520,7 +5543,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_To_Arbitrary_Transform_CoordinateXYZM()
+TEST_CASE("Projected_To_Arbitrary_Transform_CoordinateXYZM", "[CoordinateSystem]")
 {
     try
     {
@@ -5527,11 +5550,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ArbitraryWkt_Feet;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -5546,7 +5569,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5554,7 +5577,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_To_Arbitrary_Transform_EnvelopeXY()
+TEST_CASE("Projected_To_Arbitrary_Transform_EnvelopeXY", "[CoordinateSystem]")
 {
     try
     {
@@ -5561,11 +5584,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ArbitraryWkt_Feet;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -5580,7 +5603,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5588,7 +5611,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_To_Arbitrary_Transform_EnvelopeXYZ()
+TEST_CASE("Projected_To_Arbitrary_Transform_EnvelopeXYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -5595,11 +5618,11 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ArbitraryWkt_Feet;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         try
         {
@@ -5614,7 +5637,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5622,7 +5645,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_To_Geographic_Transform_XY()
+TEST_CASE("Projected_To_Geographic_Transform_XY", "[CoordinateSystem]")
 {
     try
     {
@@ -5629,24 +5652,24 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         Ptr<MgCoordinate> pCoord = transform->Transform(410961.8644, 1415078.441);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-84.46, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(33.89, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(-84.46, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(33.89, pCoord->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5654,7 +5677,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_To_Geographic_Transform_XYZ()
+TEST_CASE("Projected_To_Geographic_Transform_XYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -5661,26 +5684,26 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         Ptr<MgCoordinate> pCoord = transform->Transform(410961.8644, 1415078.441, 1.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-84.46, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(33.89, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(-84.46, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(33.89, pCoord->GetY()));
         // TODO: Commented out because Mentor gives different results on Linux
-//        CPPUNIT_ASSERT(MgUtil::ValuesEqual(0.3548707958, pCoord->GetZ()));
+//        REQUIRE(MgUtil::ValuesEqual(0.3548707958, pCoord->GetZ()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5688,7 +5711,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_To_Geographic_Transform_CoordinateXY()
+TEST_CASE("Projected_To_Geographic_Transform_CoordinateXY", "[CoordinateSystem]")
 {
     try
     {
@@ -5695,25 +5718,25 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         MgCoordinateXY coord(410961.8644, 1415078.441);
         Ptr<MgCoordinate> pCoord = transform->Transform(&coord);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-84.46, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(33.89, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(-84.46, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(33.89, pCoord->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5721,7 +5744,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_To_Geographic_Transform_CoordinateXYM()
+TEST_CASE("Projected_To_Geographic_Transform_CoordinateXYM", "[CoordinateSystem]")
 {
     try
     {
@@ -5728,26 +5751,26 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         MgCoordinateXYM coord(410961.8644, 1415078.441, 100000.0);
         Ptr<MgCoordinate> pCoord = transform->Transform(&coord);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-84.46, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(33.89, pCoord->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(0.2738070466, pCoord->GetM()));
+        REQUIRE(MgUtil::ValuesEqual(-84.46, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(33.89, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(0.2738070466, pCoord->GetM()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5755,7 +5778,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_To_Geographic_Transform_CoordinateXYZ()
+TEST_CASE("Projected_To_Geographic_Transform_CoordinateXYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -5762,27 +5785,27 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         MgCoordinateXYZ coord(410961.8644, 1415078.441, 1.0);
         Ptr<MgCoordinate> pCoord = transform->Transform(&coord);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-84.46, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(33.89, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(-84.46, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(33.89, pCoord->GetY()));
         // TODO: Commented out because Mentor gives different results on Linux
-//        CPPUNIT_ASSERT(MgUtil::ValuesEqual(0.3548707958, pCoord->GetZ()));
+//        REQUIRE(MgUtil::ValuesEqual(0.3548707958, pCoord->GetZ()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5790,7 +5813,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_To_Geographic_Transform_CoordinateXYZM()
+TEST_CASE("Projected_To_Geographic_Transform_CoordinateXYZM", "[CoordinateSystem]")
 {
     try
     {
@@ -5797,28 +5820,28 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         MgCoordinateXYZM coord(410961.8644, 1415078.441, 1.0, 100000.0);
         Ptr<MgCoordinate> pCoord = transform->Transform(&coord);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-84.46, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(33.89, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(-84.46, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(33.89, pCoord->GetY()));
         // TODO: Commented out because Mentor gives different results on Linux
-//        CPPUNIT_ASSERT(MgUtil::ValuesEqual(0.3548707958, pCoord->GetZ()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(0.2738070466, pCoord->GetM()));
+//        REQUIRE(MgUtil::ValuesEqual(0.3548707958, pCoord->GetZ()));
+        REQUIRE(MgUtil::ValuesEqual(0.2738070466, pCoord->GetM()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5826,7 +5849,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_To_Geographic_Transform_EnvelopeXY()
+TEST_CASE("Projected_To_Geographic_Transform_EnvelopeXY", "[CoordinateSystem]")
 {
     try
     {
@@ -5833,14 +5856,14 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         Ptr<MgCoordinate> coord1 = new MgCoordinateXY(410983.0, 1415115.0);
         Ptr<MgCoordinate> coord2 = new MgCoordinateXY(410000.0, 1415000.0);
@@ -5850,16 +5873,16 @@
         Ptr<MgCoordinate> ur = envelopeTarget->GetUpperRightCoordinate();
         Ptr<MgCoordinate> ll = envelopeTarget->GetLowerLeftCoordinate();
 
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-84.46000082, ur->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(33.88999734, ur->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-84.46317002, ll->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(33.88977686, ll->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(-84.46000082, ur->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(33.88999734, ur->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(-84.46317002, ll->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(33.88977686, ll->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5867,7 +5890,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_To_Geographic_Transform_EnvelopeXYZ()
+TEST_CASE("Projected_To_Geographic_Transform_EnvelopeXYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -5874,14 +5897,14 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = GeographicWkt_LL84;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         Ptr<MgCoordinate> coord1 = new MgCoordinateXYZ(410983.0, 1415115.0, 1.0);
         Ptr<MgCoordinate> coord2 = new MgCoordinateXYZ(410000.0, 1415000.0, 2.0);
@@ -5891,18 +5914,18 @@
         Ptr<MgCoordinate> ur = envelopeTarget->GetUpperRightCoordinate();
         Ptr<MgCoordinate> ll = envelopeTarget->GetLowerLeftCoordinate();
 
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-84.46000082, ur->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(33.88999734, ur->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(2.0, ur->GetZ()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-84.46317002, ll->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(33.88977686, ll->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1.0, ll->GetZ()));
+        REQUIRE(MgUtil::ValuesEqual(-84.46000082, ur->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(33.88999734, ur->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(2.0, ur->GetZ()));
+        REQUIRE(MgUtil::ValuesEqual(-84.46317002, ll->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(33.88977686, ll->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(1.0, ll->GetZ()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5910,7 +5933,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_To_Projected_Transform_XY()
+TEST_CASE("Projected_To_Projected_Transform_XY", "[CoordinateSystem]")
 {
     try
     {
@@ -5917,24 +5940,24 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         Ptr<MgCoordinate> pCoord = transform->Transform(410961.8644, 1415078.441);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(410961.8644, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(410961.8644, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5942,7 +5965,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_To_Projected_Transform_XYZ()
+TEST_CASE("Projected_To_Projected_Transform_XYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -5949,25 +5972,25 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         Ptr<MgCoordinate> pCoord = transform->Transform(410961.8644, 1415078.441, 1.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(410961.8644, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1.0, pCoord->GetZ()));
+        REQUIRE(MgUtil::ValuesEqual(410961.8644, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(1.0, pCoord->GetZ()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -5975,7 +5998,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_To_Projected_Transform_CoordinateXY()
+TEST_CASE("Projected_To_Projected_Transform_CoordinateXY", "[CoordinateSystem]")
 {
     try
     {
@@ -5982,25 +6005,25 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         MgCoordinateXY coord(410961.8644, 1415078.441);
         Ptr<MgCoordinate> pCoord = transform->Transform(&coord);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(410961.8644, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(410961.8644, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -6008,7 +6031,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_To_Projected_Transform_CoordinateXYM()
+TEST_CASE("Projected_To_Projected_Transform_CoordinateXYM", "[CoordinateSystem]")
 {
     try
     {
@@ -6015,26 +6038,26 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         MgCoordinateXYM coord(410961.8644, 1415078.441, 100000.0);
         Ptr<MgCoordinate> pCoord = transform->Transform(&coord);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(410961.8644, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(100000.0, pCoord->GetM()));
+        REQUIRE(MgUtil::ValuesEqual(410961.8644, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(100000.0, pCoord->GetM()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -6042,7 +6065,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_To_Projected_Transform_CoordinateXYZ()
+TEST_CASE("Projected_To_Projected_Transform_CoordinateXYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -6049,26 +6072,26 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         MgCoordinateXYZ coord(410961.8644, 1415078.441, 1.0);
         Ptr<MgCoordinate> pCoord = transform->Transform(&coord);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(410961.8644, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1.0, pCoord->GetZ()));
+        REQUIRE(MgUtil::ValuesEqual(410961.8644, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(1.0, pCoord->GetZ()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -6076,7 +6099,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_To_Projected_Transform_CoordinateXYZM()
+TEST_CASE("Projected_To_Projected_Transform_CoordinateXYZM", "[CoordinateSystem]")
 {
     try
     {
@@ -6083,27 +6106,27 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         MgCoordinateXYZM coord(410961.8644, 1415078.441, 1.0, 100000.0);
         Ptr<MgCoordinate> pCoord = transform->Transform(&coord);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(410961.8644, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1.0, pCoord->GetZ()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(100000.0, pCoord->GetM()));
+        REQUIRE(MgUtil::ValuesEqual(410961.8644, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(1415078.441, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(1.0, pCoord->GetZ()));
+        REQUIRE(MgUtil::ValuesEqual(100000.0, pCoord->GetM()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -6111,7 +6134,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_To_Projected_Transform_EnvelopeXY()
+TEST_CASE("Projected_To_Projected_Transform_EnvelopeXY", "[CoordinateSystem]")
 {
     try
     {
@@ -6118,14 +6141,14 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         Ptr<MgCoordinate> coord1 = new MgCoordinateXY(410983.0, 1415115.0);
         Ptr<MgCoordinate> coord2 = new MgCoordinateXY(410000.0, 1415000.0);
@@ -6135,16 +6158,16 @@
         Ptr<MgCoordinate> ur = envelopeTarget->GetUpperRightCoordinate();
         Ptr<MgCoordinate> ll = envelopeTarget->GetLowerLeftCoordinate();
 
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(410983.0, ur->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1415115.0, ur->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(410000.0, ll->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1415000.0, ll->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(410983.0, ur->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(1415115.0, ur->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(410000.0, ll->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(1415000.0, ll->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -6152,7 +6175,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Projected_To_Projected_Transform_EnvelopeXYZ()
+TEST_CASE("Projected_To_Projected_Transform_EnvelopeXYZ", "[CoordinateSystem]")
 {
     try
     {
@@ -6159,14 +6182,14 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt1 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ProjectedWkt_GAW;
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         Ptr<MgCoordinate> coord1 = new MgCoordinateXYZ(410983.0, 1415115.0, 1.0);
         Ptr<MgCoordinate> coord2 = new MgCoordinateXYZ(410000.0, 1415000.0, 2.0);
@@ -6176,18 +6199,18 @@
         Ptr<MgCoordinate> ur = envelopeTarget->GetUpperRightCoordinate();
         Ptr<MgCoordinate> ll = envelopeTarget->GetLowerLeftCoordinate();
 
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(410983.0, ur->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1415115.0, ur->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(2.0, ur->GetZ()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(410000.0, ll->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1415000.0, ll->GetY()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(1.0, ll->GetZ()));
+        REQUIRE(MgUtil::ValuesEqual(410983.0, ur->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(1415115.0, ur->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(2.0, ur->GetZ()));
+        REQUIRE(MgUtil::ValuesEqual(410000.0, ll->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(1415000.0, ll->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(1.0, ll->GetZ()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -6195,7 +6218,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Boston_Geographic()
+TEST_CASE("Boston_Geographic", "[CoordinateSystem]")
 {
     try
     {
@@ -6202,7 +6225,7 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> coordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(coordinateSystem);
+        REQUIRE(coordinateSystem);
 
         MgCoordinateXY coord1(LonBoston, LatBoston);
         MgCoordinateXY coord2(LonNewYork, LatNewYork);
@@ -6209,25 +6232,25 @@
 
         // Calculate the distance to New York
         double distance = coordinateSystem->MeasureGreatCircleDistance(&coord1, &coord2);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(2.748740240, distance));
+        REQUIRE(MgUtil::ValuesEqual(2.748740240, distance));
 
         double meters = coordinateSystem->ConvertCoordinateSystemUnitsToMeters(distance);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(305988.3638, meters));
+        REQUIRE(MgUtil::ValuesEqual(305988.3638, meters));
 
         // Calculate the azimuth to New York
         double azimuth = coordinateSystem->GetAzimuth(&coord1, &coord2);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-125.5883639, azimuth));
+        REQUIRE(MgUtil::ValuesEqual(-125.5883639, azimuth));
 
         // If we move in the azimuth direction calculated above and the calculated distance above to New York we should end up in New York
         Ptr<MgCoordinate> coordinate = coordinateSystem->GetCoordinate(&coord1, azimuth, distance);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(LonNewYork, coordinate->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(LatNewYork, coordinate->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(LonNewYork, coordinate->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(LatNewYork, coordinate->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -6235,7 +6258,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_NewYork_Geographic()
+TEST_CASE("NewYork_Geographic", "[CoordinateSystem]")
 {
     try
     {
@@ -6242,7 +6265,7 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = GeographicWkt;
         Ptr<MgCoordinateSystem> coordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(coordinateSystem);
+        REQUIRE(coordinateSystem);
 
         MgCoordinateXY coord1(LonNewYork, LatNewYork);
         MgCoordinateXY coord2(LonBoston, LatBoston);
@@ -6249,25 +6272,25 @@
 
         // Calculate the distance to Boston
         double distance = coordinateSystem->MeasureGreatCircleDistance(&coord1, &coord2);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(2.748740240, distance));
+        REQUIRE(MgUtil::ValuesEqual(2.748740240, distance));
 
         double meters = coordinateSystem->ConvertCoordinateSystemUnitsToMeters(distance);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(305988.3638, meters));
+        REQUIRE(MgUtil::ValuesEqual(305988.3638, meters));
 
         // Calculate the azimuth to Boston
         double azimuth = coordinateSystem->GetAzimuth(&coord1, &coord2);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(52.45839467, azimuth));
+        REQUIRE(MgUtil::ValuesEqual(52.45839467, azimuth));
 
         // If we move in the azimuth direction calculated above and the calculated distance above to Boston we should end up in Boston
         Ptr<MgCoordinate> coordinate = coordinateSystem->GetCoordinate(&coord1, azimuth, distance);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(LonBoston, coordinate->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(LatBoston, coordinate->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(LonBoston, coordinate->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(LatBoston, coordinate->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -6275,7 +6298,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Boston_Projected()
+TEST_CASE("Boston_Projected", "[CoordinateSystem]")
 {
     try
     {
@@ -6282,7 +6305,7 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = Projected_UTM18_NAD83;
         Ptr<MgCoordinateSystem> coordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(coordinateSystem);
+        REQUIRE(coordinateSystem);
 
         MgCoordinateXY coord1(XBoston, YBoston);
         MgCoordinateXY coord2(XNewYork, YNewYork);
@@ -6289,22 +6312,22 @@
 
         // Calculate the distance to New York
         double distance = coordinateSystem->MeasureGreatCircleDistance(&coord1, &coord2);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(305853.5115, distance));
+        REQUIRE(MgUtil::ValuesEqual(305853.5115, distance));
 
         // Calculate the azimuth to New York
         double azimuth = coordinateSystem->GetAzimuth(&coord1, &coord2);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(-128.7141250, azimuth));
+        REQUIRE(MgUtil::ValuesEqual(-128.7141250, azimuth));
 
         // If we move in the azimuth direction calculated above and the calculated distance above to New York we should end up in New York
         Ptr<MgCoordinate> coordinate = coordinateSystem->GetCoordinate(&coord1, azimuth, distance);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(XNewYork, coordinate->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(YNewYork, coordinate->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(XNewYork, coordinate->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(YNewYork, coordinate->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -6312,7 +6335,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_NewYork_Projected()
+TEST_CASE("NewYork_Projected", "[CoordinateSystem]")
 {
     try
     {
@@ -6319,7 +6342,7 @@
         MgCoordinateSystemFactory factory;
         STRING ogcWkt = Projected_UTM18_NAD83;
         Ptr<MgCoordinateSystem> coordinateSystem = factory.Create(ogcWkt);
-        CPPUNIT_ASSERT(coordinateSystem);
+        REQUIRE(coordinateSystem);
 
         MgCoordinateXY coord1(XNewYork, YNewYork);
         MgCoordinateXY coord2(XBoston, YBoston);
@@ -6326,22 +6349,22 @@
 
         // Calculate the distance to Boston
         double distance = coordinateSystem->MeasureGreatCircleDistance(&coord1, &coord2);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(305853.5115, distance));
+        REQUIRE(MgUtil::ValuesEqual(305853.5115, distance));
 
         // Calculate the azimuth to Boston
         double azimuth = coordinateSystem->GetAzimuth(&coord1, &coord2);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(51.13907730, azimuth));
+        REQUIRE(MgUtil::ValuesEqual(51.13907730, azimuth));
 
         // If we move in the azimuth direction calculated above and the calculated distance above to Boston we should end up in Boston
         Ptr<MgCoordinate> coordinate = coordinateSystem->GetCoordinate(&coord1, azimuth, distance);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(XBoston, coordinate->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(YBoston, coordinate->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(XBoston, coordinate->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(YBoston, coordinate->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -6349,7 +6372,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_EPSG()
+TEST_CASE("EPSG", "[CoordinateSystem]")
 {
     try
     {
@@ -6357,25 +6380,25 @@
 
         STRING ogcWkt;
         Ptr<MgCoordinateSystemFactory> factory = new MgCoordinateSystemFactory();
-        CPPUNIT_ASSERT(factory);
+        REQUIRE(factory);
 
         ogcWkt = factory->ConvertCoordinateSystemCodeToWkt(L"EPSG:4326");
-        CPPUNIT_ASSERT_MESSAGE(MgUtil::WideCharToMultiByte(ogcWkt), ogcWkt == EPSG_4326_Wkt);
+        REQUIRE(ogcWkt == EPSG_4326_Wkt);
 
         ogcWkt = factory->ConvertCoordinateSystemCodeToWkt(L"ePsG:4326");
-        CPPUNIT_ASSERT_MESSAGE(MgUtil::WideCharToMultiByte(ogcWkt), ogcWkt == EPSG_4326_Wkt);
+        REQUIRE(ogcWkt == EPSG_4326_Wkt);
 
-        CPPUNIT_ASSERT_THROW_MG(ogcWkt = factory->ConvertCoordinateSystemCodeToWkt(L"test:4000"), MgCoordinateSystemLoadFailedException*);
+        REQUIRE_THROWS_MG(ogcWkt = factory->ConvertCoordinateSystemCodeToWkt(L"test:4000"), MgCoordinateSystemLoadFailedException*);
 
         ogcWkt = factory->ConvertEpsgCodeToWkt(4326);
-        CPPUNIT_ASSERT_MESSAGE(MgUtil::WideCharToMultiByte(ogcWkt), ogcWkt == EPSG_4326_Wkt);
+        REQUIRE(ogcWkt == EPSG_4326_Wkt);
 
         ogcWkt = factory->ConvertEpsgCodeToWkt(0);
         // TODO: This should be throwing an exception because the conversion failed.
-        CPPUNIT_ASSERT_MESSAGE(MgUtil::WideCharToMultiByte(ogcWkt), ogcWkt == L"");
+        REQUIRE(ogcWkt == L"");
 
         INT32 epsg = factory->ConvertWktToEpsgCode(EPSG_4326_Wkt);
-        CPPUNIT_ASSERT(epsg == 4326);
+        REQUIRE(epsg == 4326);
 
         long lStart = GetTickCount();
 
@@ -6451,7 +6474,7 @@
         else
         {
             ACE_DEBUG((LM_INFO, ACE_TEXT("Could not open EPSG code test file: %C\n"), EpsgTestFile));
-            CPPUNIT_ASSERT(false);
+            REQUIRE(false);
         }
 
         ACE_DEBUG((LM_INFO, ACE_TEXT("\nTotal EPSG codes tested: %d/%d (Passed/Total)\n"), nEpsgCodesPassed, nEpsgCodesTested));
@@ -6461,7 +6484,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -6469,7 +6492,7 @@
     }
 }
 
-void TestCoordinateSystem::TestCase_Geographic_DatumConversion()
+TEST_CASE("Geographic_DatumConversion", "[CoordinateSystem]")
 {
     try
     {
@@ -6481,23 +6504,23 @@
         ogcWktTarget = factory.ConvertCoordinateSystemCodeToWkt(L"Accra1929.LL");
 
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWktSource);
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWktTarget);
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         Ptr<MgCoordinate> pCoord = transform->Transform(0.0, 0.0);
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(0.0001886392995, pCoord->GetX()));
-        CPPUNIT_ASSERT(MgUtil::ValuesEqual(0.001309777484, pCoord->GetY()));
+        REQUIRE(MgUtil::ValuesEqual(0.0001886392995, pCoord->GetX()));
+        REQUIRE(MgUtil::ValuesEqual(0.001309777484, pCoord->GetY()));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -6505,7 +6528,7 @@
     }
 }
 
-bool TestCoordinateSystem::CompareCodes(STRING code1, STRING code2)
+static bool CompareCodes(STRING code1, STRING code2)
 {
     bool bResult = false;
 
@@ -6536,7 +6559,7 @@
     return bResult;
 }
 
-void TestCoordinateSystem::TestCase_Benchmark_Transformation()
+TEST_CASE("Benchmark_Transformation", "[CoordinateSystem]")
 {
     try
     {
@@ -6553,18 +6576,18 @@
         long lStart = GetTickCount();
         Ptr<MgCoordinateSystem> coordinateSystemSource = factory.Create(ogcWkt1);
         ACE_DEBUG((LM_INFO, ACE_TEXT("  CS Source Creation Time: = %6.4f (s)\n"), ((GetTickCount()-lStart)/1000.0)));
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         STRING ogcWkt2 = ArbitraryWkt_Feet;
         lStart = GetTickCount();
         Ptr<MgCoordinateSystem> coordinateSystemTarget = factory.Create(ogcWkt2);
         ACE_DEBUG((LM_INFO, ACE_TEXT("  CS Target Creation Time: = %6.4f (s)\n"), ((GetTickCount()-lStart)/1000.0)));
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         lStart = GetTickCount();
         Ptr<MgCoordinateSystemTransform> transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
         ACE_DEBUG((LM_INFO, ACE_TEXT("  Transformation Creation Time: = %6.4f (s)\n"), ((GetTickCount()-lStart)/1000.0)));
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         // MgCoordinate
         lStart = GetTickCount();
@@ -6601,18 +6624,18 @@
         lStart = GetTickCount();
         coordinateSystemSource = factory.Create(ogcWkt1);
         ACE_DEBUG((LM_INFO, ACE_TEXT("  CS Source Creation Time: = %6.4f (s)\n"), ((GetTickCount()-lStart)/1000.0)));
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         ogcWkt2 = GeographicWkt_LL84;
         lStart = GetTickCount();
         coordinateSystemTarget = factory.Create(ogcWkt2);
         ACE_DEBUG((LM_INFO, ACE_TEXT("  CS Target Creation Time: = %6.4f (s)\n"), ((GetTickCount()-lStart)/1000.0)));
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         lStart = GetTickCount();
         transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
         ACE_DEBUG((LM_INFO, ACE_TEXT("  Transformation Creation Time: = %6.4f (s)\n"), ((GetTickCount()-lStart)/1000.0)));
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         // MgCoordinate
         lStart = GetTickCount();
@@ -6649,18 +6672,18 @@
         lStart = GetTickCount();
         coordinateSystemSource = factory.Create(ogcWkt1);
         ACE_DEBUG((LM_INFO, ACE_TEXT("  CS Source Creation Time: = %6.4f (s)\n"), ((GetTickCount()-lStart)/1000.0)));
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         ogcWkt2 = ProjectedWkt_GAW;
         lStart = GetTickCount();
         coordinateSystemTarget = factory.Create(ogcWkt2);
         ACE_DEBUG((LM_INFO, ACE_TEXT("  CS Target Creation Time: = %6.4f (s)\n"), ((GetTickCount()-lStart)/1000.0)));
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         lStart = GetTickCount();
         transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
         ACE_DEBUG((LM_INFO, ACE_TEXT("  Transformation Creation Time: = %6.4f (s)\n"), ((GetTickCount()-lStart)/1000.0)));
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         // MgCoordinate
         lStart = GetTickCount();
@@ -6697,18 +6720,18 @@
         lStart = GetTickCount();
         coordinateSystemSource = factory.Create(ogcWkt1);
         ACE_DEBUG((LM_INFO, ACE_TEXT("  CS Source Creation Time: = %6.4f (s)\n"), ((GetTickCount()-lStart)/1000.0)));
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         ogcWkt2 = GeographicWkt_LL84;
         lStart = GetTickCount();
         coordinateSystemTarget = factory.Create(ogcWkt2);
         ACE_DEBUG((LM_INFO, ACE_TEXT("  CS Target Creation Time: = %6.4f (s)\n"), ((GetTickCount()-lStart)/1000.0)));
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         lStart = GetTickCount();
         transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
         ACE_DEBUG((LM_INFO, ACE_TEXT("  Transformation Creation Time: = %6.4f (s)\n"), ((GetTickCount()-lStart)/1000.0)));
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         // MgCoordinate
         lStart = GetTickCount();
@@ -6745,18 +6768,18 @@
         lStart = GetTickCount();
         coordinateSystemSource = factory.Create(ogcWkt1);
         ACE_DEBUG((LM_INFO, ACE_TEXT("  CS Source Creation Time: = %6.4f (s)\n"), ((GetTickCount()-lStart)/1000.0)));
-        CPPUNIT_ASSERT(coordinateSystemSource);
+        REQUIRE(coordinateSystemSource);
 
         ogcWkt2 = ProjectedWkt_GAW;
         lStart = GetTickCount();
         coordinateSystemTarget = factory.Create(ogcWkt2);
         ACE_DEBUG((LM_INFO, ACE_TEXT("  CS Target Creation Time: = %6.4f (s)\n"), ((GetTickCount()-lStart)/1000.0)));
-        CPPUNIT_ASSERT(coordinateSystemTarget);
+        REQUIRE(coordinateSystemTarget);
 
         lStart = GetTickCount();
         transform = factory.GetTransform(coordinateSystemSource, coordinateSystemTarget);
         ACE_DEBUG((LM_INFO, ACE_TEXT("  Transformation Creation Time: = %6.4f (s)\n"), ((GetTickCount()-lStart)/1000.0)));
-        CPPUNIT_ASSERT(transform);
+        REQUIRE(transform);
 
         // MgCoordinate
         lStart = GetTickCount();
@@ -6791,7 +6814,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {

Deleted: trunk/MgDev/Server/src/UnitTesting/TestCoordinateSystem.h
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestCoordinateSystem.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestCoordinateSystem.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,560 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef TESTCOORDINATESYSTEM_H_
-#define TESTCOORDINATESYSTEM_H_
-
-#include <cppunit/extensions/HelperMacros.h>
-
-// Comment out the line below to disable the slow test cases
-#define ENABLE_SLOW_TESTS 1
-
-class TestCoordinateSystem : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestCoordinateSystem);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_ReadAllCoordinateSystems);
-    CPPUNIT_TEST(TestCase_ReadAllDatums);
-    CPPUNIT_TEST(TestCase_ReadAllEllipsoids);
-    CPPUNIT_TEST(TestCase_ReadAllCategories);
-    CPPUNIT_TEST(TestCase_ReadAllGeodeticTransformations);
-    CPPUNIT_TEST(TestCase_ReadAllGeodeticPaths);
-
-    CPPUNIT_TEST(TestCase_UpdateCoordinateSystems);
-    CPPUNIT_TEST(TestCase_UpdateDatums);
-    CPPUNIT_TEST(TestCase_UpdateEllipsoids);
-    CPPUNIT_TEST(TestCase_UpdateCategories);
-    CPPUNIT_TEST(TestCase_UpdateGeodeticTransformations);
-    CPPUNIT_TEST(TestCase_UpdateGeodeticPaths);
-
-    CPPUNIT_TEST(TestCase_InitializeInvalidUserDictionaryDir);
-    CPPUNIT_TEST(TestCase_InitializeValidUserDictionaryDir);
-
-    CPPUNIT_TEST(TestCase_UpdateUserCoordinateSystems);
-    CPPUNIT_TEST(TestCase_UpdateUserDatums);
-    CPPUNIT_TEST(TestCase_UpdateUserEllipsoids);
-    CPPUNIT_TEST(TestCase_UpdateUserCategories);
-    CPPUNIT_TEST(TestCase_UpdateUserGeodeticTransformations);
-    CPPUNIT_TEST(TestCase_UpdateUserGeodeticPaths);
-
-#ifdef ENABLE_SLOW_TESTS
-    CPPUNIT_TEST(TestCase_CheckCoordinateSystems);
-#endif
-    CPPUNIT_TEST(TestCase_CreateValidCoordinateSystem);
-    CPPUNIT_TEST(TestCase_CreateInvalidCoordinateSystem);
-#ifdef ENABLE_SLOW_TESTS
-    CPPUNIT_TEST(TestCase_EnumerateCategories);
-#endif
-    CPPUNIT_TEST(TestCase_EnumerateCoordSys);
-    CPPUNIT_TEST(TestCase_GetBaseLibrary);
-    CPPUNIT_TEST(TestCase_IsValid);
-
-    CPPUNIT_TEST(TestCase_ValidateCoordinateSystemArbitrary);
-    CPPUNIT_TEST(TestCase_Arbitrary_ConvertFromLonLat);
-    CPPUNIT_TEST(TestCase_Arbitrary_ConvertFromLonLatArray);
-    CPPUNIT_TEST(TestCase_Arbitrary_ConvertToLonLat);
-    CPPUNIT_TEST(TestCase_Arbitrary_ConvertToLonLatArray);
-    CPPUNIT_TEST(TestCase_Arbitrary_ConvertCoordinateSystemUnitsToMeters);
-    CPPUNIT_TEST(TestCase_Arbitrary_ConvertMetersToCoordinateSystemUnits);
-    CPPUNIT_TEST(TestCase_Arbitrary_MeasureEuclideanDistance);
-    CPPUNIT_TEST(TestCase_Arbitrary_MeasureGreatCircleDistance);
-    CPPUNIT_TEST(TestCase_Arbitrary_GetAzimuth);
-    CPPUNIT_TEST(TestCase_Arbitrary_GetCoordinate);
-    CPPUNIT_TEST(TestCase_Arbitrary_ConvertCode);
-    CPPUNIT_TEST(TestCase_Arbitrary_GetUnits);
-    CPPUNIT_TEST(TestCase_Arbitrary_GetUnitScale);
-    CPPUNIT_TEST(TestCase_Arbitrary_GetMinX);
-    CPPUNIT_TEST(TestCase_Arbitrary_GetMinY);
-    CPPUNIT_TEST(TestCase_Arbitrary_GetMaxX);
-    CPPUNIT_TEST(TestCase_Arbitrary_GetMaxY);
-    CPPUNIT_TEST(TestCase_Arbitrary_GetCsCode);
-    CPPUNIT_TEST(TestCase_Arbitrary_GetDescription);
-    CPPUNIT_TEST(TestCase_Arbitrary_GetProjection);
-    CPPUNIT_TEST(TestCase_Arbitrary_GetProjectionDescription);
-    CPPUNIT_TEST(TestCase_Arbitrary_GetDatum);
-    CPPUNIT_TEST(TestCase_Arbitrary_GetDatumDescription);
-    CPPUNIT_TEST(TestCase_Arbitrary_GetEllipsoid);
-    CPPUNIT_TEST(TestCase_Arbitrary_GetEllipsoidDescription);
-    CPPUNIT_TEST(TestCase_Arbitrary_GetCategory);
-
-    CPPUNIT_TEST(TestCase_ValidateCoordinateSystemGeographic);
-    CPPUNIT_TEST(TestCase_Geographic_ConvertFromLonLat);
-    CPPUNIT_TEST(TestCase_Geographic_ConvertFromLonLatArray);
-    CPPUNIT_TEST(TestCase_Geographic_ConvertToLonLat);
-    CPPUNIT_TEST(TestCase_Geographic_ConvertToLonLatArray);
-    CPPUNIT_TEST(TestCase_Geographic_ConvertCoordinateSystemUnitsToMeters);
-    CPPUNIT_TEST(TestCase_Geographic_ConvertMetersToCoordinateSystemUnits);
-    CPPUNIT_TEST(TestCase_Geographic_MeasureEuclideanDistance);
-    CPPUNIT_TEST(TestCase_Geographic_MeasureGreatCircleDistance);
-    CPPUNIT_TEST(TestCase_Geographic_GetAzimuth);
-    CPPUNIT_TEST(TestCase_Geographic_GetCoordinate);
-    CPPUNIT_TEST(TestCase_Geographic_ConvertCode);
-    CPPUNIT_TEST(TestCase_Geographic_GetUnits);
-    CPPUNIT_TEST(TestCase_Geographic_GetUnitScale);
-    //CPPUNIT_TEST(TestCase_Geographic_GetMinX);
-    CPPUNIT_TEST(TestCase_Geographic_GetMinY);
-    //CPPUNIT_TEST(TestCase_Geographic_GetMaxX);
-    CPPUNIT_TEST(TestCase_Geographic_GetMaxY);
-    CPPUNIT_TEST(TestCase_Geographic_GetCsCode);
-    CPPUNIT_TEST(TestCase_Geographic_GetDescription);
-    CPPUNIT_TEST(TestCase_Geographic_GetProjection);
-    CPPUNIT_TEST(TestCase_Geographic_GetProjectionDescription);
-    CPPUNIT_TEST(TestCase_Geographic_GetDatum);
-    CPPUNIT_TEST(TestCase_Geographic_GetDatumDescription);
-    CPPUNIT_TEST(TestCase_Geographic_GetEllipsoid);
-    CPPUNIT_TEST(TestCase_Geographic_GetEllipsoidDescription);
-    CPPUNIT_TEST(TestCase_Geographic_GetCategory);
-
-    CPPUNIT_TEST(TestCase_ValidateCoordinateSystemProjected);
-    CPPUNIT_TEST(TestCase_Projected_ConvertFromLonLat);
-    CPPUNIT_TEST(TestCase_Projected_ConvertFromLonLatArray);
-    CPPUNIT_TEST(TestCase_Projected_ConvertToLonLat);
-    CPPUNIT_TEST(TestCase_Projected_ConvertToLonLatArray);
-    CPPUNIT_TEST(TestCase_Projected_ConvertCoordinateSystemUnitsToMeters);
-    CPPUNIT_TEST(TestCase_Projected_ConvertMetersToCoordinateSystemUnits);
-    CPPUNIT_TEST(TestCase_Projected_MeasureEuclideanDistance);
-    CPPUNIT_TEST(TestCase_Projected_MeasureGreatCircleDistance);
-    CPPUNIT_TEST(TestCase_Projected_GetAzimuth);
-    CPPUNIT_TEST(TestCase_Projected_GetCoordinate);
-    CPPUNIT_TEST(TestCase_Projected_ConvertCode);
-    CPPUNIT_TEST(TestCase_Projected_GetUnits);
-    CPPUNIT_TEST(TestCase_Projected_GetUnitScale);
-    //CPPUNIT_TEST(TestCase_Projected_GetMinX);
-    //CPPUNIT_TEST(TestCase_Projected_GetMinY);
-    //CPPUNIT_TEST(TestCase_Projected_GetMaxX);
-    //CPPUNIT_TEST(TestCase_Projected_GetMaxY);
-    CPPUNIT_TEST(TestCase_Projected_GetCsCode);
-    CPPUNIT_TEST(TestCase_Projected_GetDescription);
-    CPPUNIT_TEST(TestCase_Projected_GetProjection);
-    CPPUNIT_TEST(TestCase_Projected_GetProjectionDescription);
-    CPPUNIT_TEST(TestCase_Projected_GetDatum);
-    CPPUNIT_TEST(TestCase_Projected_GetDatumDescription);
-    CPPUNIT_TEST(TestCase_Projected_GetEllipsoid);
-    CPPUNIT_TEST(TestCase_Projected_GetEllipsoidDescription);
-    CPPUNIT_TEST(TestCase_Projected_GetCategory);
-
-    CPPUNIT_TEST(TestCase_Arbitrary_Measure_GetDistance);
-    CPPUNIT_TEST(TestCase_Arbitrary_Measure_GetAzimuth);
-    CPPUNIT_TEST(TestCase_Arbitrary_Measure_GetCoordinate);
-    CPPUNIT_TEST(TestCase_Geographic_Measure_GetDistance);
-    CPPUNIT_TEST(TestCase_Geographic_Measure_GetAzimuth);
-    CPPUNIT_TEST(TestCase_Geographic_Measure_GetCoordinate);
-    CPPUNIT_TEST(TestCase_Projected_Measure_GetDistance);
-    CPPUNIT_TEST(TestCase_Projected_Measure_GetAzimuth);
-    CPPUNIT_TEST(TestCase_Projected_Measure_GetCoordinate);
-
-    // Arbitrary
-    CPPUNIT_TEST(TestCase_Arbitrary_To_Arbitrary_Transform_XY);
-    CPPUNIT_TEST(TestCase_Arbitrary_To_Arbitrary_Transform_XYZ);
-    CPPUNIT_TEST(TestCase_Arbitrary_To_Arbitrary_Transform_CoordinateXY);
-    CPPUNIT_TEST(TestCase_Arbitrary_To_Arbitrary_Transform_CoordinateXYM);
-    CPPUNIT_TEST(TestCase_Arbitrary_To_Arbitrary_Transform_CoordinateXYZ);
-    CPPUNIT_TEST(TestCase_Arbitrary_To_Arbitrary_Transform_CoordinateXYZM);
-    CPPUNIT_TEST(TestCase_Arbitrary_To_Arbitrary_Transform_EnvelopeXY);
-    CPPUNIT_TEST(TestCase_Arbitrary_To_Arbitrary_Transform_EnvelopeXYZ);
-
-    CPPUNIT_TEST(TestCase_Arbitrary_To_Geographic_Transform_XY);
-    CPPUNIT_TEST(TestCase_Arbitrary_To_Geographic_Transform_XYZ);
-    CPPUNIT_TEST(TestCase_Arbitrary_To_Geographic_Transform_CoordinateXY);
-    CPPUNIT_TEST(TestCase_Arbitrary_To_Geographic_Transform_CoordinateXYM);
-    CPPUNIT_TEST(TestCase_Arbitrary_To_Geographic_Transform_CoordinateXYZ);
-    CPPUNIT_TEST(TestCase_Arbitrary_To_Geographic_Transform_CoordinateXYZM);
-    CPPUNIT_TEST(TestCase_Arbitrary_To_Geographic_Transform_EnvelopeXY);
-    CPPUNIT_TEST(TestCase_Arbitrary_To_Geographic_Transform_EnvelopeXYZ);
-
-    CPPUNIT_TEST(TestCase_Arbitrary_To_Projected_Transform_XY);
-    CPPUNIT_TEST(TestCase_Arbitrary_To_Projected_Transform_XYZ);
-    CPPUNIT_TEST(TestCase_Arbitrary_To_Projected_Transform_CoordinateXY);
-    CPPUNIT_TEST(TestCase_Arbitrary_To_Projected_Transform_CoordinateXYM);
-    CPPUNIT_TEST(TestCase_Arbitrary_To_Projected_Transform_CoordinateXYZ);
-    CPPUNIT_TEST(TestCase_Arbitrary_To_Projected_Transform_CoordinateXYZM);
-    CPPUNIT_TEST(TestCase_Arbitrary_To_Projected_Transform_EnvelopeXY);
-    CPPUNIT_TEST(TestCase_Arbitrary_To_Projected_Transform_EnvelopeXYZ);
-
-    // Geographic
-    CPPUNIT_TEST(TestCase_Geographic_To_Arbitrary_Transform_XY);
-    CPPUNIT_TEST(TestCase_Geographic_To_Arbitrary_Transform_XYZ);
-    CPPUNIT_TEST(TestCase_Geographic_To_Arbitrary_Transform_CoordinateXY);
-    CPPUNIT_TEST(TestCase_Geographic_To_Arbitrary_Transform_CoordinateXYM);
-    CPPUNIT_TEST(TestCase_Geographic_To_Arbitrary_Transform_CoordinateXYZ);
-    CPPUNIT_TEST(TestCase_Geographic_To_Arbitrary_Transform_CoordinateXYZM);
-    CPPUNIT_TEST(TestCase_Geographic_To_Arbitrary_Transform_EnvelopeXY);
-    CPPUNIT_TEST(TestCase_Geographic_To_Arbitrary_Transform_EnvelopeXYZ);
-
-    CPPUNIT_TEST(TestCase_Geographic_To_Geographic_Transform_XY);
-    CPPUNIT_TEST(TestCase_Geographic_To_Geographic_Transform_XYZ);
-    CPPUNIT_TEST(TestCase_Geographic_To_Geographic_Transform_CoordinateXY);
-    CPPUNIT_TEST(TestCase_Geographic_To_Geographic_Transform_CoordinateXYM);
-    CPPUNIT_TEST(TestCase_Geographic_To_Geographic_Transform_CoordinateXYZ);
-    CPPUNIT_TEST(TestCase_Geographic_To_Geographic_Transform_CoordinateXYZM);
-    CPPUNIT_TEST(TestCase_Geographic_To_Geographic_Transform_EnvelopeXY);
-    CPPUNIT_TEST(TestCase_Geographic_To_Geographic_Transform_EnvelopeXYZ);
-
-    CPPUNIT_TEST(TestCase_Geographic_To_Projected_Transform_XY);
-    CPPUNIT_TEST(TestCase_Geographic_To_Projected_Transform_XYZ);
-    CPPUNIT_TEST(TestCase_Geographic_To_Projected_Transform_CoordinateXY);
-    CPPUNIT_TEST(TestCase_Geographic_To_Projected_Transform_CoordinateXYM);
-    CPPUNIT_TEST(TestCase_Geographic_To_Projected_Transform_CoordinateXYZ);
-    CPPUNIT_TEST(TestCase_Geographic_To_Projected_Transform_CoordinateXYZM);
-    CPPUNIT_TEST(TestCase_Geographic_To_Projected_Transform_EnvelopeXY);
-    CPPUNIT_TEST(TestCase_Geographic_To_Projected_Transform_EnvelopeXYZ);
-
-    // Projected
-    CPPUNIT_TEST(TestCase_Projected_To_Arbitrary_Transform_XY);
-    CPPUNIT_TEST(TestCase_Projected_To_Arbitrary_Transform_XYZ);
-    CPPUNIT_TEST(TestCase_Projected_To_Arbitrary_Transform_CoordinateXY);
-    CPPUNIT_TEST(TestCase_Projected_To_Arbitrary_Transform_CoordinateXYM);
-    CPPUNIT_TEST(TestCase_Projected_To_Arbitrary_Transform_CoordinateXYZ);
-    CPPUNIT_TEST(TestCase_Projected_To_Arbitrary_Transform_CoordinateXYZM);
-    CPPUNIT_TEST(TestCase_Projected_To_Arbitrary_Transform_EnvelopeXY);
-    CPPUNIT_TEST(TestCase_Projected_To_Arbitrary_Transform_EnvelopeXYZ);
-
-    CPPUNIT_TEST(TestCase_Projected_To_Geographic_Transform_XY);
-    CPPUNIT_TEST(TestCase_Projected_To_Geographic_Transform_XYZ);
-    CPPUNIT_TEST(TestCase_Projected_To_Geographic_Transform_CoordinateXY);
-    CPPUNIT_TEST(TestCase_Projected_To_Geographic_Transform_CoordinateXYM);
-    CPPUNIT_TEST(TestCase_Projected_To_Geographic_Transform_CoordinateXYZ);
-    CPPUNIT_TEST(TestCase_Projected_To_Geographic_Transform_CoordinateXYZM);
-    CPPUNIT_TEST(TestCase_Projected_To_Geographic_Transform_EnvelopeXY);
-    CPPUNIT_TEST(TestCase_Projected_To_Geographic_Transform_EnvelopeXYZ);
-
-    CPPUNIT_TEST(TestCase_Projected_To_Projected_Transform_XY);
-    CPPUNIT_TEST(TestCase_Projected_To_Projected_Transform_XYZ);
-    CPPUNIT_TEST(TestCase_Projected_To_Projected_Transform_CoordinateXY);
-    CPPUNIT_TEST(TestCase_Projected_To_Projected_Transform_CoordinateXYM);
-    CPPUNIT_TEST(TestCase_Projected_To_Projected_Transform_CoordinateXYZ);
-    CPPUNIT_TEST(TestCase_Projected_To_Projected_Transform_CoordinateXYZM);
-    CPPUNIT_TEST(TestCase_Projected_To_Projected_Transform_EnvelopeXY);
-    CPPUNIT_TEST(TestCase_Projected_To_Projected_Transform_EnvelopeXYZ);
-
-    // Datum conversion
-    CPPUNIT_TEST(TestCase_Geographic_DatumConversion);
-
-    // Real world locations
-    CPPUNIT_TEST(TestCase_Boston_Geographic);
-    CPPUNIT_TEST(TestCase_NewYork_Geographic);
-    CPPUNIT_TEST(TestCase_Boston_Projected);
-    CPPUNIT_TEST(TestCase_NewYork_Projected);
-
-    // EPSG
-#ifdef ENABLE_SLOW_TESTS
-    CPPUNIT_TEST(TestCase_EPSG);
-#endif
-
-    // Performance
-#ifdef ENABLE_SLOW_TESTS
-    CPPUNIT_TEST(TestCase_Benchmark_Transformation);
-#endif
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    //check sanity of the dictionaries
-    void TestCase_ReadAllCoordinateSystems();
-    void TestCase_ReadAllDatums();
-    void TestCase_ReadAllEllipsoids();
-    void TestCase_ReadAllCategories();
-    void TestCase_ReadAllGeodeticTransformations();
-    void TestCase_ReadAllGeodeticPaths();
-
-    void TestCase_UpdateCoordinateSystems();
-    void TestCase_UpdateDatums();
-    void TestCase_UpdateEllipsoids();
-    void TestCase_UpdateCategories();
-    void TestCase_UpdateGeodeticTransformations();
-    void TestCase_UpdateGeodeticPaths();
-
-    void TestCase_InitializeInvalidUserDictionaryDir();
-    void TestCase_InitializeValidUserDictionaryDir();
-
-    void TestCase_UpdateUserCoordinateSystems();
-    void TestCase_UpdateUserDatums();
-    void TestCase_UpdateUserEllipsoids();
-    void TestCase_UpdateUserCategories();
-    void TestCase_UpdateUserGeodeticTransformations();
-    void TestCase_UpdateUserGeodeticPaths();
-
-    void TestCase_CheckCoordinateSystems();
-    void TestCase_CreateValidCoordinateSystem();
-    void TestCase_CreateInvalidCoordinateSystem();
-    void TestCase_EnumerateCategories();
-    void TestCase_EnumerateCoordSys();
-    void TestCase_GetBaseLibrary();
-    void TestCase_IsValid();
-
-    void TestCase_ValidateCoordinateSystemArbitrary();
-    void TestCase_Arbitrary_ConvertFromLonLat();
-    void TestCase_Arbitrary_ConvertFromLonLatArray();
-    void TestCase_Arbitrary_ConvertToLonLat();
-    void TestCase_Arbitrary_ConvertToLonLatArray();
-    void TestCase_Arbitrary_ConvertCoordinateSystemUnitsToMeters();
-    void TestCase_Arbitrary_ConvertMetersToCoordinateSystemUnits();
-    void TestCase_Arbitrary_MeasureEuclideanDistance();
-    void TestCase_Arbitrary_MeasureGreatCircleDistance();
-    void TestCase_Arbitrary_GetAzimuth();
-    void TestCase_Arbitrary_GetCoordinate();
-    void TestCase_Arbitrary_ConvertCode();
-    void TestCase_Arbitrary_GetUnits();
-    void TestCase_Arbitrary_GetUnitScale();
-    void TestCase_Arbitrary_GetMinX();
-    void TestCase_Arbitrary_GetMinY();
-    void TestCase_Arbitrary_GetMaxX();
-    void TestCase_Arbitrary_GetMaxY();
-    void TestCase_Arbitrary_GetCsCode();
-    void TestCase_Arbitrary_GetDescription();
-    void TestCase_Arbitrary_GetProjection();
-    void TestCase_Arbitrary_GetProjectionDescription();
-    void TestCase_Arbitrary_GetDatum();
-    void TestCase_Arbitrary_GetDatumDescription();
-    void TestCase_Arbitrary_GetEllipsoid();
-    void TestCase_Arbitrary_GetEllipsoidDescription();
-    void TestCase_Arbitrary_GetCategory();
-
-    void TestCase_ValidateCoordinateSystemGeographic();
-    void TestCase_Geographic_ConvertFromLonLat();
-    void TestCase_Geographic_ConvertFromLonLatArray();
-    void TestCase_Geographic_ConvertToLonLat();
-    void TestCase_Geographic_ConvertToLonLatArray();
-    void TestCase_Geographic_ConvertCoordinateSystemUnitsToMeters();
-    void TestCase_Geographic_ConvertMetersToCoordinateSystemUnits();
-    void TestCase_Geographic_MeasureEuclideanDistance();
-    void TestCase_Geographic_MeasureGreatCircleDistance();
-    void TestCase_Geographic_GetAzimuth();
-    void TestCase_Geographic_GetCoordinate();
-    void TestCase_Geographic_ConvertCode();
-    void TestCase_Geographic_GetUnits();
-    void TestCase_Geographic_GetUnitScale();
-    void TestCase_Geographic_GetMinX();
-    void TestCase_Geographic_GetMinY();
-    void TestCase_Geographic_GetMaxX();
-    void TestCase_Geographic_GetMaxY();
-    void TestCase_Geographic_GetCsCode();
-    void TestCase_Geographic_GetDescription();
-    void TestCase_Geographic_GetProjection();
-    void TestCase_Geographic_GetProjectionDescription();
-    void TestCase_Geographic_GetDatum();
-    void TestCase_Geographic_GetDatumDescription();
-    void TestCase_Geographic_GetEllipsoid();
-    void TestCase_Geographic_GetEllipsoidDescription();
-    void TestCase_Geographic_GetCategory();
-
-    void TestCase_ValidateCoordinateSystemProjected();
-    void TestCase_Projected_ConvertFromLonLat();
-    void TestCase_Projected_ConvertFromLonLatArray();
-    void TestCase_Projected_ConvertToLonLat();
-    void TestCase_Projected_ConvertToLonLatArray();
-    void TestCase_Projected_ConvertCoordinateSystemUnitsToMeters();
-    void TestCase_Projected_ConvertMetersToCoordinateSystemUnits();
-    void TestCase_Projected_MeasureEuclideanDistance();
-    void TestCase_Projected_MeasureGreatCircleDistance();
-    void TestCase_Projected_GetAzimuth();
-    void TestCase_Projected_GetCoordinate();
-    void TestCase_Projected_ConvertCode();
-    void TestCase_Projected_GetUnits();
-    void TestCase_Projected_GetUnitScale();
-    void TestCase_Projected_GetMinX();
-    void TestCase_Projected_GetMinY();
-    void TestCase_Projected_GetMaxX();
-    void TestCase_Projected_GetMaxY();
-    void TestCase_Projected_GetCsCode();
-    void TestCase_Projected_GetDescription();
-    void TestCase_Projected_GetProjection();
-    void TestCase_Projected_GetProjectionDescription();
-    void TestCase_Projected_GetDatum();
-    void TestCase_Projected_GetDatumDescription();
-    void TestCase_Projected_GetEllipsoid();
-    void TestCase_Projected_GetEllipsoidDescription();
-    void TestCase_Projected_GetCategory();
-
-    // Test Measure
-    void TestCase_Arbitrary_Measure_GetDistance();
-    void TestCase_Arbitrary_Measure_GetAzimuth();
-    void TestCase_Arbitrary_Measure_GetCoordinate();
-    void TestCase_Geographic_Measure_GetDistance();
-    void TestCase_Geographic_Measure_GetAzimuth();
-    void TestCase_Geographic_Measure_GetCoordinate();
-    void TestCase_Projected_Measure_GetDistance();
-    void TestCase_Projected_Measure_GetAzimuth();
-    void TestCase_Projected_Measure_GetCoordinate();
-
-    // Test Transform
-    // Arbitrary
-    void TestCase_Arbitrary_To_Arbitrary_Transform_XY();
-    void TestCase_Arbitrary_To_Arbitrary_Transform_XYZ();
-    void TestCase_Arbitrary_To_Arbitrary_Transform_CoordinateXY();
-    void TestCase_Arbitrary_To_Arbitrary_Transform_CoordinateXYM();
-    void TestCase_Arbitrary_To_Arbitrary_Transform_CoordinateXYZ();
-    void TestCase_Arbitrary_To_Arbitrary_Transform_CoordinateXYZM();
-    void TestCase_Arbitrary_To_Arbitrary_Transform_EnvelopeXY();
-    void TestCase_Arbitrary_To_Arbitrary_Transform_EnvelopeXYZ();
-
-    void TestCase_Arbitrary_To_Geographic_Transform_XY();
-    void TestCase_Arbitrary_To_Geographic_Transform_XYZ();
-    void TestCase_Arbitrary_To_Geographic_Transform_CoordinateXY();
-    void TestCase_Arbitrary_To_Geographic_Transform_CoordinateXYM();
-    void TestCase_Arbitrary_To_Geographic_Transform_CoordinateXYZ();
-    void TestCase_Arbitrary_To_Geographic_Transform_CoordinateXYZM();
-    void TestCase_Arbitrary_To_Geographic_Transform_EnvelopeXY();
-    void TestCase_Arbitrary_To_Geographic_Transform_EnvelopeXYZ();
-
-    void TestCase_Arbitrary_To_Projected_Transform_XY();
-    void TestCase_Arbitrary_To_Projected_Transform_XYZ();
-    void TestCase_Arbitrary_To_Projected_Transform_CoordinateXY();
-    void TestCase_Arbitrary_To_Projected_Transform_CoordinateXYM();
-    void TestCase_Arbitrary_To_Projected_Transform_CoordinateXYZ();
-    void TestCase_Arbitrary_To_Projected_Transform_CoordinateXYZM();
-    void TestCase_Arbitrary_To_Projected_Transform_EnvelopeXY();
-    void TestCase_Arbitrary_To_Projected_Transform_EnvelopeXYZ();
-
-    // Geographic
-    void TestCase_Geographic_To_Arbitrary_Transform_XY();
-    void TestCase_Geographic_To_Arbitrary_Transform_XYZ();
-    void TestCase_Geographic_To_Arbitrary_Transform_CoordinateXY();
-    void TestCase_Geographic_To_Arbitrary_Transform_CoordinateXYM();
-    void TestCase_Geographic_To_Arbitrary_Transform_CoordinateXYZ();
-    void TestCase_Geographic_To_Arbitrary_Transform_CoordinateXYZM();
-    void TestCase_Geographic_To_Arbitrary_Transform_EnvelopeXY();
-    void TestCase_Geographic_To_Arbitrary_Transform_EnvelopeXYZ();
-
-    void TestCase_Geographic_To_Geographic_Transform_XY();
-    void TestCase_Geographic_To_Geographic_Transform_XYZ();
-    void TestCase_Geographic_To_Geographic_Transform_CoordinateXY();
-    void TestCase_Geographic_To_Geographic_Transform_CoordinateXYM();
-    void TestCase_Geographic_To_Geographic_Transform_CoordinateXYZ();
-    void TestCase_Geographic_To_Geographic_Transform_CoordinateXYZM();
-    void TestCase_Geographic_To_Geographic_Transform_EnvelopeXY();
-    void TestCase_Geographic_To_Geographic_Transform_EnvelopeXYZ();
-
-    void TestCase_Geographic_To_Projected_Transform_XY();
-    void TestCase_Geographic_To_Projected_Transform_XYZ();
-    void TestCase_Geographic_To_Projected_Transform_CoordinateXY();
-    void TestCase_Geographic_To_Projected_Transform_CoordinateXYM();
-    void TestCase_Geographic_To_Projected_Transform_CoordinateXYZ();
-    void TestCase_Geographic_To_Projected_Transform_CoordinateXYZM();
-    void TestCase_Geographic_To_Projected_Transform_EnvelopeXY();
-    void TestCase_Geographic_To_Projected_Transform_EnvelopeXYZ();
-
-    // Projected
-    void TestCase_Projected_To_Arbitrary_Transform_XY();
-    void TestCase_Projected_To_Arbitrary_Transform_XYZ();
-    void TestCase_Projected_To_Arbitrary_Transform_CoordinateXY();
-    void TestCase_Projected_To_Arbitrary_Transform_CoordinateXYM();
-    void TestCase_Projected_To_Arbitrary_Transform_CoordinateXYZ();
-    void TestCase_Projected_To_Arbitrary_Transform_CoordinateXYZM();
-    void TestCase_Projected_To_Arbitrary_Transform_EnvelopeXY();
-    void TestCase_Projected_To_Arbitrary_Transform_EnvelopeXYZ();
-
-    void TestCase_Projected_To_Geographic_Transform_XY();
-    void TestCase_Projected_To_Geographic_Transform_XYZ();
-    void TestCase_Projected_To_Geographic_Transform_CoordinateXY();
-    void TestCase_Projected_To_Geographic_Transform_CoordinateXYM();
-    void TestCase_Projected_To_Geographic_Transform_CoordinateXYZ();
-    void TestCase_Projected_To_Geographic_Transform_CoordinateXYZM();
-    void TestCase_Projected_To_Geographic_Transform_EnvelopeXY();
-    void TestCase_Projected_To_Geographic_Transform_EnvelopeXYZ();
-
-    void TestCase_Projected_To_Projected_Transform_XY();
-    void TestCase_Projected_To_Projected_Transform_XYZ();
-    void TestCase_Projected_To_Projected_Transform_CoordinateXY();
-    void TestCase_Projected_To_Projected_Transform_CoordinateXYM();
-    void TestCase_Projected_To_Projected_Transform_CoordinateXYZ();
-    void TestCase_Projected_To_Projected_Transform_CoordinateXYZM();
-    void TestCase_Projected_To_Projected_Transform_EnvelopeXY();
-    void TestCase_Projected_To_Projected_Transform_EnvelopeXYZ();
-
-    // Datum conversion
-    void TestCase_Geographic_DatumConversion();
-
-    // Real world locations
-    void TestCase_Boston_Geographic();
-    void TestCase_NewYork_Geographic();
-    void TestCase_Boston_Projected();
-    void TestCase_NewYork_Projected();
-
-    // EPSG
-    void TestCase_EPSG();
-
-    // Performance
-    void TestCase_Benchmark_Transformation();
-
-    static bool SetDefaultUserDictionaryDir();
-
-    class FileAutoBackup
-    {
-    private:
-
-        STRING m_sFilename;
-        STRING m_sRotateSuffix;
-        STRING m_sBackupFilename;
-        bool m_bRotated;
-        bool m_bKeepFile;
-
-    public:
-        FileAutoBackup(const CREFSTRING filename, const CREFSTRING rotateSuffix, bool keepFile = false)
-            : m_sFilename(filename), m_sRotateSuffix(rotateSuffix), m_bRotated(false), m_bKeepFile(keepFile)
-        {
-            struct _stat64 fileStatus;
-            bool fileExists = MgFileUtil::GetFileStatus(filename, fileStatus);
-
-            this->m_sBackupFilename = (this->m_sFilename + this->m_sRotateSuffix);
-
-            ACE_DEBUG((LM_INFO, ACE_TEXT("\nBacking up file\n%W\n-->\n%W\n"), this->m_sFilename.c_str(), this->m_sBackupFilename.c_str()));
-
-            MgFileUtil::DeleteFile(this->m_sBackupFilename);
-            if (fileExists)
-            {
-                if (!this->m_bKeepFile)
-                {
-                    MgFileUtil::RenameFile(this->m_sFilename, this->m_sBackupFilename);
-                }
-                else
-                {
-                    MgFileUtil::CopyFile(this->m_sFilename, this->m_sBackupFilename);
-                }
-
-                this->m_bRotated = true;
-            }
-        }
-
-        ~FileAutoBackup()
-        {
-            MgFileUtil::DeleteFile(this->m_sFilename);
-            if (this->m_bRotated)
-            {
-                ACE_DEBUG((LM_INFO, ACE_TEXT("\nRestoring file\n%W\n-->\n%W\n"), this->m_sBackupFilename.c_str(), this->m_sFilename.c_str()));
-                MgFileUtil::RenameFile(this->m_sBackupFilename, this->m_sFilename, true);
-            }
-            else
-            {
-                ACE_DEBUG((LM_INFO, ACE_TEXT("\nDid not restore file\n%W\nas it did not exist before\n"), this->m_sFilename.c_str()));
-            }
-        }
-    };
-
-private:
-
-    bool CompareCodes(STRING code1, STRING code2);
-};
-
-#endif

Modified: trunk/MgDev/Server/src/UnitTesting/TestDrawingService.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestDrawingService.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestDrawingService.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -16,100 +16,25 @@
 //
 
 #include "MapGuideCommon.h"
-#include "TestDrawingService.h"
-#include "CppUnitExtensions.h"
+#include "CatchHelperMacros.h"
 #include "ServiceManager.h"
+#include "TestServiceFactory.h"
+#include "catch.hpp"
 
-const STRING TEST_LOCALE = L"en";
-
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestDrawingService, "TestDrawingService");
-
-TestDrawingService::TestDrawingService()
+TEST_CASE("DescribeDrawing", "[DrawingService]")
 {
-    // Initialize service objects.
-    MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-
-    m_svcDrawing = dynamic_cast<MgDrawingService*>(serviceManager->RequestService(MgServiceType::DrawingService));
-    assert(m_svcDrawing != NULL);
-}
-
-TestDrawingService::~TestDrawingService() { }
-
-void TestDrawingService::setUp() { }
-
-void TestDrawingService::tearDown() { }
-
-void TestDrawingService::TestStart()
-{
     try
     {
-        MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        Ptr<MgResourceService> resSvc = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        assert(resSvc != NULL);
-
-        //Set the user information for the current thread to be administrator
-        MgUserInformation::SetCurrentUserInfo(NULL);
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
-        MgUserInformation::SetCurrentUserInfo(userInfo);
-
-        MgResourceIdentifier resourceIdentifier1(L"Library://UnitTests/Drawings/SpaceShip.DrawingSource");
-
-        Ptr<MgByteSource> contentSource1 = new MgByteSource(L"../UnitTestFiles/SpaceShipDrawingSource.xml");
-        Ptr<MgByteReader> contentReader1 = contentSource1->GetReader();
-        resSvc->SetResource(&resourceIdentifier1, contentReader1, NULL);
-
-        Ptr<MgByteSource> dataSource1 = new MgByteSource(L"../UnitTestFiles/SpaceShip.dwf");
-        Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
-        resSvc->SetResourceData(&resourceIdentifier1, L"SpaceShip.dwf", L"File", dataReader1);
-    }
-    catch(MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-}
-
-void TestDrawingService::TestEnd()
-{
-    try
-    {
-        MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        Ptr<MgResourceService> resSvc = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        assert(resSvc != NULL);
-
-        //Set the user information for the current thread to be administrator
-        MgUserInformation::SetCurrentUserInfo(NULL);
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
-        MgUserInformation::SetCurrentUserInfo(userInfo);
-
-        MgResourceIdentifier resourceIdentifier1(L"Library://UnitTests/Drawings/SpaceShip.DrawingSource");
-
-        resSvc->DeleteResource(&resourceIdentifier1);
-    }
-    catch(MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-}
-
-void TestDrawingService::TestCase_DescribeDrawing()
-{
-    try
-    {
+        Ptr<MgDrawingService> m_svcDrawing = TestServiceFactory::CreateDrawingService();
         Ptr<MgResourceIdentifier> resId1 = new MgResourceIdentifier(L"Library://UnitTests/Drawings/SpaceShip.DrawingSource");
         Ptr<MgByteReader> rdr1 = m_svcDrawing->DescribeDrawing(resId1);
-        CPPUNIT_ASSERT(MgMimeType::Xml == rdr1->GetMimeType());
+        REQUIRE(MgMimeType::Xml == rdr1->GetMimeType());
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -117,19 +42,20 @@
     }
 }
 
-void TestDrawingService::TestCase_EnumerateSections()
+TEST_CASE("EnumerateSections", "[DrawingService]")
 {
     try
     {
+        Ptr<MgDrawingService> m_svcDrawing = TestServiceFactory::CreateDrawingService();
         Ptr<MgResourceIdentifier> resId1 = new MgResourceIdentifier(L"Library://UnitTests/Drawings/SpaceShip.DrawingSource");
         Ptr<MgByteReader> rdr1 = m_svcDrawing->EnumerateSections(resId1);
-        CPPUNIT_ASSERT(MgMimeType::Xml == rdr1->GetMimeType());
+        REQUIRE(MgMimeType::Xml == rdr1->GetMimeType());
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -137,22 +63,23 @@
     }
 }
 
-void TestDrawingService::TestCase_EnumerateSectionResources()
+TEST_CASE("EnumerateSectionResources", "[DrawingService]")
 {
     try
     {
+        Ptr<MgDrawingService> m_svcDrawing = TestServiceFactory::CreateDrawingService();
         Ptr<MgResourceIdentifier> resId1 = new MgResourceIdentifier(L"Library://UnitTests/Drawings/SpaceShip.DrawingSource");
-        CPPUNIT_ASSERT_THROW_MG(m_svcDrawing->EnumerateSectionResources(resId1, L"foo"), MgDwfSectionNotFoundException*);
+        REQUIRE_THROWS_MG(m_svcDrawing->EnumerateSectionResources(resId1, L"foo"), MgDwfSectionNotFoundException*);
         
         STRING sect1 = L"com.autodesk.dwf.ePlot_9E2723744244DB8C44482263E654F764";
         Ptr<MgByteReader> rdr1 = m_svcDrawing->EnumerateSectionResources(resId1, sect1);
-        CPPUNIT_ASSERT(MgMimeType::Xml == rdr1->GetMimeType());
+        REQUIRE(MgMimeType::Xml == rdr1->GetMimeType());
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -160,19 +87,20 @@
     }
 }
 
-void TestDrawingService::TestCase_GetCoordinateSpace()
+TEST_CASE("GetCoordinateSpace", "[DrawingService]")
 {
     try
     {
+        Ptr<MgDrawingService> m_svcDrawing = TestServiceFactory::CreateDrawingService();
         Ptr<MgResourceIdentifier> resId1 = new MgResourceIdentifier(L"Library://UnitTests/Drawings/SpaceShip.DrawingSource");
         STRING cs1 = m_svcDrawing->GetCoordinateSpace(resId1);
-        CPPUNIT_ASSERT(!cs1.empty());
+        REQUIRE(!cs1.empty());
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -180,20 +108,25 @@
     }
 }
 
-void TestDrawingService::TestCase_EnumerateLayers()
+#ifdef _WIN32
+TEST_CASE("EnumerateLayers", "[DrawingService]")
+#else
+TEST_CASE("EnumerateLayers", "[Broken]")
+#endif
 {
     try
     {
+        Ptr<MgDrawingService> m_svcDrawing = TestServiceFactory::CreateDrawingService();
         Ptr<MgResourceIdentifier> resId1 = new MgResourceIdentifier(L"Library://UnitTests/Drawings/SpaceShip.DrawingSource");
         STRING sect1 = L"com.autodesk.dwf.ePlot_9E2723744244DB8C44482263E654F764";
         Ptr<MgStringCollection> str1 = m_svcDrawing->EnumerateLayers(resId1, sect1);
-        CPPUNIT_ASSERT(str1->GetCount() > 0);
+        REQUIRE(str1->GetCount() > 0);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -201,19 +134,20 @@
     }
 }
 
-void TestDrawingService::TestCase_GetDrawing()
+TEST_CASE("GetDrawing", "[DrawingService]")
 {
     try
     {
+        Ptr<MgDrawingService> m_svcDrawing = TestServiceFactory::CreateDrawingService();
         Ptr<MgResourceIdentifier> resId1 = new MgResourceIdentifier(L"Library://UnitTests/Drawings/SpaceShip.DrawingSource");
         Ptr<MgByteReader> rdr1 = m_svcDrawing->GetDrawing(resId1);
-        CPPUNIT_ASSERT(NULL != rdr1.p);
+        REQUIRE(nullptr != rdr1.p);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -221,10 +155,11 @@
     }
 }
 
-void TestDrawingService::TestCase_GetLayer()
+TEST_CASE("GetLayer", "[DrawingService]")
 {
     try
     {
+        Ptr<MgDrawingService> m_svcDrawing = TestServiceFactory::CreateDrawingService();
         Ptr<MgResourceIdentifier> resId1 = new MgResourceIdentifier(L"Library://UnitTests/Drawings/SpaceShip.DrawingSource");
         STRING sect1 = L"com.autodesk.dwf.ePlot_9E2723744244DB8C44482263E654F764";
         Ptr<MgStringCollection> dwfLayers = m_svcDrawing->EnumerateLayers(resId1, sect1);
@@ -235,9 +170,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -245,10 +180,11 @@
     }
 }
 
-void TestDrawingService::TestCase_GetSection()
+TEST_CASE("GetSection", "[DrawingService]")
 {
     try
     {
+        Ptr<MgDrawingService> m_svcDrawing = TestServiceFactory::CreateDrawingService();
         Ptr<MgResourceIdentifier> resId1 = new MgResourceIdentifier(L"Library://UnitTests/Drawings/SpaceShip.DrawingSource");
         STRING sect1 = L"com.autodesk.dwf.ePlot_9E2723744244DB8C44482263E654F764";
         Ptr<MgByteReader> rdr = m_svcDrawing->GetSection(resId1, sect1);
@@ -255,9 +191,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -265,23 +201,24 @@
     }
 }
 
-void TestDrawingService::TestCase_GetSectionResource()
+TEST_CASE("GetSectionResource", "[DrawingService]")
 {
     try
     {
+        Ptr<MgDrawingService> m_svcDrawing = TestServiceFactory::CreateDrawingService();
         Ptr<MgResourceIdentifier> resId1 = new MgResourceIdentifier(L"Library://UnitTests/Drawings/SpaceShip.DrawingSource");
         STRING res1 = L"com.autodesk.dwf.ePlot_9E2723744244DB8C44482263E654F764\\4AA701C2E18DD99948F3C0D4FDFAC165.png";
         Ptr<MgByteReader> rdr1 = m_svcDrawing->GetSectionResource(resId1, res1);
-        CPPUNIT_ASSERT(rdr1->GetMimeType() == MgMimeType::Png);
+        REQUIRE(rdr1->GetMimeType() == MgMimeType::Png);
         STRING res2 = L"com.autodesk.dwf.ePlot_9E2723744244DB8C44482263E654F764\\descriptor.xml";
         Ptr<MgByteReader> rdr2 = m_svcDrawing->GetSectionResource(resId1, res2);
-        CPPUNIT_ASSERT(rdr2->GetMimeType() == MgMimeType::Xml);
+        REQUIRE(rdr2->GetMimeType() == MgMimeType::Xml);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {

Deleted: trunk/MgDev/Server/src/UnitTesting/TestDrawingService.h
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestDrawingService.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestDrawingService.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,64 +0,0 @@
-//
-//  Copyright (C) 2004-2014 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _TESTDRAWINGSERVICE_H
-#define _TESTDRAWINGSERVICE_H
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestDrawingService : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestDrawingService);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_DescribeDrawing);
-    CPPUNIT_TEST(TestCase_EnumerateSections);
-    CPPUNIT_TEST(TestCase_EnumerateSectionResources);
-    CPPUNIT_TEST(TestCase_GetCoordinateSpace);
-    CPPUNIT_TEST(TestCase_EnumerateLayers);
-    CPPUNIT_TEST(TestCase_GetDrawing);
-    CPPUNIT_TEST(TestCase_GetLayer);
-    CPPUNIT_TEST(TestCase_GetSection);
-    CPPUNIT_TEST(TestCase_GetSectionResource);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    TestDrawingService();
-    ~TestDrawingService();
-
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    void TestCase_DescribeDrawing();
-    void TestCase_EnumerateSections();
-    void TestCase_EnumerateSectionResources();
-    void TestCase_GetCoordinateSpace();
-    void TestCase_EnumerateLayers();
-    void TestCase_GetDrawing();
-    void TestCase_GetLayer();
-    void TestCase_GetSection();
-    void TestCase_GetSectionResource();
-
-private:
-    Ptr<MgDrawingService> m_svcDrawing;
-};
-
-#endif // _TESTDRAWINGSERVICE_H

Modified: trunk/MgDev/Server/src/UnitTesting/TestFeatureService.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestFeatureService.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestFeatureService.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -16,8 +16,6 @@
 //
 
 #include "MapGuideCommon.h"
-#include "TestFeatureService.h"
-#include "CppUnitExtensions.h"
 #include "ServiceManager.h"
 #include "FdoConnectionManager.h"
 #include "Services/FeatureService.h"
@@ -25,308 +23,78 @@
 #include "Fdo.h"
 #include "FoundationDefs.h"
 
-const STRING TEST_LOCALE = L"en";
+#include "CatchHelperMacros.h"
+#include "TestServiceFactory.h"
+#include "catch.hpp"
 
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestFeatureService, "TestFeatureService");
-
-
-void TestFeatureService::setUp()
+static STRING CreateTestDataStore(MgFeatureService* svcFeature, CREFSTRING provider, MgResourceIdentifier* fsId)
 {
-}
+    Ptr<MgCoordinateSystemFactory> csFactory = new MgCoordinateSystemFactory();
+    STRING scName = L"Default";
+    STRING csWkt = csFactory->ConvertCoordinateSystemCodeToWkt(L"LL84");
 
+    Ptr<MgFeatureSchema> schema = new MgFeatureSchema(L"Default", L"Default Feature Schema");
+    Ptr<MgClassDefinition> klass = new MgClassDefinition();
+    klass->SetName(L"Test");
 
-void TestFeatureService::tearDown()
-{
-}
+    Ptr<MgPropertyDefinitionCollection> clsProps = klass->GetProperties();
+    Ptr<MgPropertyDefinitionCollection> clsIdProps = klass->GetIdentityProperties();
 
+    Ptr<MgDataPropertyDefinition> id = new MgDataPropertyDefinition(L"ID");
+    id->SetDataType(MgPropertyType::Int32);
+    id->SetAutoGeneration(true);
 
-void TestFeatureService::TestStart()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Feature Service tests.\n")));
+    Ptr<MgDataPropertyDefinition> name = new MgDataPropertyDefinition(L"Name");
+    name->SetDataType(MgPropertyType::String);
+    name->SetLength(255);
+    name->SetNullable(true);
 
-#ifdef _WIN32
-    //If the FDO we're using has a full providers.xml and we haven't met the dependencies
-    //of some providers (eg. OCI.dll for King.Oracle), then it's going to show a message box
-    //in our face about this that has to be manually dismissed. Not something you want to have 
-    //happen when trying to run tests in an automated fashion. This test suite only covers the
-    //SDF, SHP and SQLite providers so having such message boxes show up is intrusive.
-    //
-    //This call will suppress such message boxes when loading dlls with unmet depdendencies. It's
-    //okay to do this here because mgserver.exe would not be running as a service or long-running process
-    //when running its test suite, so this will only take effect for the duration of the test run
-    SetErrorMode(SEM_FAILCRITICALERRORS);
-#endif
+    Ptr<MgGeometricPropertyDefinition> geom = new MgGeometricPropertyDefinition(L"Geometry");
+    geom->SetGeometryTypes(MgFeatureGeometricType::Point);
+    geom->SetSpatialContextAssociation(scName);
 
-    try
-    {
-        #ifdef _DEBUG
-        ACE_DEBUG((LM_INFO, ACE_TEXT("TestFeatureService::TestStart()\n")));
-        MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
-        if(pFdoConnectionManager)
-        {
-            pFdoConnectionManager->ShowCache();
-        }
-        #endif
+    clsProps->Add(id);
+    clsProps->Add(name);
+    clsProps->Add(geom);
 
-        MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
-        {
-            throw new MgNullReferenceException(L"TestResourceService.setUp", __LINE__, __WFILE__, NULL, L"", NULL);
-        }
+    clsIdProps->Add(id);
 
-        Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
-        {
-            throw new MgServiceNotAvailableException(L"TestResourceService.setUp", __LINE__, __WFILE__, NULL, L"", NULL);
-        }
+    klass->SetDefaultGeometryPropertyName(L"Geometry");
 
-        //Set the user information for the current thread to be administrator
-        MgUserInformation::SetCurrentUserInfo(NULL);
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        if (userInfo != NULL)
-        {
-            userInfo->SetLocale(TEST_LOCALE);
-            MgUserInformation::SetCurrentUserInfo(userInfo);
+    Ptr<MgClassDefinitionCollection> classes = schema->GetClasses();
+    classes->Add(klass);
 
-            MgResourceIdentifier resourceIdentifier1(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
-            MgResourceIdentifier resourceIdentifier2(L"Library://UnitTests/Data/Redding_Parcels.FeatureSource");
-            MgResourceIdentifier resourceIdentifier3(L"Library://UnitTests/Data/Sheboygan_BuildingOutlines.FeatureSource");
-            MgResourceIdentifier resourceIdentifier4(L"Library://UnitTests/Data/Sheboygan_VotingDistricts.FeatureSource");
-            MgResourceIdentifier resourceIdentifier5(L"Library://UnitTests/Data/TestChainedInner1ToManyJoin.FeatureSource");
-            MgResourceIdentifier resourceIdentifier6(L"Library://UnitTests/Data/Empty.FeatureSource");
-            MgResourceIdentifier resourceIdentifier7(L"Library://UnitTests/Data/SavePointTest.FeatureSource");
-            MgResourceIdentifier resourceIdentifier8(L"Library://UnitTests/Data/ParcelsJoinTestSQLite.FeatureSource");
-            MgResourceIdentifier resourceIdentifier9(L"Library://UnitTests/Data/FdoJoin.FeatureSource");
-#ifdef _WIN32
-            STRING resourceContentFileName1 = L"..\\UnitTestFiles\\Sheboygan_Parcels.FeatureSource";
-            STRING resourceContentFileName2 = L"..\\UnitTestFiles\\Redding_Parcels.FeatureSource";
-            STRING resourceContentFileName3 = L"..\\UnitTestFiles\\Sheboygan_BuildingOutlines.FeatureSource";
-            STRING resourceContentFileName4 = L"..\\UnitTestFiles\\Sheboygan_VotingDistricts.FeatureSource";
-            STRING resourceContentFileName5 = L"..\\UnitTestFiles\\TESTChainedInner1ToManyJoin.FeatureSource";
-            STRING resourceContentFileName6 = L"..\\UnitTestFiles\\Empty.FeatureSource";
-            STRING resourceContentFileName7 = L"..\\UnitTestFiles\\SavePointTest.FeatureSource";
-            STRING resourceContentFileName8 = L"..\\UnitTestFiles\\UT_Parcels_SQLite_Join.FeatureSource";
-            STRING resourceContentFileName9 = L"..\\UnitTestFiles\\UT_FdoJoin.FeatureSource";
-            STRING dataFileName1 = L"..\\UnitTestFiles\\Sheboygan_Parcels.sdf";
-            STRING dataFileName2 = L"..\\UnitTestFiles\\Redding_Parcels.shp";
-            STRING dataFileName3 = L"..\\UnitTestFiles\\Redding_Parcels.dbf";
-            STRING dataFileName4 = L"..\\UnitTestFiles\\Redding_Parcels.shx";
-            STRING dataFileName5 = L"..\\UnitTestFiles\\Sheboygan_BuildingOutlines.sdf";
-            STRING dataFileName6 = L"..\\UnitTestFiles\\Sheboygan_VotingDistricts.sdf";
-            STRING dataFileName7 = L"..\\UnitTestFiles\\Empty.sdf";
-            STRING dataFileName8 = L"..\\UnitTestFiles\\SavePointTest.sqlite";
-            STRING dataFileName9 = L"..\\UnitTestFiles\\JoinTest.sqlite";
-            STRING dataFileName10 = L"..\\UnitTestFiles\\ParcelsJoinTest.sqlite";
-#else
-            STRING resourceContentFileName1 = L"../UnitTestFiles/Sheboygan_Parcels.FeatureSource";
-            STRING resourceContentFileName2 = L"../UnitTestFiles/Redding_Parcels.FeatureSource";
-            STRING resourceContentFileName3 = L"../UnitTestFiles/Sheboygan_BuildingOutlines.FeatureSource";
-            STRING resourceContentFileName4 = L"../UnitTestFiles/Sheboygan_VotingDistricts.FeatureSource";
-            STRING resourceContentFileName5 = L"../UnitTestFiles/TESTChainedInner1ToManyJoin.FeatureSource";
-            STRING resourceContentFileName6 = L"../UnitTestFiles/Empty.FeatureSource";
-            STRING resourceContentFileName7 = L"../UnitTestFiles/SavePointTest.FeatureSource";
-            STRING resourceContentFileName8 = L"../UnitTestFiles/UT_Parcels_SQLite_Join.FeatureSource";
-            STRING resourceContentFileName9 = L"../UnitTestFiles/UT_FdoJoin.FeatureSource";
-            STRING dataFileName1 = L"../UnitTestFiles/Sheboygan_Parcels.sdf";
-            STRING dataFileName2 = L"../UnitTestFiles/Redding_Parcels.shp";
-            STRING dataFileName3 = L"../UnitTestFiles/Redding_Parcels.dbf";
-            STRING dataFileName4 = L"../UnitTestFiles/Redding_Parcels.shx";
-            STRING dataFileName5 = L"../UnitTestFiles/Sheboygan_BuildingOutlines.sdf";
-            STRING dataFileName6 = L"../UnitTestFiles/Sheboygan_VotingDistricts.sdf";
-            STRING dataFileName7 = L"../UnitTestFiles/Empty.sdf";
-            STRING dataFileName8 = L"../UnitTestFiles/SavePointTest.sqlite";
-            STRING dataFileName9 = L"../UnitTestFiles/JoinTest.sqlite";
-            STRING dataFileName10 = L"../UnitTestFiles/ParcelsJoinTest.sqlite";
-#endif
+    Ptr<MgFileFeatureSourceParams> fsParams = new MgFileFeatureSourceParams(provider, scName, csWkt, schema);
+    svcFeature->CreateFeatureSource(fsId, fsParams);
 
-            //Add a new resource
-            Ptr<MgByteSource> contentSource1 = new MgByteSource(resourceContentFileName1);
-            Ptr<MgByteReader> contentReader1 = contentSource1->GetReader();
-            pService->SetResource(&resourceIdentifier1, contentReader1, NULL);
+    Ptr<MgFeatureSchemaCollection> schemas = svcFeature->DescribeSchema(fsId, L"");
+    Ptr<MgFeatureSchema> theSchema = schemas->GetItem(0);
+    Ptr<MgClassDefinitionCollection> theClasses = theSchema->GetClasses();
+    Ptr<MgClassDefinition> theClass = theClasses->GetItem(0);
 
-            Ptr<MgByteSource> contentSource2 = new MgByteSource(resourceContentFileName2);
-            Ptr<MgByteReader> contentReader2 = contentSource2->GetReader();
-            pService->SetResource(&resourceIdentifier2, contentReader2, NULL);
-
-            Ptr<MgByteSource> contentSource3 = new MgByteSource(resourceContentFileName3);
-            Ptr<MgByteReader> contentReader3 = contentSource3->GetReader();
-            pService->SetResource(&resourceIdentifier3, contentReader3, NULL);
-
-            Ptr<MgByteSource> contentSource4 = new MgByteSource(resourceContentFileName4);
-            Ptr<MgByteReader> contentReader4 = contentSource4->GetReader();
-            pService->SetResource(&resourceIdentifier4, contentReader4, NULL);
-
-            Ptr<MgByteSource> contentSource5 = new MgByteSource(resourceContentFileName5);
-            Ptr<MgByteReader> contentReader5 = contentSource5->GetReader();
-            pService->SetResource(&resourceIdentifier5, contentReader5, NULL);
-
-            Ptr<MgByteSource> contentSource6 = new MgByteSource(resourceContentFileName6);
-            Ptr<MgByteReader> contentReader6 = contentSource6->GetReader();
-            pService->SetResource(&resourceIdentifier6, contentReader6, NULL);
-
-            Ptr<MgByteSource> contentSource7 = new MgByteSource(resourceContentFileName7);
-            Ptr<MgByteReader> contentReader7 = contentSource7->GetReader();
-            pService->SetResource(&resourceIdentifier7, contentReader7, NULL);
-
-            Ptr<MgByteSource> contentSource8 = new MgByteSource(resourceContentFileName8);
-            Ptr<MgByteReader> contentReader8 = contentSource8->GetReader();
-            pService->SetResource(&resourceIdentifier8, contentReader8, NULL);
-
-            Ptr<MgByteSource> contentSource9 = new MgByteSource(resourceContentFileName9);
-            Ptr<MgByteReader> contentReader9 = contentSource9->GetReader();
-            pService->SetResource(&resourceIdentifier9, contentReader9, NULL);
-
-            //Set the resource data
-            Ptr<MgByteSource> dataSource1 = new MgByteSource(dataFileName1);
-            Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
-            pService->SetResourceData(&resourceIdentifier1, L"Sheboygan_Parcels.sdf", L"File", dataReader1);
-
-            Ptr<MgByteSource> dataSource2 = new MgByteSource(dataFileName2);
-            Ptr<MgByteReader> dataReader2 = dataSource2->GetReader();
-            pService->SetResourceData(&resourceIdentifier2, L"Redding_Parcels.shp", L"File", dataReader2);
-
-            Ptr<MgByteSource> dataSource3 = new MgByteSource(dataFileName3);
-            Ptr<MgByteReader> dataReader3 = dataSource3->GetReader();
-            pService->SetResourceData(&resourceIdentifier2, L"Redding_Parcels.dbf", L"File", dataReader3);
-
-            Ptr<MgByteSource> dataSource4 = new MgByteSource(dataFileName4);
-            Ptr<MgByteReader> dataReader4 = dataSource4->GetReader();
-            pService->SetResourceData(&resourceIdentifier2, L"Redding_Parcels.shx", L"File", dataReader4);
-
-            Ptr<MgByteSource> dataSource5 = new MgByteSource(dataFileName5);
-            Ptr<MgByteReader> dataReader5 = dataSource5->GetReader();
-            pService->SetResourceData(&resourceIdentifier3, L"Sheboygan_BuildingOutlines.sdf", L"File", dataReader5);
-
-            Ptr<MgByteSource> dataSource6 = new MgByteSource(dataFileName6);
-            Ptr<MgByteReader> dataReader6 = dataSource6->GetReader();
-            pService->SetResourceData(&resourceIdentifier4, L"Sheboygan_VotingDistricts.sdf", L"File", dataReader6);
-
-            Ptr<MgByteSource> dataSource7 = new MgByteSource(dataFileName1);
-            Ptr<MgByteReader> dataReader7 = dataSource7->GetReader();
-            pService->SetResourceData(&resourceIdentifier5, L"Sheboygan_Parcels.sdf", L"File", dataReader7);
-
-            Ptr<MgByteSource> dataSource8 = new MgByteSource(dataFileName7);
-            Ptr<MgByteReader> dataReader8 = dataSource8->GetReader();
-            pService->SetResourceData(&resourceIdentifier6, L"Empty.sdf", L"File", dataReader8);
-
-            Ptr<MgByteSource> dataSource9 = new MgByteSource(dataFileName8);
-            Ptr<MgByteReader> dataReader9 = dataSource9->GetReader();
-            pService->SetResourceData(&resourceIdentifier7, L"SavePointTest.sqlite", L"File", dataReader9);
-
-            Ptr<MgByteSource> dataSource10 = new MgByteSource(dataFileName9);
-            Ptr<MgByteReader> dataReader10 = dataSource10->GetReader();
-            pService->SetResourceData(&resourceIdentifier9, L"JoinTest.sqlite", L"File", dataReader10);
-
-            Ptr<MgByteSource> dataSource11 = new MgByteSource(dataFileName10);
-            Ptr<MgByteReader> dataReader11 = dataSource11->GetReader();
-            pService->SetResourceData(&resourceIdentifier8, L"ParcelsJoinTest.sqlite", L"File", dataReader11);
-        }
-    }
-    catch(MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
+    STRING qClassName = theSchema->GetName();
+    qClassName += L":";
+    qClassName += theClass->GetName();
+    return qClassName;
 }
 
-
-void TestFeatureService::TestEnd()
-{
-    try
-    {
-        MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
-        {
-            throw new MgNullReferenceException(L"TestFeatureService.TestEnd",
-                __LINE__, __WFILE__, NULL, L"", NULL);
-        }
-
-        Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
-        {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestEnd",
-                __LINE__, __WFILE__, NULL, L"", NULL);
-        }
-
-        // set user info
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
-        MgUserInformation::SetCurrentUserInfo(userInfo);
-
-        // delete the feature sources definition
-        Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
-        pService->DeleteResource(fsres1);
-
-        Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Redding_Parcels.FeatureSource");
-        pService->DeleteResource(fsres2);
-
-        Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_BuildingOutlines.FeatureSource");
-        pService->DeleteResource(fsres3);
-
-        Ptr<MgResourceIdentifier> fsres4 = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_VotingDistricts.FeatureSource");
-        pService->DeleteResource(fsres4);
-
-        Ptr<MgResourceIdentifier> fsres5 = new MgResourceIdentifier(L"Library://UnitTests/Data/TestChainedInner1ToManyJoin.FeatureSource");
-        pService->DeleteResource(fsres5);
-
-        Ptr<MgResourceIdentifier> fsres6 = new MgResourceIdentifier(L"Library://UnitTests/Data/Empty.FeatureSource");
-        pService->DeleteResource(fsres6);
-
-        Ptr<MgResourceIdentifier> fsres7 = new MgResourceIdentifier(L"Library://UnitTests/Data/FdoJoin.FeatureSource");
-        pService->DeleteResource(fsres7);
-
-        Ptr<MgResourceIdentifier> fsres8 = new MgResourceIdentifier(L"Library://UnitTests/Data/ParcelsJoinTestSQLite.FeatureSource");
-        pService->DeleteResource(fsres8);
-
-        //May or may not have been created during the test
-        Ptr<MgResourceIdentifier> fsres9 = new MgResourceIdentifier(L"Library://UnitTests/Data/GetIdentityPropertiesTest.FeatureSource");
-        if (pService->ResourceExists(fsres9)) pService->DeleteResource(fsres9);
-
-        Ptr<MgResourceIdentifier> fsres10 = new MgResourceIdentifier(L"Library://UnitTests/Data/TestInsert.FeatureSource");
-        if (pService->ResourceExists(fsres10)) pService->DeleteResource(fsres10);
-
-        #ifdef _DEBUG
-        ACE_DEBUG((LM_INFO, ACE_TEXT("TestFeatureService::TestEnd()\n")));
-        MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
-        if(pFdoConnectionManager)
-        {
-            pFdoConnectionManager->ShowCache();
-        }
-        #endif
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nFeature Service tests completed.\n\n")));
-}
-
-
 ///----------------------------------------------------------------------------
 /// Test Case Description:
 ///
 /// This test case gets the feature providers.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_GetFeatureProviders()
+TEST_CASE("GetFeatureProviders", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_GetFeatureProviders", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetFeatureProviders", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -333,18 +101,18 @@
 
         Ptr<MgByteReader> byteReader = pService->GetFeatureProviders();
         STRING mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -358,18 +126,18 @@
 ///
 /// This test case tests connections to the SDF provider.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_TestConnectionSDFProvider()
+TEST_CASE("TestConnectionSDFProvider", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_TestConnectionSDFProvider", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService.p == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_TestConnectionSDFProvider", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -385,18 +153,18 @@
         const STRING connectionString = L"File=../UnitTestFiles/Sheboygan_Parcels.sdf";
 #endif
         bool bSuccess = pService->TestConnection(provider, connectionString);
-        CPPUNIT_ASSERT(bSuccess);
+        REQUIRE(bSuccess);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -410,12 +178,12 @@
 ///
 /// This test case tests the FDO connection manager.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_TestFdoConnectionManager()
+TEST_CASE("TestFdoConnectionManager", "[FeatureService]")
 {
     try
     {
         MgFdoConnectionManager* pManager = MgFdoConnectionManager::GetInstance();
-        if(pManager == 0)
+        if (pManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_TestFdoConnectionManager", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -430,20 +198,20 @@
 #endif
 
         FdoIConnection* pFdoConnection1 = pManager->Open(provider, connectionString);
-        CPPUNIT_ASSERT(pFdoConnection1);
+        REQUIRE(pFdoConnection1);
 
         FdoIConnection* pFdoConnectionAlt = pManager->Open(provider, connectionStringAlt);
-        CPPUNIT_ASSERT(pFdoConnectionAlt);
+        REQUIRE(pFdoConnectionAlt);
 
         FdoIConnection* pFdoConnection2 = pManager->Open(provider, connectionString);
-        CPPUNIT_ASSERT(pFdoConnection2);
+        REQUIRE(pFdoConnection2);
 
         FdoIConnection* pFdoConnection3 = pManager->Open(provider, connectionString);
-        CPPUNIT_ASSERT(pFdoConnection3);
+        REQUIRE(pFdoConnection3);
 
         // These connections should be different
-        CPPUNIT_ASSERT(pFdoConnection1 != pFdoConnection2);
-        CPPUNIT_ASSERT(pFdoConnection1 != pFdoConnection3);
+        REQUIRE(pFdoConnection1 != pFdoConnection2);
+        REQUIRE(pFdoConnection1 != pFdoConnection3);
 
         pManager->Close(pFdoConnection1);
         pManager->Close(pFdoConnection2);
@@ -459,14 +227,14 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -480,18 +248,18 @@
 ///
 /// This test case gets the connection property values.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_GetConnectionPropertyValues()
+TEST_CASE("GetConnectionPropertyValues", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_GetConnectionPropertyValues", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetConnectionPropertyValues", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -499,23 +267,23 @@
         STRING provider = L"";
         STRING property = L"";
         STRING connectionString = L"";
-        CPPUNIT_ASSERT_THROW_MG(pService->GetConnectionPropertyValues(provider, property, connectionString), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetConnectionPropertyValues(provider, property, connectionString), MgInvalidArgumentException*);
 
         provider = L"OSGeo.SDF";
         property = L"ReadOnly";
         Ptr<MgStringCollection> properties = pService->GetConnectionPropertyValues(provider, property, connectionString);
-        CPPUNIT_ASSERT(properties->GetCount() > 0);
+        REQUIRE(properties->GetCount() > 0);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -529,18 +297,18 @@
 ///
 /// This test case gets the provider capabilities.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_GetCapabilities()
+TEST_CASE("GetCapabilities", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_GetCapabilities", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetCapabilities", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -548,7 +316,7 @@
         STRING provider = L"OSGeo.SDF";
 
         MgFdoConnectionManager* fdoConnectionManager = MgFdoConnectionManager::GetInstance();
-        if(fdoConnectionManager == 0)
+        if (fdoConnectionManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_GetCapabilities", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -556,22 +324,22 @@
 
         Ptr<MgByteReader> reader = pService->GetCapabilities(providerNoVersion);
         STRING mimetype = reader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimetype.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimetype.c_str(), MgMimeType::Xml.c_str()) == 0);
 
         provider = L"";
 
-        CPPUNIT_ASSERT_THROW_MG(pService->GetCapabilities(provider), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetCapabilities(provider), MgInvalidArgumentException*);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -585,42 +353,42 @@
 ///
 /// This test case tests a connection to a resource.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_TestConnectionResourceIdentifier()
+TEST_CASE("TestConnectionResourceIdentifier", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_TestConnectionResourceIdentifier", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_TestConnectionResourceIdentifier", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
-        CPPUNIT_ASSERT_THROW_MG(pService->TestConnection(resource), MgInvalidRepositoryTypeException*);
+        REQUIRE_THROWS_MG(pService->TestConnection(resource), MgInvalidRepositoryTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Geography/World.MapDefinition");
-        CPPUNIT_ASSERT_THROW_MG(pService->TestConnection(resource), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(pService->TestConnection(resource), MgInvalidResourceTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
         bool bResult = pService->TestConnection(resource);
-        CPPUNIT_ASSERT(bResult);
+        REQUIRE(bResult);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -634,18 +402,18 @@
 ///
 /// This test case exercises getting schemas.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_GetSchemas()
+TEST_CASE("GetSchemas", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_GetSchemas", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetSchemas", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -655,25 +423,25 @@
         MgUserInformation::SetCurrentUserInfo(adminUserInfo);
 
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
-        CPPUNIT_ASSERT_THROW_MG(pService->GetSchemas(resource), MgInvalidRepositoryTypeException*);
+        REQUIRE_THROWS_MG(pService->GetSchemas(resource), MgInvalidRepositoryTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Geography/World.MapDefinition");
-        CPPUNIT_ASSERT_THROW_MG(pService->GetSchemas(resource), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(pService->GetSchemas(resource), MgInvalidResourceTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
         Ptr<MgStringCollection> schemas = pService->GetSchemas(resource);
-        CPPUNIT_ASSERT(schemas->GetCount() > 0);
+        REQUIRE(schemas->GetCount() > 0);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -687,18 +455,18 @@
 ///
 /// This test case exercises getting classes.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_GetClasses()
+TEST_CASE("GetClasses", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_GetClasses", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetClasses", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -709,26 +477,26 @@
 
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
         STRING schemaName = L"";
-        CPPUNIT_ASSERT_THROW_MG(pService->GetClasses(resource, schemaName), MgInvalidRepositoryTypeException*);
+        REQUIRE_THROWS_MG(pService->GetClasses(resource, schemaName), MgInvalidRepositoryTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Geography/World.MapDefinition");
-        CPPUNIT_ASSERT_THROW_MG(pService->GetClasses(resource, schemaName), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(pService->GetClasses(resource, schemaName), MgInvalidResourceTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
         schemaName = L"SHP_Schema";
         Ptr<MgStringCollection> classes = pService->GetClasses(resource, schemaName);
-        CPPUNIT_ASSERT(classes->GetCount() > 0);
+        REQUIRE(classes->GetCount() > 0);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -742,18 +510,18 @@
 ///
 /// This test case exercises getting class definitions.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_GetClassDefinition()
+TEST_CASE("GetClassDefinition", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_GetClassDefinition", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetClassDefinition", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -761,7 +529,7 @@
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
         STRING schemaName = L"";
         STRING className = L"";
-        CPPUNIT_ASSERT_THROW_MG(pService->GetClassDefinition(resource, schemaName, className), MgClassNotFoundException*);
+        REQUIRE_THROWS_MG(pService->GetClassDefinition(resource, schemaName, className), MgClassNotFoundException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
         schemaName = L"SHP_Schema";
@@ -768,18 +536,18 @@
         className = L"Parcels";
         Ptr<MgClassDefinition> classDef = pService->GetClassDefinition(resource, schemaName, className);
         STRING name = classDef->GetName();
-        CPPUNIT_ASSERT(name == L"Parcels");
+        REQUIRE(name == L"Parcels");
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -792,18 +560,18 @@
 ///
 /// This test case exercises the GetIdentityProperties() internal API
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_GetIdentityProperties()
+TEST_CASE("GetIdentityProperties", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_GetIdentityProperties", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetIdentityProperties", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -829,28 +597,30 @@
         Ptr<MgStringCollection> classNames = new MgStringCollection();
         classNames->Add(L"NoProps");
         Ptr<MgClassDefinitionCollection> matchingClasses = pService->GetIdentityProperties(fsId, L"UnitTest", classNames);
-        CPPUNIT_ASSERT_MESSAGE("Expected class (NoProps) to be in result for GetIdentityProperties", 1 == matchingClasses->GetCount());
+        // Expected class (NoProps) to be in result for GetIdentityProperties
+        REQUIRE(1 == matchingClasses->GetCount());
 
         // Here's the kicker - We expect 0 identity properties instead of exception (#1403)
         Ptr<MgClassDefinition> klass = matchingClasses->GetItem(0);
         Ptr<MgPropertyDefinitionCollection> idProps = klass->GetIdentityProperties();
-        CPPUNIT_ASSERT_MESSAGE("Expected 0 identity properties in class (NoProps)", 0 == idProps->GetCount());
+        // Expected 0 identity properties in class (NoProps)
+        REQUIRE(0 == idProps->GetCount());
 
         // Here is where exception should be thrown
         classNames->Clear();
         classNames->Add(L"IDontExist");
-        CPPUNIT_ASSERT_THROW_MG(pService->GetIdentityProperties(fsId, L"UnitTest", classNames), MgFdoException*);
+        REQUIRE_THROWS_MG(pService->GetIdentityProperties(fsId, L"UnitTest", classNames), MgFdoException*);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -864,18 +634,18 @@
 ///
 /// This test case exercises describing schemas.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_DescribeSchema()
+TEST_CASE("DescribeSchema", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_DescribeSchema", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_DescribeSchema", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -886,27 +656,27 @@
 
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
         STRING schemaName = L"";
-        CPPUNIT_ASSERT_THROW_MG(pService->DescribeSchema(resource, schemaName, NULL), MgInvalidRepositoryTypeException*);
+        REQUIRE_THROWS_MG(pService->DescribeSchema(resource, schemaName, NULL), MgInvalidRepositoryTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Geography/World.MapDefinition");
         schemaName = L"";
-        CPPUNIT_ASSERT_THROW_MG(pService->DescribeSchema(resource, schemaName, NULL), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(pService->DescribeSchema(resource, schemaName, NULL), MgInvalidResourceTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
         schemaName = L"";
         Ptr<MgFeatureSchemaCollection> schemaCollection = pService->DescribeSchema(resource, schemaName, NULL);
-        CPPUNIT_ASSERT(schemaCollection->GetCount() > 0);
+        REQUIRE(schemaCollection->GetCount() > 0);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -936,18 +706,18 @@
 ///
 /// This test case exercises applying schemas.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_ApplySchema()
+TEST_CASE("ApplySchema", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_ApplySchema", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_ApplySchema", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -976,7 +746,7 @@
         Ptr<MgClassDefinitionCollection> newSchemaClasses = newSchema->GetClasses();
         Ptr<MgClassDefinition> newClassDef = FindClassByName(newSchemaClasses, L"Parcel");
         Ptr<MgPropertyDefinitionCollection> newProperties = newClassDef->GetProperties();
-        CPPUNIT_ASSERT(newProperties->Contains(L"Name") == false);
+        REQUIRE(newProperties->Contains(L"Name") == false);
 
         //////////////////////////////////////////////////////////////////////
         /// The second test case:                                          ///
@@ -1049,7 +819,7 @@
         STRING temp;
         newSchema = newSchemas->GetItem(0);
         temp = newSchema->GetName();
-        CPPUNIT_ASSERT(temp == L"Schema");
+        REQUIRE(temp == L"Schema");
 
         schemaClasses = newSchema->GetClasses();
 
@@ -1056,62 +826,62 @@
         // Verify the first feature class
         classDef1 = FindClassByName(schemaClasses, L"FeatureClass1");
         temp = classDef1->GetName();
-        CPPUNIT_ASSERT(temp == L"FeatureClass1");
+        REQUIRE(temp == L"FeatureClass1");
         temp = classDef1->GetDescription();
-        CPPUNIT_ASSERT(temp == L"Feature class 1");
+        REQUIRE(temp == L"Feature class 1");
         temp = classDef1->GetDefaultGeometryPropertyName();
-        CPPUNIT_ASSERT(temp == L"GEOM");
+        REQUIRE(temp == L"GEOM");
 
         identityProperties1 = classDef1->GetIdentityProperties();
-        CPPUNIT_ASSERT(identityProperties1->GetCount() == 1);
+        REQUIRE(identityProperties1->GetCount() == 1);
         prop = static_cast<MgDataPropertyDefinition*>(identityProperties1->GetItem(L"KEY1"));
-        CPPUNIT_ASSERT(prop != NULL);
+        REQUIRE(prop.p != NULL);
 
         properties1 = classDef1->GetProperties();
-        CPPUNIT_ASSERT(properties1->GetCount() == 3);
+        REQUIRE(properties1->GetCount() == 3);
 
         prop = static_cast<MgDataPropertyDefinition*>(properties1->GetItem(L"KEY1"));
-        CPPUNIT_ASSERT(prop != NULL);
-        CPPUNIT_ASSERT(prop->GetDataType() == MgPropertyType::Int32);
-        CPPUNIT_ASSERT(prop->IsAutoGenerated() == true);
-        CPPUNIT_ASSERT(prop->GetReadOnly() == true);
+        REQUIRE(prop.p != NULL);
+        REQUIRE(prop->GetDataType() == MgPropertyType::Int32);
+        REQUIRE(prop->IsAutoGenerated() == true);
+        REQUIRE(prop->GetReadOnly() == true);
 
         prop = static_cast<MgDataPropertyDefinition*>(properties1->GetItem(L"NAME1"));
-        CPPUNIT_ASSERT(prop != NULL);
-        CPPUNIT_ASSERT(prop->GetDataType() == MgPropertyType::String);
+        REQUIRE(prop.p != NULL);
+        REQUIRE(prop->GetDataType() == MgPropertyType::String);
 
         propGeom = static_cast<MgGeometricPropertyDefinition*>(properties1->GetItem(L"GEOM"));
-        CPPUNIT_ASSERT(prop != NULL);
-        CPPUNIT_ASSERT(propGeom->GetGeometryTypes() == MgFeatureGeometricType::Surface);
+        REQUIRE(prop.p != NULL);
+        REQUIRE(propGeom->GetGeometryTypes() == MgFeatureGeometricType::Surface);
 
         // Verify the second feature class
         classDef2 = FindClassByName(schemaClasses, L"FeatureClass2");
         temp = classDef2->GetDescription();
-        CPPUNIT_ASSERT(temp == L"Feature class 2");
+        REQUIRE(temp == L"Feature class 2");
         temp = classDef2->GetDefaultGeometryPropertyName();
-        CPPUNIT_ASSERT(temp == L"GEOM");
+        REQUIRE(temp == L"GEOM");
 
         identityProperties2 = classDef2->GetIdentityProperties();
-        CPPUNIT_ASSERT(identityProperties2->GetCount() == 1);
+        REQUIRE(identityProperties2->GetCount() == 1);
         prop = static_cast<MgDataPropertyDefinition*>(identityProperties2->GetItem(L"KEY2"));
-        CPPUNIT_ASSERT(prop != NULL);
+        REQUIRE(prop.p != NULL);
 
         properties2 = classDef2->GetProperties();
-        CPPUNIT_ASSERT(properties2->GetCount() == 3);
+        REQUIRE(properties2->GetCount() == 3);
 
         prop = static_cast<MgDataPropertyDefinition*>(properties2->GetItem(L"KEY2"));
-        CPPUNIT_ASSERT(prop != NULL);
-        CPPUNIT_ASSERT(prop->GetDataType() == MgPropertyType::Int32);
-        CPPUNIT_ASSERT(prop->IsAutoGenerated() == true);
-        CPPUNIT_ASSERT(prop->GetReadOnly() == true);
+        REQUIRE(prop.p != NULL);
+        REQUIRE(prop->GetDataType() == MgPropertyType::Int32);
+        REQUIRE(prop->IsAutoGenerated() == true);
+        REQUIRE(prop->GetReadOnly() == true);
 
         prop = static_cast<MgDataPropertyDefinition*>(properties2->GetItem(L"NAME2"));
-        CPPUNIT_ASSERT(prop != NULL);
-        CPPUNIT_ASSERT(prop->GetDataType() == MgPropertyType::String);
+        REQUIRE(prop.p != NULL);
+        REQUIRE(prop->GetDataType() == MgPropertyType::String);
 
         propGeom = static_cast<MgGeometricPropertyDefinition*>(properties2->GetItem(L"GEOM"));
-        CPPUNIT_ASSERT(prop != NULL);
-        CPPUNIT_ASSERT(propGeom->GetGeometryTypes() == MgFeatureGeometricType::Curve);
+        REQUIRE(prop.p != NULL);
+        REQUIRE(propGeom->GetGeometryTypes() == MgFeatureGeometricType::Curve);
 
         //////////////////////////////////////////////////////////////////////
         /// The third test case:                                           ///
@@ -1141,53 +911,53 @@
         newSchemas = pService->DescribeSchema(resource, L"Schema", NULL);
         newSchema = newSchemas->GetItem(0);
         temp = newSchema->GetName();
-        CPPUNIT_ASSERT(temp == L"Schema");
+        REQUIRE(temp == L"Schema");
 
         schemaClasses = newSchema->GetClasses();
 
         // Verify the first feature class
         classDef1 = FindClassByName(schemaClasses, L"FeatureClass1");
-        CPPUNIT_ASSERT(classDef1 == NULL);
+        REQUIRE(classDef1.p == NULL);
 
         classDef2 = FindClassByName(schemaClasses, L"FeatureClass2");
         temp = classDef2->GetDescription();
-        CPPUNIT_ASSERT(temp == L"Modified Feature Class");
+        REQUIRE(temp == L"Modified Feature Class");
 
         properties2 = classDef2->GetProperties();
-        CPPUNIT_ASSERT(properties2->GetCount() == 5);
+        REQUIRE(properties2->GetCount() == 5);
 
         temp = classDef2->GetDefaultGeometryPropertyName();
-        CPPUNIT_ASSERT(temp == L"GEOM");
+        REQUIRE(temp == L"GEOM");
 
         identityProperties2 = classDef2->GetIdentityProperties();
-        CPPUNIT_ASSERT(identityProperties2->GetCount() == 1);
+        REQUIRE(identityProperties2->GetCount() == 1);
         prop = static_cast<MgDataPropertyDefinition*>(identityProperties2->GetItem(L"KEY2"));
-        CPPUNIT_ASSERT(prop != NULL);
+        REQUIRE(prop.p != NULL);
 
         prop = static_cast<MgDataPropertyDefinition*>(properties2->GetItem(L"ID"));
-        CPPUNIT_ASSERT(prop != NULL);
-        CPPUNIT_ASSERT(prop->GetDataType() == MgPropertyType::Int32);
-        CPPUNIT_ASSERT(prop->IsAutoGenerated() == true);
-        CPPUNIT_ASSERT(prop->GetReadOnly() == true);
+        REQUIRE(prop.p != NULL);
+        REQUIRE(prop->GetDataType() == MgPropertyType::Int32);
+        REQUIRE(prop->IsAutoGenerated() == true);
+        REQUIRE(prop->GetReadOnly() == true);
 
         prop = static_cast<MgDataPropertyDefinition*>(properties2->GetItem(L"LENGTH"));
-        CPPUNIT_ASSERT(prop != NULL);
-        CPPUNIT_ASSERT(prop->GetDataType() == MgPropertyType::Single);
+        REQUIRE(prop.p != NULL);
+        REQUIRE(prop->GetDataType() == MgPropertyType::Single);
 
         propGeom = static_cast<MgGeometricPropertyDefinition*>(properties2->GetItem(L"GEOM"));
-        CPPUNIT_ASSERT(prop != NULL);
-        CPPUNIT_ASSERT(propGeom->GetGeometryTypes() == MgFeatureGeometricType::Curve);
+        REQUIRE(prop.p != NULL);
+        REQUIRE(propGeom->GetGeometryTypes() == MgFeatureGeometricType::Curve);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -1201,18 +971,18 @@
 ///
 /// This test case exercises selecting features.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_SelectFeatures()
+TEST_CASE("SelectFeatures", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_SelectFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_SelectFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -1220,7 +990,7 @@
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
         STRING className = L"";
         Ptr<MgFeatureQueryOptions> options = new MgFeatureQueryOptions();
-        CPPUNIT_ASSERT_THROW_MG(pService->SelectFeatures(resource, className, options), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->SelectFeatures(resource, className, options), MgInvalidArgumentException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
         className = L"Parcels";
@@ -1227,18 +997,18 @@
         Ptr<MgFeatureReader> reader = pService->SelectFeatures(resource, className, options);
         bool bResult = reader->ReadNext();
         reader->Close();
-        CPPUNIT_ASSERT(bResult);
+        REQUIRE(bResult);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -1251,18 +1021,18 @@
 ///
 /// This test case exercises selecting features transformed to a specific coordinate system.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_SelectFeaturesWithXform()
+TEST_CASE("SelectFeaturesWithXform", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_SelectFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_SelectFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -1329,44 +1099,44 @@
         Ptr<MgFeatureQueryOptions> query = new MgFeatureQueryOptions();
         Ptr<MgReader> reader = pService->SelectFeatures(fsId, L"Default:Test", query, dstWkt);
         
-        CPPUNIT_ASSERT(reader->ReadNext());
-        CPPUNIT_ASSERT(!reader->IsNull(L"Geometry"));
+        REQUIRE(reader->ReadNext());
+        REQUIRE(!reader->IsNull(L"Geometry"));
 
         Ptr<MgByteReader> txAgf1 = reader->GetGeometry(L"Geometry");
         Ptr<MgGeometry> txGeom1 = agfRw->Read(txAgf1);
         MgPoint* txPt1 = dynamic_cast<MgPoint*>(txGeom1.p);
-        CPPUNIT_ASSERT(txPt1 != NULL);
+        REQUIRE(txPt1 != NULL);
         Ptr<MgCoordinate> txCoord1 = txPt1->GetCoordinate();
 
         //TODO: Maybe we should really check that it matches the expected transformed result
-        CPPUNIT_ASSERT(txCoord1->GetX() != -37.1020);
-        CPPUNIT_ASSERT(txCoord1->GetY() != 144.0020);
+        REQUIRE(txCoord1->GetX() != -37.1020);
+        REQUIRE(txCoord1->GetY() != 144.0020);
 
-        CPPUNIT_ASSERT(reader->ReadNext());
-        CPPUNIT_ASSERT(!reader->IsNull(L"Geometry"));
+        REQUIRE(reader->ReadNext());
+        REQUIRE(!reader->IsNull(L"Geometry"));
 
         Ptr<MgByteReader> txAgf2 = reader->GetGeometry(L"Geometry");
         Ptr<MgGeometry> txGeom2 = agfRw->Read(txAgf2);
         MgPoint* txPt2 = dynamic_cast<MgPoint*>(txGeom2.p);
-        CPPUNIT_ASSERT(txPt2 != NULL);
+        REQUIRE(txPt2 != NULL);
         Ptr<MgCoordinate> txCoord2 = txPt2->GetCoordinate();
 
         //TODO: Maybe we should really check that it matches the expected transformed result
-        CPPUNIT_ASSERT(txCoord2->GetX() != -37.2020);
-        CPPUNIT_ASSERT(txCoord2->GetY() != 144.2020);
+        REQUIRE(txCoord2->GetX() != -37.2020);
+        REQUIRE(txCoord2->GetY() != 144.2020);
 
         reader->Close();
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -1381,7 +1151,7 @@
 /// with ordering (not supported in capabilities, but allowed through extended
 /// select but only on a single property)
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_SelectFeaturesSdfWithOrdering()
+TEST_CASE("SelectFeaturesSdfWithOrdering", "[FeatureService]")
 {
     try
     {
@@ -1392,7 +1162,7 @@
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_SelectFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -1407,7 +1177,7 @@
         options->SetOrderingFilter(orderProps, MgOrderingOption::Descending);
 
         //Invalid conditions for ordered select
-        CPPUNIT_ASSERT_THROW_MG(pService->SelectFeatures(resource, className, options), MgFeatureServiceException*);
+        REQUIRE_THROWS_MG(pService->SelectFeatures(resource, className, options), MgFeatureServiceException*);
         
         orderProps->Clear();
         orderProps->Add(L"ID");
@@ -1421,7 +1191,7 @@
             str += reader->GetString(L"ID");
         }
         reader->Close();
-        CPPUNIT_ASSERT(str == L"12334456678");
+        REQUIRE(str == L"12334456678");
 
         orderProps->Clear();
         orderProps->Add(L"ID");
@@ -1435,18 +1205,18 @@
             str += reader->GetString(L"ID");
         }
         reader->Close();
-        CPPUNIT_ASSERT(str == L"87665443321");
+        REQUIRE(str == L"87665443321");
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch (...)
     {
@@ -1459,18 +1229,18 @@
 ///
 /// This test case exercises selecting aggregate features.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_SelectAggregate()
+TEST_CASE("SelectAggregates", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_SelectAggregate", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_SelectAggregate", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -1478,7 +1248,7 @@
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
         STRING className = L"";
         Ptr<MgFeatureAggregateOptions> options = new MgFeatureAggregateOptions();
-        CPPUNIT_ASSERT_THROW_MG(pService->SelectAggregate(resource, className, options), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->SelectAggregate(resource, className, options), MgInvalidArgumentException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
         className = L"Parcels";
@@ -1486,18 +1256,18 @@
         Ptr<MgDataReader> reader = pService->SelectAggregate(resource, className, options);
         bool bResult = reader->ReadNext();
         reader->Close();
-        CPPUNIT_ASSERT(bResult);
+        REQUIRE(bResult);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -1512,18 +1282,18 @@
 /// This test case exercises executing SQL queries containing SELECT
 /// statements.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_ExecuteSqlQuery()
+TEST_CASE("ExecuteSqlQuery", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_ExecuteSqlQuery", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_ExecuteSqlQuery", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -1530,20 +1300,20 @@
 
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
         const STRING sqlQuery = L"";
-        CPPUNIT_ASSERT_THROW_MG(pService->ExecuteSqlQuery(resource, sqlQuery), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->ExecuteSqlQuery(resource, sqlQuery), MgInvalidArgumentException*);
 
         //TODO test with correct input
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -1558,18 +1328,18 @@
 /// This test case exercises executing SQL queries not containing
 /// SELECT statements.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_ExecuteSqlNonQuery()
+TEST_CASE("ExecuteSqlNonQuery", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_ExecuteSqlNonQuery", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_ExecuteSqlNonQuery", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -1576,20 +1346,20 @@
 
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
         const STRING sqlNonQuery = L"";
-        CPPUNIT_ASSERT_THROW_MG(pService->ExecuteSqlNonQuery(resource, sqlNonQuery), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->ExecuteSqlNonQuery(resource, sqlNonQuery), MgInvalidArgumentException*);
 
         //TODO test with correct input
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -1603,18 +1373,18 @@
 ///
 /// This test case exercises getting spatial contexts.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_GetSpatialContexts()
+TEST_CASE("GetSpatialContexts", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_GetSpatialContexts", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetSpatialContexts", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -1625,10 +1395,10 @@
 
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
         bool activeOnly = false;
-        CPPUNIT_ASSERT_THROW_MG(pService->GetSpatialContexts(resource, activeOnly), MgInvalidRepositoryTypeException*);
+        REQUIRE_THROWS_MG(pService->GetSpatialContexts(resource, activeOnly), MgInvalidRepositoryTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Geography/World.MapDefinition");
-        CPPUNIT_ASSERT_THROW_MG(pService->GetSpatialContexts(resource, activeOnly), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(pService->GetSpatialContexts(resource, activeOnly), MgInvalidResourceTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
 
@@ -1637,7 +1407,7 @@
 
         // Advance to the 1st spatial context
         bool bResult = reader->ReadNext();
-        CPPUNIT_ASSERT(bResult);
+        REQUIRE(bResult);
 
         // Get the CS name and CS WKT
         STRING csName = reader->GetName();
@@ -1644,8 +1414,8 @@
         STRING csWkt = reader->GetCoordinateSystemWkt();
         ACE_DEBUG((LM_DEBUG, ACE_TEXT("TestFeatureService::TestCase_GetSpatialContexts()\nName: %W\nWKT: %W\n"), csName.c_str(), csWkt.c_str()));
 
-        CPPUNIT_ASSERT(wcscmp(csName.c_str(), L"WGS84 Lat/Long's, Degre") == 0);
-        CPPUNIT_ASSERT(wcscmp(csWkt.c_str(), L"GEOGCS[\"WGS84 Lat/Long's, Degrees, -180 ==> +180\",DATUM[\"D_WGS_1984\",SPHEROID[\"World_Geodetic_System_of_1984\",6378137,298.257222932867]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]]") == 0);
+        REQUIRE(wcscmp(csName.c_str(), L"WGS84 Lat/Long's, Degre") == 0);
+        REQUIRE(wcscmp(csWkt.c_str(), L"GEOGCS[\"WGS84 Lat/Long's, Degrees, -180 ==> +180\",DATUM[\"D_WGS_1984\",SPHEROID[\"World_Geodetic_System_of_1984\",6378137,298.257222932867]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]]") == 0);
 
         // Close the reader
         reader->Close();
@@ -1658,13 +1428,13 @@
 
         // Advance to the 1st spatial context
         bResult = reader->ReadNext();
-        CPPUNIT_ASSERT(bResult);
+        REQUIRE(bResult);
 
         // Get the CS name and CS WKT
         csName = reader->GetName();
         csWkt = reader->GetCoordinateSystemWkt();
-        CPPUNIT_ASSERT(wcscmp(csName.c_str(), L"WGS84 Lat/Long's, Degre") == 0);
-        CPPUNIT_ASSERT(wcscmp(csWkt.c_str(), L"GEOGCS[\"WGS84 Lat/Long's, Degrees, -180 ==> +180\",DATUM[\"D_WGS_1984\",SPHEROID[\"World_Geodetic_System_of_1984\",6378137,298.257222932867]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]]") == 0);
+        REQUIRE(wcscmp(csName.c_str(), L"WGS84 Lat/Long's, Degre") == 0);
+        REQUIRE(wcscmp(csWkt.c_str(), L"GEOGCS[\"WGS84 Lat/Long's, Degrees, -180 ==> +180\",DATUM[\"D_WGS_1984\",SPHEROID[\"World_Geodetic_System_of_1984\",6378137,298.257222932867]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]]") == 0);
 
         // Close the reader
         reader->Close();
@@ -1671,14 +1441,14 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -1692,18 +1462,18 @@
 ///
 /// This test case exercises getting long transactions.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_GetLongTransactions()
+TEST_CASE("GetLongTransaction", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_GetLongTransactions", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetLongTransactions", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -1714,23 +1484,23 @@
 
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
         bool activeOnly = false;
-        CPPUNIT_ASSERT_THROW_MG(pService->GetLongTransactions(resource, activeOnly), MgInvalidRepositoryTypeException*);
+        REQUIRE_THROWS_MG(pService->GetLongTransactions(resource, activeOnly), MgInvalidRepositoryTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Geography/World.MapDefinition");
-        CPPUNIT_ASSERT_THROW_MG(pService->GetLongTransactions(resource, activeOnly), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(pService->GetLongTransactions(resource, activeOnly), MgInvalidResourceTypeException*);
 
         //TODO test with correct input
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -1744,18 +1514,18 @@
 ///
 /// This test case exercises setting long transaction names.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_SetLongTransaction()
+TEST_CASE("SetLongTransaction", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_SetLongTransaction", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_SetLongTransaction", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -1763,46 +1533,46 @@
         STRING longTransactionName = L"Live";
 
         // verify exception when passing in a NULL resource
-        CPPUNIT_ASSERT_THROW_MG(pService->SetLongTransaction(NULL, longTransactionName), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->SetLongTransaction(NULL, longTransactionName), MgNullArgumentException*);
 
         // verify exception when passing in an invalid resource type
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
-        CPPUNIT_ASSERT_THROW_MG(pService->SetLongTransaction(resource, longTransactionName), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(pService->SetLongTransaction(resource, longTransactionName), MgInvalidResourceTypeException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Geography/World.MapDefinition");
-        CPPUNIT_ASSERT_THROW_MG(pService->SetLongTransaction(resource, longTransactionName), MgInvalidResourceTypeException*);
+        REQUIRE_THROWS_MG(pService->SetLongTransaction(resource, longTransactionName), MgInvalidResourceTypeException*);
 
         // verify exception when session is not set
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
-        CPPUNIT_ASSERT_THROW_MG(pService->SetLongTransaction(resource, longTransactionName), MgSessionNotFoundException*);
+        REQUIRE_THROWS_MG(pService->SetLongTransaction(resource, longTransactionName), MgSessionNotFoundException*);
 
         // set the user information for the current thread to be administrator - this
         // alone doesn't create a session
         Ptr<MgUserInformation> userInfo = new MgUserInformation(MgUser::Administrator, L"");
         MgUserInformation::SetCurrentUserInfo(userInfo);
-        CPPUNIT_ASSERT_THROW_MG(pService->SetLongTransaction(resource, longTransactionName), MgSessionNotFoundException*);
+        REQUIRE_THROWS_MG(pService->SetLongTransaction(resource, longTransactionName), MgSessionNotFoundException*);
 
         // now set a session
         userInfo->SetMgSessionId(userInfo->CreateMgSessionId());
         MgUserInformation::SetCurrentUserInfo(userInfo);
-        CPPUNIT_ASSERT(pService->SetLongTransaction(resource, longTransactionName));
+        REQUIRE(pService->SetLongTransaction(resource, longTransactionName));
 
         // setting the same LT name twice shouldn't matter
-        CPPUNIT_ASSERT(pService->SetLongTransaction(resource, longTransactionName));
+        REQUIRE(pService->SetLongTransaction(resource, longTransactionName));
 
         // should be able to clear the LT name
-        CPPUNIT_ASSERT(pService->SetLongTransaction(resource, L""));
+        REQUIRE(pService->SetLongTransaction(resource, L""));
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -1816,37 +1586,37 @@
 ///
 /// This test case exercises getting features.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_GetFeatures()
+TEST_CASE("GetFeatures", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_GetFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         STRING readerId = L"0";
-        CPPUNIT_ASSERT_THROW_MG(pService->GetFeatures(readerId), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetFeatures(readerId), MgInvalidArgumentException*);
 
         //TODO test with correct input
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -1860,18 +1630,18 @@
 ///
 /// This test case exercises closing a feature reader.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_CloseFeatureReader()
+TEST_CASE("CloseFeatureReader", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_CloseFeatureReader", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_CloseFeatureReader", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -1878,20 +1648,20 @@
 
         STRING readerId = L"0";
         bool closed = pService->CloseFeatureReader(readerId);
-        CPPUNIT_ASSERT(!closed);
+        REQUIRE(!closed);
 
         // TODO test with correct input
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -1905,37 +1675,37 @@
 ///
 /// This test case exercises getting SQL rows.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_GetSqlRows()
+TEST_CASE("GetSqlRows", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_GetSqlRows", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetSqlRows", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         STRING sqlReader = L"0";
-        CPPUNIT_ASSERT_THROW_MG(pService->GetSqlRows(sqlReader), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetSqlRows(sqlReader), MgInvalidArgumentException*);
 
         //TODO test with correct input
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -1949,18 +1719,18 @@
 ///
 /// This test case exercises closing a SQL reader.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_CloseSqlReader()
+TEST_CASE("CloseSqlReader", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_CloseSqlReader", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_CloseSqlReader", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -1967,20 +1737,20 @@
 
         STRING sqlReader = L"0";
         bool closed = pService->CloseSqlReader(sqlReader);
-        CPPUNIT_ASSERT(!closed);
+        REQUIRE(!closed);
 
         // TODO test with correct input
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -1994,18 +1764,18 @@
 ///
 /// This test case exercises getting a raster.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_GetRaster()
+TEST_CASE("GetRaster", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_GetRaster", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetRaster", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -2013,20 +1783,20 @@
         STRING featureReader = L"0";
         INT32 xSize = 0;
         INT32 ySize = 0;
-        CPPUNIT_ASSERT_THROW_MG(pService->GetRaster(featureReader, xSize, ySize, L""), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetRaster(featureReader, xSize, ySize, L""), MgInvalidArgumentException*);
 
         //TODO test with correct input
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -2040,37 +1810,37 @@
 ///
 /// This test case exercises getting data rows.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_GetDataRows()
+TEST_CASE("GetDataRows", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_GetDataRows", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_GetDataRows", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         STRING dataReader = L"0";
-        CPPUNIT_ASSERT_THROW_MG(pService->GetDataRows(dataReader), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetDataRows(dataReader), MgInvalidArgumentException*);
 
         //TODO test with correct input
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -2084,18 +1854,18 @@
 ///
 /// This test case exercises closing a data reader.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_CloseDataReader()
+TEST_CASE("CloseDataReader", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_CloseDataReader", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_CloseDataReader", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -2102,20 +1872,20 @@
 
         STRING dataReader = L"0";
         bool closed = pService->CloseDataReader(dataReader);
-        CPPUNIT_ASSERT(!closed);
+        REQUIRE(!closed);
 
         // TODO test with correct input
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -2129,12 +1899,12 @@
 ///
 /// This test case exercises joining features.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_JoinFeatures()
+TEST_CASE("JoinFeatures", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_JoinFeatures",
                 __LINE__, __WFILE__, NULL, L"", NULL);
@@ -2141,7 +1911,7 @@
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_JoinFeatures",
                 __LINE__, __WFILE__, NULL, L"", NULL);
@@ -2162,22 +1932,22 @@
         // Close the reader
         reader->Close();
 
-        CPPUNIT_ASSERT(bReadNextResult);
-        CPPUNIT_ASSERT(bIsNullResult == false);
-        CPPUNIT_ASSERT(s1 == L"NIEMUTH, ROGER L.");
-        CPPUNIT_ASSERT(s2 == L"Wells Fargo");
-        CPPUNIT_ASSERT(s3 == L"10573");
+        REQUIRE(bReadNextResult);
+        REQUIRE(bIsNullResult == false);
+        REQUIRE(s1 == L"NIEMUTH, ROGER L.");
+        REQUIRE(s2 == L"Wells Fargo");
+        REQUIRE(s3 == L"10573");
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -2191,7 +1961,7 @@
 ///
 /// This test case exercises joining features defined as chained, inner, 1-to-many.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_JoinFeaturesChainedInner1ToMany()
+TEST_CASE("JoinFeaturesChainedInner1ToMany", "[FeatureService]")
 {
     try
     {
@@ -2205,7 +1975,7 @@
         #endif
 
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_JoinFeaturesChainedInner1ToMany",
                 __LINE__, __WFILE__, NULL, L"", NULL);
@@ -2212,7 +1982,7 @@
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_JoinFeaturesChainedInner1ToMany",
                 __LINE__, __WFILE__, NULL, L"", NULL);
@@ -2242,25 +2012,25 @@
         ACE_DEBUG((LM_INFO, ACE_TEXT("TestFeatureService::TestCase_JoinFeaturesChainedInner1ToMany() - End\n")));
         #endif
 
-        CPPUNIT_ASSERT(bReadNextResult);
-        CPPUNIT_ASSERT(bIsNullResult == false);
-        CPPUNIT_ASSERT(bIsNullResult2 == false);
-        CPPUNIT_ASSERT(s1 == L"CITY OF SHEBOYGAN");
-        CPPUNIT_ASSERT(s2 == L"Johnson Bank");
-        CPPUNIT_ASSERT(s3 == L"30320");
-        CPPUNIT_ASSERT(s4 == L"Voting District Seven");
-        CPPUNIT_ASSERT(s5 == L"7");
+        REQUIRE(bReadNextResult);
+        REQUIRE(bIsNullResult == false);
+        REQUIRE(bIsNullResult2 == false);
+        REQUIRE(s1 == L"CITY OF SHEBOYGAN");
+        REQUIRE(s2 == L"Johnson Bank");
+        REQUIRE(s3 == L"30320");
+        REQUIRE(s4 == L"Voting District Seven");
+        REQUIRE(s5 == L"7");
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -2275,12 +2045,12 @@
 ///
 /// This test case exercises creating a feature source.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_CreateFeatureSource()
+TEST_CASE("CreateFeatureSource", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_CreateFeatureSource",
                 __LINE__, __WFILE__, NULL, L"", NULL);
@@ -2287,7 +2057,7 @@
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_CreateFeatureSource",
                 __LINE__, __WFILE__, NULL, L"", NULL);
@@ -2294,7 +2064,7 @@
         }
 
         Ptr<MgResourceService> pResourceService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_CreateFeatureSource",
                 __LINE__, __WFILE__, NULL, L"", NULL);
@@ -2363,14 +2133,14 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -2381,92 +2151,9 @@
 ///----------------------------------------------------------------------------
 /// Test Case Description:
 ///
-/// This test case benchmarks selecting features.
-///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_BenchmarkSelectFeatures()
-{
-    try
-    {
-        ACE_DEBUG((LM_INFO, ACE_TEXT("\nTestFeatureService::TestCase_BenchmarkSelectFeatures() - Start\n")));
-
-        #ifdef _DEBUG
-        MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
-        if(pFdoConnectionManager)
-        {
-            pFdoConnectionManager->ShowCache();
-        }
-        #endif
-
-        MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
-        {
-            throw new MgNullReferenceException(L"TestFeatureService.TestCase_BenchmarkSelectFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
-        }
-
-        Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
-        {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_BenchmarkSelectFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
-        }
-
-        Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
-        STRING className = L"Parcels";
-        resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
-        Ptr<MgFeatureQueryOptions> options = new MgFeatureQueryOptions();
-
-#ifdef _DEBUG
-        const int iterations = 1;
-#else
-        const int iterations = 1000;
-#endif
-        long lStart = GetTickCount();
-        for(int i=0;i<iterations;i++)
-        {
-            int nFeatures = 0;
-            Ptr<MgFeatureReader> reader = pService->SelectFeatures(resource, className, options);
-            while(reader->ReadNext())
-            {
-                nFeatures++;
-            }
-
-            // Close the reader
-            reader->Close();
-            CPPUNIT_ASSERT(nFeatures == 17565);
-        }
-
-        #ifdef _DEBUG
-        if(pFdoConnectionManager)
-        {
-            pFdoConnectionManager->ShowCache();
-        }
-        #endif
-
-        ACE_DEBUG((LM_INFO, ACE_TEXT("  Execution Time (Average of %d runs): = %6.4f (s)\n"), iterations, ((GetTickCount()-lStart)/1000.0)/(double)iterations ));
-        ACE_DEBUG((LM_INFO, ACE_TEXT("TestCase_BenchmarkSelectFeatures - END\n")));
-    }
-    catch(MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch(FdoException* e)
-    {
-        FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
-    }
-    catch(...)
-    {
-        throw;
-    }
-}
-
-///----------------------------------------------------------------------------
-/// Test Case Description:
-///
 /// This test case tests concurrent access to a provider.
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_ConcurrentAccess()
+TEST_CASE("ConcurrentAccess", "[FeatureService]")
 {
     vector<MgFeatureReader*> featureReaders;
 
@@ -2482,13 +2169,13 @@
         #endif
 
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_ConcurrentAccess", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_ConcurrentAccess", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -2518,7 +2205,7 @@
 
         // Create another reader - this one should timeout and throw exception
         Ptr<MgFeatureReader> readerFail;
-        CPPUNIT_ASSERT_THROW_MG(readerFail = pService->SelectFeatures(resource, className, options), MgAllProviderConnectionsUsedException*);
+        REQUIRE_THROWS_MG(readerFail = pService->SelectFeatures(resource, className, options), MgAllProviderConnectionsUsedException*);
 
         if (!featureReaders.empty())
         {
@@ -2534,7 +2221,7 @@
                 // Create another reader - this one should succeed
                 Ptr<MgFeatureReader> readerSuccess = pService->SelectFeatures(resource, className, options);
                 bool bResult = readerSuccess->ReadNext();
-                CPPUNIT_ASSERT(bResult);
+                REQUIRE(bResult);
                 featureReaders.push_back(readerSuccess.Detach());
             }
         }
@@ -2549,14 +2236,14 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -2580,18 +2267,18 @@
     featureReaders.clear();
 }
 
-void TestFeatureService::TestCase_SavePoint()
+TEST_CASE("SavePoint", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_SavePoint", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_SavePoint", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -2631,7 +2318,7 @@
             STRING sp = pTransaction->AddSavePoint(L"test");
             STRING sp1 = pTransaction->AddSavePoint(L"test");
 
-            CPPUNIT_ASSERT(sp != sp1);
+            REQUIRE(sp != sp1);
 
             commands->Clear();
             Ptr<MgPropertyCollection> properties3 = new MgPropertyCollection();
@@ -2658,19 +2345,19 @@
             {
                 count++;
             }
-            CPPUNIT_ASSERT(count == 2);
+            REQUIRE(count == 2);
         }
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -2683,18 +2370,18 @@
 ///
 /// This test case exercises the UpdateFeatures API for insertion
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_UpdateFeaturesInsert()
+TEST_CASE("UpdateFeaturesInsert", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_SavePoint", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_SavePoint", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -2761,10 +2448,10 @@
 
         //Execute insert. Should be fine
         Ptr<MgPropertyCollection> result = pService->UpdateFeatures(featureSource, commands, true);
-        CPPUNIT_ASSERT(result->GetCount() == 1);
+        REQUIRE(result->GetCount() == 1);
         INT32 i = 0;
         Ptr<MgProperty> resItem1 = result->GetItem(i);
-        CPPUNIT_ASSERT(resItem1->GetPropertyType() == MgPropertyType::Feature);
+        REQUIRE(resItem1->GetPropertyType() == MgPropertyType::Feature);
         Ptr<MgFeatureReader> rdr = ((MgFeatureProperty*)resItem1.p)->GetValue();
         rdr->Close();
 
@@ -2772,7 +2459,7 @@
         nameVal->SetValue(L"Bar");
 
         //Execute again, expect MgFdoException due to constraint violation
-        CPPUNIT_ASSERT_THROW_MG(result = pService->UpdateFeatures(featureSource, commands, true), MgFdoException*);
+        REQUIRE_THROWS_MG(result = pService->UpdateFeatures(featureSource, commands, true), MgFdoException*);
         
         //Expect one inserted result
         Ptr<MgFeatureQueryOptions> query = new MgFeatureQueryOptions();
@@ -2780,14 +2467,14 @@
         INT32 count = 0;
         while (qryReader->ReadNext()) { count++; }
         qryReader->Close();
-        CPPUNIT_ASSERT(1 == count);
+        REQUIRE(1 == count);
 
         //Execute again, useTransaction = false. Should not throw exception, but log
         //the error as a MgStringProperty
         result = pService->UpdateFeatures(featureSource, commands, false);
-        CPPUNIT_ASSERT(result->GetCount() == 1);
+        REQUIRE(result->GetCount() == 1);
         resItem1 = result->GetItem(i);
-        CPPUNIT_ASSERT(resItem1->GetPropertyType() == MgPropertyType::String); //Errors are of type String
+        REQUIRE(resItem1->GetPropertyType() == MgPropertyType::String); //Errors are of type String
 
         //Use new id
         idVal->SetValue(2);
@@ -2794,22 +2481,22 @@
 
         //Should be fine now
         result = pService->UpdateFeatures(featureSource, commands, true);
-        CPPUNIT_ASSERT(result->GetCount() == 1);
+        REQUIRE(result->GetCount() == 1);
         resItem1 = result->GetItem(i);
-        CPPUNIT_ASSERT(resItem1->GetPropertyType() == MgPropertyType::Feature);
+        REQUIRE(resItem1->GetPropertyType() == MgPropertyType::Feature);
         rdr = ((MgFeatureProperty*)resItem1.p)->GetValue();
         rdr->Close();
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -2822,19 +2509,19 @@
 ///
 /// This test case exercises the FDO join optimization
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_JoinFdoFeatures()
+TEST_CASE("JoinFdoFeatures", "[FeatureService]")
 {
     try
     {
         
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_JoinFdoFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_JoinFdoFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -2846,17 +2533,17 @@
         INT32 count1 = 0;
         while(reader->ReadNext())
         {
-            CPPUNIT_ASSERT(reader->IsNull(L"ID") == false);
-            CPPUNIT_ASSERT(reader->IsNull(L"CountryCode") == false);
-            CPPUNIT_ASSERT(reader->IsNull(L"StateCode") == false);
-            CPPUNIT_ASSERT(reader->IsNull(L"Name") == false);
-            CPPUNIT_ASSERT(reader->IsNull(L"Population") == false);
-            CPPUNIT_ASSERT(reader->IsNull(L"CNT_CountryCode") == false);
-            CPPUNIT_ASSERT(reader->IsNull(L"CNT_Name") == false);
+            REQUIRE(reader->IsNull(L"ID") == false);
+            REQUIRE(reader->IsNull(L"CountryCode") == false);
+            REQUIRE(reader->IsNull(L"StateCode") == false);
+            REQUIRE(reader->IsNull(L"Name") == false);
+            REQUIRE(reader->IsNull(L"Population") == false);
+            REQUIRE(reader->IsNull(L"CNT_CountryCode") == false);
+            REQUIRE(reader->IsNull(L"CNT_Name") == false);
             count1++;
         }
         reader->Close();
-        CPPUNIT_ASSERT(10 == count1);
+        REQUIRE(10 == count1);
 
         Ptr<MgFeatureReader> reader2 = pService->SelectFeatures(lFeatureSource, L"CitiesStates", NULL);
 
@@ -2863,19 +2550,19 @@
         INT32 count2 = 0;
         while(reader2->ReadNext())
         {
-            CPPUNIT_ASSERT(reader2->IsNull(L"ID") == false);
-            CPPUNIT_ASSERT(reader2->IsNull(L"CountryCode") == false);
-            CPPUNIT_ASSERT(reader2->IsNull(L"StateCode") == false);
-            CPPUNIT_ASSERT(reader2->IsNull(L"Name") == false);
-            CPPUNIT_ASSERT(reader2->IsNull(L"Population") == false);
-            CPPUNIT_ASSERT(reader2->IsNull(L"ST_ID") == false);
-            CPPUNIT_ASSERT(reader2->IsNull(L"ST_CountryCode") == false);
-            CPPUNIT_ASSERT(reader2->IsNull(L"ST_StateCode") == false);
-            CPPUNIT_ASSERT(reader2->IsNull(L"ST_Name") == false);
+            REQUIRE(reader2->IsNull(L"ID") == false);
+            REQUIRE(reader2->IsNull(L"CountryCode") == false);
+            REQUIRE(reader2->IsNull(L"StateCode") == false);
+            REQUIRE(reader2->IsNull(L"Name") == false);
+            REQUIRE(reader2->IsNull(L"Population") == false);
+            REQUIRE(reader2->IsNull(L"ST_ID") == false);
+            REQUIRE(reader2->IsNull(L"ST_CountryCode") == false);
+            REQUIRE(reader2->IsNull(L"ST_StateCode") == false);
+            REQUIRE(reader2->IsNull(L"ST_Name") == false);
             count2++;
         }
         reader2->Close();
-        CPPUNIT_ASSERT(10 == count2);
+        REQUIRE(10 == count2);
 
         Ptr<MgFeatureReader> reader3 = pService->SelectFeatures(lFeatureSource, L"CitiesStatesOneToOne", NULL);
         INT32 count3 = 0;
@@ -2884,13 +2571,13 @@
             count3++;
         }
         reader3->Close();
-        CPPUNIT_ASSERT(10 == count3);
+        REQUIRE(10 == count3);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -2897,7 +2584,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -2905,24 +2592,24 @@
     }
 }
 
-void TestFeatureService::TestCase_BenchmarkSqliteJoin()
+TEST_CASE("BenchmarkSqliteJoin", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_BenchmarkSqliteJoin", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_BenchmarkSqliteJoin", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> featSvc = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (featSvc == 0)
+        if (featSvc == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_BenchmarkSqliteJoin",
                 __LINE__, __WFILE__, NULL, L"", NULL);
@@ -2929,7 +2616,7 @@
         }
 
         Ptr<MgResourceIdentifier> fsId = new MgResourceIdentifier(L"Library://UnitTests/Data/ParcelsJoinTestSQLite.FeatureSource");
-        CPPUNIT_ASSERT(featSvc->TestConnection(fsId));
+        REQUIRE(featSvc->TestConnection(fsId));
         Ptr<MgFeatureReader> reader;
 
         // ----- Start the tests ------- //
@@ -2984,9 +2671,9 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -2993,7 +2680,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3001,24 +2688,28 @@
     }
 }
 
-void TestFeatureService::TestCase_BenchmarkSqliteAggregateJoin()
+#ifdef _DEBUG
+TEST_CASE("BenchmarkSqliteAggregateJoin", "[Broken]")
+#else
+TEST_CASE("BenchmarkSqliteAggregateJoin", "[FeatureService]")
+#endif
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_BenchmarkSqliteAggregateJoin", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_BenchmarkSqliteAggregateJoin", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> featSvc = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (featSvc == 0)
+        if (featSvc == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_BenchmarkSqliteAggregateJoin",
                 __LINE__, __WFILE__, NULL, L"", NULL);
@@ -3025,7 +2716,7 @@
         }
 
         Ptr<MgResourceIdentifier> fsId = new MgResourceIdentifier(L"Library://UnitTests/Data/ParcelsJoinTestSQLite.FeatureSource");
-        CPPUNIT_ASSERT(featSvc->TestConnection(fsId));
+        REQUIRE(featSvc->TestConnection(fsId));
         Ptr<MgDataReader> reader;
 
         // ----- Start the tests ------- //
@@ -3035,7 +2726,7 @@
 
         ACE_DEBUG((LM_INFO, ACE_TEXT("\nTestFeatureService::TestCase_BenchmarkSqliteAggregateJoin() - Inner Join \n")));
         long lStart = GetTickCount();
-        long total = 0L;
+        INT64 total = 0L;
         int iterations = 0;
 
         reader = featSvc->SelectAggregate(fsId, L"ParcelsInner", aggOpts);
@@ -3046,7 +2737,7 @@
             iterations++;
         }
         reader->Close();
-        CPPUNIT_ASSERT(iterations == 1);
+        REQUIRE(iterations == 1);
 
         ACE_DEBUG((LM_INFO, ACE_TEXT("  Execution Time (%d results): = %6.4f (s)\n"), total, ((GetTickCount()-lStart)/1000.0) ));
         ACE_DEBUG((LM_INFO, ACE_TEXT("\nTestFeatureService::TestCase_BenchmarkSqliteAggregateJoin() - Left Outer Join \n")));
@@ -3061,7 +2752,7 @@
             iterations++;
         }
         reader->Close();
-        CPPUNIT_ASSERT(iterations == 1L);
+        REQUIRE(iterations == 1L);
 
         ACE_DEBUG((LM_INFO, ACE_TEXT("  Execution Time (%d results): = %6.4f (s)\n"), total, ((GetTickCount()-lStart)/1000.0) ));
         ACE_DEBUG((LM_INFO, ACE_TEXT("\nTestFeatureService::TestCase_BenchmarkSqliteAggregateJoin() - Inner Join (Forced 1:1) \n")));
@@ -3076,7 +2767,7 @@
             iterations++;
         }
         reader->Close();
-        CPPUNIT_ASSERT(iterations == 1L);
+        REQUIRE(iterations == 1L);
 
         ACE_DEBUG((LM_INFO, ACE_TEXT("  Execution Time (%d results): = %6.4f (s)\n"), total, ((GetTickCount()-lStart)/1000.0) ));
         ACE_DEBUG((LM_INFO, ACE_TEXT("\nTestFeatureService::TestCase_BenchmarkSqliteAggregateJoin() - Left Outer Join (Forced 1:1) \n")));
@@ -3091,15 +2782,15 @@
             iterations++;
         }
         reader->Close();
-        CPPUNIT_ASSERT(iterations == 1L);
+        REQUIRE(iterations == 1L);
 
         ACE_DEBUG((LM_INFO, ACE_TEXT("  Execution Time (%d results): = %6.4f (s)\n"), total, ((GetTickCount()-lStart)/1000.0) ));
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -3106,7 +2797,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3120,18 +2811,18 @@
 /// This test case tests the correct response for a non-transactional failure
 /// in UpdateFeatures
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_UpdateFeaturesPartialFailure()
+TEST_CASE("UpdateFeaturesPartialFailure", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_UpdateFeaturesPartialFailure", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> featSvc = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (featSvc == 0)
+        if (featSvc == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_UpdateFeaturesPartialFailure",
                 __LINE__, __WFILE__, NULL, L"", NULL);
@@ -3146,7 +2837,7 @@
         cmds->Add(insert);
 
         Ptr<MgPropertyCollection> result = featSvc->UpdateFeatures(fsId, cmds, false);
-        CPPUNIT_ASSERT(result->GetCount() > 0);
+        REQUIRE(result->GetCount() > 0);
 
         bool bPartialFailure = false;
         for (INT32 i = 0; i < result->GetCount(); i++)
@@ -3159,13 +2850,13 @@
             }
         }
 
-        CPPUNIT_ASSERT(bPartialFailure);
+        REQUIRE(bPartialFailure);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -3172,7 +2863,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3180,18 +2871,18 @@
     }
 }
 
-void TestFeatureService::TestCase_InsertFeatures()
+TEST_CASE("InsertFeatures", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_InsertFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> featSvc = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (featSvc == 0)
+        if (featSvc == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_InsertFeatures",
                 __LINE__, __WFILE__, NULL, L"", NULL);
@@ -3221,7 +2912,7 @@
             count++;
         }
         fr->Close();
-        CPPUNIT_ASSERT(1 == count);
+        REQUIRE(1 == count);
 
         Ptr<MgFeatureQueryOptions> query = new MgFeatureQueryOptions();
         fr = featSvc->SelectFeatures(fsId, className, query);
@@ -3228,20 +2919,20 @@
         count = 0;
         while(fr->ReadNext())
         {
-            CPPUNIT_ASSERT(fr->GetString(L"Name") == L"Test");
+            REQUIRE(fr->GetString(L"Name") == L"Test");
             agf = fr->GetGeometry(L"Geometry");
             geom = agfRw.Read(agf);
-            CPPUNIT_ASSERT(wktRw.Write(geom) == L"POINT (1 1)");
+            REQUIRE(wktRw.Write(geom) == L"POINT (1 1)");
             count++;
         }
         fr->Close();
-        CPPUNIT_ASSERT(1 == count);
+        REQUIRE(1 == count);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -3248,7 +2939,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3256,18 +2947,18 @@
     }
 }
 
-void TestFeatureService::TestCase_InsertFeaturesBatch()
+TEST_CASE("InsertFeaturesBatch", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_InsertFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> featSvc = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (featSvc == 0)
+        if (featSvc == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_InsertFeatures",
                 __LINE__, __WFILE__, NULL, L"", NULL);
@@ -3308,7 +2999,7 @@
             count++;
         }
         fr->Close();
-        CPPUNIT_ASSERT(5 == count);
+        REQUIRE(5 == count);
 
         Ptr<MgFeatureQueryOptions> query = new MgFeatureQueryOptions();
         fr = featSvc->SelectFeatures(fsId, className, query);
@@ -3318,13 +3009,13 @@
             count++;
         }
         fr->Close();
-        CPPUNIT_ASSERT(5 == count);
+        REQUIRE(5 == count);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -3331,7 +3022,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3339,18 +3030,18 @@
     }
 }
 
-void TestFeatureService::TestCase_UpdateMatchingFeatures()
+TEST_CASE("UpdateMatchingFeatures", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_UpdateMatchingFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> featSvc = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (featSvc == 0)
+        if (featSvc == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_UpdateMatchingFeatures",
                 __LINE__, __WFILE__, NULL, L"", NULL);
@@ -3386,7 +3077,7 @@
                 count++;
             }
             fr->Close();
-            CPPUNIT_ASSERT(1 == count);
+            REQUIRE(1 == count);
         }
 
         Ptr<MgFeatureQueryOptions> query = new MgFeatureQueryOptions();
@@ -3397,7 +3088,7 @@
             count++;
         }
         fr->Close();
-        CPPUNIT_ASSERT(5 == count);
+        REQUIRE(5 == count);
 
         Ptr<MgPropertyCollection> updateProps = new MgPropertyCollection();
         Ptr<MgStringProperty> newNameProp = new MgStringProperty(L"Name", L"Test3Updated");
@@ -3408,7 +3099,7 @@
         updateProps->Add(newGeomProp);
 
         INT32 updated = featSvc->UpdateMatchingFeatures(fsId, className, updateProps, L"Name = 'Test3'");
-        CPPUNIT_ASSERT(1 == updated);
+        REQUIRE(1 == updated);
 
         query->SetFilter(L"Name = 'Test3'");
         fr = featSvc->SelectFeatures(fsId, className, query);
@@ -3418,7 +3109,7 @@
             count++;
         }
         fr->Close();
-        CPPUNIT_ASSERT(0 == count);
+        REQUIRE(0 == count);
 
         query->SetFilter(L"Name = 'Test3Updated'");
         fr = featSvc->SelectFeatures(fsId, className, query);
@@ -3428,13 +3119,13 @@
             count++;
         }
         fr->Close();
-        CPPUNIT_ASSERT(1 == count);
+        REQUIRE(1 == count);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -3441,7 +3132,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3449,18 +3140,18 @@
     }
 }
 
-void TestFeatureService::TestCase_DeleteFeatures()
+TEST_CASE("DeleteFeatures", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_DeleteFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> featSvc = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (featSvc == 0)
+        if (featSvc == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_DeleteFeatures",
                 __LINE__, __WFILE__, NULL, L"", NULL);
@@ -3496,7 +3187,7 @@
                 count++;
             }
             fr->Close();
-            CPPUNIT_ASSERT(1 == count);
+            REQUIRE(1 == count);
         }
 
         Ptr<MgFeatureQueryOptions> query = new MgFeatureQueryOptions();
@@ -3507,10 +3198,10 @@
             count++;
         }
         fr->Close();
-        CPPUNIT_ASSERT(5 == count);
+        REQUIRE(5 == count);
 
         INT32 deleted = featSvc->DeleteFeatures(fsId, className, L"Name = 'Test3'");
-        CPPUNIT_ASSERT(1 == deleted);
+        REQUIRE(1 == deleted);
 
         query->SetFilter(L"Name = 'Test3'");
         fr = featSvc->SelectFeatures(fsId, className, query);
@@ -3520,7 +3211,7 @@
             count++;
         }
         fr->Close();
-        CPPUNIT_ASSERT(0 == count);
+        REQUIRE(0 == count);
 
         query = new MgFeatureQueryOptions();
         fr = featSvc->SelectFeatures(fsId, className, query);
@@ -3530,13 +3221,13 @@
             count++;
         }
         fr->Close();
-        CPPUNIT_ASSERT(4 == count);
+        REQUIRE(4 == count);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -3543,7 +3234,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3551,18 +3242,18 @@
     }
 }
 
-void TestFeatureService::TestCase_TransactedCrud()
+TEST_CASE("TransactedCrud", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_TransactedCrud", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> featSvc = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (featSvc == 0)
+        if (featSvc == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_TransactedCrud",
                 __LINE__, __WFILE__, NULL, L"", NULL);
@@ -3598,7 +3289,7 @@
                 count++;
             }
             fr->Close();
-            CPPUNIT_ASSERT(1 == count);
+            REQUIRE(1 == count);
         }
 
         Ptr<MgFeatureQueryOptions> query = new MgFeatureQueryOptions();
@@ -3609,7 +3300,7 @@
             count++;
         }
         fr->Close();
-        CPPUNIT_ASSERT(5 == count);
+        REQUIRE(5 == count);
 
         //Do a transacted update
         Ptr<MgTransaction> trans = featSvc->BeginTransaction(fsId);
@@ -3623,7 +3314,7 @@
         updateProps->Add(newGeomProp);
 
         INT32 updated = featSvc->UpdateMatchingFeatures(fsId, className, updateProps, L"Name = 'Test3'", trans);
-        CPPUNIT_ASSERT(1 == updated);
+        REQUIRE(1 == updated);
 
         //This hasn't been commited yet. So roll it back and verify our update never made it
         trans->Rollback();
@@ -3635,7 +3326,7 @@
             count++;
         }
         fr->Close();
-        CPPUNIT_ASSERT(0 == count);
+        REQUIRE(0 == count);
 
         //Do a transacted update. This time, commit it.
         trans = featSvc->BeginTransaction(fsId);
@@ -3649,7 +3340,7 @@
         updateProps->Add(newGeomProp);
 
         updated = featSvc->UpdateMatchingFeatures(fsId, className, updateProps, L"Name = 'Test3'", trans);
-        CPPUNIT_ASSERT(1 == updated);
+        REQUIRE(1 == updated);
         trans->Commit();
 
         //Verify the update came through
@@ -3661,13 +3352,13 @@
             count++;
         }
         fr->Close();
-        CPPUNIT_ASSERT(1 == count);
+        REQUIRE(1 == count);
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
@@ -3674,7 +3365,7 @@
         STRING message = L"FdoException occurred: ";
         message += e->GetExceptionMessage();
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -3682,57 +3373,6 @@
     }
 }
 
-STRING TestFeatureService::CreateTestDataStore(MgFeatureService* svcFeature, CREFSTRING provider, MgResourceIdentifier* fsId)
-{
-    Ptr<MgCoordinateSystemFactory> csFactory = new MgCoordinateSystemFactory();
-    STRING scName = L"Default";
-    STRING csWkt = csFactory->ConvertCoordinateSystemCodeToWkt(L"LL84");
-
-    Ptr<MgFeatureSchema> schema = new MgFeatureSchema(L"Default", L"Default Feature Schema");
-    Ptr<MgClassDefinition> klass = new MgClassDefinition();
-    klass->SetName(L"Test");
-
-    Ptr<MgPropertyDefinitionCollection> clsProps = klass->GetProperties();
-    Ptr<MgPropertyDefinitionCollection> clsIdProps = klass->GetIdentityProperties();
-
-    Ptr<MgDataPropertyDefinition> id = new MgDataPropertyDefinition(L"ID");
-    id->SetDataType(MgPropertyType::Int32);
-    id->SetAutoGeneration(true);
-    
-    Ptr<MgDataPropertyDefinition> name = new MgDataPropertyDefinition(L"Name");
-    name->SetDataType(MgPropertyType::String);
-    name->SetLength(255);
-    name->SetNullable(true);
-
-    Ptr<MgGeometricPropertyDefinition> geom = new MgGeometricPropertyDefinition(L"Geometry");
-    geom->SetGeometryTypes(MgFeatureGeometricType::Point);
-    geom->SetSpatialContextAssociation(scName);
-
-    clsProps->Add(id);
-    clsProps->Add(name);
-    clsProps->Add(geom);
-
-    clsIdProps->Add(id);
-
-    klass->SetDefaultGeometryPropertyName(L"Geometry");
-
-    Ptr<MgClassDefinitionCollection> classes = schema->GetClasses();
-    classes->Add(klass);
-
-    Ptr<MgFileFeatureSourceParams> fsParams = new MgFileFeatureSourceParams(provider, scName, csWkt, schema);
-    svcFeature->CreateFeatureSource(fsId, fsParams);
-
-    Ptr<MgFeatureSchemaCollection> schemas = svcFeature->DescribeSchema(fsId, L"");
-    Ptr<MgFeatureSchema> theSchema = schemas->GetItem(0);
-    Ptr<MgClassDefinitionCollection> theClasses = theSchema->GetClasses();
-    Ptr<MgClassDefinition> theClass = theClasses->GetItem(0);
-
-    STRING qClassName = theSchema->GetName();
-    qClassName += L":";
-    qClassName += theClass->GetName();
-    return qClassName;
-}
-
 ///----------------------------------------------------------------------------
 /// Test Case Description:
 ///
@@ -3739,18 +3379,18 @@
 /// This test case exercises getting indices of invalid property names from
 /// the feature reader
 ///----------------------------------------------------------------------------
-void TestFeatureService::TestCase_FeatureReader_GetPropertyIndex_BadProp()
+TEST_CASE("FeatureReader_GetPropertyIndex_BadProp", "[FeatureService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if (serviceManager == 0)
+        if (serviceManager == NULL)
         {
             throw new MgNullReferenceException(L"TestFeatureService.TestCase_FeatureReader_GetPropertyIndex_BadProp", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == NULL)
         {
             throw new MgServiceNotAvailableException(L"TestFeatureService.TestCase_FeatureReader_GetPropertyIndex_BadProp", __LINE__, __WFILE__, NULL, L"", NULL);
         }
@@ -3758,24 +3398,24 @@
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
         STRING className = L"";
         Ptr<MgFeatureQueryOptions> options = new MgFeatureQueryOptions();
-        CPPUNIT_ASSERT_THROW_MG(pService->SelectFeatures(resource, className, options), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->SelectFeatures(resource, className, options), MgInvalidArgumentException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
         className = L"Parcels";
         Ptr<MgFeatureReader> reader = pService->SelectFeatures(resource, className, options);
-        CPPUNIT_ASSERT(reader->GetPropertyIndex(L"IDontExist") < 0);
+        REQUIRE(reader->GetPropertyIndex(L"IDontExist") < 0);
         reader->Close();
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch (...)
     {

Deleted: trunk/MgDev/Server/src/UnitTesting/TestFeatureService.h
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestFeatureService.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestFeatureService.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,134 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _TESTFEATURESERVICE_H
-#define _TESTFEATURESERVICE_H
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestFeatureService : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestFeatureService);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_GetFeatureProviders);
-    CPPUNIT_TEST(TestCase_TestConnectionSDFProvider);
-    CPPUNIT_TEST(TestCase_TestFdoConnectionManager);
-    CPPUNIT_TEST(TestCase_GetConnectionPropertyValues);
-    CPPUNIT_TEST(TestCase_GetCapabilities);
-    CPPUNIT_TEST(TestCase_TestConnectionResourceIdentifier);
-    CPPUNIT_TEST(TestCase_GetSchemas);
-    CPPUNIT_TEST(TestCase_GetClasses);
-    CPPUNIT_TEST(TestCase_GetClassDefinition);
-    CPPUNIT_TEST(TestCase_GetIdentityProperties);
-    CPPUNIT_TEST(TestCase_DescribeSchema);
-    CPPUNIT_TEST(TestCase_ApplySchema);
-    CPPUNIT_TEST(TestCase_SelectFeatures);
-    CPPUNIT_TEST(TestCase_SelectFeaturesWithXform);
-    CPPUNIT_TEST(TestCase_SelectFeaturesSdfWithOrdering);
-    CPPUNIT_TEST(TestCase_SelectAggregate);
-    CPPUNIT_TEST(TestCase_UpdateFeaturesInsert);
-    CPPUNIT_TEST(TestCase_UpdateFeaturesPartialFailure);
-    CPPUNIT_TEST(TestCase_InsertFeatures);
-    CPPUNIT_TEST(TestCase_InsertFeaturesBatch);
-    CPPUNIT_TEST(TestCase_UpdateMatchingFeatures);
-    CPPUNIT_TEST(TestCase_DeleteFeatures);
-    CPPUNIT_TEST(TestCase_TransactedCrud);
-    CPPUNIT_TEST(TestCase_ExecuteSqlQuery);
-    CPPUNIT_TEST(TestCase_ExecuteSqlNonQuery);
-    CPPUNIT_TEST(TestCase_GetSpatialContexts);
-    CPPUNIT_TEST(TestCase_GetLongTransactions);
-    CPPUNIT_TEST(TestCase_SetLongTransaction);
-    CPPUNIT_TEST(TestCase_GetFeatures);
-    CPPUNIT_TEST(TestCase_CloseFeatureReader);
-    CPPUNIT_TEST(TestCase_GetSqlRows);
-    CPPUNIT_TEST(TestCase_CloseSqlReader);
-    CPPUNIT_TEST(TestCase_GetRaster);
-    CPPUNIT_TEST(TestCase_GetDataRows);
-    CPPUNIT_TEST(TestCase_CloseDataReader);
-    CPPUNIT_TEST(TestCase_JoinFeatures);
-    CPPUNIT_TEST(TestCase_JoinFeaturesChainedInner1ToMany);
-    CPPUNIT_TEST(TestCase_CreateFeatureSource);
-    CPPUNIT_TEST(TestCase_BenchmarkSelectFeatures);
-    CPPUNIT_TEST(TestCase_ConcurrentAccess);
-    CPPUNIT_TEST(TestCase_SavePoint);
-    CPPUNIT_TEST(TestCase_JoinFdoFeatures);
-    CPPUNIT_TEST(TestCase_BenchmarkSqliteJoin);
-    CPPUNIT_TEST(TestCase_BenchmarkSqliteAggregateJoin);
-    CPPUNIT_TEST(TestCase_FeatureReader_GetPropertyIndex_BadProp);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    void TestCase_GetFeatureProviders();
-    void TestCase_TestConnectionSDFProvider();
-    void TestCase_TestFdoConnectionManager();
-    void TestCase_GetConnectionPropertyValues();
-    void TestCase_GetCapabilities();
-    void TestCase_TestConnectionProviderConnectionString();
-    void TestCase_TestConnectionResourceIdentifier();
-    void TestCase_GetSchemas();
-    void TestCase_GetClasses();
-    void TestCase_GetClassDefinition();
-    void TestCase_GetIdentityProperties();
-    void TestCase_DescribeSchema();
-    void TestCase_ApplySchema();
-    void TestCase_SelectFeatures();
-    void TestCase_SelectFeaturesWithXform();
-    void TestCase_SelectFeaturesSdfWithOrdering();
-    void TestCase_SelectAggregate();
-    void TestCase_UpdateFeaturesInsert();
-    void TestCase_UpdateFeaturesPartialFailure();
-    void TestCase_InsertFeatures();
-    void TestCase_InsertFeaturesBatch();
-    void TestCase_UpdateMatchingFeatures();
-    void TestCase_DeleteFeatures();
-    void TestCase_TransactedCrud();
-    void TestCase_ExecuteSqlQuery();
-    void TestCase_ExecuteSqlNonQuery();
-    void TestCase_GetSpatialContexts();
-    void TestCase_GetLongTransactions();
-    void TestCase_SetLongTransaction();
-    void TestCase_GetFeatures();
-    void TestCase_CloseFeatureReader();
-    void TestCase_GetSqlRows();
-    void TestCase_CloseSqlReader();
-    void TestCase_GetRaster();
-    void TestCase_GetDataRows();
-    void TestCase_CloseDataReader();
-    void TestCase_JoinFeatures();
-    void TestCase_JoinFeaturesChainedInner1ToMany();
-    void TestCase_CreateFeatureSource();
-    void TestCase_BenchmarkSelectFeatures();
-    void TestCase_ConcurrentAccess();
-    void TestCase_SavePoint();
-    void TestCase_JoinFdoFeatures();
-    void TestCase_BenchmarkSqliteJoin();
-    void TestCase_BenchmarkSqliteAggregateJoin();
-    void TestCase_FeatureReader_GetPropertyIndex_BadProp();
-
-private:
-    STRING CreateTestDataStore(MgFeatureService* svcFeature, CREFSTRING provider, MgResourceIdentifier* fsId);
-};
-
-#endif // _TESTFEATURESERVICE_H

Modified: trunk/MgDev/Server/src/UnitTesting/TestGeometry.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestGeometry.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestGeometry.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -16,134 +16,17 @@
 //
 
 #include "MapGuideCommon.h"
-#include "ServiceManager.h"
-#include "TestGeometry.h"
-#include "CppUnitExtensions.h"
+#include "TestServiceFactory.h"
 #include "FoundationDefs.h"
+#include "catch.hpp"
+#include "CatchHelperMacros.h"
 
 const STRING ArbitraryWkt  = L"LOCAL_CS [ \"Non-Earth (Mile)\", LOCAL_DATUM [\"Local Datum\", 0], UNIT [\"Mile_US\", 1609.344], AXIS [\"X\", EAST], AXIS[\"Y\", NORTH]]";
 const STRING GeographicWkt = L"GEOGCS[\"LL84\",DATUM[\"WGS84\",SPHEROID[\"WGS84\",6378137.000,298.25722293]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]]";
 const STRING ProjectedWkt  = L"PROJCS[\"GA-W\",GEOGCS[\"LL27\",DATUM[\"NAD27\",SPHEROID[\"CLRK66\",6378206.400,294.97869821]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"false_easting\",500000.000],PARAMETER[\"false_northing\",0.000],PARAMETER[\"scale_factor\",0.999900000000],PARAMETER[\"central_meridian\",-84.16666666666670],PARAMETER[\"latitude_of_origin\",30.00000000000000],UNIT[\"Foot_US\",0.30480060960122]]";
 
-const STRING TEST_LOCALE = L"en";
-
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestGeometry, "TestGeometry");
-
-void TestGeometry::setUp()
+static MgPoint* CreatePoint()
 {
-}
-
-
-void TestGeometry::tearDown()
-{
-}
-
-
-void TestGeometry::TestStart()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Geometry tests. (Mentor)\n")));
-#ifdef TEST_PREPARED_GEOMETRY_PERF
-    try
-    {
-        MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if (serviceManager == 0)
-        {
-            throw new MgNullReferenceException(L"TestGeometry::TestStart", __LINE__, __WFILE__, NULL, L"", NULL);
-        }
-
-        Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
-        {
-            throw new MgServiceNotAvailableException(L"TestGeometry::TestStart", __LINE__, __WFILE__, NULL, L"", NULL);
-        }
-
-        //Set the user information for the current thread to be administrator
-        MgUserInformation::SetCurrentUserInfo(NULL);
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        if (userInfo != NULL)
-        {
-            userInfo->SetLocale(TEST_LOCALE);
-            MgUserInformation::SetCurrentUserInfo(userInfo);
-
-            MgResourceIdentifier resourceIdentifier1(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
-    #ifdef _WIN32
-            STRING resourceContentFileName1 = L"..\\UnitTestFiles\\Sheboygan_Parcels.FeatureSource";
-            STRING dataFileName1 = L"..\\UnitTestFiles\\Sheboygan_Parcels.sdf";
-    #else
-            STRING resourceContentFileName1 = L"../UnitTestFiles/Sheboygan_Parcels.FeatureSource";
-            STRING dataFileName1 = L"../UnitTestFiles/Sheboygan_Parcels.sdf";
-    #endif
-
-            //Add a new resource
-            Ptr<MgByteSource> contentSource1 = new MgByteSource(resourceContentFileName1);
-            Ptr<MgByteReader> contentReader1 = contentSource1->GetReader();
-            pService->SetResource(&resourceIdentifier1, contentReader1, NULL);
-
-            //Set the resource data
-            Ptr<MgByteSource> dataSource1 = new MgByteSource(dataFileName1);
-            Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
-            pService->SetResourceData(&resourceIdentifier1, L"Sheboygan_Parcels.sdf", L"File", dataReader1);
-        }
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-#endif
-}
-
-
-void TestGeometry::TestEnd()
-{
-#ifdef TEST_PREPARED_GEOMETRY_PERF
-    try
-    {
-        MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if (serviceManager == 0)
-        {
-            throw new MgNullReferenceException(L"TestFeatureService.TestEnd",
-                __LINE__, __WFILE__, NULL, L"", NULL);
-        }
-
-        Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
-        {
-            throw new MgServiceNotAvailableException(L"TestFeatureService.TestEnd",
-                __LINE__, __WFILE__, NULL, L"", NULL);
-        }
-
-        // set user info
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
-        MgUserInformation::SetCurrentUserInfo(userInfo);
-
-        Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
-        pService->DeleteResource(fsres1);
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-#endif
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nGeometry tests completed.\n\n")));
-}
-
-
-TestGeometry::TestGeometry()
-{
-}
-
-
-MgPoint* TestGeometry::CreatePoint()
-{
     MgGeometryFactory factory;
     Ptr<MgCoordinate> coord = factory.CreateCoordinateXYZ(5.0, 3.0, 2.0);
 
@@ -150,8 +33,7 @@
     return factory.CreatePoint(coord);
 }
 
-
-MgLineString* TestGeometry::CreateLineString()
+static MgLineString* CreateLineString()
 {
     MgGeometryFactory factory;
 
@@ -168,8 +50,7 @@
     return factory.CreateLineString(coordCol);
 }
 
-
-MgLinearRing* TestGeometry::CreateLinearRing()
+static MgLinearRing* CreateLinearRing()
 {
     MgGeometryFactory factory;
 
@@ -189,8 +70,7 @@
     return factory.CreateLinearRing(outerRingCoord);
 }
 
-
-MgPolygon* TestGeometry::CreatePolygon()
+static MgPolygon* CreatePolygon()
 {
     MgGeometryFactory factory;
 
@@ -243,8 +123,7 @@
     return factory.CreatePolygon(extRing, intRings);
 }
 
-
-MgCurveString* TestGeometry::CreateCurveString(double offset)
+static MgCurveString* CreateCurveString(double offset)
 {
     MgGeometryFactory factory;
 
@@ -278,8 +157,7 @@
     return factory.CreateCurveString(curveSegs);
 }
 
-
-MgCurveRing* TestGeometry::CreateCurveRing(double offset)
+static MgCurveRing* CreateCurveRing(double offset)
 {
     // Ring is a closed entity.
     // Create and return a ring consisting of
@@ -312,8 +190,7 @@
     return factory.CreateCurveRing(curveSegs);
 }
 
-
-MgCurvePolygon* TestGeometry::CreateCurvePolygon(double offset, int increment)
+static MgCurvePolygon* CreateCurvePolygon(double offset, int increment = 100)
 {
     MgGeometryFactory factory;
 
@@ -331,8 +208,7 @@
     return factory.CreateCurvePolygon(extRing, intRings);
 }
 
-
-MgMultiPoint* TestGeometry::CreateMultiPoint()
+static MgMultiPoint* CreateMultiPoint()
 {
     MgGeometryFactory factory;
 
@@ -353,8 +229,7 @@
     return factory.CreateMultiPoint(pnts);
 }
 
-
-MgMultiLineString* TestGeometry::CreateMultiLineString()
+static MgMultiLineString* CreateMultiLineString()
 {
     MgGeometryFactory factory;
 
@@ -386,8 +261,7 @@
     return factory.CreateMultiLineString(lineStrings);
 }
 
-
-MgMultiPolygon* TestGeometry::CreateMultiPolygon()
+static MgMultiPolygon* CreateMultiPolygon()
 {
     MgGeometryFactory factory;
 
@@ -401,8 +275,7 @@
     return factory.CreateMultiPolygon(polygons);
 }
 
-
-MgMultiCurveString* TestGeometry::CreateMultiCurveString()
+static MgMultiCurveString* CreateMultiCurveString()
 {
     MgGeometryFactory factory;
 
@@ -418,8 +291,7 @@
     return factory.CreateMultiCurveString(curveStrings);
 }
 
-
-MgMultiCurvePolygon* TestGeometry::CreateMultiCurvePolygon(INT32 numCurvePolys, double offset)
+static MgMultiCurvePolygon* CreateMultiCurvePolygon(INT32 numCurvePolys, double offset)
 {
     MgGeometryFactory factory;
 
@@ -433,8 +305,7 @@
     return factory.CreateMultiCurvePolygon(curvePolys);
 }
 
-
-MgMultiGeometry* TestGeometry::CreateMultiGeometry()
+static MgMultiGeometry* CreateMultiGeometry()
 {
     MgGeometryFactory factory;
 
@@ -467,8 +338,7 @@
     return factory.CreateMultiGeometry(geometries);
 }
 
-
-MgCoordinateSystemMeasure* TestGeometry::CreateMeasureArbitrary()
+static MgCoordinateSystemMeasure* CreateMeasureArbitrary()
 {
     MgCoordinateSystemFactory factory;
     Ptr<MgCoordinateSystem> pCoordSys = factory.Create(ArbitraryWkt);
@@ -475,8 +345,7 @@
     return pCoordSys->GetMeasure();
 }
 
-
-MgCoordinateSystemMeasure* TestGeometry::CreateMeasureGeographic()
+static MgCoordinateSystemMeasure* CreateMeasureGeographic()
 {
     MgCoordinateSystemFactory factory;
     Ptr<MgCoordinateSystem> pCoordSys = factory.Create(GeographicWkt);
@@ -483,8 +352,7 @@
     return pCoordSys->GetMeasure();
 }
 
-
-MgCoordinateSystemMeasure* TestGeometry::CreateMeasureProjected()
+static MgCoordinateSystemMeasure* CreateMeasureProjected()
 {
     MgCoordinateSystemFactory factory;
     Ptr<MgCoordinateSystem> pCoordSys = factory.Create(ProjectedWkt);
@@ -491,29 +359,25 @@
     return pCoordSys->GetMeasure();
 }
 
-
-MgCoordinateSystem* TestGeometry::CreateCoordinateSystemArbitrary()
+static MgCoordinateSystem* CreateCoordinateSystemArbitrary()
 {
     MgCoordinateSystemFactory factory;
     return factory.Create(ArbitraryWkt);
 }
 
-
-MgCoordinateSystem* TestGeometry::CreateCoordinateSystemGeographic()
+static MgCoordinateSystem* CreateCoordinateSystemGeographic()
 {
     MgCoordinateSystemFactory factory;
     return factory.Create(GeographicWkt);
 }
 
-
-MgCoordinateSystem* TestGeometry::CreateCoordinateSystemProjected()
+static MgCoordinateSystem* CreateCoordinateSystemProjected()
 {
     MgCoordinateSystemFactory factory;
     return factory.Create(ProjectedWkt);
 }
 
-
-bool TestGeometry::CheckGeometry(MgGeometry* geom, CREFSTRING wkt)
+static bool CheckGeometry(MgGeometry* geom, CREFSTRING wkt)
 {
     bool success = true;
     MgWktReaderWriter readerWriter;
@@ -537,8 +401,7 @@
     return success;
 }
 
-
-bool TestGeometry::CheckGeometry(CREFSTRING calculated, CREFSTRING base)
+static bool CheckGeometry(CREFSTRING calculated, CREFSTRING base)
 {
     bool bResult = true;
 
@@ -577,8 +440,7 @@
     return bResult;
 }
 
-
-void TestGeometry::TestCase_Point()
+TEST_CASE("Point", "[Geometry]")
 {
     try
     {
@@ -588,13 +450,13 @@
 
         MgWktReaderWriter readerWriter;
         STRING found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(geom, base));
-        CPPUNIT_ASSERT(CheckGeometry(geom, found));
+        REQUIRE(CheckGeometry(geom, base));
+        REQUIRE(CheckGeometry(geom, found));
 
         Ptr<MgGeometry> point1 = readerWriter.Read(base);
         found = readerWriter.Write(point1);
-        CPPUNIT_ASSERT(CheckGeometry(point1, base));
-        CPPUNIT_ASSERT(CheckGeometry(point1, found));
+        REQUIRE(CheckGeometry(point1, base));
+        REQUIRE(CheckGeometry(point1, found));
 
         Ptr<MgMemoryStreamHelper> helper = new MgMemoryStreamHelper();
         Ptr<MgStream> stream = new MgStream(helper);
@@ -601,18 +463,18 @@
         Ptr<MgGeometry> point2 = new MgPoint();
         point1->Serialize(stream);
         point2->Deserialize(stream);
-        CPPUNIT_ASSERT(CheckGeometry(point2, base));
+        REQUIRE(CheckGeometry(point2, base));
 
         MgAgfReaderWriter agfReaderWriter;
         Ptr<MgByteReader> reader = agfReaderWriter.Write(geom);
         Ptr<MgGeometry> point3 = agfReaderWriter.Read(reader);
-        CPPUNIT_ASSERT(CheckGeometry(point3, base));
+        REQUIRE(CheckGeometry(point3, base));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -620,8 +482,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_LineString()
+TEST_CASE("LineString", "[Geometry]")
 {
     try
     {
@@ -631,13 +492,13 @@
 
         MgWktReaderWriter readerWriter;
         STRING found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(geom, base));
-        CPPUNIT_ASSERT(CheckGeometry(geom, found));
+        REQUIRE(CheckGeometry(geom, base));
+        REQUIRE(CheckGeometry(geom, found));
 
         Ptr<MgGeometry> lineString1 = readerWriter.Read(base);
         found = readerWriter.Write(lineString1);
-        CPPUNIT_ASSERT(CheckGeometry(lineString1, base));
-        CPPUNIT_ASSERT(CheckGeometry(lineString1, found));
+        REQUIRE(CheckGeometry(lineString1, base));
+        REQUIRE(CheckGeometry(lineString1, found));
 
         Ptr<MgMemoryStreamHelper> helper = new MgMemoryStreamHelper();
         Ptr<MgStream> stream = new MgStream(helper);
@@ -644,18 +505,18 @@
         Ptr<MgGeometry> lineString2 = new MgLineString();
         lineString1->Serialize(stream);
         lineString2->Deserialize(stream);
-        CPPUNIT_ASSERT(CheckGeometry(lineString2, base));
+        REQUIRE(CheckGeometry(lineString2, base));
 
         MgAgfReaderWriter agfReaderWriter;
         Ptr<MgByteReader> reader = agfReaderWriter.Write(geom);
         Ptr<MgGeometry> lineString3 = agfReaderWriter.Read(reader);
-        CPPUNIT_ASSERT(CheckGeometry(lineString3, base));
+        REQUIRE(CheckGeometry(lineString3, base));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -663,8 +524,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_Polygon()
+TEST_CASE("Polygon", "[Geometry]")
 {
     try
     {
@@ -674,13 +534,13 @@
 
         MgWktReaderWriter readerWriter;
         STRING found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(geom, base));
-        CPPUNIT_ASSERT(CheckGeometry(geom, found));
+        REQUIRE(CheckGeometry(geom, base));
+        REQUIRE(CheckGeometry(geom, found));
 
         Ptr<MgGeometry> polygon1 = readerWriter.Read(base);
         found = readerWriter.Write(polygon1);
-        CPPUNIT_ASSERT(CheckGeometry(polygon1, base));
-        CPPUNIT_ASSERT(CheckGeometry(polygon1, found));
+        REQUIRE(CheckGeometry(polygon1, base));
+        REQUIRE(CheckGeometry(polygon1, found));
 
         Ptr<MgMemoryStreamHelper> helper = new MgMemoryStreamHelper();
         Ptr<MgStream> stream = new MgStream(helper);
@@ -687,18 +547,18 @@
         Ptr<MgGeometry> polygon2 = new MgPolygon();
         polygon1->Serialize(stream);
         polygon2->Deserialize(stream);
-        CPPUNIT_ASSERT(CheckGeometry(polygon2, base));
+        REQUIRE(CheckGeometry(polygon2, base));
 
         MgAgfReaderWriter agfReaderWriter;
         Ptr<MgByteReader> reader = agfReaderWriter.Write(geom);
         Ptr<MgGeometry> polygon3 = agfReaderWriter.Read(reader);
-        CPPUNIT_ASSERT(CheckGeometry(polygon3, base));
+        REQUIRE(CheckGeometry(polygon3, base));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -706,8 +566,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_CurveString()
+TEST_CASE("CurveString", "[Geometry]")
 {
     try
     {
@@ -717,13 +576,13 @@
 
         MgWktReaderWriter readerWriter;
         STRING found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(geom, base));
-        CPPUNIT_ASSERT(CheckGeometry(geom, found));
+        REQUIRE(CheckGeometry(geom, base));
+        REQUIRE(CheckGeometry(geom, found));
 
         Ptr<MgGeometry> curveString1 = readerWriter.Read(base);
         found = readerWriter.Write(curveString1);
-        CPPUNIT_ASSERT(CheckGeometry(curveString1, base));
-        CPPUNIT_ASSERT(CheckGeometry(curveString1, found));
+        REQUIRE(CheckGeometry(curveString1, base));
+        REQUIRE(CheckGeometry(curveString1, found));
 
         Ptr<MgMemoryStreamHelper> helper = new MgMemoryStreamHelper();
         Ptr<MgStream> stream = new MgStream(helper);
@@ -730,18 +589,18 @@
         Ptr<MgGeometry> curveString2 = new MgCurveString();
         curveString1->Serialize(stream);
         curveString2->Deserialize(stream);
-        CPPUNIT_ASSERT(CheckGeometry(curveString2, base));
+        REQUIRE(CheckGeometry(curveString2, base));
 
         MgAgfReaderWriter agfReaderWriter;
         Ptr<MgByteReader> reader = agfReaderWriter.Write(geom);
         Ptr<MgGeometry> curveString3 = agfReaderWriter.Read(reader);
-        CPPUNIT_ASSERT(CheckGeometry(curveString3, base));
+        REQUIRE(CheckGeometry(curveString3, base));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -749,8 +608,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_CurveRing()
+TEST_CASE("CurveRing", "[Geometry]")
 {
     try
     {
@@ -759,14 +617,14 @@
 
         Ptr<MgGeometricEntity> geom = CreateCurveRing(3.14);
         STRING found = geom->ToAwkt(true);
-        CPPUNIT_ASSERT(wstring::npos != found.find(L"CIRCULARARCSEGMENT"));
-        CPPUNIT_ASSERT(wstring::npos != found.find(L"LINESTRINGSEGMENT"));
+        REQUIRE(wstring::npos != found.find(L"CIRCULARARCSEGMENT"));
+        REQUIRE(wstring::npos != found.find(L"LINESTRINGSEGMENT"));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -774,8 +632,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_CurvePolygon()
+TEST_CASE("CurvePolygon", "[Geometry]")
 {
     try
     {
@@ -787,13 +644,13 @@
 
         MgWktReaderWriter readerWriter;
         STRING found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(geom, base));
-        CPPUNIT_ASSERT(CheckGeometry(geom, found));
+        REQUIRE(CheckGeometry(geom, base));
+        REQUIRE(CheckGeometry(geom, found));
 
         Ptr<MgGeometry> curvePolygon1 = readerWriter.Read(base);
         found = readerWriter.Write(curvePolygon1);
-        CPPUNIT_ASSERT(CheckGeometry(curvePolygon1, base));
-        CPPUNIT_ASSERT(CheckGeometry(curvePolygon1, found));
+        REQUIRE(CheckGeometry(curvePolygon1, base));
+        REQUIRE(CheckGeometry(curvePolygon1, found));
 
         Ptr<MgMemoryStreamHelper> helper = new MgMemoryStreamHelper();
         Ptr<MgStream> stream = new MgStream(helper);
@@ -800,18 +657,18 @@
         Ptr<MgGeometry> curvePolygon2 = new MgCurvePolygon();
         curvePolygon1->Serialize(stream);
         curvePolygon2->Deserialize(stream);
-        CPPUNIT_ASSERT(CheckGeometry(curvePolygon2, base));
+        REQUIRE(CheckGeometry(curvePolygon2, base));
 
         MgAgfReaderWriter agfReaderWriter;
         Ptr<MgByteReader> reader = agfReaderWriter.Write(geom);
         Ptr<MgGeometry> curvePolygon3 = agfReaderWriter.Read(reader);
-        CPPUNIT_ASSERT(CheckGeometry(curvePolygon3, base));
+        REQUIRE(CheckGeometry(curvePolygon3, base));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -819,8 +676,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_MultiPoint()
+TEST_CASE("MultiPoint", "[Geometry]")
 {
     try
     {
@@ -830,13 +686,13 @@
 
         MgWktReaderWriter readerWriter;
         STRING found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(geom, base));
-        CPPUNIT_ASSERT(CheckGeometry(geom, found));
+        REQUIRE(CheckGeometry(geom, base));
+        REQUIRE(CheckGeometry(geom, found));
 
         Ptr<MgGeometry> multiPoint1 = readerWriter.Read(base);
         found = readerWriter.Write(multiPoint1);
-        CPPUNIT_ASSERT(CheckGeometry(multiPoint1, base));
-        CPPUNIT_ASSERT(CheckGeometry(multiPoint1, base));
+        REQUIRE(CheckGeometry(multiPoint1, base));
+        REQUIRE(CheckGeometry(multiPoint1, base));
 
         Ptr<MgMemoryStreamHelper> helper = new MgMemoryStreamHelper();
         Ptr<MgStream> stream = new MgStream(helper);
@@ -843,18 +699,18 @@
         Ptr<MgGeometry> multiPoint2 = new MgMultiPoint();
         multiPoint1->Serialize(stream);
         multiPoint2->Deserialize(stream);
-        CPPUNIT_ASSERT(CheckGeometry(multiPoint2, base));
+        REQUIRE(CheckGeometry(multiPoint2, base));
 
         MgAgfReaderWriter agfReaderWriter;
         Ptr<MgByteReader> reader = agfReaderWriter.Write(geom);
         Ptr<MgGeometry> multiPoint3 = agfReaderWriter.Read(reader);
-        CPPUNIT_ASSERT(CheckGeometry(multiPoint3, base));
+        REQUIRE(CheckGeometry(multiPoint3, base));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -862,8 +718,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_MultiLineString()
+TEST_CASE("MultiLineString", "[Geometry]")
 {
     try
     {
@@ -873,13 +728,13 @@
 
         MgWktReaderWriter readerWriter;
         STRING found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(geom, base));
-        CPPUNIT_ASSERT(CheckGeometry(geom, found));
+        REQUIRE(CheckGeometry(geom, base));
+        REQUIRE(CheckGeometry(geom, found));
 
         Ptr<MgGeometry> multiLineString1 = readerWriter.Read(base);
         found = readerWriter.Write(multiLineString1);
-        CPPUNIT_ASSERT(CheckGeometry(multiLineString1, base));
-        CPPUNIT_ASSERT(CheckGeometry(multiLineString1, found));
+        REQUIRE(CheckGeometry(multiLineString1, base));
+        REQUIRE(CheckGeometry(multiLineString1, found));
 
         Ptr<MgMemoryStreamHelper> helper = new MgMemoryStreamHelper();
         Ptr<MgStream> stream = new MgStream(helper);
@@ -886,18 +741,18 @@
         Ptr<MgGeometry> multiLineString2 = new MgMultiLineString();
         multiLineString1->Serialize(stream);
         multiLineString2->Deserialize(stream);
-        CPPUNIT_ASSERT(CheckGeometry(multiLineString2, base));
+        REQUIRE(CheckGeometry(multiLineString2, base));
 
         MgAgfReaderWriter agfReaderWriter;
         Ptr<MgByteReader> reader = agfReaderWriter.Write(geom);
         Ptr<MgGeometry> multiLineString3 = agfReaderWriter.Read(reader);
-        CPPUNIT_ASSERT(CheckGeometry(multiLineString3, base));
+        REQUIRE(CheckGeometry(multiLineString3, base));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -905,8 +760,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_MultiPolygon()
+TEST_CASE("MultiPolygon", "[Geometry]")
 {
     try
     {
@@ -917,13 +771,13 @@
 
         MgWktReaderWriter readerWriter;
         STRING found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(geom, base));
-        CPPUNIT_ASSERT(CheckGeometry(geom, found));
+        REQUIRE(CheckGeometry(geom, base));
+        REQUIRE(CheckGeometry(geom, found));
 
         Ptr<MgGeometry> multiPolygon1 = readerWriter.Read(base);
         found = readerWriter.Write(multiPolygon1);
-        CPPUNIT_ASSERT(CheckGeometry(multiPolygon1, base));
-        CPPUNIT_ASSERT(CheckGeometry(multiPolygon1, found));
+        REQUIRE(CheckGeometry(multiPolygon1, base));
+        REQUIRE(CheckGeometry(multiPolygon1, found));
 
         Ptr<MgMemoryStreamHelper> helper = new MgMemoryStreamHelper();
         Ptr<MgStream> stream = new MgStream(helper);
@@ -930,18 +784,18 @@
         Ptr<MgGeometry> multiPolygon2 = new MgMultiPolygon();
         multiPolygon1->Serialize(stream);
         multiPolygon2->Deserialize(stream);
-        CPPUNIT_ASSERT(CheckGeometry(multiPolygon2, base));
+        REQUIRE(CheckGeometry(multiPolygon2, base));
 
         MgAgfReaderWriter agfReaderWriter;
         Ptr<MgByteReader> reader = agfReaderWriter.Write(geom);
         Ptr<MgGeometry> multiPolygon3 = agfReaderWriter.Read(reader);
-        CPPUNIT_ASSERT(CheckGeometry(multiPolygon3, base));
+        REQUIRE(CheckGeometry(multiPolygon3, base));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -949,8 +803,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_MultiCurveString()
+TEST_CASE("MultiCurveString", "[Geometry]")
 {
     try
     {
@@ -962,13 +815,13 @@
 
         MgWktReaderWriter readerWriter;
         STRING found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(geom, base));
-        CPPUNIT_ASSERT(CheckGeometry(geom, found));
+        REQUIRE(CheckGeometry(geom, base));
+        REQUIRE(CheckGeometry(geom, found));
 
         Ptr<MgGeometry> multiCurveString1 = readerWriter.Read(base);
         found = readerWriter.Write(multiCurveString1);
-        CPPUNIT_ASSERT(CheckGeometry(multiCurveString1, base));
-        CPPUNIT_ASSERT(CheckGeometry(multiCurveString1, found));
+        REQUIRE(CheckGeometry(multiCurveString1, base));
+        REQUIRE(CheckGeometry(multiCurveString1, found));
 
         Ptr<MgMemoryStreamHelper> helper = new MgMemoryStreamHelper();
         Ptr<MgStream> stream = new MgStream(helper);
@@ -975,18 +828,18 @@
         Ptr<MgGeometry> multiCurveString2 = new MgMultiCurveString();
         multiCurveString1->Serialize(stream);
         multiCurveString2->Deserialize(stream);
-        CPPUNIT_ASSERT(CheckGeometry(multiCurveString2, base));
+        REQUIRE(CheckGeometry(multiCurveString2, base));
 
         MgAgfReaderWriter agfReaderWriter;
         Ptr<MgByteReader> reader = agfReaderWriter.Write(geom);
         Ptr<MgGeometry> multiCurveString3 = agfReaderWriter.Read(reader);
-        CPPUNIT_ASSERT(CheckGeometry(multiCurveString3, base));
+        REQUIRE(CheckGeometry(multiCurveString3, base));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -994,8 +847,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_MultiCurvePolygon()
+TEST_CASE("MultiCurvePolygon", "[Geometry]")
 {
     try
     {
@@ -1013,13 +865,13 @@
 
         MgWktReaderWriter readerWriter;
         STRING found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(geom, base));
-        CPPUNIT_ASSERT(CheckGeometry(geom, found));
+        REQUIRE(CheckGeometry(geom, base));
+        REQUIRE(CheckGeometry(geom, found));
 
         Ptr<MgGeometry> multiCurvePolygon1 = readerWriter.Read(base);
         found = readerWriter.Write(multiCurvePolygon1);
-        CPPUNIT_ASSERT(CheckGeometry(multiCurvePolygon1, base));
-        CPPUNIT_ASSERT(CheckGeometry(multiCurvePolygon1, found));
+        REQUIRE(CheckGeometry(multiCurvePolygon1, base));
+        REQUIRE(CheckGeometry(multiCurvePolygon1, found));
 
         Ptr<MgMemoryStreamHelper> helper = new MgMemoryStreamHelper();
         Ptr<MgStream> stream = new MgStream(helper);
@@ -1026,18 +878,18 @@
         Ptr<MgGeometry> multiCurvePolygon2 = new MgMultiCurvePolygon();
         multiCurvePolygon1->Serialize(stream);
         multiCurvePolygon2->Deserialize(stream);
-        CPPUNIT_ASSERT(CheckGeometry(multiCurvePolygon2, base));
+        REQUIRE(CheckGeometry(multiCurvePolygon2, base));
 
         MgAgfReaderWriter agfReaderWriter;
         Ptr<MgByteReader> reader = agfReaderWriter.Write(geom);
         Ptr<MgGeometry> multiCurvePolygon3 = agfReaderWriter.Read(reader);
-        CPPUNIT_ASSERT(CheckGeometry(multiCurvePolygon3, base));
+        REQUIRE(CheckGeometry(multiCurvePolygon3, base));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1045,8 +897,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_MultiGeometry()
+TEST_CASE("MultiGeometry", "[Geometry]")
 {
     try
     {
@@ -1061,13 +912,13 @@
 
         Ptr<MgGeometry> geom = CreateMultiGeometry();
         STRING found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(geom, base));
-        CPPUNIT_ASSERT(CheckGeometry(geom, found));
+        REQUIRE(CheckGeometry(geom, base));
+        REQUIRE(CheckGeometry(geom, found));
 
         Ptr<MgGeometry> multiGeometry1 = readerWriter.Read(base);
         found = readerWriter.Write(multiGeometry1);
-        CPPUNIT_ASSERT(CheckGeometry(multiGeometry1, base));
-        CPPUNIT_ASSERT(CheckGeometry(multiGeometry1, found));
+        REQUIRE(CheckGeometry(multiGeometry1, base));
+        REQUIRE(CheckGeometry(multiGeometry1, found));
 
         Ptr<MgMemoryStreamHelper> helper = new MgMemoryStreamHelper();
         Ptr<MgStream> stream = new MgStream(helper);
@@ -1074,18 +925,18 @@
         Ptr<MgGeometry> multiGeometry2 = new MgMultiGeometry();
         multiGeometry1->Serialize(stream);
         multiGeometry2->Deserialize(stream);
-        CPPUNIT_ASSERT(CheckGeometry(multiGeometry2, base));
+        REQUIRE(CheckGeometry(multiGeometry2, base));
 
         MgAgfReaderWriter agfReaderWriter;
         Ptr<MgByteReader> reader = agfReaderWriter.Write(geom);
         Ptr<MgGeometry> multiGeometry3 = agfReaderWriter.Read(reader);
-        CPPUNIT_ASSERT(CheckGeometry(multiGeometry3, base));
+        REQUIRE(CheckGeometry(multiGeometry3, base));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1093,8 +944,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_BufferNoMeasure()
+TEST_CASE("Buffer (no measure)", "[Geometry]")
 {
     try
     {
@@ -1101,20 +951,20 @@
         MgWktReaderWriter readerWriter;
 
         Ptr<MgPoint> point = CreatePoint();
-        Ptr<MgGeometry> geom = point->Buffer(5.0, NULL);
+        Ptr<MgGeometry> geom = point->Buffer(5.0, nullptr);
         STRING found = geom->ToAwkt(false);
-        CPPUNIT_ASSERT(CheckGeometry(geom, found));
+        REQUIRE(CheckGeometry(geom, found));
 
         Ptr<MgMultiGeometry> multiGeometry = CreateMultiGeometry();
-        geom = multiGeometry->Buffer(5.0, NULL);
+        geom = multiGeometry->Buffer(5.0, nullptr);
         found = geom->ToAwkt(false);
-        CPPUNIT_ASSERT(CheckGeometry(geom, found));
+        REQUIRE(CheckGeometry(geom, found));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1122,8 +972,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_BufferArbitrary()
+TEST_CASE("Buffer (arbitrary)", "[Geometry]")
 {
     try
     {
@@ -1133,13 +982,13 @@
         Ptr<MgPoint> testPoint = CreatePoint();
         Ptr<MgGeometry> geom = testPoint->Buffer(5.0, measure);
         STRING found = geom->ToAwkt(false);
-        CPPUNIT_ASSERT(CheckGeometry(geom, found));
+        REQUIRE(CheckGeometry(geom, found));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1147,8 +996,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_BufferGeographic()
+TEST_CASE("Buffer (geographic)", "[Geometry]")
 {
     try
     {
@@ -1158,33 +1006,33 @@
         Ptr<MgPoint> testPoint = CreatePoint();
         Ptr<MgGeometry> geom = testPoint->Buffer(5.0, measure);
         STRING found = geom->ToAwkt(false);
-        CPPUNIT_ASSERT(CheckGeometry(geom, found));
+        REQUIRE(CheckGeometry(geom, found));
 
         Ptr<MgLineString> testLine = CreateLineString();
         geom = testLine->Buffer(5.0, measure);
         found = geom->ToAwkt(false);
-        CPPUNIT_ASSERT(CheckGeometry(geom, found));
+        REQUIRE(CheckGeometry(geom, found));
 
         Ptr<MgPolygon> testPolygon = CreatePolygon();
         geom = testPolygon->Buffer(5.0, measure);
         found = geom->ToAwkt(false);
-        CPPUNIT_ASSERT(CheckGeometry(geom, found));
+        REQUIRE(CheckGeometry(geom, found));
 
         Ptr<MgCurveString> testCurveString = CreateCurveString(0.0);
         geom = testCurveString->Buffer(5.0, measure);
         found = geom->ToAwkt(false);
-        CPPUNIT_ASSERT(CheckGeometry(geom, found));
+        REQUIRE(CheckGeometry(geom, found));
 
         Ptr<MgCurvePolygon> testCurvePolygon = CreateCurvePolygon(0.0, 10);
         geom = testCurvePolygon->Buffer(1.0, measure);
         found = geom->ToAwkt(false);
-        CPPUNIT_ASSERT(CheckGeometry(geom, found));
+        REQUIRE(CheckGeometry(geom, found));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1192,8 +1040,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_BufferProjected()
+TEST_CASE("Buffer (projected)", "[Geometry]")
 {
     try
     {
@@ -1203,11 +1050,11 @@
         Ptr<MgPoint> testPoint = CreatePoint();
         Ptr<MgGeometry> geom = testPoint->Buffer(5.0, measure);
         STRING found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(geom, found));
+        REQUIRE(CheckGeometry(geom, found));
 
         Ptr<MgLineString> testLine = CreateLineString();
         Ptr<MgGeometry> buffer = testLine->Buffer(5.0, measure);
-        CPPUNIT_ASSERT(buffer);
+        REQUIRE(buffer);
 
         Ptr<MgPolygon> testPolygon = CreatePolygon();
         // TODO: Need to investigate why this test throws an exception
@@ -1215,9 +1062,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1225,8 +1072,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_Intersection()
+TEST_CASE("Intersection", "[Geometry]")
 {
     try
     {
@@ -1238,7 +1084,7 @@
         Ptr<MgPoint> point = new MgPoint(coord);
         Ptr<MgPolygon> polygon = CreatePolygon();
         Ptr<MgGeometry> geom = point->Intersection(polygon);
-        CPPUNIT_ASSERT(geom == NULL);
+        REQUIRE(geom.p == nullptr);
 
         //TEST 2
         coord = factory.CreateCoordinateXY(100.0, 100.0);
@@ -1255,10 +1101,10 @@
         outerCoords->Add(coord4);
         outerCoords->Add(coord5);
         Ptr<MgLinearRing> outerRing = factory.CreateLinearRing(outerCoords);
-        Ptr<MgLinearRingCollection> innerRings = NULL;
+        Ptr<MgLinearRingCollection> innerRings = nullptr;
         polygon = factory.CreatePolygon(outerRing, innerRings);
         geom = point->Intersection(polygon);
-        CPPUNIT_ASSERT(geom == NULL);
+        REQUIRE(geom.p == nullptr);
 
         //TEST 3
         STRING base = L"POINT (5 3)";
@@ -1265,67 +1111,80 @@
         point = CreatePoint();
         polygon = CreatePolygon();
         geom = point->Intersection(polygon);
+        REQUIRE(geom.p != nullptr);
         STRING found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 4
         Ptr<MgLineString> lineString = CreateLineString();
         geom = lineString->Intersection(point);
-        CPPUNIT_ASSERT(geom == NULL);
+        REQUIRE(geom.p == nullptr);
 
         //TEST 5
         base = L"LINESTRING (0 1, 2 3, 4 5)";
         polygon = CreatePolygon();
         geom = polygon->Intersection(lineString);
+        REQUIRE(geom.p != nullptr);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 6
         base = L"GEOMETRYCOLLECTION (POINT (0 0), LINESTRING (0 0.99246192690647705, 0.045672548622950601 1.1204286132756418, 0.1310606385532562 1.2912047931362536, 0.23641094695643791 1.4504434254749068, 0.3601872291077422 1.5958224524579303, 0.50058454809348885 1.7252219205068542, 0.65555559485563741 1.8367548939952993, 0.82284054256798778 1.9287949710194192, 1 2, 1.5 1.5, 2 1, 3 0, 3 0, 3 2))";
         Ptr<MgCurveString> curveString = CreateCurveString(0.0);
         geom = curveString->Intersection(polygon);
+        REQUIRE(geom.p != nullptr);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 7
         Ptr<MgCurvePolygon> curvePolygon = CreateCurvePolygon(0.0);
         geom = curvePolygon->Intersection(curveString);
-        CPPUNIT_ASSERT(geom == NULL);
+        REQUIRE(geom.p == nullptr);
 
         //TEST 8
         Ptr<MgMultiPoint> multiPoint = CreateMultiPoint();
         geom = multiPoint->Intersection(point);
-        CPPUNIT_ASSERT(geom == NULL);
+        REQUIRE(geom.p == nullptr);
 
         //TEST 9
         base = L"MULTIPOINT (1 2, 4 5)";
         Ptr<MgMultiLineString> multiLineString = CreateMultiLineString();
         geom = multiLineString->Intersection(multiPoint);
+        REQUIRE(geom.p != nullptr);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 10
         base = L"LINESTRING (0 1, 3 4, 4 5)";
         Ptr<MgMultiPolygon> multiPolygon = CreateMultiPolygon();
+#ifdef _WIN32
         geom = multiPolygon->Intersection(multiLineString);
+        REQUIRE(geom.p != nullptr);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
+#else
+    #pragma message("WARNING: This particular assertion could pass or fail depending on what version of GEOS we're linking against on linux. We're skipping this for now")
+#endif
 
         //TEST 11
         Ptr<MgMultiCurveString> multiCurveString = CreateMultiCurveString();
         geom = multiCurveString->Intersection(multiPolygon);
-        CPPUNIT_ASSERT(geom == NULL);
+        REQUIRE(geom.p == nullptr);
 
+#ifdef _WIN32
         //TEST 12
         Ptr<MgMultiCurvePolygon> multiCurvePolygon = CreateMultiCurvePolygon(3, 0.0);
         geom = multiCurvePolygon->Intersection(curvePolygon);
-        CPPUNIT_ASSERT(geom == NULL);
+        REQUIRE(geom.p == nullptr);
+#else
+    #pragma message("WARNING: This particular assertion could pass or fail depending on what version of GEOS we're linking against on linux. We're skipping this for now")
+#endif
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1333,8 +1192,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_Boundary()
+TEST_CASE("Boundary", "[Geometry]")
 {
     try
     {
@@ -1343,7 +1201,7 @@
         //TEST 1
         Ptr<MgPoint> point = CreatePoint();
         Ptr<MgGeometry> geom = point->Boundary();
-        CPPUNIT_ASSERT(geom == NULL);
+        REQUIRE(geom.p == nullptr);
 
         //TEST 2
         STRING base = L"MULTIPOINT (0 1, 4 5)";
@@ -1350,7 +1208,7 @@
         Ptr<MgLineString> lineString = CreateLineString();
         geom = lineString->Boundary();
         STRING found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 3
         base = L"MULTILINESTRING ((0 0, 5 0, 5 5, 0 5, 0 0), (1 1, 2 1, 2 2, 1 1), (3 3, 4 3, 4 4, 3 3))";
@@ -1357,7 +1215,7 @@
         Ptr<MgPolygon> polygon = CreatePolygon();
         geom = polygon->Boundary();
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 4
         base = L"MULTIPOINT (0 0, 3 2)";
@@ -1364,7 +1222,7 @@
         Ptr<MgCurveString> curveString = CreateCurveString(0.0);
         geom = curveString->Boundary();
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 5
         base = L"MULTILINESTRING ((100 100, 99.958214339826924 100.14943334715824, 99.931276918387084 100.30224284282258, 99.919447157774457 100.45695684801559, 99.922838985050518 100.61208538229199, 99.941419735064471 100.76613447306482, 99.975010465036377 100.91762054337813, 100.02328767787407 101.0650846995641, 100.08578643762691 101.20710678118655, 100.16190484707316 101.34231903796228, 100.25090984431932 101.46941930194401, 100.35194426258683 101.58718352810953, 100.46403508519673 101.69447758258438, 100.58610281625221 101.79026816497108, 100.7169718767742 101.87363275959679, 100.85538192616956 101.94376851984352, 101 102, 100 100), (200 200,199.95821433982692 200.14943334715824, 199.93127691838708 200.30224284282258, 199.91944715777444 200.45695684801558, 199.92283898505053 200.61208538229198, 199.94141973506447 200.76613447306482, 199.97501046503638 200.91762054337812, 200.02328767787407 201.0650846995641, 200.08578643762689 201.20710678118655, 200.16190484707317 201.34231903
 796228, 200.25090984431932 201.46941930194401, 200.35194426258681 201.58718352810953, 200.46403508519671 201.6944775825844, 200.58610281625221 201.79026816497108, 200.71697187677418 201.87363275959677, 200.85538192616957 201.9437685198435, 201 202, 200 200), (300 300, 299.95821433982695 300.14943334715826, 299.93127691838708 300.30224284282258, 299.91944715777447 300.45695684801558, 299.92283898505053 300.61208538229198, 299.94141973506447 300.76613447306482, 299.97501046503641 300.91762054337812, 300.02328767787407 301.06508469956412, 300.08578643762689 301.20710678118655, 300.16190484707317 301.34231903796228, 300.25090984431932 301.46941930194401, 300.35194426258681 301.58718352810951,300.46403508519671 301.6944775825844, 300.58610281625221 301.79026816497111, 300.71697187677421 301.87363275959677, 300.85538192616957 301.9437685198435, 301 302, 300 300))";
@@ -1371,12 +1229,12 @@
         Ptr<MgCurvePolygon> curvePolygon = CreateCurvePolygon(0.0);
         geom = curvePolygon->Boundary();
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 6
         Ptr<MgMultiPoint> multiPoint = CreateMultiPoint();
         geom = multiPoint->Boundary();
-        CPPUNIT_ASSERT(geom == NULL);
+        REQUIRE(geom.p == nullptr);
 
         //TEST 7
         base = L"MULTIPOINT (0 1, 6 7, 9 10, 15 16)";
@@ -1383,7 +1241,7 @@
         Ptr<MgMultiLineString> multiLineString = CreateMultiLineString();
         geom = multiLineString->Boundary();
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 8
         base = L"MULTILINESTRING ((0 0, 5 0, 5 5, 0 5, 0 0), (1 1, 2 1, 2 2, 1 1), (3 3, 4 3, 4 4, 3 3), (0 0, 5 0, 5 5, 0 5, 0 0), (1 1, 2 1, 2 2, 1 1), (3 3, 4 3, 4 4, 3 3))";
@@ -1390,7 +1248,7 @@
         Ptr<MgMultiPolygon> multiPolygon = CreateMultiPolygon();
         geom = multiPolygon->Boundary();
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 9
         base = L"MULTIPOINT (100 100, 103 102, 200 200, 203 202, 300 300, 303 302)";
@@ -1397,19 +1255,19 @@
         Ptr<MgMultiCurveString> multiCurveString = CreateMultiCurveString();
         geom = multiCurveString->Boundary();
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 10
         Ptr<MgMultiCurvePolygon> multiCurvePolygon = CreateMultiCurvePolygon(3, 0.0);
         geom = multiCurvePolygon->Boundary();
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(0 == ::wcsncmp(found.c_str(), L"MULTILINESTRING", ::wcslen(L"MULTILINESTRING")));
+        REQUIRE(0 == ::wcsncmp(found.c_str(), L"MULTILINESTRING", ::wcslen(L"MULTILINESTRING")));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1417,8 +1275,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_ConvexHull()
+TEST_CASE("ConvexHull", "[Geometry]")
 {
     try
     {
@@ -1429,7 +1286,7 @@
         Ptr<MgPoint> point = CreatePoint();
         Ptr<MgGeometry> geom = point->ConvexHull();
         STRING found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 2
         base = L"LINESTRING (0 1, 4 5)";
@@ -1436,7 +1293,7 @@
         Ptr<MgLineString> lineString = CreateLineString();
         geom = lineString->ConvexHull();
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 3
         base = L"POLYGON ((0 0, 0 5, 5 5, 5 0, 0 0))";
@@ -1443,7 +1300,7 @@
         Ptr<MgPolygon> polygon = CreatePolygon();
         geom = polygon->ConvexHull();
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 4
         base = L"POLYGON ((0 0, -0.049331651274742601 0.18445058333395731, -0.076070558282857095 0.37350258771831019, -0.0798268075493902 0.5643992092210961, -0.060545624501699299 0.75435674523904783, -0.018508172206062701 0.94060518714990526, 0.045672548622950601 1.1204286132756418, 0.1310606385532562 1.2912047931362536, 0.23641094695643791 1.4504434254749068, 0.3601872291077422 1.5958224524579303, 0.50058454809348885 1.7252219205068542, 0.65555559485563741 1.8367548939952993, 0.82284054256798778 1.9287949710194192, 1 2, 3 2, 3 0, 0 0))";
@@ -1450,7 +1307,7 @@
         Ptr<MgCurveString> curveString = CreateCurveString(0.0);
         geom = curveString->ConvexHull();
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 5
         base = L"POLYGON ((100 100, 99.958214339826924 100.14943334715824, 99.931276918387084 100.30224284282258, 99.919447157774457 100.45695684801559, 99.922838985050518 100.61208538229199, 99.941419735064471 100.76613447306482, 99.975010465036377 100.91762054337813, 100.02328767787407 101.0650846995641, 100.08578643762691 101.20710678118655, 100.16190484707316 101.34231903796228, 100.25090984431932 101.46941930194401, 100.35194426258683 101.58718352810953, 100.46403508519673 101.69447758258438, 100.58610281625221 101.79026816497108, 100.7169718767742 101.87363275959679, 100.85538192616956 101.94376851984352, 101 102, 100 100))";
@@ -1457,7 +1314,7 @@
         Ptr<MgCurvePolygon> curvePolygon = CreateCurvePolygon(0.0);
         geom = curvePolygon->ConvexHull();
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 6
         base = L"LINESTRING (1 2, 7 8)";
@@ -1464,7 +1321,7 @@
         Ptr<MgMultiPoint> multiPoint = CreateMultiPoint();
         geom = multiPoint->ConvexHull();
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 7
         // The reason for the different check below is because we get slightly
@@ -1477,7 +1334,7 @@
         Ptr<MgMultiLineString> multiLineString = CreateMultiLineString();
         geom = multiLineString->ConvexHull();
         found = readerWriter.Write(geom);
-        //CPPUNIT_ASSERT(CheckGeometry(found, base));
+        //REQUIRE(CheckGeometry(found, base));
 
         //TEST 8
 #ifdef _DEBUG
@@ -1488,7 +1345,7 @@
         Ptr<MgMultiPolygon> multiPolygon = CreateMultiPolygon();
         geom = multiPolygon->ConvexHull();
         found = readerWriter.Write(geom);
-        //CPPUNIT_ASSERT(CheckGeometry(found, base));
+        //REQUIRE(CheckGeometry(found, base));
 
         //TEST 9
         base = L"POLYGON ((100 100, 100 101, 301 302, 303 302, 303 300, 103 100, 100 100))";
@@ -1495,7 +1352,7 @@
         Ptr<MgMultiCurveString> multiCurveString = CreateMultiCurveString();
         geom = multiCurveString->ConvexHull();
         found = readerWriter.Write(geom);
-        //CPPUNIT_ASSERT(CheckGeometry(found, base));
+        //REQUIRE(CheckGeometry(found, base));
 
         //TEST 10
 #ifdef _DEBUG
@@ -1506,7 +1363,7 @@
         Ptr<MgMultiCurvePolygon> multiCurvePolygon = CreateMultiCurvePolygon(3, 0.0);
         geom = multiCurvePolygon->ConvexHull();
         found = readerWriter.Write(geom);
-        //CPPUNIT_ASSERT(CheckGeometry(found, base));
+        //REQUIRE(CheckGeometry(found, base));
 
         //TEST 11
 #ifdef _DEBUG
@@ -1517,13 +1374,13 @@
         Ptr<MgMultiGeometry> multiGeometry = CreateMultiGeometry();
         geom = multiGeometry->ConvexHull();
         found = readerWriter.Write(geom);
-        //CPPUNIT_ASSERT(CheckGeometry(found, base));
+        //REQUIRE(CheckGeometry(found, base));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1531,8 +1388,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_Difference()
+TEST_CASE("Difference", "[Geometry]")
 {
     try
     {
@@ -1546,7 +1402,7 @@
         Ptr<MgPoint> pointCoord = factory.CreatePoint(coord);
         Ptr<MgGeometry> geom = point->Difference(pointCoord);
         STRING found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 2
         base = L"LINESTRING (0 1, 2 3, 4 5)";
@@ -1553,7 +1409,7 @@
         Ptr<MgLineString> lineString = CreateLineString();
         geom = lineString->Difference(point);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 3
         base = L"POLYGON ((4 5, 5 5, 5 0, 0 0, 0 1, 0 5, 4 5), (1 1, 2 1, 2 2, 1 1), (3 3, 4 3, 4 4, 3 3))";
@@ -1560,7 +1416,7 @@
         Ptr<MgPolygon> polygon = CreatePolygon();
         geom = polygon->Difference(lineString);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 4
         base = L"MULTILINESTRING ((0 0, -0.049331651274742601 0.18445058333395731, -0.076070558282857095 0.37350258771831019, -0.0798268075493902 0.5643992092210961, -0.060545624501699299 0.75435674523904783, -0.018508172206062701 0.94060518714990526,0 0.99246192690647705), (1.5 1.5, 2 1))";
@@ -1567,7 +1423,7 @@
         Ptr<MgCurveString> curveString = CreateCurveString(0.0);
         geom = curveString->Difference(polygon);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 5
         Ptr<MgCurvePolygon> curvePolygon = CreateCurvePolygon(0.0);
@@ -1578,7 +1434,7 @@
         Ptr<MgMultiPoint> multiPoint = CreateMultiPoint();
         geom = multiPoint->Difference(point);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 7
         base = L"MULTILINESTRING ((0 1, 3 4, 6 7), (9 10, 12 13, 15 16))";
@@ -1585,7 +1441,7 @@
         Ptr<MgMultiLineString> multiLineString = CreateMultiLineString();
         geom = multiLineString->Difference(multiPoint);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 8
         base = L"POLYGON ((5 0, 0 0, 0 1, 0 5, 4 5, 5 5, 5 0), (1 1, 2 1, 2 2, 1 1),"
@@ -1593,7 +1449,7 @@
         Ptr<MgMultiPolygon> multiPolygon = CreateMultiPolygon();
         geom = multiPolygon->Difference(multiLineString);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 9
         base = L"MULTILINESTRING ((100 100, 100 101, 101 102, 103 100, 103 102),"
@@ -1602,7 +1458,7 @@
         Ptr<MgMultiCurveString> multiCurveString = CreateMultiCurveString();
         geom = multiCurveString->Difference(multiPolygon);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 10
         Ptr<MgMultiCurvePolygon> multiCurvePolygon = CreateMultiCurvePolygon(3, 0.0);
@@ -1615,9 +1471,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1625,8 +1481,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_SymetricDifference()
+TEST_CASE("SymetricDifference", "[Geometry]")
 {
     try
     {
@@ -1650,7 +1505,7 @@
         Ptr<MgPoint> pointCoord = factory.CreatePoint(coord);
         Ptr<MgGeometry> geom = pointCoord->SymetricDifference(point);
         STRING found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 2
         base = L"GEOMETRYCOLLECTION (POINT (5 3), LINESTRING (0 1, 2 3, 4 5))";
@@ -1657,7 +1512,7 @@
         Ptr<MgLineString> lineString = CreateLineString();
         geom = point->SymetricDifference(lineString);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 3
         base = L"POLYGON ((4 5, 5 5, 5 0, 0 0, 0 1, 0 5, 4 5), (1 1, 2 1, 2 2, 1 1),"
@@ -1665,7 +1520,7 @@
         Ptr<MgPolygon> polygon = CreatePolygon();
         geom = lineString->SymetricDifference(polygon);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 4
         base = L"GEOMETRYCOLLECTION (LINESTRING (0 0, -0.049331651274742601 0.18445058333395731, -0.076070558282857095 0.37350258771831019, -0.0798268075493902 0.5643992092210961, -0.060545624501699299 0.75435674523904783, -0.018508172206062701 0.94060518714990526, 0 0.99246192690647705, 1.5 1.5, 2 1), POLYGON ((3 0, 0 0, 0 0.99246192690647705, 0 5, 5 5, 5 0, 3 0), (1 1, 2 1, 2 2, 1.5 1.5, 1 1), (3 3, 4 3, 4 4,3 3)))";
@@ -1672,7 +1527,7 @@
         Ptr<MgCurveString> curveString = CreateCurveString(0.0);
         geom = polygon->SymetricDifference(curveString);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 5
         Ptr<MgCurvePolygon> curvePolygon = CreateCurvePolygon(0.0);
@@ -1683,7 +1538,7 @@
         Ptr<MgMultiPoint> multiPoint = CreateMultiPoint();
         geom = point->SymetricDifference(multiPoint);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 7
         base = L"GEOMETRYCOLLECTION (POINT (7 8), LINESTRING (0 1, 3 4, 6 7, 9 10, 12 13, 15 16))";
@@ -1690,7 +1545,7 @@
         Ptr<MgMultiLineString> multiLineString = CreateMultiLineString();
         geom = multiPoint->SymetricDifference(multiLineString);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 8
         base = L"GEOMETRYCOLLECTION (LINESTRING (4 5, 6 7, 9 10, 12 13, 15 16),"
@@ -1699,7 +1554,7 @@
         Ptr<MgMultiPolygon> multiPolygon = CreateMultiPolygon();
         geom = multiLineString->SymetricDifference(multiPolygon);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 9
         base = L"GEOMETRYCOLLECTION (POINT (1 2), POINT (4 5), POINT (7 8),"
@@ -1708,7 +1563,7 @@
         Ptr<MgMultiCurveString> multiCurveString = CreateMultiCurveString();
         geom = multiPoint->SymetricDifference(multiCurveString);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 10
         Ptr<MgMultiCurvePolygon> multiCurvePolygon = CreateMultiCurvePolygon(3, 0.0);
@@ -1720,9 +1575,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1730,8 +1585,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_Union()
+TEST_CASE("Union", "[Geometry]")
 {
     try
     {
@@ -1745,7 +1599,7 @@
         Ptr<MgPoint> pointCoord = factory.CreatePoint(coord);
         Ptr<MgGeometry> geom = point->Union(pointCoord);
         STRING found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 2
         base = L"GEOMETRYCOLLECTION (LINESTRING (0 1, 2 3, 4 5), POINT (5 3))";
@@ -1752,7 +1606,7 @@
         Ptr<MgLineString> lineString = CreateLineString();
         geom = lineString->Union(point);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 3
         base = L"POLYGON ((4 5, 5 5, 5 0, 0 0, 0 1, 0 5, 4 5), (1 1, 2 1, 2 2, 1 1),"
@@ -1760,7 +1614,7 @@
         Ptr<MgPolygon> polygon = CreatePolygon();
         geom = polygon->Union(lineString);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 4
         base = L"GEOMETRYCOLLECTION (LINESTRING (0 0, -0.049331651274742601 0.18445058333395731, -0.076070558282857095 0.37350258771831019, -0.0798268075493902 0.5643992092210961, -0.060545624501699299 0.75435674523904783, -0.018508172206062701 0.94060518714990526, 0 0.99246192690647705, 1.5 1.5, 2 1), POLYGON ((3 0, 0 0, 0 0.99246192690647705, 0 5, 5 5, 5 0, 3 0), (1 1, 2 1, 2 2, 1.5 1.5, 1 1), (3 3, 4 3, 4 4,3 3)))";
@@ -1767,7 +1621,7 @@
         Ptr<MgCurveString> curveString = CreateCurveString(0.0);
         geom = curveString->Union(polygon);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 5
         base = L"GEOMETRYCOLLECTION (POLYGON ((100 100, 99.958214339826924 100.14943334715824, 99.931276918387084 100.30224284282258, 99.919447157774457 100.45695684801559, 99.922838985050518 100.61208538229199, 99.941419735064471 100.76613447306482, 99.975010465036377 100.91762054337813, 100.02328767787407 101.0650846995641, 100.08578643762691 101.20710678118655, 100.16190484707316 101.34231903796228, 100.25090984431932 101.46941930194401, 100.35194426258683 101.58718352810953, 100.46403508519673 101.69447758258438, 100.58610281625221 101.79026816497108, 100.7169718767742 101.87363275959679, 100.85538192616956 101.94376851984352, 101 102, 100 100), (200 200, 199.95821433982692 200.14943334715824, 199.93127691838708 200.30224284282258, 199.91944715777444 200.45695684801558, 199.92283898505053 200.61208538229198, 199.94141973506447 200.76613447306482, 199.97501046503638 200.91762054337812, 200.02328767787407 201.0650846995641, 200.08578643762689 201.20710678118655, 200.16190484707317
  201.34231903796228, 200.25090984431932 201.46941930194401,200.35194426258681 201.58718352810953, 200.46403508519671 201.6944775825844, 200.58610281625221 201.79026816497108, 200.71697187677418 201.87363275959677, 200.85538192616957 201.9437685198435, 201 202, 200 200), (300 300, 299.95821433982695 300.14943334715826, 299.93127691838708 300.30224284282258, 299.91944715777447 300.45695684801558, 299.92283898505053 300.61208538229198, 299.94141973506447 300.76613447306482, 299.97501046503641 300.91762054337812, 300.02328767787407 301.06508469956412, 300.08578643762689 301.20710678118655, 300.16190484707317 301.34231903796228, 300.25090984431932 301.46941930194401, 300.35194426258681 301.58718352810951, 300.46403508519671 301.6944775825844, 300.58610281625221 301.79026816497111, 300.71697187677421 301.87363275959677, 300.85538192616957 301.9437685198435, 301 302, 300 300)), LINESTRING (0 0, -0.049331651274742601 0.18445058333395731, -0.076070558282857095 0.37350258771831019, -0.0798268
 075493902 0.5643992092210961, -0.060545624501699299 0.75435674523904783, -0.018508172206062701 0.94060518714990526, 0.045672548622950601 1.1204286132756418, 0.1310606385532562 1.2912047931362536, 0.23641094695643791 1.4504434254749068, 0.3601872291077422 1.5958224524579303, 0.50058454809348885 1.7252219205068542, 0.65555559485563741 1.8367548939952993, 0.82284054256798778 1.9287949710194192, 1 2, 3 0, 3 2))";
@@ -1774,7 +1628,7 @@
         Ptr<MgCurvePolygon> curvePolygon = CreateCurvePolygon(0.0);
         geom = curvePolygon->Union(curveString);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 6
         base = L"MULTIPOINT (1 2, 4 5, 5 3, 7 8)";
@@ -1781,7 +1635,7 @@
         Ptr<MgMultiPoint> multiPoint = CreateMultiPoint();
         geom = multiPoint->Union(point);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 7
         base = L"GEOMETRYCOLLECTION (POINT (7 8), LINESTRING (0 1, 3 4, 6 7, 9 10, 12 13, 15 16))";
@@ -1788,7 +1642,7 @@
         Ptr<MgMultiLineString> multiLineString = CreateMultiLineString();
         geom = multiLineString->Union(multiPoint);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 8
         base = L"GEOMETRYCOLLECTION (LINESTRING (4 5, 6 7, 9 10, 12 13, 15 16),"
@@ -1797,7 +1651,7 @@
         Ptr<MgMultiPolygon> multiPolygon = CreateMultiPolygon();
         geom = multiPolygon->Union(multiLineString);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 9
         base = L"GEOMETRYCOLLECTION (LINESTRING (100 100, 100 101, 101 102, 103 100,"
@@ -1808,7 +1662,7 @@
         Ptr<MgMultiCurveString> multiCurveString = CreateMultiCurveString();
         geom = multiCurveString->Union(multiPolygon);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 10
         Ptr<MgMultiCurvePolygon> multiCurvePolygon = CreateMultiCurvePolygon(3, 0.0);
@@ -1820,9 +1674,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1830,8 +1684,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_Distance()
+TEST_CASE("Distance", "[Geometry]")
 {
     try
     {
@@ -1840,83 +1693,83 @@
         Ptr<MgCoordinateSystemMeasure> measure = CreateMeasureArbitrary();
         Ptr<MgCoordinateSystem> coordinateSystem = measure->GetCoordSys();
         double dist = point1->Distance(point2, measure);
-        CPPUNIT_ASSERT(dist == 0.0);
+        REQUIRE(dist == 0.0);
 
         Ptr<MgLineString> lineString = CreateLineString();
         dist = lineString->Distance(point1, measure);
-        CPPUNIT_ASSERT(dist == 2.2360679774997898);
+        REQUIRE(dist == 2.2360679774997898);
 
         double meters = coordinateSystem->ConvertCoordinateSystemUnitsToMeters(dist);
-        CPPUNIT_ASSERT(meters == 3598.6025831814218);
+        REQUIRE(meters == 3598.6025831814218);
 
         Ptr<MgPolygon> polygon = CreatePolygon();
         dist = polygon->Distance(lineString, measure);
-        CPPUNIT_ASSERT(dist == 1.0);
+        REQUIRE(dist == 1.0);
 
         meters = coordinateSystem->ConvertCoordinateSystemUnitsToMeters(dist);
-        CPPUNIT_ASSERT(meters == 1609.3440000000001);
+        REQUIRE(meters == 1609.3440000000001);
 
         Ptr<MgCurveString> curveString = CreateCurveString(0.0);
         dist = curveString->Distance(polygon, measure);
-        CPPUNIT_ASSERT(dist == 0.0);
+        REQUIRE(dist == 0.0);
 
         meters = coordinateSystem->ConvertCoordinateSystemUnitsToMeters(dist);
-        CPPUNIT_ASSERT(meters == 0.0);
+        REQUIRE(meters == 0.0);
 
         Ptr<MgCurvePolygon> curvePolygon = CreateCurvePolygon(0.0);
         dist = curvePolygon->Distance(lineString, measure);
-        CPPUNIT_ASSERT(dist == 135.05924625881784);
+        REQUIRE(dist == 135.05924625881784);
 
         meters = coordinateSystem->ConvertCoordinateSystemUnitsToMeters(dist);
-        CPPUNIT_ASSERT(meters == 217356.78761115094);
+        REQUIRE(meters == 217356.78761115094);
 
         Ptr<MgMultiPoint> multiPoint = CreateMultiPoint();
         dist = multiPoint->Distance(lineString, measure);
-        CPPUNIT_ASSERT(dist == 0.0);
+        REQUIRE(dist == 0.0);
 
         meters = coordinateSystem->ConvertCoordinateSystemUnitsToMeters(dist);
-        CPPUNIT_ASSERT(meters == 0.0);
+        REQUIRE(meters == 0.0);
 
         Ptr<MgMultiLineString> multiLineString = CreateMultiLineString();
         dist = multiLineString->Distance(multiPoint, measure);
-        CPPUNIT_ASSERT(dist == 1.4142135623730951);
+        REQUIRE(dist == 1.4142135623730951);
 
         meters = coordinateSystem->ConvertCoordinateSystemUnitsToMeters(dist);
-        CPPUNIT_ASSERT(meters == 2275.9561113237664);
+        REQUIRE(meters == 2275.9561113237664);
 
         Ptr<MgMultiPolygon> multiPolygon = CreateMultiPolygon();
         dist = multiPolygon->Distance(multiLineString, measure);
-        CPPUNIT_ASSERT(dist == 1.0);
+        REQUIRE(dist == 1.0);
 
         meters = coordinateSystem->ConvertCoordinateSystemUnitsToMeters(dist);
-        CPPUNIT_ASSERT(meters == 1609.3440000000001);
+        REQUIRE(meters == 1609.3440000000001);
 
         Ptr<MgMultiCurveString> multiCurveString = CreateMultiCurveString();
         dist = multiCurveString->Distance(lineString, measure);
-        CPPUNIT_ASSERT(dist == 135.05924625881784);
+        REQUIRE(dist == 135.05924625881784);
 
         meters = coordinateSystem->ConvertCoordinateSystemUnitsToMeters(dist);
-        CPPUNIT_ASSERT(meters == 217356.78761115094);
+        REQUIRE(meters == 217356.78761115094);
 
         Ptr<MgMultiCurvePolygon> multiCurvePolygon = CreateMultiCurvePolygon(2, 0.0);
         dist = multiCurvePolygon->Distance(lineString, measure);
-        CPPUNIT_ASSERT(dist == 135.05924625881784);
+        REQUIRE(dist == 135.05924625881784);
 
         meters = coordinateSystem->ConvertCoordinateSystemUnitsToMeters(dist);
-        CPPUNIT_ASSERT(meters == 217356.78761115094);
+        REQUIRE(meters == 217356.78761115094);
 
         Ptr<MgMultiGeometry> multiGeometry = CreateMultiGeometry();
         dist = multiGeometry->Distance(lineString, measure);
-        CPPUNIT_ASSERT(dist == 0.0);
+        REQUIRE(dist == 0.0);
 
         meters = coordinateSystem->ConvertCoordinateSystemUnitsToMeters(dist);
-        CPPUNIT_ASSERT(meters == 0.0);
+        REQUIRE(meters == 0.0);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1924,8 +1777,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_Transform()
+TEST_CASE("Transform", "[Geometry]")
 {
     try
     {
@@ -1941,31 +1793,31 @@
         Ptr<MgPoint> point = CreatePoint();
         Ptr<MgGeometricEntity> geom = point->Transform(transform);
         STRING found = geom->ToAwkt(false);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         base = L"LINESTRING (0 1, 2 3, 4 5)";
         Ptr<MgLineString> lineString = CreateLineString();
         geom = lineString->Transform(transform);
         found = geom->ToAwkt(false);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         base = L"POLYGON ((0 0, 5 0, 5 5, 0 5, 0 0), (1 1, 2 1, 2 2, 1 1), (3 3, 4 3, 4 4, 3 3))";
         Ptr<MgPolygon> polygon = CreatePolygon();
         geom = polygon->Transform(transform);
         found = geom->ToAwkt(false);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         base = L"CURVESTRING (0 0 (CIRCULARARCSEGMENT (0 1, 1 2), LINESTRINGSEGMENT (3 0, 3 2)))";
         Ptr<MgCurveString> curveString = CreateCurveString(0.0);
         geom = curveString->Transform(transform);
         found = geom->ToAwkt(false);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         base = L"(0 0 (CIRCULARARCSEGMENT (0 1, 1 2), LINESTRINGSEGMENT (0 0)))";
         Ptr<MgCurveRing> curveRing = CreateCurveRing(0.0);
         geom = curveRing->Transform(transform);
         found = geom->ToAwkt(false);
-        // CPPUNIT_ASSERT(CheckGeometry(found, base)); // This does not work on CurveRing objects
+        // REQUIRE(CheckGeometry(found, base)); // This does not work on CurveRing objects
 
         base = L"CURVEPOLYGON ((100 100 (CIRCULARARCSEGMENT (100 101, 101 102), LINESTRINGSEGMENT (100 100))),"
                L" (200 200 (CIRCULARARCSEGMENT (200 201, 201 202), LINESTRINGSEGMENT (200 200))),"
@@ -1973,19 +1825,19 @@
         Ptr<MgCurvePolygon> curvePolygon = CreateCurvePolygon(0.0);
         geom = curvePolygon->Transform(transform);
         found = geom->ToAwkt(false);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         base = L"MULTIPOINT XYZ (1 2 3, 4 5 6, 7 8 9)";
         Ptr<MgMultiPoint> multiPoint = CreateMultiPoint();
         geom = multiPoint->Transform(transform);
         found = geom->ToAwkt(false);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         base = L"MULTILINESTRING XYZ ((0 1 2, 3 4 5, 6 7 8), (9 10 11, 12 13 14, 15 16 17))";
         Ptr<MgMultiLineString> multiLineString = CreateMultiLineString();
         geom = multiLineString->Transform(transform);
         found = geom->ToAwkt(false);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         base = L"MULTIPOLYGON (((0 0, 5 0, 5 5, 0 5, 0 0), (1 1, 2 1, 2 2, 1 1),"
                L" (3 3, 4 3, 4 4, 3 3)), ((0 0, 5 0, 5 5, 0 5, 0 0), (1 1, 2 1, 2 2, 1 1),"
@@ -1993,7 +1845,7 @@
         Ptr<MgMultiPolygon> multiPolygon = CreateMultiPolygon();
         geom = multiPolygon->Transform(transform);
         found = geom->ToAwkt(false);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         base = L"MULTICURVESTRING ((100 100 (CIRCULARARCSEGMENT (100 101, 101 102), LINESTRINGSEGMENT (103 100, 103 102))),"
                L" (200 200 (CIRCULARARCSEGMENT (200 201, 201 202), LINESTRINGSEGMENT (203 200, 203 202))),"
@@ -2001,7 +1853,7 @@
         Ptr<MgMultiCurveString> multiCurveString = CreateMultiCurveString();
         geom = multiCurveString->Transform(transform);
         found = geom->ToAwkt(false);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         base = L"MULTICURVEPOLYGON (((100 100 (CIRCULARARCSEGMENT (100 101, 101 102), LINESTRINGSEGMENT (100 100))),"
                L" (200 200 (CIRCULARARCSEGMENT (200 201, 201 202), LINESTRINGSEGMENT (200 200))),"
@@ -2015,7 +1867,7 @@
         Ptr<MgMultiCurvePolygon> multiCurvePolygon = CreateMultiCurvePolygon(3, 0.0);
         geom = multiCurvePolygon->Transform(transform);
         found = geom->ToAwkt(false);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         base = L"GEOMETRYCOLLECTION (CURVEPOLYGON ((100 100 (CIRCULARARCSEGMENT (100 101, 101 102),"
                L" LINESTRINGSEGMENT (100 100))), (200 200 (CIRCULARARCSEGMENT (200 201, 201 202),"
@@ -2026,13 +1878,13 @@
         Ptr<MgMultiGeometry> multiGeometry = CreateMultiGeometry();
         geom = multiGeometry->Transform(transform);
         found = geom->ToAwkt(false);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -2040,8 +1892,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_Touches()
+TEST_CASE("Touches", "[Geometry]")
 {
     try
     {
@@ -2049,15 +1900,15 @@
         Ptr<MgPoint> point = CreatePoint();
         Ptr<MgPolygon> polygon = CreatePolygon();
         bool touches = point->Touches(polygon);
-        CPPUNIT_ASSERT(touches);
+        REQUIRE(touches);
         touches = polygon->Touches(point);
-        CPPUNIT_ASSERT(touches);
+        REQUIRE(touches);
         Ptr<MgPreparedGeometry> ppoint = point->Prepare();
         Ptr<MgPreparedGeometry> ppolygon = polygon->Prepare();
         touches = ppoint->Touches(polygon);
-        CPPUNIT_ASSERT(touches);
+        REQUIRE(touches);
         touches = ppolygon->Touches(point);
-        CPPUNIT_ASSERT(touches);
+        REQUIRE(touches);
 
         //TEST 2
         MgGeometryFactory factory;
@@ -2064,29 +1915,29 @@
         Ptr<MgCoordinate> coord = factory.CreateCoordinateXY(100.0, 100.0);
         point = new MgPoint(coord);
         touches = point->Touches(polygon);
-        CPPUNIT_ASSERT(!touches);
+        REQUIRE(!touches);
         touches = polygon->Touches(point);
-        CPPUNIT_ASSERT(!touches);
+        REQUIRE(!touches);
         ppoint = point->Prepare();
         ppolygon = polygon->Prepare();
         touches = ppoint->Touches(polygon);
-        CPPUNIT_ASSERT(!touches);
+        REQUIRE(!touches);
         touches = ppolygon->Touches(point);
-        CPPUNIT_ASSERT(!touches);
+        REQUIRE(!touches);
 
         //TEST 3
         Ptr<MgMultiPolygon> multiPolygon = CreateMultiPolygon();
         point = CreatePoint();
         touches = point->Touches(multiPolygon);
-        CPPUNIT_ASSERT(!touches);
+        REQUIRE(!touches);
         touches = multiPolygon->Touches(point);
-        CPPUNIT_ASSERT(!touches);
+        REQUIRE(!touches);
         ppoint = point->Prepare();
         Ptr<MgPreparedGeometry> pmultiPolygon = multiPolygon->Prepare();
         touches = ppoint->Touches(multiPolygon);
-        CPPUNIT_ASSERT(!touches);
+        REQUIRE(!touches);
         touches = pmultiPolygon->Touches(point);
-        CPPUNIT_ASSERT(!touches);
+        REQUIRE(!touches);
 
         //TEST 4
         Ptr<MgCoordinateCollection> collection = new MgCoordinateCollection();
@@ -2119,10 +1970,10 @@
         coord = factory.CreateCoordinateXY(100.0, 100.0);
         point = factory.CreatePoint(coord);
         touches = polygon->Touches(point);
-        CPPUNIT_ASSERT(!touches);
+        REQUIRE(!touches);
         ppolygon = polygon->Prepare();
         touches = ppolygon->Touches(point);
-        CPPUNIT_ASSERT(!touches);
+        REQUIRE(!touches);
 
         //TEST 5
         coord1 = factory.CreateCoordinateXY( 45.0,  45.0);
@@ -2154,10 +2005,10 @@
         coord = factory.CreateCoordinateXY(100.0, 100.0);
         point = factory.CreatePoint(coord);
         touches = point->Touches(polygon);
-        CPPUNIT_ASSERT(!touches);
+        REQUIRE(!touches);
         ppoint = point->Prepare();
         touches = ppoint->Touches(polygon);
-        CPPUNIT_ASSERT(!touches);
+        REQUIRE(!touches);
 
         //TEST 6
         coord1 = factory.CreateCoordinateXY(100.0, 100.0);
@@ -2188,9 +2039,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -2198,8 +2049,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_Envelope()
+TEST_CASE("Envelope", "[Geometry]")
 {
     try
     {
@@ -2221,9 +2071,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -2231,8 +2081,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_GetArea()
+TEST_CASE("GetArea", "[Geometry]")
 {
     try
     {
@@ -2241,62 +2090,62 @@
         //TEST 1
         Ptr<MgPoint> point = CreatePoint();
         double area = point->GetArea();
-        CPPUNIT_ASSERT(area == 0.0);
+        REQUIRE(area == 0.0);
 
         //TEST 2
         Ptr<MgLineString> lineString = CreateLineString();
         area = lineString->GetArea();
-        CPPUNIT_ASSERT(area == 0.0);
+        REQUIRE(area == 0.0);
 
         //TEST 3
         Ptr<MgPolygon> polygon = CreatePolygon();
         area = polygon->GetArea();
-        CPPUNIT_ASSERT(area == 24.0);
+        REQUIRE(area == 24.0);
 
         //TEST 4
         Ptr<MgCurveString> curveString = CreateCurveString(0.0);
         area = curveString->GetArea();
-        CPPUNIT_ASSERT(area == 0.0);
+        REQUIRE(area == 0.0);
 
         //TEST 5
         Ptr<MgCurveRing> curveRing = CreateCurveRing(0.0);
         area = curveRing->GetArea();
-        CPPUNIT_ASSERT(area == 0.0);
+        REQUIRE(area == 0.0);
 
         //TEST 6
         Ptr<MgCurvePolygon> curvePolygon = CreateCurvePolygon(0.0);
         area = curveRing->GetArea();
-        CPPUNIT_ASSERT(area == 0.0);
+        REQUIRE(area == 0.0);
 
         //TEST 7
         Ptr<MgMultiPoint> multiPoint = CreateMultiPoint();
         area = multiPoint->GetArea();
-        CPPUNIT_ASSERT(area == 0.0);
+        REQUIRE(area == 0.0);
 
         //TEST 8
         Ptr<MgMultiLineString> multiLineString = CreateMultiLineString();
         area = multiLineString->GetArea();
-        CPPUNIT_ASSERT(area == 0.0);
+        REQUIRE(area == 0.0);
 
         //TEST 9
         Ptr<MgMultiPolygon> multiPolygon = CreateMultiPolygon();
         area = multiPolygon->GetArea();
-        CPPUNIT_ASSERT(area == 48.0);
+        REQUIRE(area == 48.0);
 
         //TEST 10
         Ptr<MgMultiCurveString> multiCurveString = CreateMultiCurveString();
         area = multiCurveString->GetArea();
-        CPPUNIT_ASSERT(area == 0.0);
+        REQUIRE(area == 0.0);
 
         //TEST 11
         Ptr<MgMultiCurvePolygon> multiCurvePolygon = CreateMultiCurvePolygon(3, 0.0);
         area = curveRing->GetArea();
-        CPPUNIT_ASSERT(area == 0.0);
+        REQUIRE(area == 0.0);
 
         //TEST 12
         Ptr<MgMultiGeometry> multiGeometry = CreateMultiGeometry();
         area = multiGeometry->GetArea();
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(area, 23.375, 0.0001);
+        REQUIRE(area == Approx(23.375));
 
         //TEST 13
         Ptr<MgCoordinate> coord1 = factory.CreateCoordinateXYZ(-45.0, -45.0, 1.0);
@@ -2314,15 +2163,15 @@
 
         Ptr<MgLinearRing> linearRing = factory.CreateLinearRing(coords);
 
-        polygon = factory.CreatePolygon(linearRing, NULL);
+        polygon = factory.CreatePolygon(linearRing, nullptr);
         area = polygon->GetArea();
-        CPPUNIT_ASSERT(area == 8100.0);
+        REQUIRE(area == 8100.0);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -2330,8 +2179,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_GetCentroid()
+TEST_CASE("GetCentroid", "[Geometry]")
 {
     try
     {
@@ -2343,7 +2191,7 @@
         Ptr<MgPoint> point = CreatePoint();
         Ptr<MgPoint> centroid = point->GetCentroid();
         STRING found = readerWriter.Write(centroid);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 2
         base = L"POINT (2 3)";
@@ -2350,7 +2198,7 @@
         Ptr<MgLineString> lineString = CreateLineString();
         centroid = lineString->GetCentroid();
         found = readerWriter.Write(centroid);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 3
         base = L"POINT (2.5 2.5)";
@@ -2357,7 +2205,7 @@
         Ptr<MgPolygon> polygon = CreatePolygon();
         centroid = polygon->GetCentroid();
         found = readerWriter.Write(centroid);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 4
         base = L"POINT (1.672 1.046)";
@@ -2364,7 +2212,7 @@
         Ptr<MgCurveString> curveString = CreateCurveString(0.0);
         centroid = curveString->GetCentroid();
         found = readerWriter.Write(centroid);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 5
         base = L"POINT (0 0)";
@@ -2381,7 +2229,7 @@
         Ptr<MgMultiPoint> multiPoint = CreateMultiPoint();
         centroid = multiPoint->GetCentroid();
         found = readerWriter.Write(centroid);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 8
         base = L"POINT (7.5 8.5)";
@@ -2388,7 +2236,7 @@
         Ptr<MgMultiLineString> multiLineString = CreateMultiLineString();
         centroid = multiLineString->GetCentroid();
         found = readerWriter.Write(centroid);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 9
         base = L"POINT (2.5 2.5)";
@@ -2395,7 +2243,7 @@
         Ptr<MgMultiPolygon> multiPolygon = CreateMultiPolygon();
         centroid = multiPolygon->GetCentroid();
         found = readerWriter.Write(centroid);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 10
         base = L"POINT (201.7 201.0)";
@@ -2402,7 +2250,7 @@
         Ptr<MgMultiCurveString> multiCurveString = CreateMultiCurveString();
         centroid = multiCurveString->GetCentroid();
         found = readerWriter.Write(centroid);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 11
         base = L"POINT (0 0)";
@@ -2414,7 +2262,7 @@
         Ptr<MgMultiGeometry> multiGeometry = CreateMultiGeometry();
         centroid = multiGeometry->GetCentroid();
         found = readerWriter.Write(centroid);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 13
         Ptr<MgCoordinate> coord1 = factory.CreateCoordinateXYZ(-45.0, -45.0, 1.0);
@@ -2433,16 +2281,16 @@
         Ptr<MgLinearRing> linearRing = factory.CreateLinearRing(coords);
 
         base = L"POINT (0 0)";
-        polygon = factory.CreatePolygon(linearRing, NULL);
+        polygon = factory.CreatePolygon(linearRing, nullptr);
         centroid = polygon->GetCentroid();
         found = readerWriter.Write(centroid);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -2450,8 +2298,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_GetInteriorPoint()
+TEST_CASE("GetInteriorPoint", "[Geometry]")
 {
     try
     {
@@ -2471,9 +2318,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -2481,53 +2328,53 @@
     }
 }
 
-void TestGeometry::TestCase_CoordinateIterator()
+TEST_CASE("Coordinate Iterator", "[Geometry]")
 {
     try
     {
         Ptr<MgGeometricEntity> point = CreatePoint();
         Ptr<MgCoordinateIterator> iterator = point->GetCoordinates();
-        CPPUNIT_ASSERT(iterator->GetCount() == 1);
+        REQUIRE(iterator->GetCount() == 1);
 
         Ptr<MgGeometricEntity> lineString = CreateLineString();
         iterator = lineString->GetCoordinates();
-        CPPUNIT_ASSERT(iterator->GetCount() == 3);
+        REQUIRE(iterator->GetCount() == 3);
 
         Ptr<MgGeometricEntity> polygon = CreatePolygon();
         iterator = polygon->GetCoordinates();
-        CPPUNIT_ASSERT(iterator->GetCount() == 13);
+        REQUIRE(iterator->GetCount() == 13);
 
         Ptr<MgGeometricEntity> curveString = CreateCurveString(0.0);
         iterator = curveString->GetCoordinates();
-        CPPUNIT_ASSERT(iterator->GetCount() == 20);
+        REQUIRE(iterator->GetCount() == 20);
 
         Ptr<MgGeometricEntity> curveRing = CreateCurveRing(0.0);
         iterator = curveRing->GetCoordinates();
-        CPPUNIT_ASSERT(iterator->GetCount() == 19);
+        REQUIRE(iterator->GetCount() == 19);
 
         Ptr<MgGeometricEntity> multiPoint = CreateMultiPoint();
         iterator = multiPoint->GetCoordinates();
-        CPPUNIT_ASSERT(iterator->GetCount() == 3);
+        REQUIRE(iterator->GetCount() == 3);
 
         Ptr<MgGeometricEntity> multiLineString = CreateMultiLineString();
         iterator = multiLineString->GetCoordinates();
-        CPPUNIT_ASSERT(iterator->GetCount() == 6);
+        REQUIRE(iterator->GetCount() == 6);
 
         Ptr<MgGeometricEntity> multiPolygon = CreateMultiPolygon();
         iterator = multiPolygon->GetCoordinates();
-        CPPUNIT_ASSERT(iterator->GetCount() == 26);
+        REQUIRE(iterator->GetCount() == 26);
 
         Ptr<MgGeometricEntity> multiCurveString = CreateMultiCurveString();
         iterator = multiCurveString->GetCoordinates();
-        CPPUNIT_ASSERT(iterator->GetCount() == 60);
+        REQUIRE(iterator->GetCount() == 60);
 
         Ptr<MgGeometricEntity> multiCurvePolygon = CreateMultiCurvePolygon(2, 0.0);
         iterator = multiCurvePolygon->GetCoordinates();
-        CPPUNIT_ASSERT(iterator->GetCount() == 114);
+        REQUIRE(iterator->GetCount() == 114);
 
         Ptr<MgGeometricEntity> multiGeometry = CreateMultiGeometry();
         iterator = multiGeometry->GetCoordinates();
-        CPPUNIT_ASSERT(iterator->GetCount() == 94);
+        REQUIRE(iterator->GetCount() == 94);
     }
     catch (...)
     {
@@ -2535,7 +2382,7 @@
     }
 }
 
-void TestGeometry::TestCase_Simplify_BadParams()
+TEST_CASE("Simplify with bad params", "[Geometry]")
 {
     try
     {
@@ -2543,15 +2390,15 @@
         Ptr<MgWktReaderWriter> wktRw = new MgWktReaderWriter();
         Ptr<MgGeometry> geom = wktRw->Read(L"POINT (1 1)");
 
-        CPPUNIT_ASSERT_THROW_MG(simp->Simplify(NULL, 1.0, MgGeometrySimplificationAlgorithmType::DouglasPeucker), MgNullArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(simp->Simplify(geom, 1.0, -1), MgInvalidArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(simp->Simplify(geom, 1.0, 2), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(simp->Simplify(nullptr, 1.0, MgGeometrySimplificationAlgorithmType::DouglasPeucker), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(simp->Simplify(geom, 1.0, -1), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(simp->Simplify(geom, 1.0, 2), MgInvalidArgumentException*);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -2559,7 +2406,7 @@
     }
 }
 
-void TestGeometry::TestCase_Simplify_DP()
+TEST_CASE("Simplify (Douglas Peucker)", "[Geometry]")
 {
     try
     {
@@ -2575,9 +2422,9 @@
 
         Ptr<MgGeometry> gInput = wktRw->Read(wkt);
         Ptr<MgGeometry> gOutput = simp->Simplify(gInput, 10.0, algo);
-        CPPUNIT_ASSERT(NULL != gOutput.p);
-        CPPUNIT_ASSERT(gOutput->IsValid());
-        CPPUNIT_ASSERT(gTest->Equals(gOutput));
+        REQUIRE(nullptr != gOutput.p);
+        REQUIRE(gOutput->IsValid());
+        REQUIRE(gTest->Equals(gOutput));
 
         // 2 - PolygonReductionWithSplit
         gTest = wktRw->Read(L"MULTIPOLYGON (((40.0 240.0, 160.0 240.0, 40.0 140.0, 40.0 240.0)), \
@@ -2585,9 +2432,9 @@
         gInput = wktRw->Read(L"POLYGON ((40 240, 160 241, 280 240, 280 160, \
                     160 240, 40 140, 40 240))");
         gOutput = simp->Simplify(gInput, 10.0, algo);
-        CPPUNIT_ASSERT(NULL != gOutput.p);
-        CPPUNIT_ASSERT(gOutput->IsValid());
-        CPPUNIT_ASSERT(gTest->Equals(gOutput));
+        REQUIRE(nullptr != gOutput.p);
+        REQUIRE(gOutput->IsValid());
+        REQUIRE(gTest->Equals(gOutput));
         
         // 3 - PolygonReduction
         gTest = wktRw->Read(L"POLYGON ((120 120, 140 199, 160 200, 180 199, 220 120, 120 120))");
@@ -2594,9 +2441,9 @@
         gInput = wktRw->Read(L"POLYGON ((120 120, 121 121, 122 122, 220 120, \
                     180 199, 160 200, 140 199, 120 120))");
         gOutput = simp->Simplify(gInput, 10.0, algo);
-        CPPUNIT_ASSERT(NULL != gOutput.p);
-        CPPUNIT_ASSERT(gOutput->IsValid());
-        CPPUNIT_ASSERT(gTest->Equals(gOutput));
+        REQUIRE(nullptr != gOutput.p);
+        REQUIRE(gOutput->IsValid());
+        REQUIRE(gTest->Equals(gOutput));
 
         // 4 - PolygonWithTouchingHole
         gTest = wktRw->Read(L"POLYGON ((80 200, 160 200, 240 200, 240 60, 80 60, 80 200), \
@@ -2604,37 +2451,37 @@
         gInput = wktRw->Read(L"POLYGON ((80 200, 240 200, 240 60, 80 60, 80 200), \
                     (120 120, 220 120, 180 199, 160 200, 140 199, 120 120))");
         gOutput = simp->Simplify(gInput, 10.0, algo);
-        CPPUNIT_ASSERT(NULL != gOutput.p);
-        CPPUNIT_ASSERT(gOutput->IsValid());
-        CPPUNIT_ASSERT(gTest->Equals(gOutput));
+        REQUIRE(nullptr != gOutput.p);
+        REQUIRE(gOutput->IsValid());
+        REQUIRE(gTest->Equals(gOutput));
 
         // 5 - FlattishPolygon
         gInput = wktRw->Read(L"POLYGON ((0 0, 50 0, 53 0, 55 0, 100 0, 70 1, 60 1, 50 1, 40 1, 0 0))");
         gOutput = simp->Simplify(gInput, 10.0, algo);
-        //Unlike GEOS, we don't support "POLYGON EMPTY", so we should be expecting NULL instead
-        CPPUNIT_ASSERT(NULL == gOutput.p);
+        //Unlike GEOS, we don't support "POLYGON EMPTY", so we should be expecting nullptr instead
+        REQUIRE(nullptr == gOutput.p);
 
         // 6 - TinySquare
         gInput = wktRw->Read(L"POLYGON ((0 5, 5 5, 5 0, 0 0, 0 1, 0 5))");
         gOutput = simp->Simplify(gInput, 10.0, algo);
-        //Unlike GEOS, we don't support "POLYGON EMPTY", so we should be expecting NULL instead
-        CPPUNIT_ASSERT(NULL == gOutput.p);
+        //Unlike GEOS, we don't support "POLYGON EMPTY", so we should be expecting nullptr instead
+        REQUIRE(nullptr == gOutput.p);
 
         // 7 - TinyLineString
         gTest = wktRw->Read(L"LINESTRING (0 5, 5 5)");
         gInput = wktRw->Read(L"LINESTRING (0 5, 1 5, 2 5, 5 5)");
         gOutput = simp->Simplify(gInput, 10.0, algo);
-        CPPUNIT_ASSERT(NULL != gOutput.p);
-        CPPUNIT_ASSERT(gOutput->IsValid());
-        CPPUNIT_ASSERT(gTest->Equals(gOutput));
+        REQUIRE(nullptr != gOutput.p);
+        REQUIRE(gOutput->IsValid());
+        REQUIRE(gTest->Equals(gOutput));
 
         // 8 - MultiPoint
         gTest = wktRw->Read(L"MULTIPOINT(80 200, 240 200, 240 60, 80 60, 80 200, 140 199, 120 120)");
         gInput = wktRw->Read(L"MULTIPOINT(80 200, 240 200, 240 60, 80 60, 80 200, 140 199, 120 120)");
         gOutput = simp->Simplify(gInput, 10.0, algo);
-        CPPUNIT_ASSERT(NULL != gOutput.p);
-        CPPUNIT_ASSERT(gOutput->IsValid());
-        CPPUNIT_ASSERT(gTest->Equals(gOutput));
+        REQUIRE(nullptr != gOutput.p);
+        REQUIRE(gOutput->IsValid());
+        REQUIRE(gTest->Equals(gOutput));
 
         // 9 - MultiLineString
         gTest = wktRw->Read(L"MULTILINESTRING( (0 0, 100 0), (0 0, 100 0) )");
@@ -2641,9 +2488,9 @@
         gInput = wktRw->Read(L"MULTILINESTRING( (0 0, 50 0, 70 0, 80 0, 100 0), \
                     (0 0, 50 1, 60 1, 100 0) )");
         gOutput = simp->Simplify(gInput, 10.0, algo);
-        CPPUNIT_ASSERT(NULL != gOutput.p);
-        CPPUNIT_ASSERT(gOutput->IsValid());
-        CPPUNIT_ASSERT(gTest->Equals(gOutput));
+        REQUIRE(nullptr != gOutput.p);
+        REQUIRE(gOutput->IsValid());
+        REQUIRE(gTest->Equals(gOutput));
 
         // 10 - GeometryCollection
         gTest = wktRw->Read(L"MULTILINESTRING( (0 0, 100 0), (0 0, 100 0) )");
@@ -2652,17 +2499,17 @@
                     POLYGON ((80 200, 240 200, 240 60, 80 60, 80 200)), \
                     LINESTRING (80 200, 240 200, 240 60, 80 60, 80 200, 140 199, 120 120) )");
         gOutput = simp->Simplify(gInput, 10.0, algo);
-        CPPUNIT_ASSERT(NULL != gOutput.p);
-        CPPUNIT_ASSERT(gOutput->IsValid());
+        REQUIRE(nullptr != gOutput.p);
+        REQUIRE(gOutput->IsValid());
         //STRING sTest = gTest->ToAwkt(true);
         //STRING sOutput = gOutput->ToAwkt(true);
-        //CPPUNIT_ASSERT(gTest->Equals(gOutput));
+        //REQUIRE(gTest->Equals(gOutput));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -2670,7 +2517,7 @@
     }
 }
 
-void TestGeometry::TestCase_Simplify_TP()
+TEST_CASE("Simplify (Topology Preserving)", "[Geometry]")
 {
     try
     {
@@ -2682,9 +2529,9 @@
         Ptr<MgGeometry> gTest = wktRw->Read(L"POINT (10 10)");
         Ptr<MgGeometry> gInput = wktRw->Read(L"POINT (10 10)");
         Ptr<MgGeometry> gOutput = simp->Simplify(gInput, 10.0, algo);
-        CPPUNIT_ASSERT(NULL != gOutput.p);
-        CPPUNIT_ASSERT(gOutput->IsValid());
-        CPPUNIT_ASSERT(gTest->Equals(gOutput));
+        REQUIRE(nullptr != gOutput.p);
+        REQUIRE(gOutput->IsValid());
+        REQUIRE(gTest->Equals(gOutput));
 
         // PolygonWithSpike
         gTest = wktRw->Read(L"POLYGON (( \
@@ -2705,8 +2552,8 @@
       3312468.253 6646874.01, 3312463.52 6646875.779, \
       3312459.605 6646878.353))");
         gOutput = simp->Simplify(gInput, 2.0, algo);
-        CPPUNIT_ASSERT(NULL != gOutput.p);
-        CPPUNIT_ASSERT(gOutput->IsValid());
+        REQUIRE(nullptr != gOutput.p);
+        REQUIRE(gOutput->IsValid());
 
         // PolygonNoReduction
         gTest = wktRw->Read(L"POLYGON((20 220, 40 220, 60 220, 80 220, \
@@ -2716,9 +2563,9 @@
                     100 220, 120 220, 140 220, 140 180, 100 180, \
                     60 180, 20 180, 20 220))");
         gOutput = simp->Simplify(gInput, 10.0, algo);
-        CPPUNIT_ASSERT(NULL != gOutput.p);
-        CPPUNIT_ASSERT(gOutput->IsValid());
-        CPPUNIT_ASSERT(gTest->Equals(gOutput));
+        REQUIRE(nullptr != gOutput.p);
+        REQUIRE(gOutput->IsValid());
+        REQUIRE(gTest->Equals(gOutput));
 
         // PolygonNoReductionWithConflicts
         gTest = wktRw->Read(L"POLYGON ((40 240, 160 241, 280 240, 280 160, \
@@ -2726,9 +2573,9 @@
         gInput = wktRw->Read(L"POLYGON ((40 240, 160 241, 280 240, 280 160, \
                         160 240, 40 140, 40 240))");
         gOutput = simp->Simplify(gInput, 10.0, algo);
-        CPPUNIT_ASSERT(NULL != gOutput.p);
-        CPPUNIT_ASSERT(gOutput->IsValid());
-        CPPUNIT_ASSERT(gTest->Equals(gOutput));
+        REQUIRE(nullptr != gOutput.p);
+        REQUIRE(gOutput->IsValid());
+        REQUIRE(gTest->Equals(gOutput));
 
         // PolygonWithTouchingHole
         gTest = wktRw->Read(L"POLYGON ((80 200, 240 200, 240 60, 80 60, 80 200), \
@@ -2736,9 +2583,9 @@
         gInput = wktRw->Read(L"POLYGON ((80 200, 240 200, 240 60, 80 60, 80 200), \
                     (120 120, 220 120, 180 199, 160 200, 140 199, 120 120))");
         gOutput = simp->Simplify(gInput, 10.0, algo);
-        CPPUNIT_ASSERT(NULL != gOutput.p);
-        CPPUNIT_ASSERT(gOutput->IsValid());
-        CPPUNIT_ASSERT(gTest->Equals(gOutput));
+        REQUIRE(nullptr != gOutput.p);
+        REQUIRE(gOutput->IsValid());
+        REQUIRE(gTest->Equals(gOutput));
 
         // FlattishPolygon
         gTest = wktRw->Read(L"POLYGON ((0 0, 50 0, 53 0, 55 0, 100 0, \
@@ -2746,11 +2593,11 @@
         gInput = wktRw->Read(L"POLYGON ((0 0, 50 0, 53 0, 55 0, 100 0, \
                     70 1, 60 1, 50 1, 40 1, 0 0))");
         gOutput = simp->Simplify(gInput, 10.0, algo);
-        CPPUNIT_ASSERT(NULL != gOutput.p);
-        CPPUNIT_ASSERT(gOutput->IsValid());
+        REQUIRE(nullptr != gOutput.p);
+        REQUIRE(gOutput->IsValid());
         //STRING sTest = gTest->ToAwkt(true);
         //STRING sOutput = gOutput->ToAwkt(true);
-        //CPPUNIT_ASSERT(gTest->Equals(gOutput));
+        //REQUIRE(gTest->Equals(gOutput));
 
         // PolygonWithFlattishHole
         gTest = wktRw->Read(L"POLYGON ((0 0, 0 200, 200 200, 200 0, 0 0), \
@@ -2758,25 +2605,25 @@
         gInput = wktRw->Read(L"POLYGON ((0 0, 0 200, 200 200, 200 0, 0 0), \
                     (140 40, 90 95, 40 160, 95 100, 140 40))");
         gOutput = simp->Simplify(gInput, 10.0, algo);
-        CPPUNIT_ASSERT(NULL != gOutput.p);
-        CPPUNIT_ASSERT(gOutput->IsValid()); 
-        CPPUNIT_ASSERT(gTest->Equals(gOutput));
+        REQUIRE(nullptr != gOutput.p);
+        REQUIRE(gOutput->IsValid()); 
+        REQUIRE(gTest->Equals(gOutput));
 
         // Tiny square
         gTest = wktRw->Read(L"POLYGON ((0 5, 5 5, 5 0, 0 0, 0 1, 0 5))");
         gInput = wktRw->Read(L"POLYGON ((0 5, 5 5, 5 0, 0 0, 0 1, 0 5))");
         gOutput = simp->Simplify(gInput, 10.0, algo);
-        CPPUNIT_ASSERT(NULL != gOutput.p);
-        CPPUNIT_ASSERT(gOutput->IsValid());
-        CPPUNIT_ASSERT(gTest->Equals(gOutput));
+        REQUIRE(nullptr != gOutput.p);
+        REQUIRE(gOutput->IsValid());
+        REQUIRE(gTest->Equals(gOutput));
         
         // TinyClosedLineString
         gTest = wktRw->Read(L"LINESTRING (0 0, 5 0, 5 5, 0 0)");
         gInput = wktRw->Read(L"LINESTRING (0 0, 5 0, 5 5, 0 0)");
         gOutput = simp->Simplify(gInput, 10.0, algo);
-        CPPUNIT_ASSERT(NULL != gOutput.p);
-        CPPUNIT_ASSERT(gOutput->IsValid());
-        CPPUNIT_ASSERT(gTest->Equals(gOutput));
+        REQUIRE(nullptr != gOutput.p);
+        REQUIRE(gOutput->IsValid());
+        REQUIRE(gTest->Equals(gOutput));
 
         // MultiPoint
         gTest = wktRw->Read(L"MULTIPOINT(80 200, 240 200, 240 60, \
@@ -2784,9 +2631,9 @@
         gInput = wktRw->Read(L"MULTIPOINT(80 200, 240 200, 240 60, \
                     80 60, 80 200, 140 199, 120 120)");
         gOutput = simp->Simplify(gInput, 10.0, algo);
-        CPPUNIT_ASSERT(NULL != gOutput.p);
-        CPPUNIT_ASSERT(gOutput->IsValid());
-        CPPUNIT_ASSERT(gTest->Equals(gOutput));
+        REQUIRE(nullptr != gOutput.p);
+        REQUIRE(gOutput->IsValid());
+        REQUIRE(gTest->Equals(gOutput));
 
         // MultiLineString
         gTest = wktRw->Read(L"MULTILINESTRING((0 0, 50 0, 70 0, 80 0, 100 0), \
@@ -2794,11 +2641,11 @@
         gInput = wktRw->Read(L"MULTILINESTRING((0 0, 50 0, 70 0, 80 0, 100 0), \
                     (0 0, 50 1, 60 1, 100 0))");
         gOutput = simp->Simplify(gInput, 10.0, algo);
-        CPPUNIT_ASSERT(NULL != gOutput.p);
-        CPPUNIT_ASSERT(gOutput->IsValid());
+        REQUIRE(nullptr != gOutput.p);
+        REQUIRE(gOutput->IsValid());
         //STRING sTest = gTest->ToAwkt(true);
         //STRING sOutput = gOutput->ToAwkt(true);
-        //CPPUNIT_ASSERT(gTest->Equals(gOutput));
+        //REQUIRE(gTest->Equals(gOutput));
 
         // GeometryCollection
         gTest = wktRw->Read(L"GEOMETRYCOLLECTION ( \
@@ -2810,15 +2657,15 @@
                     POLYGON ((80 200, 240 200, 240 60, 80 60, 80 200)), \
                     LINESTRING (80 200, 240 200, 240 60, 80 60, 80 200, 140 199, 120 120))");
         gOutput = simp->Simplify(gInput, 10.0, algo);
-        CPPUNIT_ASSERT(NULL != gOutput.p);
-        CPPUNIT_ASSERT(gOutput->IsValid());
-        CPPUNIT_ASSERT(gTest->Equals(gOutput));
+        REQUIRE(nullptr != gOutput.p);
+        REQUIRE(gOutput->IsValid());
+        REQUIRE(gTest->Equals(gOutput));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -2826,20 +2673,24 @@
     }
 }
 
-void TestGeometry::TestCase_PreparedGeometryPerformance()
+#ifdef TEST_PREPARED_GEOMETRY_PERF
+TEST_CASE("Prepared Geometry Performance", "[Geometry]")
+#else
+void PreparedGeometryPerformance()
+#endif
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if (serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestGeometry::TestCase_PreparedGeometry", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestGeometry::TestCase_PreparedGeometry", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestGeometry::TestCase_PreparedGeometry", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestGeometry::TestCase_PreparedGeometry", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgAgfReaderWriter> agfRw = new MgAgfReaderWriter();
@@ -2851,7 +2702,7 @@
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
         STRING className = L"";
         Ptr<MgFeatureQueryOptions> options = new MgFeatureQueryOptions();
-        CPPUNIT_ASSERT_THROW_MG(pService->SelectFeatures(resource, className, options), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->SelectFeatures(resource, className, options), MgInvalidArgumentException*);
 
         resource = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
         className = L"Parcels";
@@ -2943,19 +2794,19 @@
         ACE_DEBUG((LM_INFO, ACE_TEXT("\n  Execution Time: = %6.4f (s)\n"), ((GetTickCount() - lStart) / 1000.0)));
         ACE_DEBUG((LM_INFO, ACE_TEXT("  Contains: %d, Crosses: %d, Disjoint: %d, Intersects: %d, Overlaps: %d, Touches: %d, Within: %d\n"), containsCount2, crossesCount2, disjointCount2, intersectsCount2, overlapsCount2, touchesCount2, withinCount2));
 
-        CPPUNIT_ASSERT(containsCount1 == containsCount2);
-        CPPUNIT_ASSERT(crossesCount2 == crossesCount2);
-        CPPUNIT_ASSERT(disjointCount2 == disjointCount2);
-        CPPUNIT_ASSERT(intersectsCount2 == intersectsCount2);
-        CPPUNIT_ASSERT(overlapsCount2 == overlapsCount2);
-        CPPUNIT_ASSERT(touchesCount2 == touchesCount2);
-        CPPUNIT_ASSERT(withinCount2 == withinCount2);
+        REQUIRE(containsCount1 == containsCount2);
+        REQUIRE(crossesCount2 == crossesCount2);
+        REQUIRE(disjointCount2 == disjointCount2);
+        REQUIRE(intersectsCount2 == intersectsCount2);
+        REQUIRE(overlapsCount2 == overlapsCount2);
+        REQUIRE(touchesCount2 == touchesCount2);
+        REQUIRE(withinCount2 == withinCount2);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -2963,7 +2814,7 @@
     }
 }
 
-void TestGeometry::TestCase_CurvePolygon_AsGeoJSON()
+TEST_CASE("CurvePolygon as GeoJSON", "[Geometry]")
 {
     try
     {
@@ -2973,13 +2824,13 @@
         Ptr<MgGeoJsonWriter> gw = new MgGeoJsonWriter();
         STRING geoJson = gw->GeometryToGeoJson(geom);
 
-        CPPUNIT_ASSERT(geoJson.find(L"geometry\": null") == STRING::npos);
+        REQUIRE(geoJson.find(L"geometry\": null") == STRING::npos);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -2987,7 +2838,7 @@
     }
 }
 
-void TestGeometry::TestCase_CurveString_AsGeoJSON()
+TEST_CASE("CurveString as GeoJSON", "[Geometry]")
 {
     try
     {
@@ -2997,13 +2848,13 @@
         Ptr<MgGeoJsonWriter> gw = new MgGeoJsonWriter();
         STRING geoJson = gw->GeometryToGeoJson(geom);
 
-        CPPUNIT_ASSERT(geoJson.find(L"geometry\": null") == STRING::npos);
+        REQUIRE(geoJson.find(L"geometry\": null") == STRING::npos);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -3011,7 +2862,7 @@
     }
 }
 
-void TestGeometry::TestCase_MultiCurvePolygon_AsGeoJSON()
+TEST_CASE("MultiCurvePolygon as GeoJSON", "[Geometry]")
 {
     try
     {
@@ -3021,13 +2872,13 @@
         Ptr<MgGeoJsonWriter> gw = new MgGeoJsonWriter();
         STRING geoJson = gw->GeometryToGeoJson(geom);
 
-        CPPUNIT_ASSERT(geoJson.find(L"geometry\": null") == STRING::npos);
+        REQUIRE(geoJson.find(L"geometry\": null") == STRING::npos);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -3035,7 +2886,7 @@
     }
 }
 
-void TestGeometry::TestCase_MultiCurveString_AsGeoJSON()
+TEST_CASE("MultiCurveString as GeoJSON", "[Geometry]")
 {
     try
     {
@@ -3045,13 +2896,13 @@
         Ptr<MgGeoJsonWriter> gw = new MgGeoJsonWriter();
         STRING geoJson = gw->GeometryToGeoJson(geom);
 
-        CPPUNIT_ASSERT(geoJson.find(L"geometry\": null") == STRING::npos);
+        REQUIRE(geoJson.find(L"geometry\": null") == STRING::npos);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {

Deleted: trunk/MgDev/Server/src/UnitTesting/TestGeometry.h
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestGeometry.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestGeometry.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,163 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef TESTGEOMETRY_H_
-#define TESTGEOMETRY_H_
-
-#include <cppunit/extensions/HelperMacros.h>
-
-//#define TEST_PREPARED_GEOMETRY_PERF
-
-#ifndef _WIN32
-//Linux: different naming for string functions
-#define stricmp strcasecmp
-#endif
-
-class TestGeometry : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestGeometry);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_Point);
-    CPPUNIT_TEST(TestCase_LineString);
-    CPPUNIT_TEST(TestCase_Polygon);
-    CPPUNIT_TEST(TestCase_CurveString);
-    CPPUNIT_TEST(TestCase_CurveRing);
-    CPPUNIT_TEST(TestCase_CurvePolygon);
-    CPPUNIT_TEST(TestCase_MultiPoint);
-    CPPUNIT_TEST(TestCase_MultiLineString);
-    CPPUNIT_TEST(TestCase_MultiPolygon);
-    CPPUNIT_TEST(TestCase_MultiCurveString);
-    CPPUNIT_TEST(TestCase_MultiCurvePolygon);
-    CPPUNIT_TEST(TestCase_MultiGeometry);
-
-    CPPUNIT_TEST(TestCase_BufferNoMeasure);
-    CPPUNIT_TEST(TestCase_BufferArbitrary);
-    CPPUNIT_TEST(TestCase_BufferGeographic);
-    CPPUNIT_TEST(TestCase_BufferProjected);
-
-    CPPUNIT_TEST(TestCase_Intersection);
-    CPPUNIT_TEST(TestCase_Boundary);
-    CPPUNIT_TEST(TestCase_ConvexHull);
-    CPPUNIT_TEST(TestCase_Difference);
-    CPPUNIT_TEST(TestCase_SymetricDifference);
-    CPPUNIT_TEST(TestCase_Union);
-
-    CPPUNIT_TEST(TestCase_Distance);
-    CPPUNIT_TEST(TestCase_Transform);
-    CPPUNIT_TEST(TestCase_Touches);
-    CPPUNIT_TEST(TestCase_Envelope);
-    CPPUNIT_TEST(TestCase_GetArea);
-    CPPUNIT_TEST(TestCase_GetCentroid);
-    CPPUNIT_TEST(TestCase_GetInteriorPoint);
-    CPPUNIT_TEST(TestCase_CoordinateIterator);
-
-    CPPUNIT_TEST(TestCase_Simplify_BadParams);
-    CPPUNIT_TEST(TestCase_Simplify_DP);
-    CPPUNIT_TEST(TestCase_Simplify_TP);
-
-    CPPUNIT_TEST(TestCase_CurveString_AsGeoJSON);
-    CPPUNIT_TEST(TestCase_CurvePolygon_AsGeoJSON);
-    CPPUNIT_TEST(TestCase_MultiCurvePolygon_AsGeoJSON);
-    CPPUNIT_TEST(TestCase_MultiCurveString_AsGeoJSON);
-
-#ifdef TEST_PREPARED_GEOMETRY_PERF
-    CPPUNIT_TEST(TestCase_PreparedGeometryPerformance);
-#endif
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-    TestGeometry();
-
-    void TestCase_Point();
-    void TestCase_LineString();
-    void TestCase_Polygon();
-    void TestCase_CurveString();
-    void TestCase_CurveRing();
-    void TestCase_CurvePolygon();
-    void TestCase_MultiPoint();
-    void TestCase_MultiLineString();
-    void TestCase_MultiPolygon();
-    void TestCase_MultiCurveString();
-    void TestCase_MultiCurvePolygon();
-    void TestCase_MultiGeometry();
-
-    void TestCase_BufferNoMeasure();
-    void TestCase_BufferArbitrary();
-    void TestCase_BufferGeographic();
-    void TestCase_BufferProjected();
-
-    void TestCase_Intersection();
-    void TestCase_Boundary();
-    void TestCase_ConvexHull();
-    void TestCase_Difference();
-    void TestCase_SymetricDifference();
-    void TestCase_Union();
-
-    void TestCase_Distance();
-    void TestCase_Transform();
-    void TestCase_Touches();
-    void TestCase_Envelope();
-    void TestCase_GetArea();
-    void TestCase_GetCentroid();
-    void TestCase_GetInteriorPoint();
-    void TestCase_CoordinateIterator();
-
-    void TestCase_Simplify_BadParams();
-    void TestCase_Simplify_DP();
-    void TestCase_Simplify_TP();
-
-    void TestCase_CurveString_AsGeoJSON();
-    void TestCase_CurvePolygon_AsGeoJSON();
-    void TestCase_MultiCurvePolygon_AsGeoJSON();
-    void TestCase_MultiCurveString_AsGeoJSON();
-
-    void TestCase_PreparedGeometryPerformance();
-
-    MgPoint*             CreatePoint();
-    MgLineString*        CreateLineString();
-    MgLinearRing*        CreateLinearRing();
-    MgPolygon*           CreatePolygon();
-    MgCurveString*       CreateCurveString(double offset);
-    MgCurveRing*         CreateCurveRing(double offset);
-    MgCurvePolygon*      CreateCurvePolygon(double offset, int increment=100);
-    MgMultiPoint*        CreateMultiPoint();
-    MgMultiLineString*   CreateMultiLineString();
-    MgMultiPolygon*      CreateMultiPolygon();
-    MgMultiCurveString*  CreateMultiCurveString();
-    MgMultiCurvePolygon* CreateMultiCurvePolygon(INT32 numCurvePolys, double offset);
-    MgMultiGeometry*     CreateMultiGeometry();
-
-    MgCoordinateSystemMeasure* CreateMeasureArbitrary();
-    MgCoordinateSystemMeasure* CreateMeasureGeographic();
-    MgCoordinateSystemMeasure* CreateMeasureProjected();
-
-    MgCoordinateSystem* CreateCoordinateSystemArbitrary();
-    MgCoordinateSystem* CreateCoordinateSystemGeographic();
-    MgCoordinateSystem* CreateCoordinateSystemProjected();
-
-    bool CheckGeometry(MgGeometry* geom, CREFSTRING wkt);
-    bool CheckGeometry(CREFSTRING calculated, CREFSTRING base);
-};
-
-#endif

Modified: trunk/MgDev/Server/src/UnitTesting/TestKmlService.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestKmlService.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestKmlService.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -16,213 +16,104 @@
 //
 
 #include "MapGuideCommon.h"
-#include "TestKmlService.h"
 #include "ServiceManager.h"
 #include "ServerResourceService.h"
 #include "ServerSiteService.h"
-#include "../Common/Manager/FdoConnectionManager.h"
 #include "FoundationDefs.h"
-const STRING TEST_LOCALE = L"en";
+#include "TestServiceFactory.h"
+#include "catch.hpp"
 
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestKmlService, "TestKmlService");
-
-
-TestKmlService::TestKmlService()
+static STRING RemoveSessionIds(CREFSTRING content)
 {
-    // Initialize service objects.
-    MgServiceManager* serviceManager = MgServiceManager::GetInstance();
+    STRING newContent = content;
 
-    m_svcResource = dynamic_cast<MgResourceService*>(
-        serviceManager->RequestService(MgServiceType::ResourceService));
-    assert(m_svcResource != NULL);
+    STRING sessionId;
+    Ptr<MgUserInformation> userInfo = MgUserInformation::GetCurrentUserInfo();
+    if (userInfo != nullptr)
+    {
+        sessionId = userInfo->GetMgSessionId();
+    }
 
-    m_svcKml = dynamic_cast<MgKmlService*>(
-        serviceManager->RequestService(MgServiceType::KmlService));
-    assert(m_svcKml != NULL);
-
-    // Initialize a site connection.
-    Ptr<MgServerSiteService> svcSite = dynamic_cast<MgServerSiteService*>(
-        serviceManager->RequestService(MgServiceType::SiteService));
-    assert(svcSite != NULL);
-
-    Ptr<MgUserInformation> userInfo = new MgUserInformation(
-        L"Administrator", L"admin");
-    userInfo->SetLocale(TEST_LOCALE);
-
-    // Set the current MgUserInformation
-    // This must be done before calling CreateSession()
-    MgUserInformation::SetCurrentUserInfo(userInfo);
-
-    STRING session = svcSite->CreateSession();
-    assert(!session.empty());
-    userInfo->SetMgSessionId(session);
-
-    // Set the current MgUserInformation
-    MgUserInformation::SetCurrentUserInfo(userInfo);
-
-    m_siteConnection = new MgSiteConnection();
-    m_siteConnection->Open(userInfo);
+    if (!sessionId.empty())
+    {
+        STRING dummyId = L"SessionIDRemoved";
+        STRING::size_type sessionIdLocation;
+        do
+        {
+            sessionIdLocation = newContent.find(sessionId);
+            if (sessionIdLocation != STRING::npos)
+            {
+                newContent.replace(sessionIdLocation, sessionId.length(), dummyId);
+            }
+        } while (sessionIdLocation != STRING::npos);
+    }
+    return newContent;
 }
 
 
-TestKmlService::~TestKmlService()
+static void SaveToFile(CREFSTRING content, CREFSTRING filename)
 {
+    FILE* file = ACE_OS::fopen(MG_WCHAR_TO_TCHAR(filename), ACE_TEXT("wt"));
+    if (file != nullptr)
+    {
+        fwprintf(file, content.c_str());
+        fclose(file);
+    }
 }
 
 
-void TestKmlService::setUp()
+static STRING LoadFromFile(CREFSTRING filename)
 {
-}
-
-
-void TestKmlService::tearDown()
-{
-}
-
-
-void TestKmlService::TestStart()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Kml Service tests.\n")));
-
-    try
+    STRING content;
+    FILE* file = ACE_OS::fopen(MG_WCHAR_TO_TCHAR(filename), ACE_TEXT("rt"));
+    if (file != nullptr)
     {
-        #ifdef _DEBUG
-        MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
-        if(pFdoConnectionManager)
+        wchar_t buffer[1024];
+        while (fgetws(buffer, 1024, file) != nullptr)
         {
-            pFdoConnectionManager->ShowCache();
+            content.append(buffer);
         }
-        #endif
-
-        //set user info
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
-        MgUserInformation::SetCurrentUserInfo(userInfo);
-
-        //publish the map definition
-        Ptr<MgResourceIdentifier> mapres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
-        Ptr<MgByteSource> mdfsrc = new MgByteSource(L"../UnitTestFiles/UT_Sheboygan.mdf", false);
-        Ptr<MgByteReader> mdfrdr = mdfsrc->GetReader();
-        m_svcResource->SetResource(mapres, mdfrdr, NULL);
-
-        //publish the layer definitions
-        Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.ldf", false);
-        Ptr<MgByteReader> ldfrdr1 = ldfsrc1->GetReader();
-        m_svcResource->SetResource(ldfres1, ldfrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.ldf", false);
-        Ptr<MgByteReader> ldfrdr2 = ldfsrc2->GetReader();
-        m_svcResource->SetResource(ldfres2, ldfrdr2, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.ldf", false);
-        Ptr<MgByteReader> ldfrdr3 = ldfsrc3->GetReader();
-        m_svcResource->SetResource(ldfres3, ldfrdr3, NULL);
-
-        //publish the feature sources
-        Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
-        Ptr<MgByteSource> fssrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.fs", false);
-        Ptr<MgByteReader> fsrdr1 = fssrc1->GetReader();
-        m_svcResource->SetResource(fsres1, fsrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
-        Ptr<MgByteSource> fssrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.fs", false);
-        Ptr<MgByteReader> fsrdr2 = fssrc2->GetReader();
-        m_svcResource->SetResource(fsres2, fsrdr2, NULL);
-
-        Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
-        Ptr<MgByteSource> fssrc3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.fs", false);
-        Ptr<MgByteReader> fsrdr3 = fssrc3->GetReader();
-        m_svcResource->SetResource(fsres3, fsrdr3, NULL);
-
-        // publish the resource data
-        Ptr<MgByteSource> dataSource1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.sdf", false);
-        Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
-        m_svcResource->SetResourceData(fsres1, L"UT_HydrographicPolygons.sdf", L"File", dataReader1);
-
-        Ptr<MgByteSource> dataSource2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.sdf", false);
-        Ptr<MgByteReader> dataReader2 = dataSource2->GetReader();
-        m_svcResource->SetResourceData(fsres2, L"UT_Parcels.sdf", L"File", dataReader2);
-
-        Ptr<MgByteSource> dataSource3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.sdf", false);
-        Ptr<MgByteReader> dataReader3 = dataSource3->GetReader();
-        m_svcResource->SetResourceData(fsres3, L"UT_Rail.sdf", L"File", dataReader3);
+        fclose(file);
     }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
+    return content;
 }
 
 
-void TestKmlService::TestEnd()
+static bool CompareContent(MgByteReader* reader, CREFSTRING referenceFile)
 {
+    bool match = false;
+    reader->GetByteSource()->SetMimeType(L"text/xml");
+    STRING content = reader->ToString();
+    STRING thisContent = RemoveSessionIds(content);
+
     try
     {
-        //set user info
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
-        MgUserInformation::SetCurrentUserInfo(userInfo);
-
-        //delete the map definition
-        Ptr<MgResourceIdentifier> mapres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
-        m_svcResource->DeleteResource(mapres);
-
-        //delete the layer definitions
-        Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres1);
-
-        Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres2);
-
-        Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres3);
-
-        //delete the feature sources
-        Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
-        m_svcResource->DeleteResource(fsres1);
-
-        Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
-        m_svcResource->DeleteResource(fsres2);
-
-        Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
-        m_svcResource->DeleteResource(fsres3);
-
-        #ifdef _DEBUG
-        MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
-        if(pFdoConnectionManager)
-        {
-            pFdoConnectionManager->ShowCache();
-        }
-        #endif
+        STRING referenceContent = LoadFromFile(referenceFile);
+        match = (thisContent.compare(0, thisContent.length(), referenceContent) == 0);
     }
-    catch (MgException* e)
+    catch (...)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        match = false;
     }
-    catch (...)
+
+    //if we didn't get a match, dump out the content we did get
+    if (!match)
     {
-        throw;
+        STRING errorFile = referenceFile + L".err";
+        SaveToFile(thisContent, errorFile);
     }
 
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nKml Service tests completed.\n\n")));
+    return match;
 }
 
-
-void TestKmlService::TestCase_GetMapKml()
+TEST_CASE("GetMapKml", "[KmlService]")
 {
     try
     {
+        Ptr<MgKmlService> m_svcKml = TestServiceFactory::CreateKmlService();
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
+
         //create map object
         Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
         Ptr<MgMap> map = new MgMap(m_siteConnection);
@@ -239,7 +130,7 @@
             Ptr<MgByteReader> reader = m_svcKml->GetMapKml(map, dpi, agentUri, format);
 
             STRING mimeType = reader->GetMimeType();
-            CPPUNIT_ASSERT(mimeType.compare(MgMimeType::Kml) == 0);
+            REQUIRE(mimeType.compare(MgMimeType::Kml) == 0);
         }
         catch(MgConnectionFailedException* e)
         {
@@ -255,13 +146,13 @@
 
         //compare results against referenced content
         //TODO: Find a way to make the comparison work on Windows AND Linux
-        //CPPUNIT_ASSERT(CompareContent(reader, L"../UnitTestFiles/UT_GetMapKMLResult.txt"));
+        //REQUIRE(CompareContent(reader, L"../UnitTestFiles/UT_GetMapKMLResult.txt"));
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -269,11 +160,14 @@
     }
 }
 
-
-void TestKmlService::TestCase_GetMapKmz()
+TEST_CASE("GetMapKmz", "[KmlService]")
 {
     try
     {
+        Ptr<MgKmlService> m_svcKml = TestServiceFactory::CreateKmlService();
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
+
         //create map object
         Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
         Ptr<MgMap> map = new MgMap(m_siteConnection);
@@ -290,7 +184,7 @@
             Ptr<MgByteReader> reader = m_svcKml->GetMapKml(map, dpi, agentUri, format);
 
             STRING mimeType = reader->GetMimeType();
-            CPPUNIT_ASSERT(mimeType.compare(MgMimeType::Kmz) == 0);
+            REQUIRE(mimeType.compare(MgMimeType::Kmz) == 0);
         }
         catch(MgConnectionFailedException* e)
         {
@@ -306,9 +200,9 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -316,11 +210,13 @@
     }
 }
 
-
-void TestKmlService::TestCase_GetLayerKml()
+TEST_CASE("GetLayerKml", "[KmlService]")
 {
     try
     {
+        Ptr<MgKmlService> m_svcKml = TestServiceFactory::CreateKmlService();
+        Ptr<MgResourceService> m_svcResource = TestServiceFactory::CreateResourceService();
+
         //create the layer
         Ptr<MgResourceIdentifier> ldfres = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
         Ptr<MgLayer> layer = new MgLayer(ldfres, m_svcResource);
@@ -340,7 +236,7 @@
             Ptr<MgByteReader> reader = m_svcKml->GetLayerKml(layer, extents, width, height, dpi, drawOrder, agentUri, format);
 
             STRING mimeType = reader->GetMimeType();
-            CPPUNIT_ASSERT(mimeType.compare(MgMimeType::Kml) == 0);
+            REQUIRE(mimeType.compare(MgMimeType::Kml) == 0);
         }
         catch(MgConnectionFailedException* e)
         {
@@ -356,13 +252,13 @@
 
         //compare results against referenced content
         //TODO: Find a way to make the comparison work on Windows AND Linux
-        //CPPUNIT_ASSERT(CompareContent(reader, L"../UnitTestFiles/UT_GetLayerKMLResult.txt"));
+        //REQUIRE(CompareContent(reader, L"../UnitTestFiles/UT_GetLayerKMLResult.txt"));
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -370,11 +266,13 @@
     }
 }
 
-
-void TestKmlService::TestCase_GetFeaturesKml()
+TEST_CASE("GetFeaturesKml", "[KmlService]")
 {
     try
     {
+        Ptr<MgKmlService> m_svcKml = TestServiceFactory::CreateKmlService();
+        Ptr<MgResourceService> m_svcResource = TestServiceFactory::CreateResourceService();
+
         //create the layer
         Ptr<MgResourceIdentifier> ldfres = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
         Ptr<MgLayer> layer = new MgLayer(ldfres, m_svcResource);
@@ -394,7 +292,7 @@
             Ptr<MgByteReader> reader = m_svcKml->GetFeaturesKml(layer, extents, width, height, dpi, drawOrder, agentUri, format);
 
             STRING mimeType = reader->GetMimeType();
-            CPPUNIT_ASSERT(mimeType.compare(MgMimeType::Kml) == 0);
+            REQUIRE(mimeType.compare(MgMimeType::Kml) == 0);
         }
         catch(MgConnectionFailedException* e)
         {
@@ -411,101 +309,16 @@
         //compare results against referenced content
         //TODO: Find a way to make the comparison work on Windows AND Linux
         //TODO: Find a way to allow tolerance in floating point value comparisons
-        //CPPUNIT_ASSERT(CompareContent(reader, L"../UnitTestFiles/UT_GetFeaturesKMLResult.txt"));
+        //REQUIRE(CompareContent(reader, L"../UnitTestFiles/UT_GetFeaturesKMLResult.txt"));
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
         throw;
     }
-}
-
-
-STRING TestKmlService::RemoveSessionIds(CREFSTRING content)
-{
-    STRING newContent = content;
-
-    STRING sessionId;
-    Ptr<MgUserInformation> userInfo = MgUserInformation::GetCurrentUserInfo();
-    if (userInfo != NULL)
-    {
-        sessionId = userInfo->GetMgSessionId();
-    }
-
-    if(!sessionId.empty())
-    {
-        STRING dummyId = L"SessionIDRemoved";
-        STRING::size_type sessionIdLocation;
-        do
-        {
-            sessionIdLocation = newContent.find(sessionId);
-            if(sessionIdLocation != STRING::npos)
-            {
-                newContent.replace(sessionIdLocation, sessionId.length(), dummyId);
-            }
-        }
-        while(sessionIdLocation != STRING::npos);
-    }
-    return newContent;
-}
-
-
-void TestKmlService::SaveToFile(CREFSTRING content, CREFSTRING filename)
-{
-    FILE* file = ACE_OS::fopen(MG_WCHAR_TO_TCHAR(filename), ACE_TEXT("wt"));
-    if (file != NULL)
-    {
-        fwprintf (file, content.c_str());
-        fclose (file);
-    }
-}
-
-
-STRING TestKmlService::LoadFromFile(CREFSTRING filename)
-{
-    STRING content;
-    FILE* file = ACE_OS::fopen(MG_WCHAR_TO_TCHAR(filename), ACE_TEXT("rt"));
-    if (file != NULL)
-    {
-        wchar_t buffer[1024];
-        while(fgetws(buffer, 1024, file) != NULL)
-        {
-            content.append(buffer);
-        }
-        fclose (file);
-    }
-    return content;
-}
-
-
-bool TestKmlService::CompareContent(MgByteReader* reader, CREFSTRING referenceFile)
-{
-    bool match = false;
-    reader->GetByteSource()->SetMimeType(L"text/xml");
-    STRING content = reader->ToString();
-    STRING thisContent = RemoveSessionIds(content);
-
-    try
-    {
-        STRING referenceContent = LoadFromFile(referenceFile);
-        match = (thisContent.compare(0, thisContent.length(), referenceContent) == 0);
-    }
-    catch(...)
-    {
-        match = false;
-    }
-
-    //if we didn't get a match, dump out the content we did get
-    if(!match)
-    {
-        STRING errorFile = referenceFile + L".err";
-        SaveToFile(thisContent, errorFile);
-    }
-
-    return match;
-}
+}
\ No newline at end of file

Deleted: trunk/MgDev/Server/src/UnitTesting/TestKmlService.h
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestKmlService.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestKmlService.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,62 +0,0 @@
-//
-//  Copyright (C) 2007-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef TestKmlService_H_
-#define TestKmlService_H_
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestKmlService : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestKmlService);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_GetMapKml);
-    CPPUNIT_TEST(TestCase_GetMapKmz);
-    CPPUNIT_TEST(TestCase_GetLayerKml);
-    CPPUNIT_TEST(TestCase_GetFeaturesKml);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    TestKmlService();
-    ~TestKmlService();
-
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    void TestCase_GetMapKml();
-    void TestCase_GetMapKmz();
-    void TestCase_GetLayerKml();
-    void TestCase_GetFeaturesKml();
-
-private:
-    void PublishTheResources();
-    STRING RemoveSessionIds(CREFSTRING content);
-    void SaveToFile(CREFSTRING content, CREFSTRING filename);
-    STRING LoadFromFile(CREFSTRING filename);
-    bool CompareContent(MgByteReader* reader, CREFSTRING referenceFile);
-
-    Ptr<MgSiteConnection> m_siteConnection;
-    Ptr<MgResourceService> m_svcResource;
-    Ptr<MgKmlService> m_svcKml;
-};
-
-#endif // TestKmlService_H_

Modified: trunk/MgDev/Server/src/UnitTesting/TestLogManager.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestLogManager.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestLogManager.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -16,13 +16,14 @@
 //
 
 #include "MapGuideCommon.h"
-#include "TestLogManager.h"
-#include "CppUnitExtensions.h"
+#include "CatchHelperMacros.h"
 #include "LogManager.h"
 #include "TestLogManagerThread.h"
 #include "FoundationDefs.h"
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestLogManager, "TestLogManager");
+#include "TestServiceFactory.h"
+#include "catch.hpp"
 
+
 const wchar_t TestName[] = L"TestName.log";
 const wchar_t TestName2[] = L"TestName2.log";
 const wchar_t NewTestName[] = L"SuperCoolNewTestName.log";
@@ -50,27 +51,9 @@
 const STRING LastEntry = L"<2005-03-08T00:57:08> Entry 5\n";
 #endif
 
-void TestLogManager::setUp()
+static bool CreateFile(STRING filename, STRING contents)
 {
-}
-
-void TestLogManager::tearDown()
-{
-}
-
-void TestLogManager::TestStart()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Log Manager tests.\n")));
-}
-
-void TestLogManager::TestEnd()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nLog Manager tests completed.\n\n")));
-}
-
-bool TestLogManager::CreateFile(STRING filename, STRING contents)
-{
-    FILE* file = NULL;
+    FILE* file = nullptr;
     file = ::fopen(MG_WCHAR_TO_CHAR(filename), "wb");
 
     if (file)
@@ -91,13 +74,13 @@
 /// This test case checks to see if there is a valid MgLogManager and that
 /// there is only 1 MgLogManager.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_ValidLogManager()
+TEST_CASE("Valid Log Manager", "[LogManager]")
 {
     MgLogManager* pMgLogManager = MgLogManager::GetInstance();
-    CPPUNIT_ASSERT(pMgLogManager != NULL);
+    REQUIRE(pMgLogManager != nullptr);
 
     MgLogManager* pMgLogManager2 = MgLogManager::GetInstance();
-    CPPUNIT_ASSERT(pMgLogManager == pMgLogManager2);
+    REQUIRE(pMgLogManager == pMgLogManager2);
 }
 
 ///----------------------------------------------------------------------------
@@ -105,12 +88,12 @@
 ///
 /// This test case checks the logs path.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetLogsPath()
+TEST_CASE("GetLogsPath", "[LogManager]")
 {
     MgLogManager* pMgLogManager = MgLogManager::GetInstance();
     CREFSTRING path = pMgLogManager->GetLogsPath();
 
-    CPPUNIT_ASSERT(path.length() > 0);
+    REQUIRE(path.length() > 0);
 }
 
 ///----------------------------------------------------------------------------
@@ -119,7 +102,7 @@
 /// This test case hits the log manager with multiple threads to ensure that
 /// it encounters no deadlocking.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_TestForDeadLock()
+TEST_CASE("Testing for dead lock", "[LogManager]")
 {
     try
     {
@@ -131,7 +114,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -145,7 +128,7 @@
 /// This test case enumerates the log files that are currently located in the
 /// logs directory
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_EnumerateLogs()
+TEST_CASE("EnumerateLogs", "[LogManager]")
 {
     try
     {
@@ -166,16 +149,16 @@
         Ptr<MgStringProperty> testName2Prop = new MgStringProperty(L"LogNameProperty", TestName2);
         Ptr<MgStringProperty> junkName2Prop = new MgStringProperty(L"LogNameProperty", JunkName2);
 
-        CPPUNIT_ASSERT(logs->Contains(junkNameProp));
-        CPPUNIT_ASSERT(logs->Contains(testNameProp));
-        CPPUNIT_ASSERT(logs->Contains(junkName2Prop));
-        CPPUNIT_ASSERT(logs->Contains(testName2Prop));
+        REQUIRE(logs->Contains(junkNameProp));
+        REQUIRE(logs->Contains(testNameProp));
+        REQUIRE(logs->Contains(junkName2Prop));
+        REQUIRE(logs->Contains(testName2Prop));
     }
     catch (MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -189,7 +172,7 @@
 /// This test case deletes log files that were created during the running
 /// of the log manager tests
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_DeleteLog()
+TEST_CASE("DeleteLog", "[LogManager]")
 {
     try
     {
@@ -203,17 +186,17 @@
 
         Ptr<MgPropertyCollection> logs = pMgLogManager->EnumerateLogs();
 
-        CPPUNIT_ASSERT(!logs->Contains(TestName));
-        CPPUNIT_ASSERT(!logs->Contains(NewTestName));
-        CPPUNIT_ASSERT(!logs->Contains(JunkName));
-        CPPUNIT_ASSERT(!logs->Contains(TestName2));
-        CPPUNIT_ASSERT(!logs->Contains(JunkName2));
+        REQUIRE(!logs->Contains(TestName));
+        REQUIRE(!logs->Contains(NewTestName));
+        REQUIRE(!logs->Contains(JunkName));
+        REQUIRE(!logs->Contains(TestName2));
+        REQUIRE(!logs->Contains(JunkName2));
     }
     catch (MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -226,7 +209,7 @@
 /// This test case creates a file in the logs folder and then uses the api
 /// to rename it.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_RenameLog()
+TEST_CASE("RenameLog", "[LogManager]")
 {
     try
     {
@@ -242,14 +225,14 @@
         Ptr<MgPropertyCollection> logs = pMgLogManager->EnumerateLogs();
 
         Ptr<MgStringProperty> newTestNameProp = new MgStringProperty(L"LogNameProperty", NewTestName);
-        CPPUNIT_ASSERT(logs->Contains(newTestNameProp));
+        REQUIRE(logs->Contains(newTestNameProp));
 
-        CPPUNIT_ASSERT_THROW_MG(pMgLogManager->RenameLog(L"", NewTestName), MgInvalidArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pMgLogManager->RenameLog(NewTestName, L""), MgInvalidArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pMgLogManager->RenameLog(TestName, TestName), MgDuplicateFileException*);
-        CPPUNIT_ASSERT_THROW_MG(pMgLogManager->RenameLog(L"DoesNotExist.log", L"NewDoesNotExist.log"), MgFileNotFoundException*);
+        REQUIRE_THROWS_MG(pMgLogManager->RenameLog(L"", NewTestName), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pMgLogManager->RenameLog(NewTestName, L""), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pMgLogManager->RenameLog(TestName, TestName), MgDuplicateFileException*);
+        REQUIRE_THROWS_MG(pMgLogManager->RenameLog(L"DoesNotExist.log", L"NewDoesNotExist.log"), MgFileNotFoundException*);
 #ifdef _WIN32
-        CPPUNIT_ASSERT_THROW_MG(pMgLogManager->RenameLog(NewTestName, L"?"), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pMgLogManager->RenameLog(NewTestName, L"?"), MgInvalidArgumentException*);
 #endif
     }
     catch (MgException* e)
@@ -256,7 +239,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -269,7 +252,7 @@
 ///
 /// This test case tries to change the log info.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_SetAccessLogInfo()
+TEST_CASE("SetAccessLogInfo", "[LogManager]")
 {
     try
     {
@@ -289,15 +272,15 @@
         // Restore original info
         pMgLogManager->SetAccessLogInfo(bOriginalEnabled, originalName, originalParams);
 
-        CPPUNIT_ASSERT(bEnabled == false);
-        CPPUNIT_ASSERT(wcscmp(name.c_str(), TestName) == 0);
-        CPPUNIT_ASSERT(wcscmp(params.c_str(), TestParameters) == 0);
+        REQUIRE(bEnabled == false);
+        REQUIRE(wcscmp(name.c_str(), TestName) == 0);
+        REQUIRE(wcscmp(params.c_str(), TestParameters) == 0);
     }
     catch (MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -310,19 +293,19 @@
 ///
 /// This test case tries to clear the log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_ClearAccessLog()
+TEST_CASE("ClearAccessLog", "[LogManager]")
 {
     try
     {
         MgLogManager* pMgLogManager = MgLogManager::GetInstance();
         bool bResult = pMgLogManager->ClearAccessLog();
-        CPPUNIT_ASSERT(bResult);
+        REQUIRE(bResult);
     }
     catch (MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -335,7 +318,7 @@
 ///
 /// This test case tries to get the contents of the log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetAccessLog()
+TEST_CASE("GetAccessLog", "[LogManager]")
 {
     MgLogManager* pMgLogManager = MgLogManager::GetInstance();
     STRING path = pMgLogManager->GetLogsPath();
@@ -363,7 +346,7 @@
         pMgLogManager->SetAccessLogFileName(originalName);
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -371,8 +354,8 @@
         throw;
     }
 
-    CPPUNIT_ASSERT(logContents == contents);
-    CPPUNIT_ASSERT(lastLogEntry == LastEntry);
+    REQUIRE(logContents == contents);
+    REQUIRE(lastLogEntry == LastEntry);
 }
 
 ///----------------------------------------------------------------------------
@@ -380,7 +363,7 @@
 ///
 /// This test case tries to get the contents of the log between two dates.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetAccessLogByDate()
+TEST_CASE("GetAccessLogByDate", "[LogManager]")
 {
     MgLogManager* pMgLogManager = MgLogManager::GetInstance();
     STRING path = pMgLogManager->GetLogsPath();
@@ -405,7 +388,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 54, 19, 0);
         byteReader = pMgLogManager->GetAccessLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry1 + Entry2 + Entry3));
+        REQUIRE(logContents == (Entry1 + Entry2 + Entry3));
 
         // from & to date are the same and at exact time an entry was made
         fromDate = new MgDateTime(2005, 3, 7, 16, 51, 13, 0);
@@ -412,7 +395,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 51, 13, 0);
         byteReader = pMgLogManager->GetAccessLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == Entry1);
+        REQUIRE(logContents == Entry1);
 
         // from & to date are the same and not at exact time an entry was made
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -419,7 +402,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
         byteReader = pMgLogManager->GetAccessLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents.length() == 0);
+        REQUIRE(logContents.length() == 0);
 
         // from & to dates are at not at exact times an entry was made
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -426,7 +409,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 56, 0, 0);
         byteReader = pMgLogManager->GetAccessLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry2 + Entry3 + Entry4));
+        REQUIRE(logContents == (Entry2 + Entry3 + Entry4));
 
         // spans two different files
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -433,7 +416,7 @@
         toDate = new MgDateTime(2005, 3, 8, 1, 0, 0, 0);
         byteReader = pMgLogManager->GetAccessLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry2 + Entry3 + Entry4 + LastEntry));
+        REQUIRE(logContents == (Entry2 + Entry3 + Entry4 + LastEntry));
 
         // spans two different files, the first of which doesn't exist
         fromDate = new MgDateTime(2005, 3, 6, 23, 59, 59, 0);
@@ -440,7 +423,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
         byteReader = pMgLogManager->GetAccessLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == Entry1);
+        REQUIRE(logContents == Entry1);
 
         // spans two different files, the second of which doesn't exist
         fromDate = new MgDateTime(2005, 3, 8, 0, 0, 0, 0);
@@ -447,7 +430,7 @@
         toDate = new MgDateTime(2005, 3, 9, 0, 0, 0, 0);
         byteReader = pMgLogManager->GetAccessLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == LastEntry);
+        REQUIRE(logContents == LastEntry);
 
         // from date is after the latest entry in the log files
         fromDate = new MgDateTime(2006, 1, 1, 1, 0, 0, 0);
@@ -454,15 +437,15 @@
         toDate = new MgDateTime(2006, 1, 1, 1, 0, 0, 0);
         byteReader = pMgLogManager->GetAccessLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents.length() == 0);
+        REQUIRE(logContents.length() == 0);
 
         // Use a null value for the date
-        CPPUNIT_ASSERT_THROW_MG(pMgLogManager->GetAccessLog(NULL, toDate), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pMgLogManager->GetAccessLog(nullptr, toDate), MgNullArgumentException*);
 
         // Use dates more than 24 hours apart
         fromDate = new MgDateTime(2005, 2, 18, 14, 0, 0, 0);
         toDate = new MgDateTime(2005, 2, 19, 18, 0, 0, 0);
-        CPPUNIT_ASSERT_THROW_MG(pMgLogManager->GetAccessLog(fromDate, toDate), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pMgLogManager->GetAccessLog(fromDate, toDate), MgInvalidArgumentException*);
 
         // Search a log file with an invalid log entry as the first entry
         CreateFile(path + JunkName, L"asdfasdfasdf");
@@ -469,7 +452,7 @@
         pMgLogManager->SetAccessLogFileName(JunkName);
         fromDate = new MgDateTime(2005, 3, 8, 0, 0, 0, 0);
         toDate = new MgDateTime(2005, 3, 9, 0, 0, 0, 0);
-        CPPUNIT_ASSERT_THROW_MG(pMgLogManager->GetAccessLog(fromDate, toDate), MgInvalidLogEntryException*);
+        REQUIRE_THROWS_MG(pMgLogManager->GetAccessLog(fromDate, toDate), MgInvalidLogEntryException*);
 
         pMgLogManager->SetAccessLogFileName(originalName);
     }
@@ -478,7 +461,7 @@
         pMgLogManager->SetAccessLogFileName(originalName);
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -493,10 +476,10 @@
 /// This test case tries to get the contents of the log using an invalid
 /// argument.  An exception should be thrown.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetAccessLogInvalid()
+TEST_CASE("GetAccessLogInvalid", "[LogManager]")
 {
     MgLogManager* pMgLogManager = MgLogManager::GetInstance();
-    CPPUNIT_ASSERT_THROW_MG(pMgLogManager->GetAccessLog(-1), MgArgumentOutOfRangeException*);
+    REQUIRE_THROWS_MG(pMgLogManager->GetAccessLog(-1), MgArgumentOutOfRangeException*);
 }
 
 ///----------------------------------------------------------------------------
@@ -504,7 +487,7 @@
 ///
 /// This test case tries to change the log info.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_SetAdminLogInfo()
+TEST_CASE("SetAdminLogInfo", "[LogManager]")
 {
     try
     {
@@ -524,15 +507,15 @@
         // Restore original info
         pMgLogManager->SetAdminLogInfo(bOriginalEnabled, originalName, originalParams);
 
-        CPPUNIT_ASSERT(bEnabled == false);
-        CPPUNIT_ASSERT(wcscmp(name.c_str(), TestName) == 0);
-        CPPUNIT_ASSERT(wcscmp(params.c_str(), TestParameters) == 0);
+        REQUIRE(bEnabled == false);
+        REQUIRE(wcscmp(name.c_str(), TestName) == 0);
+        REQUIRE(wcscmp(params.c_str(), TestParameters) == 0);
     }
     catch (MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -545,19 +528,19 @@
 ///
 /// This test case tries to clear the log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_ClearAdminLog()
+TEST_CASE("ClearAdminLog", "[LogManager]")
 {
     try
     {
         MgLogManager* pMgLogManager = MgLogManager::GetInstance();
         bool bResult = pMgLogManager->ClearAdminLog();
-        CPPUNIT_ASSERT(bResult);
+        REQUIRE(bResult);
     }
     catch (MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -570,7 +553,7 @@
 ///
 /// This test case tries to get the contents of the log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetAdminLog()
+TEST_CASE("GetAdminLog", "[LogManager]")
 {
     MgLogManager* pMgLogManager = MgLogManager::GetInstance();
     STRING path = pMgLogManager->GetLogsPath();
@@ -596,7 +579,7 @@
         pMgLogManager->SetAdminLogFileName(originalName);
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -604,8 +587,8 @@
         throw;
     }
 
-    CPPUNIT_ASSERT(logContents == contents);
-    CPPUNIT_ASSERT(lastLogEntry == LastEntry);
+    REQUIRE(logContents == contents);
+    REQUIRE(lastLogEntry == LastEntry);
 }
 
 ///----------------------------------------------------------------------------
@@ -613,7 +596,7 @@
 ///
 /// This test case tries to get the contents of the log between two dates.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetAdminLogByDate()
+TEST_CASE("GetAdminLogByDate", "[LogManager]")
 {
     MgLogManager* pMgLogManager = MgLogManager::GetInstance();
     STRING path = pMgLogManager->GetLogsPath();
@@ -638,7 +621,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 54, 19, 0);
         byteReader = pMgLogManager->GetAdminLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry1 + Entry2 + Entry3));
+        REQUIRE(logContents == (Entry1 + Entry2 + Entry3));
 
         // from & to date are the same and at exact time an entry was made
         fromDate = new MgDateTime(2005, 3, 7, 16, 51, 13, 0);
@@ -645,7 +628,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 51, 13, 0);
         byteReader = pMgLogManager->GetAdminLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == Entry1);
+        REQUIRE(logContents == Entry1);
 
         // from & to date are the same and not at exact time an entry was made
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -652,7 +635,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
         byteReader = pMgLogManager->GetAdminLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents.length() == 0);
+        REQUIRE(logContents.length() == 0);
 
         // from & to dates are at not at exact times an entry was made
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -659,7 +642,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 56, 0, 0);
         byteReader = pMgLogManager->GetAdminLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry2 + Entry3 + Entry4));
+        REQUIRE(logContents == (Entry2 + Entry3 + Entry4));
 
         // spans two different files, the second of which doesn't exist
         fromDate = new MgDateTime(2005, 3, 8, 0, 0, 0, 0);
@@ -666,7 +649,7 @@
         toDate = new MgDateTime(2005, 3, 9, 0, 0, 0, 0);
         byteReader = pMgLogManager->GetAdminLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == LastEntry);
+        REQUIRE(logContents == LastEntry);
 
         // from date is after the latest entry in the log files
         fromDate = new MgDateTime(2006, 1, 1, 1, 0, 0, 0);
@@ -673,15 +656,15 @@
         toDate = new MgDateTime(2006, 1, 1, 1, 0, 0, 0);
         byteReader = pMgLogManager->GetAdminLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents.length() == 0);
+        REQUIRE(logContents.length() == 0);
 
         // Use a null value for the date
-        CPPUNIT_ASSERT_THROW_MG(pMgLogManager->GetAdminLog(NULL, toDate), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pMgLogManager->GetAdminLog(nullptr, toDate), MgNullArgumentException*);
 
         // Use dates more than 24 hours apart
         fromDate = new MgDateTime(2005, 2, 18, 14, 0, 0, 0);
         toDate = new MgDateTime(2005, 2, 19, 18, 0, 0, 0);
-        CPPUNIT_ASSERT_THROW_MG(pMgLogManager->GetAdminLog(fromDate, toDate), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pMgLogManager->GetAdminLog(fromDate, toDate), MgInvalidArgumentException*);
 
         pMgLogManager->SetAdminLogFileName(originalName);
     }
@@ -690,7 +673,7 @@
         pMgLogManager->SetAdminLogFileName(originalName);
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -705,10 +688,10 @@
 /// This test case tries to get the contents of the log using an invalid
 /// argument.  An exception should be thrown.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetAdminLogInvalid()
+TEST_CASE("GetAdminLogInvalid", "[LogManager]")
 {
     MgLogManager* pMgLogManager = MgLogManager::GetInstance();
-    CPPUNIT_ASSERT_THROW_MG(pMgLogManager->GetAdminLog(-1), MgArgumentOutOfRangeException*);
+    REQUIRE_THROWS_MG(pMgLogManager->GetAdminLog(-1), MgArgumentOutOfRangeException*);
 }
 
 ///----------------------------------------------------------------------------
@@ -716,7 +699,7 @@
 ///
 /// This test case tries to change the log info.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_SetAuthenticationLogInfo()
+TEST_CASE("SetAuthenticationLogInfo", "[LogManager]")
 {
     try
     {
@@ -736,15 +719,15 @@
         // Restore original info
         pMgLogManager->SetAuthenticationLogInfo(bOriginalEnabled, originalName, originalParams);
 
-        CPPUNIT_ASSERT(bEnabled == false);
-        CPPUNIT_ASSERT(wcscmp(name.c_str(), TestName) == 0);
-        CPPUNIT_ASSERT(wcscmp(params.c_str(), TestParameters) == 0);
+        REQUIRE(bEnabled == false);
+        REQUIRE(wcscmp(name.c_str(), TestName) == 0);
+        REQUIRE(wcscmp(params.c_str(), TestParameters) == 0);
     }
     catch (MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -757,19 +740,19 @@
 ///
 /// This test case tries to clear the log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_ClearAuthenticationLog()
+TEST_CASE("ClearAuthenticationLog", "[LogManager]")
 {
     try
     {
         MgLogManager* pMgLogManager = MgLogManager::GetInstance();
         bool bResult = pMgLogManager->ClearAuthenticationLog();
-        CPPUNIT_ASSERT(bResult);
+        REQUIRE(bResult);
     }
     catch (MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -782,7 +765,7 @@
 ///
 /// This test case tries to get the contents of the log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetAuthenticationLog()
+TEST_CASE("GetAuthenticationLog", "[LogManager]")
 {
     MgLogManager* pMgLogManager = MgLogManager::GetInstance();
     STRING path = pMgLogManager->GetLogsPath();
@@ -808,7 +791,7 @@
         pMgLogManager->SetAuthenticationLogFileName(originalName);
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -816,8 +799,8 @@
         throw;
     }
 
-    CPPUNIT_ASSERT(logContents == contents);
-    CPPUNIT_ASSERT(lastLogEntry == LastEntry);
+    REQUIRE(logContents == contents);
+    REQUIRE(lastLogEntry == LastEntry);
 }
 
 ///----------------------------------------------------------------------------
@@ -825,7 +808,7 @@
 ///
 /// This test case tries to get the contents of the log between two dates.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetAuthenticationLogByDate()
+TEST_CASE("GetAuthenticationLogByDate", "[LogManager]")
 {
     MgLogManager* pMgLogManager = MgLogManager::GetInstance();
     STRING path = pMgLogManager->GetLogsPath();
@@ -850,7 +833,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 54, 19, 0);
         byteReader = pMgLogManager->GetAuthenticationLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry1 + Entry2 + Entry3));
+        REQUIRE(logContents == (Entry1 + Entry2 + Entry3));
 
         // from & to dates are at not at exact times an entry was made
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -857,7 +840,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 56, 0, 0);
         byteReader = pMgLogManager->GetAuthenticationLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry2 + Entry3 + Entry4));
+        REQUIRE(logContents == (Entry2 + Entry3 + Entry4));
 
         // spans two different files
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -864,7 +847,7 @@
         toDate = new MgDateTime(2005, 3, 8, 1, 0, 0, 0);
         byteReader = pMgLogManager->GetAuthenticationLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry2 + Entry3 + Entry4 + LastEntry));
+        REQUIRE(logContents == (Entry2 + Entry3 + Entry4 + LastEntry));
 
         // spans two different files, the first of which doesn't exist
         fromDate = new MgDateTime(2005, 3, 6, 23, 59, 59, 0);
@@ -871,7 +854,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
         byteReader = pMgLogManager->GetAuthenticationLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == Entry1);
+        REQUIRE(logContents == Entry1);
 
         // spans two different files, the second of which doesn't exist
         fromDate = new MgDateTime(2005, 3, 8, 0, 0, 0, 0);
@@ -878,7 +861,7 @@
         toDate = new MgDateTime(2005, 3, 9, 0, 0, 0, 0);
         byteReader = pMgLogManager->GetAuthenticationLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == LastEntry);
+        REQUIRE(logContents == LastEntry);
 
         // from date is after the latest entry in the log files
         fromDate = new MgDateTime(2006, 1, 1, 1, 0, 0, 0);
@@ -885,15 +868,15 @@
         toDate = new MgDateTime(2006, 1, 1, 1, 0, 0, 0);
         byteReader = pMgLogManager->GetAuthenticationLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents.length() == 0);
+        REQUIRE(logContents.length() == 0);
 
         // Use a null value for the date
-        CPPUNIT_ASSERT_THROW_MG(pMgLogManager->GetAuthenticationLog(NULL, toDate), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pMgLogManager->GetAuthenticationLog(nullptr, toDate), MgNullArgumentException*);
 
         // Use dates more than 24 hours apart
         fromDate = new MgDateTime(2005, 2, 18, 14, 0, 0, 0);
         toDate = new MgDateTime(2005, 2, 19, 18, 0, 0, 0);
-        CPPUNIT_ASSERT_THROW_MG(pMgLogManager->GetAuthenticationLog(fromDate, toDate), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pMgLogManager->GetAuthenticationLog(fromDate, toDate), MgInvalidArgumentException*);
 
         pMgLogManager->SetAuthenticationLogFileName(originalName);
     }
@@ -902,7 +885,7 @@
         pMgLogManager->SetAuthenticationLogFileName(originalName);
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -917,10 +900,10 @@
 /// This test case tries to get the contents of the log using an invalid
 /// argument.  An exception should be thrown.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetAuthenticationLogInvalid()
+TEST_CASE("GetAuthenticationLogInvalid", "[LogManager]")
 {
     MgLogManager* pMgLogManager = MgLogManager::GetInstance();
-    CPPUNIT_ASSERT_THROW_MG(pMgLogManager->GetAuthenticationLog(-1), MgArgumentOutOfRangeException*);
+    REQUIRE_THROWS_MG(pMgLogManager->GetAuthenticationLog(-1), MgArgumentOutOfRangeException*);
 }
 
 ///----------------------------------------------------------------------------
@@ -928,7 +911,7 @@
 ///
 /// This test case tries to change the log info.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_SetErrorLogInfo()
+TEST_CASE("SetErrorLogInfo", "[LogManager]")
 {
     try
     {
@@ -948,15 +931,15 @@
         // Restore original info
         pMgLogManager->SetErrorLogInfo(bOriginalEnabled, originalName, originalParams);
 
-        CPPUNIT_ASSERT(bEnabled == false);
-        CPPUNIT_ASSERT(wcscmp(name.c_str(), TestName) == 0);
-        CPPUNIT_ASSERT(wcscmp(params.c_str(), TestParameters) == 0);
+        REQUIRE(bEnabled == false);
+        REQUIRE(wcscmp(name.c_str(), TestName) == 0);
+        REQUIRE(wcscmp(params.c_str(), TestParameters) == 0);
     }
     catch (MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -969,19 +952,19 @@
 ///
 /// This test case tries to clear the log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_ClearErrorLog()
+TEST_CASE("ClearErrorLog", "[LogManager]")
 {
     try
     {
         MgLogManager* pMgLogManager = MgLogManager::GetInstance();
         bool bResult = pMgLogManager->ClearErrorLog();
-        CPPUNIT_ASSERT(bResult);
+        REQUIRE(bResult);
     }
     catch (MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -994,7 +977,7 @@
 ///
 /// This test case tries to get the contents of the log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetErrorLog()
+TEST_CASE("GetErrorLog", "[LogManager]")
 {
     MgLogManager* pMgLogManager = MgLogManager::GetInstance();
     STRING path = pMgLogManager->GetLogsPath();
@@ -1020,7 +1003,7 @@
         pMgLogManager->SetErrorLogFileName(originalName);
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1028,8 +1011,8 @@
         throw;
     }
 
-    CPPUNIT_ASSERT(logContents == contents);
-    CPPUNIT_ASSERT(lastLogEntry == LastEntry);
+    REQUIRE(logContents == contents);
+    REQUIRE(lastLogEntry == LastEntry);
 }
 
 ///----------------------------------------------------------------------------
@@ -1037,7 +1020,7 @@
 ///
 /// This test case tries to get the contents of the log between two dates.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetErrorLogByDate()
+TEST_CASE("GetErrorLogByDate", "[LogManager]")
 {
     MgLogManager* pMgLogManager = MgLogManager::GetInstance();
     STRING path = pMgLogManager->GetLogsPath();
@@ -1062,7 +1045,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 54, 19, 0);
         byteReader = pMgLogManager->GetErrorLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry1 + Entry2 + Entry3));
+        REQUIRE(logContents == (Entry1 + Entry2 + Entry3));
 
         // from & to dates are at not at exact times an entry was made
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -1069,7 +1052,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 56, 0, 0);
         byteReader = pMgLogManager->GetErrorLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry2 + Entry3 + Entry4));
+        REQUIRE(logContents == (Entry2 + Entry3 + Entry4));
 
         // spans two different files
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -1076,7 +1059,7 @@
         toDate = new MgDateTime(2005, 3, 8, 1, 0, 0, 0);
         byteReader = pMgLogManager->GetErrorLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry2 + Entry3 + Entry4 + LastEntry));
+        REQUIRE(logContents == (Entry2 + Entry3 + Entry4 + LastEntry));
 
         // spans two different files, the first of which doesn't exist
         fromDate = new MgDateTime(2005, 3, 6, 23, 59, 59, 0);
@@ -1083,7 +1066,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
         byteReader = pMgLogManager->GetErrorLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == Entry1);
+        REQUIRE(logContents == Entry1);
 
         // spans two different files, the second of which doesn't exist
         fromDate = new MgDateTime(2005, 3, 8, 0, 0, 0, 0);
@@ -1090,7 +1073,7 @@
         toDate = new MgDateTime(2005, 3, 9, 0, 0, 0, 0);
         byteReader = pMgLogManager->GetErrorLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == LastEntry);
+        REQUIRE(logContents == LastEntry);
 
         // from date is after the latest entry in the log files
         fromDate = new MgDateTime(2006, 1, 1, 1, 0, 0, 0);
@@ -1097,15 +1080,15 @@
         toDate = new MgDateTime(2006, 1, 1, 1, 0, 0, 0);
         byteReader = pMgLogManager->GetErrorLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents.length() == 0);
+        REQUIRE(logContents.length() == 0);
 
         // Use a null value for the date
-        CPPUNIT_ASSERT_THROW_MG(pMgLogManager->GetErrorLog(NULL, toDate), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pMgLogManager->GetErrorLog(nullptr, toDate), MgNullArgumentException*);
 
         // Use dates more than 24 hours apart
         fromDate = new MgDateTime(2005, 2, 18, 14, 0, 0, 0);
         toDate = new MgDateTime(2005, 2, 19, 18, 0, 0, 0);
-        CPPUNIT_ASSERT_THROW_MG(pMgLogManager->GetErrorLog(fromDate, toDate), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pMgLogManager->GetErrorLog(fromDate, toDate), MgInvalidArgumentException*);
 
         pMgLogManager->SetErrorLogFileName(originalName);
     }
@@ -1114,7 +1097,7 @@
         pMgLogManager->SetErrorLogFileName(originalName);
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1129,10 +1112,10 @@
 /// This test case tries to get the contents of the log using an invalid
 /// argument.  An exception should be thrown.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetErrorLogInvalid()
+TEST_CASE("GetErrorLogInvalid", "[LogManager]")
 {
     MgLogManager* pMgLogManager = MgLogManager::GetInstance();
-    CPPUNIT_ASSERT_THROW_MG(pMgLogManager->GetErrorLog(-1), MgArgumentOutOfRangeException*);
+    REQUIRE_THROWS_MG(pMgLogManager->GetErrorLog(-1), MgArgumentOutOfRangeException*);
 }
 
 ///----------------------------------------------------------------------------
@@ -1140,7 +1123,7 @@
 ///
 /// This test case tries to change the log info.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_SetSessionLogInfo()
+TEST_CASE("SetSessionLogInfo", "[LogManager]")
 {
     try
     {
@@ -1160,15 +1143,15 @@
         // Restore original info
         pMgLogManager->SetSessionLogInfo(bOriginalEnabled, originalName, originalParams);
 
-        CPPUNIT_ASSERT(bEnabled == false);
-        CPPUNIT_ASSERT(wcscmp(name.c_str(), TestName) == 0);
-        CPPUNIT_ASSERT(wcscmp(params.c_str(), TestParameters) == 0);
+        REQUIRE(bEnabled == false);
+        REQUIRE(wcscmp(name.c_str(), TestName) == 0);
+        REQUIRE(wcscmp(params.c_str(), TestParameters) == 0);
     }
     catch (MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1181,19 +1164,19 @@
 ///
 /// This test case tries to clear the log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_ClearSessionLog()
+TEST_CASE("ClearSessionLog", "[LogManager]")
 {
     try
     {
         MgLogManager* pMgLogManager = MgLogManager::GetInstance();
         bool bResult = pMgLogManager->ClearSessionLog();
-        CPPUNIT_ASSERT(bResult);
+        REQUIRE(bResult);
     }
     catch (MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1206,7 +1189,7 @@
 ///
 /// This test case tries to get the contents of the log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetSessionLog()
+TEST_CASE("GetSessionLog", "[LogManager]")
 {
     MgLogManager* pMgLogManager = MgLogManager::GetInstance();
     STRING path = pMgLogManager->GetLogsPath();
@@ -1232,7 +1215,7 @@
         pMgLogManager->SetSessionLogFileName(originalName);
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1240,8 +1223,8 @@
         throw;
     }
 
-    CPPUNIT_ASSERT(logContents == contents);
-    CPPUNIT_ASSERT(lastLogEntry == LastEntry);
+    REQUIRE(logContents == contents);
+    REQUIRE(lastLogEntry == LastEntry);
 }
 
 ///----------------------------------------------------------------------------
@@ -1249,7 +1232,7 @@
 ///
 /// This test case tries to get the contents of the log between two dates.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetSessionLogByDate()
+TEST_CASE("GetSessionLogByDate", "[LogManager]")
 {
     MgLogManager* pMgLogManager = MgLogManager::GetInstance();
     STRING path = pMgLogManager->GetLogsPath();
@@ -1274,7 +1257,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 54, 19, 0);
         byteReader = pMgLogManager->GetSessionLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry1 + Entry2 + Entry3));
+        REQUIRE(logContents == (Entry1 + Entry2 + Entry3));
 
         // from & to dates are at not at exact times an entry was made
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -1281,7 +1264,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 56, 0, 0);
         byteReader = pMgLogManager->GetSessionLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry2 + Entry3 + Entry4));
+        REQUIRE(logContents == (Entry2 + Entry3 + Entry4));
 
         // spans two different files
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -1288,7 +1271,7 @@
         toDate = new MgDateTime(2005, 3, 8, 1, 0, 0, 0);
         byteReader = pMgLogManager->GetSessionLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry2 + Entry3 + Entry4 + LastEntry));
+        REQUIRE(logContents == (Entry2 + Entry3 + Entry4 + LastEntry));
 
         // spans two different files, the first of which doesn't exist
         fromDate = new MgDateTime(2005, 3, 6, 23, 59, 59, 0);
@@ -1295,7 +1278,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
         byteReader = pMgLogManager->GetSessionLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == Entry1);
+        REQUIRE(logContents == Entry1);
 
         // spans two different files, the second of which doesn't exist
         fromDate = new MgDateTime(2005, 3, 8, 0, 0, 0, 0);
@@ -1302,7 +1285,7 @@
         toDate = new MgDateTime(2005, 3, 9, 0, 0, 0, 0);
         byteReader = pMgLogManager->GetSessionLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == LastEntry);
+        REQUIRE(logContents == LastEntry);
 
         // from date is after the latest entry in the log files
         fromDate = new MgDateTime(2006, 1, 1, 1, 0, 0, 0);
@@ -1309,15 +1292,15 @@
         toDate = new MgDateTime(2006, 1, 1, 1, 0, 0, 0);
         byteReader = pMgLogManager->GetSessionLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents.length() == 0);
+        REQUIRE(logContents.length() == 0);
 
         // Use a null value for the date
-        CPPUNIT_ASSERT_THROW_MG(pMgLogManager->GetSessionLog(NULL, toDate), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pMgLogManager->GetSessionLog(nullptr, toDate), MgNullArgumentException*);
 
         // Use dates more than 24 hours apart
         fromDate = new MgDateTime(2005, 2, 18, 14, 0, 0, 0);
         toDate = new MgDateTime(2005, 2, 19, 18, 0, 0, 0);
-        CPPUNIT_ASSERT_THROW_MG(pMgLogManager->GetSessionLog(fromDate, toDate), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pMgLogManager->GetSessionLog(fromDate, toDate), MgInvalidArgumentException*);
 
         pMgLogManager->SetSessionLogFileName(originalName);
     }
@@ -1326,7 +1309,7 @@
         pMgLogManager->SetSessionLogFileName(originalName);
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1341,10 +1324,10 @@
 /// This test case tries to get the contents of the log using an invalid
 /// argument.  An exception should be thrown.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetSessionLogInvalid()
+TEST_CASE("GetSessionLogInvalid", "[LogManager]")
 {
     MgLogManager* pMgLogManager = MgLogManager::GetInstance();
-    CPPUNIT_ASSERT_THROW_MG(pMgLogManager->GetSessionLog(-1), MgArgumentOutOfRangeException*);
+    REQUIRE_THROWS_MG(pMgLogManager->GetSessionLog(-1), MgArgumentOutOfRangeException*);
 }
 
 ///----------------------------------------------------------------------------
@@ -1352,7 +1335,7 @@
 ///
 /// This test case tries to change the log info.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_SetTraceLogInfo()
+TEST_CASE("SetTraceLogInfo", "[LogManager]")
 {
     try
     {
@@ -1372,15 +1355,15 @@
         // Restore original info
         pMgLogManager->SetTraceLogInfo(bOriginalEnabled, originalName, originalParams);
 
-        CPPUNIT_ASSERT(bEnabled == false);
-        CPPUNIT_ASSERT(wcscmp(name.c_str(), TestName) == 0);
-        CPPUNIT_ASSERT(wcscmp(params.c_str(), TestParameters) == 0);
+        REQUIRE(bEnabled == false);
+        REQUIRE(wcscmp(name.c_str(), TestName) == 0);
+        REQUIRE(wcscmp(params.c_str(), TestParameters) == 0);
     }
     catch (MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1393,19 +1376,19 @@
 ///
 /// This test case tries to clear the log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_ClearTraceLog()
+TEST_CASE("ClearTraceLog", "[LogManager]")
 {
     try
     {
         MgLogManager* pMgLogManager = MgLogManager::GetInstance();
         bool bResult = pMgLogManager->ClearTraceLog();
-        CPPUNIT_ASSERT(bResult);
+        REQUIRE(bResult);
     }
     catch (MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1418,7 +1401,7 @@
 ///
 /// This test case tries to get the contents of the log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetTraceLog()
+TEST_CASE("GetTraceLog", "[LogManager]")
 {
     MgLogManager* pMgLogManager = MgLogManager::GetInstance();
     STRING path = pMgLogManager->GetLogsPath();
@@ -1444,7 +1427,7 @@
         pMgLogManager->SetTraceLogFileName(originalName);
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1452,8 +1435,8 @@
         throw;
     }
 
-    CPPUNIT_ASSERT(logContents == contents);
-    CPPUNIT_ASSERT(lastLogEntry == LastEntry);
+    REQUIRE(logContents == contents);
+    REQUIRE(lastLogEntry == LastEntry);
 }
 
 ///----------------------------------------------------------------------------
@@ -1461,7 +1444,7 @@
 ///
 /// This test case tries to get the contents of the log between two dates.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetTraceLogByDate()
+TEST_CASE("GetTraceLogByDate", "[LogManager]")
 {
     MgLogManager* pMgLogManager = MgLogManager::GetInstance();
     STRING path = pMgLogManager->GetLogsPath();
@@ -1486,7 +1469,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 54, 19, 0);
         byteReader = pMgLogManager->GetTraceLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry1 + Entry2 + Entry3));
+        REQUIRE(logContents == (Entry1 + Entry2 + Entry3));
 
         // from & to dates are at not at exact times an entry was made
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -1493,7 +1476,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 56, 0, 0);
         byteReader = pMgLogManager->GetTraceLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry2 + Entry3 + Entry4));
+        REQUIRE(logContents == (Entry2 + Entry3 + Entry4));
 
         // spans two different files
         fromDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
@@ -1500,7 +1483,7 @@
         toDate = new MgDateTime(2005, 3, 8, 1, 0, 0, 0);
         byteReader = pMgLogManager->GetTraceLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == (Entry2 + Entry3 + Entry4 + LastEntry));
+        REQUIRE(logContents == (Entry2 + Entry3 + Entry4 + LastEntry));
 
         // spans two different files, the first of which doesn't exist
         fromDate = new MgDateTime(2005, 3, 6, 23, 59, 59, 0);
@@ -1507,7 +1490,7 @@
         toDate = new MgDateTime(2005, 3, 7, 16, 52, 0, 0);
         byteReader = pMgLogManager->GetTraceLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == Entry1);
+        REQUIRE(logContents == Entry1);
 
         // spans two different files, the second of which doesn't exist
         fromDate = new MgDateTime(2005, 3, 8, 0, 0, 0, 0);
@@ -1514,7 +1497,7 @@
         toDate = new MgDateTime(2005, 3, 9, 0, 0, 0, 0);
         byteReader = pMgLogManager->GetTraceLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents == LastEntry);
+        REQUIRE(logContents == LastEntry);
 
         // from date is after the latest entry in the log files
         fromDate = new MgDateTime(2006, 1, 1, 1, 0, 0, 0);
@@ -1521,15 +1504,15 @@
         toDate = new MgDateTime(2006, 1, 1, 1, 0, 0, 0);
         byteReader = pMgLogManager->GetTraceLog(fromDate, toDate);
         logContents = MgUtil::MultiByteToWideChar(MgUtil::GetTextFromReader(byteReader));
-        CPPUNIT_ASSERT(logContents.length() == 0);
+        REQUIRE(logContents.length() == 0);
 
         // Use a null value for the date
-        CPPUNIT_ASSERT_THROW_MG(pMgLogManager->GetTraceLog(NULL, toDate), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pMgLogManager->GetTraceLog(nullptr, toDate), MgNullArgumentException*);
 
         // Use dates more than 24 hours apart
         fromDate = new MgDateTime(2005, 2, 18, 14, 0, 0, 0);
         toDate = new MgDateTime(2005, 2, 19, 18, 0, 0, 0);
-        CPPUNIT_ASSERT_THROW_MG(pMgLogManager->GetTraceLog(fromDate, toDate), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pMgLogManager->GetTraceLog(fromDate, toDate), MgInvalidArgumentException*);
 
         pMgLogManager->SetTraceLogFileName(originalName);
     }
@@ -1538,7 +1521,7 @@
         pMgLogManager->SetTraceLogFileName(originalName);
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1553,10 +1536,10 @@
 /// This test case tries to get the contents of the log using an invalid
 /// argument.  An exception should be thrown.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetTraceLogInvalid()
+TEST_CASE("GetTraceLogInvalid", "[LogManager]")
 {
     MgLogManager* pMgLogManager = MgLogManager::GetInstance();
-    CPPUNIT_ASSERT_THROW_MG(pMgLogManager->GetTraceLog(-1), MgArgumentOutOfRangeException*);
+    REQUIRE_THROWS_MG(pMgLogManager->GetTraceLog(-1), MgArgumentOutOfRangeException*);
 }
 
 ///----------------------------------------------------------------------------
@@ -1564,7 +1547,7 @@
 ///
 /// This test case writes an entry to the log.  (Assumes that getlog works)
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_LogAccessEntry()
+TEST_CASE("LogAccessEntry", "[LogManager]")
 {
     Ptr<MgByteReader> byteReader;
     STRING logEntry;
@@ -1591,7 +1574,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
 
     }
     catch (...)
@@ -1600,7 +1583,7 @@
     }
 
     pos = logEntry.find(entry);
-    CPPUNIT_ASSERT(pos != string::npos);
+    REQUIRE(pos != string::npos);
 }
 
 ///----------------------------------------------------------------------------
@@ -1608,7 +1591,7 @@
 ///
 /// This test case writes an entry to the log.  (Assumes that getlog works)
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_LogAdminEntry()
+TEST_CASE("LogAdminEntry", "[LogManager]")
 {
     Ptr<MgByteReader> byteReader;
     STRING logEntry;
@@ -1635,7 +1618,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1643,7 +1626,7 @@
     }
 
     pos = logEntry.find(entry);
-    CPPUNIT_ASSERT(pos != string::npos);
+    REQUIRE(pos != string::npos);
 }
 
 ///----------------------------------------------------------------------------
@@ -1651,7 +1634,7 @@
 ///
 /// This test case writes an entry to the log.  (Assumes that getlog works)
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_LogAuthenticationEntry()
+TEST_CASE("LogAuthenticationEntry", "[LogManager]")
 {
     Ptr<MgByteReader> byteReader;
     STRING logEntry;
@@ -1678,7 +1661,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1686,7 +1669,7 @@
     }
 
     pos = logEntry.find(entry);
-    CPPUNIT_ASSERT(pos != string::npos);
+    REQUIRE(pos != string::npos);
 }
 
 ///----------------------------------------------------------------------------
@@ -1694,7 +1677,7 @@
 ///
 /// This test case writes an entry to the log.  (Assumes that getlog works)
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_LogErrorEntry()
+TEST_CASE("LogErrorEntry", "[LogManager]")
 {
     Ptr<MgByteReader> byteReader;
     STRING logEntry;
@@ -1721,7 +1704,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1729,7 +1712,7 @@
     }
 
     pos = logEntry.find(entry);
-    CPPUNIT_ASSERT(pos != string::npos);
+    REQUIRE(pos != string::npos);
 }
 
 ///----------------------------------------------------------------------------
@@ -1737,7 +1720,7 @@
 ///
 /// This test case writes an entry to the log.  (Assumes that getlog works)
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_LogSessionEntry()
+TEST_CASE("LogSessionEntry", "[LogManager]")
 {
     STRING logEntry;
     MgSessionInfo sessionInfo;
@@ -1762,7 +1745,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1772,7 +1755,7 @@
     // Find the values for ops failed and received, 0 and 0 respectively,
     // since no session object has been created.
 
-    CPPUNIT_ASSERT(STRING::npos != logEntry.find(L"\t0\t0"));
+    REQUIRE(STRING::npos != logEntry.find(L"\t0\t0"));
 }
 
 ///----------------------------------------------------------------------------
@@ -1780,7 +1763,7 @@
 ///
 /// This test case writes an entry to the log.  (Assumes that getlog works)
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_LogTraceEntry()
+TEST_CASE("LogTraceEntry", "[LogManager]")
 {
     Ptr<MgByteReader> byteReader;
     STRING logEntry;
@@ -1807,7 +1790,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1815,7 +1798,7 @@
     }
 
     pos = logEntry.find(entry);
-    CPPUNIT_ASSERT(pos != string::npos);
+    REQUIRE(pos != string::npos);
 }
 
 
@@ -1824,7 +1807,7 @@
 ///
 /// This test case tries to get the contents of the specified log.
 ///----------------------------------------------------------------------------
-void TestLogManager::TestCase_GetLogFile()
+TEST_CASE("GetLogFile", "[LogManager]")
 {
     MgLogManager* pMgLogManager = MgLogManager::GetInstance();
     STRING path = pMgLogManager->GetLogsPath();
@@ -1850,7 +1833,7 @@
         pMgLogManager->SetAccessLogFileName(originalName);
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1858,5 +1841,5 @@
         throw;
     }
 
-    CPPUNIT_ASSERT(logContents == contents);
+    REQUIRE(logContents == contents);
 }

Deleted: trunk/MgDev/Server/src/UnitTesting/TestLogManager.h
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestLogManager.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestLogManager.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,146 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _TESTLOGMANAGER_H
-#define _TESTLOGMANAGER_H
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestLogManager : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestLogManager);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_ValidLogManager);
-    CPPUNIT_TEST(TestCase_GetLogsPath);
-    CPPUNIT_TEST(TestCase_TestForDeadLock);
-
-    CPPUNIT_TEST(TestCase_EnumerateLogs);
-    CPPUNIT_TEST(TestCase_RenameLog);
-
-    CPPUNIT_TEST(TestCase_SetAccessLogInfo);
-    CPPUNIT_TEST(TestCase_ClearAccessLog);
-    CPPUNIT_TEST(TestCase_GetAccessLog);
-    CPPUNIT_TEST(TestCase_GetAccessLogByDate);
-    CPPUNIT_TEST(TestCase_GetAccessLogInvalid);
-
-    CPPUNIT_TEST(TestCase_SetAdminLogInfo);
-    CPPUNIT_TEST(TestCase_ClearAdminLog);
-    CPPUNIT_TEST(TestCase_GetAdminLog);
-    CPPUNIT_TEST(TestCase_GetAdminLogByDate);
-    CPPUNIT_TEST(TestCase_GetAdminLogInvalid);
-
-    CPPUNIT_TEST(TestCase_SetAuthenticationLogInfo);
-    CPPUNIT_TEST(TestCase_ClearAuthenticationLog);
-    CPPUNIT_TEST(TestCase_GetAuthenticationLog);
-    CPPUNIT_TEST(TestCase_GetAuthenticationLogByDate);
-    CPPUNIT_TEST(TestCase_GetAuthenticationLogInvalid);
-
-    CPPUNIT_TEST(TestCase_SetErrorLogInfo);
-    CPPUNIT_TEST(TestCase_ClearErrorLog);
-    CPPUNIT_TEST(TestCase_GetErrorLog);
-    CPPUNIT_TEST(TestCase_GetErrorLogByDate);
-    CPPUNIT_TEST(TestCase_GetErrorLogInvalid);
-
-    CPPUNIT_TEST(TestCase_SetSessionLogInfo);
-    CPPUNIT_TEST(TestCase_ClearSessionLog);
-    CPPUNIT_TEST(TestCase_GetSessionLog);
-    CPPUNIT_TEST(TestCase_GetSessionLogByDate);
-    CPPUNIT_TEST(TestCase_GetSessionLogInvalid);
-
-    CPPUNIT_TEST(TestCase_SetTraceLogInfo);
-    CPPUNIT_TEST(TestCase_ClearTraceLog);
-    CPPUNIT_TEST(TestCase_GetTraceLog);
-    CPPUNIT_TEST(TestCase_GetTraceLogByDate);
-    CPPUNIT_TEST(TestCase_GetTraceLogInvalid);
-
-    CPPUNIT_TEST(TestCase_LogAccessEntry);
-    CPPUNIT_TEST(TestCase_LogAdminEntry);
-    CPPUNIT_TEST(TestCase_LogAuthenticationEntry);
-    CPPUNIT_TEST(TestCase_LogErrorEntry);
-    CPPUNIT_TEST(TestCase_LogSessionEntry);
-    CPPUNIT_TEST(TestCase_LogTraceEntry);
-
-    CPPUNIT_TEST(TestCase_GetLogFile);
-
-    CPPUNIT_TEST(TestCase_DeleteLog);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-    bool CreateFile(STRING filename, STRING contents);
-
-    void TestCase_ValidLogManager();
-    void TestCase_GetLogsPath();
-    void TestCase_TestForDeadLock();
-
-    void TestCase_EnumerateLogs();
-    void TestCase_DeleteLog();
-    void TestCase_RenameLog();
-
-    void TestCase_SetAccessLogInfo();
-    void TestCase_ClearAccessLog();
-    void TestCase_GetAccessLog();
-    void TestCase_GetAccessLogByDate();
-    void TestCase_GetAccessLogInvalid();
-
-    void TestCase_SetAdminLogInfo();
-    void TestCase_ClearAdminLog();
-    void TestCase_GetAdminLog();
-    void TestCase_GetAdminLogByDate();
-    void TestCase_GetAdminLogInvalid();
-
-    void TestCase_SetAuthenticationLogInfo();
-    void TestCase_ClearAuthenticationLog();
-    void TestCase_GetAuthenticationLog();
-    void TestCase_GetAuthenticationLogByDate();
-    void TestCase_GetAuthenticationLogInvalid();
-
-    void TestCase_SetErrorLogInfo();
-    void TestCase_ClearErrorLog();
-    void TestCase_GetErrorLog();
-    void TestCase_GetErrorLogByDate();
-    void TestCase_GetErrorLogInvalid();
-
-    void TestCase_SetSessionLogInfo();
-    void TestCase_ClearSessionLog();
-    void TestCase_GetSessionLog();
-    void TestCase_GetSessionLogByDate();
-    void TestCase_GetSessionLogInvalid();
-
-    void TestCase_SetTraceLogInfo();
-    void TestCase_ClearTraceLog();
-    void TestCase_GetTraceLog();
-    void TestCase_GetTraceLogByDate();
-    void TestCase_GetTraceLogInvalid();
-
-    void TestCase_LogAccessEntry();
-    void TestCase_LogAdminEntry();
-    void TestCase_LogAuthenticationEntry();
-    void TestCase_LogErrorEntry();
-    void TestCase_LogSessionEntry();
-    void TestCase_LogTraceEntry();
-
-    void TestCase_GetLogFile();
-};
-
-#endif // _TESTLOGMANAGER_H

Modified: trunk/MgDev/Server/src/UnitTesting/TestLogManagerThread.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestLogManagerThread.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestLogManagerThread.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -30,9 +30,9 @@
 int TestLogManagerThread::svc()
 {
     MgLogManager* pMan = MgLogManager::GetInstance();
-    if (NULL == pMan)
+    if (nullptr == pMan)
     {
-        throw new MgNullReferenceException(L"TestLogManagerThread.svc", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgNullReferenceException(L"TestLogManagerThread.svc", __LINE__, __WFILE__, nullptr, L"", nullptr);
     }
 
     INT32 nResult = 0;

Modified: trunk/MgDev/Server/src/UnitTesting/TestMappingService.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestMappingService.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestMappingService.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -16,324 +16,25 @@
 //
 
 #include "MapGuideCommon.h"
-#include "TestMappingService.h"
 #include "ServiceManager.h"
 #include "ServerResourceService.h"
 #include "ServerMappingService.h"
 #include "ServerSiteService.h"
-#include "../Common/Manager/FdoConnectionManager.h"
-#include "CppUnitExtensions.h"
+#include "CatchHelperMacros.h"
 #include "FoundationDefs.h"
-const STRING TEST_LOCALE = L"en";
+#include "TestServiceFactory.h"
+#include "catch.hpp"
 
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestMappingService, "TestMappingService");
 
-
-TestMappingService::TestMappingService()
+static void TestCase_CreateRuntimeMap(INT32 major, INT32 minor, INT32 rev)
 {
-    // Initialize service objects.
-    MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-
-    m_svcResource = dynamic_cast<MgResourceService*>(
-        serviceManager->RequestService(MgServiceType::ResourceService));
-    assert(m_svcResource != NULL);
-
-    m_svcMapping = dynamic_cast<MgMappingService*>(
-        serviceManager->RequestService(MgServiceType::MappingService));
-    assert(m_svcMapping != NULL);
-
-    // Initialize a site connection.
-    Ptr<MgServerSiteService> svcSite = dynamic_cast<MgServerSiteService*>(
-        serviceManager->RequestService(MgServiceType::SiteService));
-    assert(svcSite != NULL);
-
-    Ptr<MgUserInformation> userInfo = new MgUserInformation(
-        L"Administrator", L"admin");
-    userInfo->SetLocale(TEST_LOCALE);
-
-    // Set the current MgUserInformation
-    // This must be done before calling CreateSession()
-    MgUserInformation::SetCurrentUserInfo(userInfo);
-
-    m_session = svcSite->CreateSession();
-    assert(!m_session.empty());
-    userInfo->SetMgSessionId(m_session);
-
-    // Set the current MgUserInformation
-    MgUserInformation::SetCurrentUserInfo(userInfo);
-
-    m_siteConnection = new MgSiteConnection();
-    m_siteConnection->Open(userInfo);
-}
-
-
-TestMappingService::~TestMappingService()
-{
-}
-
-
-void TestMappingService::setUp()
-{
-}
-
-
-void TestMappingService::tearDown()
-{
-}
-
-
-void TestMappingService::TestStart()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Mapping Service tests.\n")));
-
     try
     {
-        #ifdef _DEBUG
-        MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
-        if(pFdoConnectionManager)
-        {
-            pFdoConnectionManager->ShowCache();
-        }
-        #endif
+        STRING m_session;
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgUserInformation> userInfo = TestServiceFactory::CreateSession(svcSite, m_session, L"Administrator", L"admin");
+        Ptr<MgMappingService> m_svcMapping = TestServiceFactory::CreateMappingService();
 
-        //set user info
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
-        MgUserInformation::SetCurrentUserInfo(userInfo);
-
-        //publish the map definition
-        Ptr<MgResourceIdentifier> mapres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
-        Ptr<MgByteSource> mdfsrc = new MgByteSource(L"../UnitTestFiles/UT_Sheboygan.mdf", false);
-        Ptr<MgByteReader> mdfrdr = mdfsrc->GetReader();
-        m_svcResource->SetResource(mapres, mdfrdr, NULL);
-
-        //publish the layer definitions
-        Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.ldf", false);
-        Ptr<MgByteReader> ldfrdr1 = ldfsrc1->GetReader();
-        m_svcResource->SetResource(ldfres1, ldfrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.ldf", false);
-        Ptr<MgByteReader> ldfrdr2 = ldfsrc2->GetReader();
-        m_svcResource->SetResource(ldfres2, ldfrdr2, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.ldf", false);
-        Ptr<MgByteReader> ldfrdr3 = ldfsrc3->GetReader();
-        m_svcResource->SetResource(ldfres3, ldfrdr3, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres4 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RotatedPointStyles.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc4 = new MgByteSource(L"../UnitTestFiles/UT_RotatedPointStyles.ldf", false);
-        Ptr<MgByteReader> ldfrdr4 = ldfsrc4->GetReader();
-        m_svcResource->SetResource(ldfres4, ldfrdr4, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres5 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RoadCenterLines.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc5 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.ldf", false);
-        Ptr<MgByteReader> ldfrdr5 = ldfsrc5->GetReader();
-        m_svcResource->SetResource(ldfres5, ldfrdr5, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres6 = new MgResourceIdentifier(L"Library://UnitTests/Layers/VotingDistricts.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc6 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.ldf", false);
-        Ptr<MgByteReader> ldfrdr6 = ldfsrc6->GetReader();
-        m_svcResource->SetResource(ldfres6, ldfrdr6, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres7 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTS.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc7 = new MgByteSource(L"../UnitTestFiles/UT_MultiCTS.ldf", false);
-        Ptr<MgByteReader> ldfrdr7 = ldfsrc7->GetReader();
-        m_svcResource->SetResource(ldfres7, ldfrdr7, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres8 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTSWithTheme.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc8 = new MgByteSource(L"../UnitTestFiles/UT_MultiCTSWithTheme.ldf", false);
-        Ptr<MgByteReader> ldfrdr8 = ldfsrc8->GetReader();
-        m_svcResource->SetResource(ldfres8, ldfrdr8, NULL);
-
-        //publish the feature sources
-        Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
-        Ptr<MgByteSource> fssrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.fs", false);
-        Ptr<MgByteReader> fsrdr1 = fssrc1->GetReader();
-        m_svcResource->SetResource(fsres1, fsrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
-        Ptr<MgByteSource> fssrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.fs", false);
-        Ptr<MgByteReader> fsrdr2 = fssrc2->GetReader();
-        m_svcResource->SetResource(fsres2, fsrdr2, NULL);
-
-        Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
-        Ptr<MgByteSource> fssrc3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.fs", false);
-        Ptr<MgByteReader> fsrdr3 = fssrc3->GetReader();
-        m_svcResource->SetResource(fsres3, fsrdr3, NULL);
-
-        // publish the resource data
-        Ptr<MgByteSource> dataSource1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.sdf", false);
-        Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
-        m_svcResource->SetResourceData(fsres1, L"UT_HydrographicPolygons.sdf", L"File", dataReader1);
-
-        Ptr<MgByteSource> dataSource2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.sdf", false);
-        Ptr<MgByteReader> dataReader2 = dataSource2->GetReader();
-        m_svcResource->SetResourceData(fsres2, L"UT_Parcels.sdf", L"File", dataReader2);
-
-        Ptr<MgByteSource> dataSource3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.sdf", false);
-        Ptr<MgByteReader> dataReader3 = dataSource3->GetReader();
-        m_svcResource->SetResourceData(fsres3, L"UT_Rail.sdf", L"File", dataReader3);
-
-        // publish the print layouts
-        Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
-        Ptr<MgByteSource> plsrc1 = new MgByteSource(L"../UnitTestFiles/UT_AllElements.pl", false);
-        Ptr<MgByteReader> plrdr1 = plsrc1->GetReader();
-        m_svcResource->SetResource(plres1, plrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
-        Ptr<MgByteSource> plsrc2 = new MgByteSource(L"../UnitTestFiles/UT_NoLegend.pl", false);
-        Ptr<MgByteReader> plrdr2 = plsrc2->GetReader();
-        m_svcResource->SetResource(plres2, plrdr2, NULL);
-
-        // publish the symbol library
-        Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
-        Ptr<MgByteSource> slsrc1 = new MgByteSource(L"../UnitTestFiles/UT_SymbolMart.sl", false);
-        Ptr<MgByteReader> slrdr1 = slsrc1->GetReader();
-        m_svcResource->SetResource(slres1, slrdr1, NULL);
-        Ptr<MgByteSource> datasrc = new MgByteSource(L"../UnitTestFiles/UT_Symbols.dwf", false);
-        Ptr<MgByteReader> datardr = datasrc->GetReader();
-        m_svcResource->SetResourceData(slres1, L"symbols.dwf", L"File", datardr);
-
-        Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinkedTileSet.MapDefinition");
-        Ptr<MgByteSource> mdfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_LinkedTileSet.mdf", false);
-        Ptr<MgByteReader> mdfrdr2 = mdfsrc2->GetReader();
-        m_svcResource->SetResource(mapres2, mdfrdr2, NULL);
-
-        Ptr<MgResourceIdentifier> mapres3 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinkedTileSetXYZ.MapDefinition");
-        Ptr<MgByteSource> mdfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_LinkedTileSetXYZ.mdf", false);
-        Ptr<MgByteReader> mdfrdr3 = mdfsrc3->GetReader();
-        m_svcResource->SetResource(mapres3, mdfrdr3, NULL);
-
-        Ptr<MgResourceIdentifier> tilesetres1 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/Sheboygan.TileSetDefinition");
-        Ptr<MgByteSource> tsdsrc1 = new MgByteSource(L"../UnitTestFiles/UT_BaseMap.tsd", false);
-        Ptr<MgByteReader> tsdrdr1 = tsdsrc1->GetReader();
-        m_svcResource->SetResource(tilesetres1, tsdrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> tilesetres2 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/XYZ.TileSetDefinition");
-        Ptr<MgByteSource> tsdsrc2 = new MgByteSource(L"../UnitTestFiles/UT_XYZ.tsd", false);
-        Ptr<MgByteReader> tsdrdr2 = tsdsrc2->GetReader();
-        m_svcResource->SetResource(tilesetres2, tsdrdr2, NULL);
-
-        Ptr<MgByteSource> bsPackage = new MgByteSource(L"../UnitTestFiles/PlotHole.mgp", false);
-        Ptr<MgByteReader> pkgReader = bsPackage->GetReader();
-        m_svcResource->ApplyResourcePackage(pkgReader);
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-}
-
-
-void TestMappingService::TestEnd()
-{
-    try
-    {
-        //set user info
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
-        MgUserInformation::SetCurrentUserInfo(userInfo);
-
-        //delete the map definition
-        Ptr<MgResourceIdentifier> mapres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
-        m_svcResource->DeleteResource(mapres);
-
-        //delete the layer definitions
-        Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres1);
-
-        Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres2);
-
-        Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres3);
-
-        Ptr<MgResourceIdentifier> ldfres4 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RotatedPointStyles.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres4);
-
-        Ptr<MgResourceIdentifier> ldfres5 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RoadCenterLines.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres5);
-
-        Ptr<MgResourceIdentifier> ldfres6 = new MgResourceIdentifier(L"Library://UnitTests/Layers/VotingDistricts.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres6);
-
-        Ptr<MgResourceIdentifier> ldfres7 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTS.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres7);
-
-        Ptr<MgResourceIdentifier> ldfres8 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTSWithTheme.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres8);
-
-        //delete the feature sources
-        Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
-        m_svcResource->DeleteResource(fsres1);
-
-        Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
-        m_svcResource->DeleteResource(fsres2);
-
-        Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
-        m_svcResource->DeleteResource(fsres3);
-
-        // delete the print layouts
-        Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
-        m_svcResource->DeleteResource(plres1);
-
-        Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
-        m_svcResource->DeleteResource(plres2);
-
-        // delete the symbol library
-        Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
-        m_svcResource->DeleteResource(slres1);
-
-        Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinkedTileSet.MapDefinition");
-        m_svcResource->DeleteResource(mapres2);
-
-        Ptr<MgResourceIdentifier> mapres3 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinkedTileSetXYZ.MapDefinition");
-        m_svcResource->DeleteResource(mapres3);
-
-        Ptr<MgResourceIdentifier> tilesetres1 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/Sheboygan.TileSetDefinition");
-        m_svcResource->DeleteResource(tilesetres1);
-
-        Ptr<MgResourceIdentifier> tilesetres2 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/XYZ.TileSetDefinition");
-        m_svcResource->DeleteResource(tilesetres2);
-
-        Ptr<MgResourceIdentifier> plotHoleFolder = new MgResourceIdentifier(L"Library://UnitTests/PlotHole/");
-        m_svcResource->DeleteResource(plotHoleFolder);
-
-        #ifdef _DEBUG
-        MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
-        if(pFdoConnectionManager)
-        {
-            pFdoConnectionManager->ShowCache();
-        }
-        #endif
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nMapping Service tests completed.\n\n")));
-}
-
-void TestMappingService::TestCase_CreateRuntimeMap(INT32 major, INT32 minor, INT32 rev)
-{
-    try
-    {
         STRING suffix = L"_";
         STRING s;
         MgUtil::Int32ToString(major, s);
@@ -448,9 +149,9 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -458,10 +159,16 @@
     }
 }
 
-void TestMappingService::TestCase_DescribeRuntimeMap()
+TEST_CASE("DescribeRuntimeMap", "[MappingService]")
 {
     try
     {
+        STRING m_session;
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgUserInformation> userInfo = TestServiceFactory::CreateSession(svcSite, m_session, L"Administrator", L"admin");
+        Ptr<MgMappingService> m_svcMapping = TestServiceFactory::CreateMappingService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite, m_session);
+
         //make a runtime map
         Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
         STRING format = MgImageFormats::Png;
@@ -550,9 +257,9 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -560,10 +267,16 @@
     }
 }
 
-void TestMappingService::TestCase_CreateAndDescribeLinkedRuntimeMap()
+TEST_CASE("CreateAndDescribeLinkedRuntimeMap", "[MappingService]")
 {
     try
     {
+        STRING m_session;
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgUserInformation> userInfo = TestServiceFactory::CreateSession(svcSite, m_session, L"Administrator", L"admin");
+        Ptr<MgMappingService> m_svcMapping = TestServiceFactory::CreateMappingService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite, m_session);
+
         Ptr<MgResourceIdentifier> mdfId = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinkedTileSet.MapDefinition");
         STRING format = MgImageFormats::Png;
         Ptr<MgByteReader> rtMap = m_svcMapping->CreateRuntimeMap(mdfId, L"TestCase_CreateAndDescribeLinkedRuntimeMap", m_session, format, 16, 16, 0, 25);
@@ -578,9 +291,9 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -587,10 +300,17 @@
         throw;
     }
 }
-void TestMappingService::TestCase_SaveMap()
+
+TEST_CASE("SaveMap", "[MappingService]")
 {
     try
     {
+        STRING m_session;
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgUserInformation> userInfo = TestServiceFactory::CreateSession(svcSite, m_session, L"Administrator", L"admin");
+        Ptr<MgMappingService> m_svcMapping = TestServiceFactory::CreateMappingService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite, m_session);
+
         // Create a runtime map, save it, then open it.
         Ptr<MgResourceIdentifier> mapDefId = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
         STRING mapName = L"UnitTestSheboygan";
@@ -605,9 +325,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -615,10 +335,16 @@
     }
 }
 
-void TestMappingService::TestCase_GetMultiPlot()
+TEST_CASE("GetMultiPlot", "[MappingService]")
 {
     try
     {
+        STRING m_session;
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgUserInformation> userInfo = TestServiceFactory::CreateSession(svcSite, m_session, L"Administrator", L"admin");
+        Ptr<MgMappingService> m_svcMapping = TestServiceFactory::CreateMappingService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite, m_session);
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mapRes1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
         Ptr<MgMap> map1 = new MgMap(m_siteConnection);
@@ -681,7 +407,7 @@
 
         INT64 len = eplot->GetLength();
 
-        //CPPUNIT_ASSERT(len == 7000); // TODO: determine correct length
+        //REQUIRE(len == 7000); // TODO: determine correct length
 
         //Ptr<MgByteSink> byteSink = new MgByteSink(eplot);
         //byteSink->ToFile(L"UTNewMultiPlot.dwf");
@@ -688,9 +414,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -698,11 +424,16 @@
     }
 }
 
-
-void TestMappingService::TestCase_GetPlotUsingCurrentCenterAndScale()
+TEST_CASE("GetPlotUsingCurrentCenterAndScale", "[MappingService]")
 {
     try
     {
+        STRING m_session;
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgUserInformation> userInfo = TestServiceFactory::CreateSession(svcSite, m_session, L"Administrator", L"admin");
+        Ptr<MgMappingService> m_svcMapping = TestServiceFactory::CreateMappingService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite, m_session);
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mapRes1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
         Ptr<MgMap> map1 = new MgMap(m_siteConnection);
@@ -722,12 +453,12 @@
         Ptr<MgLayout> layout = new MgLayout(allElementsLayout, L"TestTitle", MgUnitType::USEnglish);
 
         // call the API
-        Ptr<MgByteReader> eplot = m_svcMapping->GeneratePlot(map1, plotSpec, NULL, version);
+        Ptr<MgByteReader> eplot = m_svcMapping->GeneratePlot(map1, plotSpec, nullptr, version);
         //Ptr<MgByteReader> eplot = m_svcMapping->GeneratePlot(map1, plotSpec, layout, version);
 
         INT64 len = eplot->GetLength();
 
-        // CPPUNIT_ASSERT(len == 7000); // TODO: determine correct length
+        // REQUIRE(len == 7000); // TODO: determine correct length
 
         //Ptr<MgByteSink> byteSink = new MgByteSink(eplot);
         //byteSink->ToFile(L"UTNewCurrentCentreAndScalePlot.dwf");
@@ -734,9 +465,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -744,11 +475,16 @@
     }
 }
 
-
-void TestMappingService::TestCase_GetPlotUsingOverriddenCenterAndScale()
+TEST_CASE("GetPlotUsingOverriddenCenterAndScale", "[MappingService]")
 {
     try
     {
+        STRING m_session;
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgUserInformation> userInfo = TestServiceFactory::CreateSession(svcSite, m_session, L"Administrator", L"admin");
+        Ptr<MgMappingService> m_svcMapping = TestServiceFactory::CreateMappingService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite, m_session);
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mapRes1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
         Ptr<MgMap> map1 = new MgMap(m_siteConnection);
@@ -772,7 +508,7 @@
 
         INT64 len = eplot->GetLength();
 
-        // CPPUNIT_ASSERT(len == 7000); // TODO: determine correct length
+        // REQUIRE(len == 7000); // TODO: determine correct length
 
         //Ptr<MgByteSink> byteSink = new MgByteSink(eplot);
         //byteSink->ToFile(L"UTNewOveriddenCenterAndScalePlot.dwf");
@@ -779,9 +515,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -789,11 +525,16 @@
     }
 }
 
-
-void TestMappingService::TestCase_GetPlotUsingExtents()
+TEST_CASE("GetPlotUsingExtents", "[MappingService]")
 {
     try
     {
+        STRING m_session;
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgUserInformation> userInfo = TestServiceFactory::CreateSession(svcSite, m_session, L"Administrator", L"admin");
+        Ptr<MgMappingService> m_svcMapping = TestServiceFactory::CreateMappingService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite, m_session);
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mapRes1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
         Ptr<MgMap> map1 = new MgMap(m_siteConnection);
@@ -817,7 +558,7 @@
 
         INT64 len = eplot->GetLength();
 
-        // CPPUNIT_ASSERT(len == 7000); // TODO: determine correct length
+        // REQUIRE(len == 7000); // TODO: determine correct length
 
         //Ptr<MgByteSink> byteSink = new MgByteSink(eplot);
         //byteSink->ToFile(L"UTNewExtentsPlot.dwf");
@@ -824,9 +565,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -834,11 +575,16 @@
     }
 }
 
-
-void TestMappingService::TestCase_GetPlotUsingExtentsAndExpandToFit()
+TEST_CASE("GetPlotUsingExtentsAndExpandToFit", "[MappingService]")
 {
     try
     {
+        STRING m_session;
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgUserInformation> userInfo = TestServiceFactory::CreateSession(svcSite, m_session, L"Administrator", L"admin");
+        Ptr<MgMappingService> m_svcMapping = TestServiceFactory::CreateMappingService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite, m_session);
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mapRes1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
         Ptr<MgMap> map1 = new MgMap(m_siteConnection);
@@ -858,11 +604,11 @@
         Ptr<MgLayout> layout = new MgLayout(allElementsLayout, L"TestTitle", MgUnitType::USEnglish);
 
         // call the API
-        Ptr<MgByteReader> eplot = m_svcMapping->GeneratePlot(map1, extents, true, plotSpec, NULL, version);
+        Ptr<MgByteReader> eplot = m_svcMapping->GeneratePlot(map1, extents, true, plotSpec, nullptr, version);
 
         INT64 len = eplot->GetLength();
 
-        // CPPUNIT_ASSERT(len == 7000); // TODO: determine correct length
+        // REQUIRE(len == 7000); // TODO: determine correct length
 
         //Ptr<MgByteSink> byteSink = new MgByteSink(eplot);
         //byteSink->ToFile(L"UTNewExtentsExpandToFitPlot.dwf");
@@ -869,9 +615,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -879,11 +625,16 @@
     }
 }
 
-
-void TestMappingService::TestCase_GetLegendPlot()
+TEST_CASE("GetLegendPlot", "[MappingService]")
 {
     try
     {
+        STRING m_session;
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgUserInformation> userInfo = TestServiceFactory::CreateSession(svcSite, m_session, L"Administrator", L"admin");
+        Ptr<MgMappingService> m_svcMapping = TestServiceFactory::CreateMappingService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite, m_session);
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mapRes1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
         Ptr<MgMap> map1 = new MgMap(m_siteConnection);
@@ -900,7 +651,7 @@
 
         INT64 len = eplot->GetLength();
 
-        //CPPUNIT_ASSERT(len == 7000); // TODO: determine correct length
+        //REQUIRE(len == 7000); // TODO: determine correct length
 
         //Ptr<MgByteSink> byteSink = new MgByteSink(eplot);
         //byteSink->ToFile(L"UTNewLegendPlot.dwf");
@@ -907,9 +658,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -917,10 +668,16 @@
     }
 }
 
-void TestMappingService::TestCase_GetLegendImage()
+TEST_CASE("GetLegendImage", "[MappingService]")
 {
     try
     {
+        STRING m_session;
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgUserInformation> userInfo = TestServiceFactory::CreateSession(svcSite, m_session, L"Administrator", L"admin");
+        Ptr<MgMappingService> m_svcMapping = TestServiceFactory::CreateMappingService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite, m_session);
+
         Ptr<MgResourceIdentifier> ldf = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
         Ptr<MgByteReader> rdr = m_svcMapping->GenerateLegendImage(ldf, 10000.0, 16, 16, MgImageFormats::Png, 3, 0);
         Ptr<MgByteSink> sink = new MgByteSink(rdr);
@@ -940,9 +697,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -950,10 +707,16 @@
     }
 }
 
-void TestMappingService::TestCase_GetLegendImagePointStyleWithConstRotations()
+TEST_CASE("GetLegndImagePointStyleWithConstRotations", "[MappingService]")
 {
     try
     {
+        STRING m_session;
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgUserInformation> userInfo = TestServiceFactory::CreateSession(svcSite, m_session, L"Administrator", L"admin");
+        Ptr<MgMappingService> m_svcMapping = TestServiceFactory::CreateMappingService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite, m_session);
+
         Ptr<MgResourceIdentifier> ldfId = new MgResourceIdentifier(L"Library://UnitTests/Layers/RotatedPointStyles.LayerDefinition");
 
         //Do 16x16 icons first. Our common scenario.
@@ -1082,9 +845,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1092,10 +855,17 @@
     }
 }
 
-void TestMappingService::TestCase_GetLegendImageConvenience()
+TEST_CASE("GetLegendImageConvenience", "[MappingService]")
 {
     try
     {
+        STRING m_session;
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgUserInformation> userInfo = TestServiceFactory::CreateSession(svcSite, m_session, L"Administrator", L"admin");
+        Ptr<MgMappingService> m_svcMapping = TestServiceFactory::CreateMappingService();
+        Ptr<MgResourceService> m_svcResource = TestServiceFactory::CreateResourceService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite, m_session);
+
         Ptr<MgResourceIdentifier> mapres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
         Ptr<MgMap> map = new MgMap(m_siteConnection);
         map->Create(mapres, L"TestCase_GetLegendImageConvenience");
@@ -1107,23 +877,23 @@
         layers->Insert(0, layer);
 
         Ptr<MgIntCollection> types = layer->GetGeometryTypeStyles(10000.0);
-        CPPUNIT_ASSERT(1 == types->GetCount());
-        CPPUNIT_ASSERT(types->IndexOf(1) < 0);
-        CPPUNIT_ASSERT(types->IndexOf(2) < 0);
-        CPPUNIT_ASSERT(types->IndexOf(3) >= 0);
-        CPPUNIT_ASSERT(types->IndexOf(4) < 0);
+        REQUIRE(1 == types->GetCount());
+        REQUIRE(types->IndexOf(1) < 0);
+        REQUIRE(types->IndexOf(2) < 0);
+        REQUIRE(types->IndexOf(3) >= 0);
+        REQUIRE(types->IndexOf(4) < 0);
 
-        CPPUNIT_ASSERT(8 == layer->GetThemeCategoryCount(10000.0, 3));
-        CPPUNIT_ASSERT(-1 == layer->GetThemeCategoryCount(10000.0, 1));
-        CPPUNIT_ASSERT(-1 == layer->GetThemeCategoryCount(10000.0, 2));
-        CPPUNIT_ASSERT(-1 == layer->GetThemeCategoryCount(10000.0, 4));
+        REQUIRE(8 == layer->GetThemeCategoryCount(10000.0, 3));
+        REQUIRE(-1 == layer->GetThemeCategoryCount(10000.0, 1));
+        REQUIRE(-1 == layer->GetThemeCategoryCount(10000.0, 2));
+        REQUIRE(-1 == layer->GetThemeCategoryCount(10000.0, 4));
 
         types = layer->GetGeometryTypeStyles(14000.0);
-        CPPUNIT_ASSERT(NULL == types.p);
-        CPPUNIT_ASSERT(-1 == layer->GetThemeCategoryCount(14000.0, 3));
-        CPPUNIT_ASSERT(-1 == layer->GetThemeCategoryCount(14000.0, 1));
-        CPPUNIT_ASSERT(-1 == layer->GetThemeCategoryCount(14000.0, 2));
-        CPPUNIT_ASSERT(-1 == layer->GetThemeCategoryCount(14000.0, 4));
+        REQUIRE(nullptr == types.p);
+        REQUIRE(-1 == layer->GetThemeCategoryCount(14000.0, 3));
+        REQUIRE(-1 == layer->GetThemeCategoryCount(14000.0, 1));
+        REQUIRE(-1 == layer->GetThemeCategoryCount(14000.0, 2));
+        REQUIRE(-1 == layer->GetThemeCategoryCount(14000.0, 4));
 
         Ptr<MgByteReader> rdr = layer->GenerateLegendImage(10000.0, 16, 16, MgImageFormats::Png, 3, 0);
         Ptr<MgByteSink> sink = new MgByteSink(rdr);
@@ -1143,9 +913,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1153,10 +923,17 @@
     }
 }
 
-void TestMappingService::TestCase_GetLegendImageCompositeConvenience()
+TEST_CASE("GetLegendImageCompositeConvenience", "[MappingService]")
 {
     try
     {
+        STRING m_session;
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgUserInformation> userInfo = TestServiceFactory::CreateSession(svcSite, m_session, L"Administrator", L"admin");
+        Ptr<MgMappingService> m_svcMapping = TestServiceFactory::CreateMappingService();
+        Ptr<MgResourceService> m_svcResource = TestServiceFactory::CreateResourceService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite, m_session);
+
         Ptr<MgResourceIdentifier> mapres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
         Ptr<MgMap> map = new MgMap(m_siteConnection);
         map->Create(mapres, L"TestCase_GetLegendImageCompositeConvenience");
@@ -1168,24 +945,24 @@
         layers->Insert(0, layer);
 
         Ptr<MgIntCollection> types = layer->GetGeometryTypeStyles(10000.0);
-        CPPUNIT_ASSERT(3 == types->GetCount());
-        CPPUNIT_ASSERT(types->IndexOf(1) < 0);
-        CPPUNIT_ASSERT(types->IndexOf(2) < 0);
-        CPPUNIT_ASSERT(types->IndexOf(3) < 0);
-        CPPUNIT_ASSERT(types->IndexOf(4) >= 0);
+        REQUIRE(3 == types->GetCount());
+        REQUIRE(types->IndexOf(1) < 0);
+        REQUIRE(types->IndexOf(2) < 0);
+        REQUIRE(types->IndexOf(3) < 0);
+        REQUIRE(types->IndexOf(4) >= 0);
         for (INT32 i = 0; i < types->GetCount(); i++)
         {
-            CPPUNIT_ASSERT(4 == types->GetItem(i));
+            REQUIRE(4 == types->GetItem(i));
         }
 
-        CPPUNIT_ASSERT(-1 == layer->GetThemeCategoryCount(10000.0, 1));
-        CPPUNIT_ASSERT(-1 == layer->GetThemeCategoryCount(10000.0, 2));
-        CPPUNIT_ASSERT(-1 == layer->GetThemeCategoryCount(10000.0, 3));
-        CPPUNIT_ASSERT(1 == layer->GetThemeCategoryCount(10000.0, 4));
-        CPPUNIT_ASSERT(1 == layer->GetCompositeThemeCategoryCount(10000.0, 0));
-        CPPUNIT_ASSERT(1 == layer->GetCompositeThemeCategoryCount(10000.0, 1));
-        CPPUNIT_ASSERT(1 == layer->GetCompositeThemeCategoryCount(10000.0, 2));
-        CPPUNIT_ASSERT(-1 == layer->GetCompositeThemeCategoryCount(10000.0, 3));
+        REQUIRE(-1 == layer->GetThemeCategoryCount(10000.0, 1));
+        REQUIRE(-1 == layer->GetThemeCategoryCount(10000.0, 2));
+        REQUIRE(-1 == layer->GetThemeCategoryCount(10000.0, 3));
+        REQUIRE(1 == layer->GetThemeCategoryCount(10000.0, 4));
+        REQUIRE(1 == layer->GetCompositeThemeCategoryCount(10000.0, 0));
+        REQUIRE(1 == layer->GetCompositeThemeCategoryCount(10000.0, 1));
+        REQUIRE(1 == layer->GetCompositeThemeCategoryCount(10000.0, 2));
+        REQUIRE(-1 == layer->GetCompositeThemeCategoryCount(10000.0, 3));
 
         INT32 rulesProcessed = 0;
         for (INT32 ctype = 0; ctype < 3; ctype++)
@@ -1230,9 +1007,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1240,10 +1017,17 @@
     }
 }
 
-void TestMappingService::TestCase_GetLegendImageCompositeThemedConvenience()
+TEST_CASE("GetLegendImageCompositeThemedConvenience", "[MappingService]")
 {
     try
     {
+        STRING m_session;
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgUserInformation> userInfo = TestServiceFactory::CreateSession(svcSite, m_session, L"Administrator", L"admin");
+        Ptr<MgMappingService> m_svcMapping = TestServiceFactory::CreateMappingService();
+        Ptr<MgResourceService> m_svcResource = TestServiceFactory::CreateResourceService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite, m_session);
+
         Ptr<MgResourceIdentifier> mapres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
         Ptr<MgMap> map = new MgMap(m_siteConnection);
         map->Create(mapres, L"TestCase_GetLegendImageCompositeThemedConvenience");
@@ -1255,24 +1039,24 @@
         layers->Insert(0, layer);
 
         Ptr<MgIntCollection> types = layer->GetGeometryTypeStyles(10000.0);
-        CPPUNIT_ASSERT(3 == types->GetCount());
-        CPPUNIT_ASSERT(types->IndexOf(1) < 0);
-        CPPUNIT_ASSERT(types->IndexOf(2) < 0);
-        CPPUNIT_ASSERT(types->IndexOf(3) < 0);
-        CPPUNIT_ASSERT(types->IndexOf(4) >= 0);
+        REQUIRE(3 == types->GetCount());
+        REQUIRE(types->IndexOf(1) < 0);
+        REQUIRE(types->IndexOf(2) < 0);
+        REQUIRE(types->IndexOf(3) < 0);
+        REQUIRE(types->IndexOf(4) >= 0);
         for (INT32 i = 0; i < types->GetCount(); i++)
         {
-            CPPUNIT_ASSERT(4 == types->GetItem(i));
+            REQUIRE(4 == types->GetItem(i));
         }
 
-        CPPUNIT_ASSERT(-1 == layer->GetThemeCategoryCount(10000.0, 1));
-        CPPUNIT_ASSERT(-1 == layer->GetThemeCategoryCount(10000.0, 2));
-        CPPUNIT_ASSERT(-1 == layer->GetThemeCategoryCount(10000.0, 3));
-        CPPUNIT_ASSERT(1 == layer->GetThemeCategoryCount(10000.0, 4));
-        CPPUNIT_ASSERT(1 == layer->GetCompositeThemeCategoryCount(10000.0, 0));
-        CPPUNIT_ASSERT(3 == layer->GetCompositeThemeCategoryCount(10000.0, 1));
-        CPPUNIT_ASSERT(1 == layer->GetCompositeThemeCategoryCount(10000.0, 2));
-        CPPUNIT_ASSERT(-1 == layer->GetCompositeThemeCategoryCount(10000.0, 3));
+        REQUIRE(-1 == layer->GetThemeCategoryCount(10000.0, 1));
+        REQUIRE(-1 == layer->GetThemeCategoryCount(10000.0, 2));
+        REQUIRE(-1 == layer->GetThemeCategoryCount(10000.0, 3));
+        REQUIRE(1 == layer->GetThemeCategoryCount(10000.0, 4));
+        REQUIRE(1 == layer->GetCompositeThemeCategoryCount(10000.0, 0));
+        REQUIRE(3 == layer->GetCompositeThemeCategoryCount(10000.0, 1));
+        REQUIRE(1 == layer->GetCompositeThemeCategoryCount(10000.0, 2));
+        REQUIRE(-1 == layer->GetCompositeThemeCategoryCount(10000.0, 3));
 
         INT32 rulesProcessed = 0;
         for (INT32 ctype = 0; ctype < 3; ctype++)
@@ -1318,9 +1102,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1328,10 +1112,17 @@
     }
 }
 
-void TestMappingService::TestCase_GetLegendImagePointStyleWithConstRotationsConvenience()
+TEST_CASE("GetLegendImagePointStyleWithConstRotationConvenience", "[MappingService]")
 {
     try
     {
+        STRING m_session;
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgUserInformation> userInfo = TestServiceFactory::CreateSession(svcSite, m_session, L"Administrator", L"admin");
+        Ptr<MgMappingService> m_svcMapping = TestServiceFactory::CreateMappingService();
+        Ptr<MgResourceService> m_svcResource = TestServiceFactory::CreateResourceService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite, m_session);
+
         Ptr<MgResourceIdentifier> mapres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
         Ptr<MgMap> map = new MgMap(m_siteConnection);
         map->Create(mapres, L"TestCase_GetLegendImageConvenience");
@@ -1343,16 +1134,16 @@
         layers->Insert(0, layer);
 
         Ptr<MgIntCollection> types = layer->GetGeometryTypeStyles(1000.0);
-        CPPUNIT_ASSERT(1 == types->GetCount());
-        CPPUNIT_ASSERT(types->IndexOf(1) >= 0);
-        CPPUNIT_ASSERT(types->IndexOf(2) < 0);
-        CPPUNIT_ASSERT(types->IndexOf(3) < 0);
-        CPPUNIT_ASSERT(types->IndexOf(4) < 0);
+        REQUIRE(1 == types->GetCount());
+        REQUIRE(types->IndexOf(1) >= 0);
+        REQUIRE(types->IndexOf(2) < 0);
+        REQUIRE(types->IndexOf(3) < 0);
+        REQUIRE(types->IndexOf(4) < 0);
 
-        CPPUNIT_ASSERT(15 == layer->GetThemeCategoryCount(1000.0, 1));
-        CPPUNIT_ASSERT(-1 == layer->GetThemeCategoryCount(1000.0, 2));
-        CPPUNIT_ASSERT(-1 == layer->GetThemeCategoryCount(1000.0, 3));
-        CPPUNIT_ASSERT(-1 == layer->GetThemeCategoryCount(1000.0, 4));
+        REQUIRE(15 == layer->GetThemeCategoryCount(1000.0, 1));
+        REQUIRE(-1 == layer->GetThemeCategoryCount(1000.0, 2));
+        REQUIRE(-1 == layer->GetThemeCategoryCount(1000.0, 3));
+        REQUIRE(-1 == layer->GetThemeCategoryCount(1000.0, 4));
         
         //Do 16x16 icons first. Our common scenario.
 
@@ -1480,9 +1271,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1490,10 +1281,18 @@
     }
 }
 
-void TestMappingService::TestCase_QueryFeaturesImageMap()
+//TEST_CASE("QueryFeaturesImageMap", "[MappingService]")
+void TestCase_QueryFeaturesImageMap()
 {
     try
     {
+        STRING m_session;
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgUserInformation> userInfo = TestServiceFactory::CreateSession(svcSite, m_session, L"Administrator", L"admin");
+        Ptr<MgMappingService> m_svcMapping = TestServiceFactory::CreateMappingService();
+        Ptr<MgResourceService> m_svcResource = TestServiceFactory::CreateResourceService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite, m_session);
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
         Ptr<MgMap> map = new MgMap(m_siteConnection);
@@ -1524,9 +1323,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1534,10 +1333,20 @@
     }
 }
 
-void TestMappingService::TestCase_PlotMultiPolygonWithHoles()
+#ifdef _WIN32
+TEST_CASE("PlotMultiPolygonWithHoles", "[MappingService]")
+#else
+TEST_CASE("PlotMultiPolygonWithHoles", "[Broken]")
+#endif
 {
     try
     {
+        STRING m_session;
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgUserInformation> userInfo = TestServiceFactory::CreateSession(svcSite, m_session, L"Administrator", L"admin");
+        Ptr<MgMappingService> m_svcMapping = TestServiceFactory::CreateMappingService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite, m_session);
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mapRes1 = new MgResourceIdentifier(L"Library://UnitTests/PlotHole/Maps/Test.MapDefinition");
         Ptr<MgMap> map1 = new MgMap(m_siteConnection);
@@ -1557,12 +1366,12 @@
         Ptr<MgLayout> layout = new MgLayout(allElementsLayout, L"TestTitle", MgUnitType::USEnglish);
 
         // call the API
-        Ptr<MgByteReader> eplot = m_svcMapping->GeneratePlot(map1, plotSpec, NULL, version);
+        Ptr<MgByteReader> eplot = m_svcMapping->GeneratePlot(map1, plotSpec, nullptr, version);
         //Ptr<MgByteReader> eplot = m_svcMapping->GeneratePlot(map1, plotSpec, layout, version);
 
         INT64 len = eplot->GetLength();
 
-        // CPPUNIT_ASSERT(len == 7000); // TODO: determine correct length
+        // REQUIRE(len == 7000); // TODO: determine correct length
 
         // Have to manually verify this file atm. There should be no fill in the hole
         Ptr<MgByteSink> byteSink = new MgByteSink(eplot);
@@ -1570,9 +1379,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {

Deleted: trunk/MgDev/Server/src/UnitTesting/TestMappingService.h
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestMappingService.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestMappingService.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,96 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef TESTMAPPINGSERVICE_H_
-#define TESTMAPPINGSERVICE_H_
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestMappingService : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestMappingService);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_SaveMap);
-    CPPUNIT_TEST(TestCase_GetMultiPlot);
-    CPPUNIT_TEST(TestCase_GetPlotUsingCurrentCenterAndScale);
-    CPPUNIT_TEST(TestCase_GetPlotUsingOverriddenCenterAndScale);
-    CPPUNIT_TEST(TestCase_GetPlotUsingExtents);
-    CPPUNIT_TEST(TestCase_GetPlotUsingExtentsAndExpandToFit);
-    CPPUNIT_TEST(TestCase_PlotMultiPolygonWithHoles);
-    CPPUNIT_TEST(TestCase_GetLegendPlot);
-    CPPUNIT_TEST(TestCase_GetLegendImage);
-    CPPUNIT_TEST(TestCase_GetLegendImagePointStyleWithConstRotations);
-    CPPUNIT_TEST(TestCase_GetLegendImageConvenience);
-    CPPUNIT_TEST(TestCase_GetLegendImageCompositeConvenience);
-    CPPUNIT_TEST(TestCase_GetLegendImageCompositeThemedConvenience);
-    CPPUNIT_TEST(TestCase_GetLegendImagePointStyleWithConstRotationsConvenience);
-    CPPUNIT_TEST(TestCase_CreateRuntimeMap260);
-    CPPUNIT_TEST(TestCase_CreateRuntimeMap300);
-    CPPUNIT_TEST(TestCase_CreateRuntimeMap400);
-    CPPUNIT_TEST(TestCase_DescribeRuntimeMap);
-    CPPUNIT_TEST(TestCase_CreateAndDescribeLinkedRuntimeMap);
-    //CPPUNIT_TEST(TestCase_QueryFeaturesImageMap);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-
-    TestMappingService();
-    ~TestMappingService();
-
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    void TestCase_CreateRuntimeMap(INT32 major, INT32 minor, INT32 rev);
-    void TestCase_CreateRuntimeMap260() { TestCase_CreateRuntimeMap(2, 6, 0); }
-    void TestCase_CreateRuntimeMap300() { TestCase_CreateRuntimeMap(3, 0, 0); }
-    void TestCase_CreateRuntimeMap400() { TestCase_CreateRuntimeMap(4, 0, 0); }
-    void TestCase_DescribeRuntimeMap();
-    void TestCase_SaveMap();
-    void TestCase_GetPlot();
-    void TestCase_GetMultiPlot();
-    void TestCase_CreateAndDescribeLinkedRuntimeMap();
-    void TestCase_GetPlotUsingCurrentCenterAndScale();
-    void TestCase_GetPlotUsingOverriddenCenterAndScale();
-    void TestCase_GetPlotUsingExtents();
-    void TestCase_GetPlotUsingExtentsAndExpandToFit();
-    void TestCase_PlotMultiPolygonWithHoles();
-    void TestCase_GetLegendPlot();
-    void TestCase_GetLegendImage();
-    void TestCase_GetLegendImagePointStyleWithConstRotations();
-    void TestCase_GetLegendImageConvenience();
-    void TestCase_GetLegendImageCompositeConvenience();
-    void TestCase_GetLegendImageCompositeThemedConvenience();
-    void TestCase_GetLegendImagePointStyleWithConstRotationsConvenience();
-    void TestCase_QueryFeaturesImageMap();
-
-private:
-
-    void PublishTheResources();
-
-    Ptr<MgSiteConnection> m_siteConnection;
-    Ptr<MgResourceService> m_svcResource;
-    Ptr<MgMappingService> m_svcMapping;
-
-    STRING m_session;
-};
-
-#endif // TESTMAPPINGSERVICE_H_

Modified: trunk/MgDev/Server/src/UnitTesting/TestMdfModel.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestMdfModel.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestMdfModel.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -16,150 +16,17 @@
 //
 
 #include "MapGuideCommon.h"
-#include "TestMdfModel.h"
-#include "ServiceManager.h"
 #include "SAX2Parser.h"
 #include "FoundationDefs.h"
-const STRING TEST_LOCALE = L"en";
+#include "TestServiceFactory.h"
+#include "catch.hpp"
 
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestMdfModel, "TestMdfModel");
-
-
-TestMdfModel::TestMdfModel()
+TEST_CASE("Serialization", "[MdfModel]")
 {
-    // Initialize service objects.
-    MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-
-    m_svcResource = dynamic_cast<MgResourceService*>(
-        serviceManager->RequestService(MgServiceType::ResourceService));
-    assert(m_svcResource != NULL);
-}
-
-
-TestMdfModel::~TestMdfModel()
-{
-}
-
-
-void TestMdfModel::setUp()
-{
-}
-
-
-void TestMdfModel::tearDown()
-{
-}
-
-
-void TestMdfModel::TestStart()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning MdfModel tests.\n")));
-
     try
     {
-        // set user info
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
-        MgUserInformation::SetCurrentUserInfo(userInfo);
+        Ptr<MgResourceService> m_svcResource = TestServiceFactory::CreateResourceService();
 
-        // add symbols / layer definitions for testing MdfModel / MdfParser
-        Ptr<MgResourceIdentifier> sdres1 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestSimpleSymbol.SymbolDefinition");
-        Ptr<MgByteSource> sdsrc1 = new MgByteSource(L"../UnitTestFiles/MdfTestSimpleSymbol.sd", false);
-        Ptr<MgByteReader> sdrdr1 = sdsrc1->GetReader();
-        m_svcResource->SetResource(sdres1, sdrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> sdres2 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestCompoundSymbol.SymbolDefinition");
-        Ptr<MgByteSource> sdsrc2 = new MgByteSource(L"../UnitTestFiles/MdfTestCompoundSymbol.sd", false);
-        Ptr<MgByteReader> sdrdr2 = sdsrc2->GetReader();
-        m_svcResource->SetResource(sdres2, sdrdr2, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestTypeStyles.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc3 = new MgByteSource(L"../UnitTestFiles/MdfTestTypeStyles.ldf", false);
-        Ptr<MgByteReader> ldfrdr3 = ldfsrc3->GetReader();
-        m_svcResource->SetResource(ldfres3, ldfrdr3, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres4 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestDisabledBounds.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc4 = new MgByteSource(L"../UnitTestFiles/MdfTestDisabledBounds.ldf", false);
-        Ptr<MgByteReader> ldfrdr4 = ldfsrc4->GetReader();
-        m_svcResource->SetResource(ldfres4, ldfrdr4, NULL);
-
-        Ptr<MgResourceIdentifier> mdfres4 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestMap.MapDefinition");
-        Ptr<MgByteSource> mdfsrc4 = new MgByteSource(L"../UnitTestFiles/MdfTestMap.mdf", false);
-        Ptr<MgByteReader> mdfrdr4 = mdfsrc4->GetReader();
-        m_svcResource->SetResource(mdfres4, mdfrdr4, NULL);
-
-        Ptr<MgResourceIdentifier> tsdres5 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestTileSet.TileSetDefinition");
-        Ptr<MgByteSource> tsdsrc5 = new MgByteSource(L"../UnitTestFiles/UT_BaseMap.tsd", false);
-        Ptr<MgByteReader> tsdrdr5 = tsdsrc5->GetReader();
-        m_svcResource->SetResource(tsdres5, tsdrdr5, NULL);
-
-        Ptr<MgResourceIdentifier> tsdres6 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/XYZTestTileSet.TileSetDefinition");
-        Ptr<MgByteSource> tsdsrc6 = new MgByteSource(L"../UnitTestFiles/UT_XYZ.tsd", false);
-        Ptr<MgByteReader> tsdrdr6 = tsdsrc6->GetReader();
-        m_svcResource->SetResource(tsdres6, tsdrdr6, NULL);
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-}
-
-
-void TestMdfModel::TestEnd()
-{
-    try
-    {
-        // set user info
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
-        MgUserInformation::SetCurrentUserInfo(userInfo);
-
-        // delete symbols / layer definitions for testing MdfModel / MdfParser
-        Ptr<MgResourceIdentifier> sdres1 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestSimpleSymbol.SymbolDefinition");
-        m_svcResource->DeleteResource(sdres1);
-        Ptr<MgResourceIdentifier> sdres2 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestCompoundSymbol.SymbolDefinition");
-        m_svcResource->DeleteResource(sdres2);
-        Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestTypeStyles.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres3);
-        Ptr<MgResourceIdentifier> ldfres4 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestDisabledBounds.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres4);
-        Ptr<MgResourceIdentifier> mdfres4 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestMap.MapDefinition");
-        m_svcResource->DeleteResource(mdfres4);
-        Ptr<MgResourceIdentifier> mdfres5 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestTileSet.TileSetDefinition");
-        m_svcResource->DeleteResource(mdfres5);
-    }
-    catch(MgFileIoException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        ACE_DEBUG((LM_INFO, ACE_TEXT("\nMgFileIoException - Possible file permission error.\nError: %W\n"), message.c_str()));
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        message += e->GetStackTrace(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nMdfModel tests completed.\n\n")));
-}
-
-
-void TestMdfModel::TestCase_Serialization()
-{
-    try
-    {
         MdfParser::SAX2Parser parser;
 
         Ptr<MgResourceIdentifier> sdresV = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestDummy.SymbolDefinition");
@@ -179,7 +46,7 @@
         // iterate over the symbol definition schema versions
         for (vector<Version>::size_type symbolDefVersionIndex = 0; symbolDefVersionIndex != symbolDefVersions.size(); ++symbolDefVersionIndex)
         {
-            Version &symbolDefVersion = symbolDefVersions[symbolDefVersionIndex];
+            Version& symbolDefVersion = symbolDefVersions[symbolDefVersionIndex];
 
             Ptr<MgResourceIdentifier> sdres = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestSimpleSymbol.SymbolDefinition");
 
@@ -187,17 +54,17 @@
             Ptr<MgByteReader> rdr = m_svcResource->GetResourceContent(sdres);
             Ptr<MgByteSink> sink = new MgByteSink(rdr);
             Ptr<MgByte> bytes = sink->ToBuffer();
-            CPPUNIT_ASSERT(bytes->GetLength() > 0);
+            REQUIRE(bytes->GetLength() > 0);
 
             parser.ParseString((const char*)bytes->Bytes(), bytes->GetLength());
-            CPPUNIT_ASSERT(parser.GetSucceeded());
+            REQUIRE(parser.GetSucceeded());
 
             // write the file - this exercises MdfParser serialization
             unique_ptr<SymbolDefinition> symbolDef1(parser.DetachSymbolDefinition());
-            CPPUNIT_ASSERT(symbolDef1.get() != NULL);
+            REQUIRE(symbolDef1.get() != nullptr);
 
             parser.WriteToFile("../UnitTestFiles/MdfTestSimpleSymbol_Copy1.sd", symbolDef1.get(), &symbolDefVersion);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestSimpleSymbol_Copy1.sd"));
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestSimpleSymbol_Copy1.sd"));
 
             // parse and resave the newly written file
             Ptr<MgByteSource> src1 = new MgByteSource(L"../UnitTestFiles/MdfTestSimpleSymbol_Copy1.sd");
@@ -206,10 +73,10 @@
             Ptr<MgByte> bytes1 = sink1->ToBuffer();
             parser.ParseString((const char*)bytes1->Bytes(), bytes1->GetLength());
             unique_ptr<SymbolDefinition> symbolDef2(parser.DetachSymbolDefinition());
-            CPPUNIT_ASSERT(symbolDef2.get() != NULL);
+            REQUIRE(symbolDef2.get() != nullptr);
 
             parser.WriteToFile("../UnitTestFiles/MdfTestSimpleSymbol_Copy2.sd", symbolDef2.get(), &symbolDefVersion);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestSimpleSymbol_Copy2.sd"));
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestSimpleSymbol_Copy2.sd"));
 
             // compare the two files
             Ptr<MgByteSource> src2 = new MgByteSource(L"../UnitTestFiles/MdfTestSimpleSymbol_Copy2.sd");
@@ -216,11 +83,11 @@
             Ptr<MgByteReader> rdr2 = src2->GetReader();
             Ptr<MgByteSink> sink2 = new MgByteSink(rdr2);
             Ptr<MgByte> bytes2 = sink2->ToBuffer();
-            CPPUNIT_ASSERT(bytes1->GetLength() == bytes2->GetLength());
-            CPPUNIT_ASSERT(memcmp(bytes1->Bytes(), bytes2->Bytes(), bytes1->GetLength()) == 0);
+            REQUIRE(bytes1->GetLength() == bytes2->GetLength());
+            REQUIRE(memcmp(bytes1->Bytes(), bytes2->Bytes(), bytes1->GetLength()) == 0);
 
             // save the new resource to the repository to validate the XML
-            m_svcResource->SetResource(sdresV, rdr1, NULL);
+            m_svcResource->SetResource(sdresV, rdr1, nullptr);
             m_svcResource->DeleteResource(sdresV);
         }
 
@@ -235,7 +102,7 @@
         // iterate over the symbol definition schema versions
         for (vector<Version>::size_type symbolDefVersionIndex = 0; symbolDefVersionIndex != symbolDefVersions.size(); ++symbolDefVersionIndex)
         {
-            Version &symbolDefVersion = symbolDefVersions[symbolDefVersionIndex];
+            Version& symbolDefVersion = symbolDefVersions[symbolDefVersionIndex];
 
             Ptr<MgResourceIdentifier> sdres = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestCompoundSymbol.SymbolDefinition");
 
@@ -243,17 +110,17 @@
             Ptr<MgByteReader> rdr = m_svcResource->GetResourceContent(sdres);
             Ptr<MgByteSink> sink = new MgByteSink(rdr);
             Ptr<MgByte> bytes = sink->ToBuffer();
-            CPPUNIT_ASSERT(bytes->GetLength() > 0);
+            REQUIRE(bytes->GetLength() > 0);
 
             parser.ParseString((const char*)bytes->Bytes(), bytes->GetLength());
-            CPPUNIT_ASSERT(parser.GetSucceeded());
+            REQUIRE(parser.GetSucceeded());
 
             // write the file - this exercises MdfParser serialization
             unique_ptr<SymbolDefinition> symbolDef1(parser.DetachSymbolDefinition());
-            CPPUNIT_ASSERT(symbolDef1.get() != NULL);
+            REQUIRE(symbolDef1.get() != nullptr);
 
             parser.WriteToFile("../UnitTestFiles/MdfTestCompoundSymbol_Copy1.sd", symbolDef1.get(), &symbolDefVersion);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestCompoundSymbol_Copy1.sd"));
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestCompoundSymbol_Copy1.sd"));
 
             // parse and resave the newly written file
             Ptr<MgByteSource> src1 = new MgByteSource(L"../UnitTestFiles/MdfTestCompoundSymbol_Copy1.sd");
@@ -262,10 +129,10 @@
             Ptr<MgByte> bytes1 = sink1->ToBuffer();
             parser.ParseString((const char*)bytes1->Bytes(), bytes1->GetLength());
             unique_ptr<SymbolDefinition> symbolDef2(parser.DetachSymbolDefinition());
-            CPPUNIT_ASSERT(symbolDef2.get() != NULL);
+            REQUIRE(symbolDef2.get() != nullptr);
 
             parser.WriteToFile("../UnitTestFiles/MdfTestCompoundSymbol_Copy2.sd", symbolDef2.get(), &symbolDefVersion);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestCompoundSymbol_Copy2.sd"));
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestCompoundSymbol_Copy2.sd"));
 
             // compare the two files
             Ptr<MgByteSource> src2 = new MgByteSource(L"../UnitTestFiles/MdfTestCompoundSymbol_Copy2.sd");
@@ -272,11 +139,11 @@
             Ptr<MgByteReader> rdr2 = src2->GetReader();
             Ptr<MgByteSink> sink2 = new MgByteSink(rdr2);
             Ptr<MgByte> bytes2 = sink2->ToBuffer();
-            CPPUNIT_ASSERT(bytes1->GetLength() == bytes2->GetLength());
-            CPPUNIT_ASSERT(memcmp(bytes1->Bytes(), bytes2->Bytes(), bytes1->GetLength()) == 0);
+            REQUIRE(bytes1->GetLength() == bytes2->GetLength());
+            REQUIRE(memcmp(bytes1->Bytes(), bytes2->Bytes(), bytes1->GetLength()) == 0);
 
             // save the new resource to the repository to validate the XML
-            m_svcResource->SetResource(sdresV, rdr1, NULL);
+            m_svcResource->SetResource(sdresV, rdr1, nullptr);
             m_svcResource->DeleteResource(sdresV);
         }
 
@@ -300,7 +167,7 @@
         // iterate over the layer definition schema versions
         for (vector<Version>::size_type layerDefVersionIndex = 0; layerDefVersionIndex != layerDefVersions.size(); ++layerDefVersionIndex)
         {
-            Version &layerDefVersion = layerDefVersions[layerDefVersionIndex];
+            Version& layerDefVersion = layerDefVersions[layerDefVersionIndex];
 
             Ptr<MgResourceIdentifier> ldfres = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestTypeStyles.LayerDefinition");
 
@@ -308,17 +175,17 @@
             Ptr<MgByteReader> rdr = m_svcResource->GetResourceContent(ldfres);
             Ptr<MgByteSink> sink = new MgByteSink(rdr);
             Ptr<MgByte> bytes = sink->ToBuffer();
-            CPPUNIT_ASSERT(bytes->GetLength() > 0);
+            REQUIRE(bytes->GetLength() > 0);
 
             parser.ParseString((const char*)bytes->Bytes(), bytes->GetLength());
-            CPPUNIT_ASSERT(parser.GetSucceeded());
+            REQUIRE(parser.GetSucceeded());
 
             // write the file - this exercises MdfParser serialization
             unique_ptr<VectorLayerDefinition> layerDef1(parser.DetachVectorLayerDefinition());
-            CPPUNIT_ASSERT(layerDef1.get() != NULL);
+            REQUIRE(layerDef1.get() != nullptr);
 
-            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_Copy1.ldf", NULL, layerDef1.get(), NULL, NULL, NULL, NULL, &layerDefVersion);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_Copy1.ldf"));
+            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_Copy1.ldf", nullptr, layerDef1.get(), nullptr, nullptr, nullptr, nullptr, &layerDefVersion);
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_Copy1.ldf"));
 
             // parse and resave the newly written file
             Ptr<MgByteSource> src1 = new MgByteSource(L"../UnitTestFiles/MdfTestTypeStyles_Copy1.ldf");
@@ -327,10 +194,10 @@
             Ptr<MgByte> bytes1 = sink1->ToBuffer();
             parser.ParseString((const char*)bytes1->Bytes(), bytes1->GetLength());
             unique_ptr<VectorLayerDefinition> layerDef2(parser.DetachVectorLayerDefinition());
-            CPPUNIT_ASSERT(layerDef2.get() != NULL);
+            REQUIRE(layerDef2.get() != nullptr);
 
-            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_Copy2.ldf", NULL, layerDef2.get(), NULL, NULL, NULL, NULL, &layerDefVersion);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_Copy2.ldf"));
+            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_Copy2.ldf", nullptr, layerDef2.get(), nullptr, nullptr, nullptr, nullptr, &layerDefVersion);
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_Copy2.ldf"));
 
             // compare the two files
             Ptr<MgByteSource> src2 = new MgByteSource(L"../UnitTestFiles/MdfTestTypeStyles_Copy2.ldf");
@@ -338,11 +205,11 @@
             Ptr<MgByteSink> sink2 = new MgByteSink(rdr2);
             Ptr<MgByte> bytes2 = sink2->ToBuffer();
 
-            CPPUNIT_ASSERT(bytes1->GetLength() == bytes2->GetLength());
-            CPPUNIT_ASSERT(memcmp(bytes1->Bytes(), bytes2->Bytes(), bytes1->GetLength()) == 0);
+            REQUIRE(bytes1->GetLength() == bytes2->GetLength());
+            REQUIRE(memcmp(bytes1->Bytes(), bytes2->Bytes(), bytes1->GetLength()) == 0);
 
             // save the new resource to the repository to validate the XML
-            m_svcResource->SetResource(ldfresV, rdr1, NULL);
+            m_svcResource->SetResource(ldfresV, rdr1, nullptr);
             m_svcResource->DeleteResource(ldfresV);
         }
 
@@ -363,7 +230,7 @@
         // iterate over the map definition schema versions
         for (vector<Version>::size_type mapDefVersionIndex = 0; mapDefVersionIndex != mapDefVersions.size(); ++mapDefVersionIndex)
         {
-            Version &mapDefVersion = mapDefVersions[mapDefVersionIndex];
+            Version& mapDefVersion = mapDefVersions[mapDefVersionIndex];
 
             Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestMap.MapDefinition");
 
@@ -371,17 +238,17 @@
             Ptr<MgByteReader> rdr = m_svcResource->GetResourceContent(mdfres);
             Ptr<MgByteSink> sink = new MgByteSink(rdr);
             Ptr<MgByte> bytes = sink->ToBuffer();
-            CPPUNIT_ASSERT(bytes->GetLength() > 0);
+            REQUIRE(bytes->GetLength() > 0);
 
             parser.ParseString((const char*)bytes->Bytes(), bytes->GetLength());
-            CPPUNIT_ASSERT(parser.GetSucceeded());
+            REQUIRE(parser.GetSucceeded());
 
             // write the file - this exercises MdfParser serialization
             unique_ptr<MapDefinition> mapDef1(parser.DetachMapDefinition());
-            CPPUNIT_ASSERT(mapDef1.get() != NULL);
+            REQUIRE(mapDef1.get() != nullptr);
 
-            parser.WriteToFile("../UnitTestFiles/MdfTestMap_Copy1.mdf", mapDef1.get(), NULL, NULL, NULL, NULL, NULL, &mapDefVersion);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestMap_Copy1.mdf"));
+            parser.WriteToFile("../UnitTestFiles/MdfTestMap_Copy1.mdf", mapDef1.get(), nullptr, nullptr, nullptr, nullptr, nullptr, &mapDefVersion);
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestMap_Copy1.mdf"));
 
             // parse and resave the newly written file
             Ptr<MgByteSource> src1 = new MgByteSource(L"../UnitTestFiles/MdfTestMap_Copy1.mdf");
@@ -390,10 +257,10 @@
             Ptr<MgByte> bytes1 = sink1->ToBuffer();
             parser.ParseString((const char*)bytes1->Bytes(), bytes1->GetLength());
             unique_ptr<MapDefinition> mapDef2(parser.DetachMapDefinition());
-            CPPUNIT_ASSERT(mapDef2.get() != NULL);
+            REQUIRE(mapDef2.get() != nullptr);
 
-            parser.WriteToFile("../UnitTestFiles/MdfTestMap_Copy2.mdf", mapDef2.get(), NULL, NULL, NULL, NULL, NULL, &mapDefVersion);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestMap_Copy2.mdf"));
+            parser.WriteToFile("../UnitTestFiles/MdfTestMap_Copy2.mdf", mapDef2.get(), nullptr, nullptr, nullptr, nullptr, nullptr, &mapDefVersion);
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestMap_Copy2.mdf"));
 
             // compare the two files
             Ptr<MgByteSource> src2 = new MgByteSource(L"../UnitTestFiles/MdfTestMap_Copy2.mdf");
@@ -401,11 +268,11 @@
             Ptr<MgByteSink> sink2 = new MgByteSink(rdr2);
             Ptr<MgByte> bytes2 = sink2->ToBuffer();
 
-            CPPUNIT_ASSERT(bytes1->GetLength() == bytes2->GetLength());
-            CPPUNIT_ASSERT(memcmp(bytes1->Bytes(), bytes2->Bytes(), bytes1->GetLength()) == 0);
+            REQUIRE(bytes1->GetLength() == bytes2->GetLength());
+            REQUIRE(memcmp(bytes1->Bytes(), bytes2->Bytes(), bytes1->GetLength()) == 0);
 
             // save the new resource to the repository to validate the XML
-            m_svcResource->SetResource(mdfresV, rdr1, NULL);
+            m_svcResource->SetResource(mdfresV, rdr1, nullptr);
             m_svcResource->DeleteResource(mdfresV);
         }
 
@@ -415,17 +282,18 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
-
-void TestMdfModel::TestCase_Versioning()
+TEST_CASE("Versioning", "[MdfModel]")
 {
     try
     {
+        Ptr<MgResourceService> m_svcResource = TestServiceFactory::CreateResourceService();
+
         Version layerDefVersion09(0, 9, 0); // MapGuide 2006
         Version layerDefVersion10(1, 0, 0); // MapGuide 2007
         Version layerDefVersion11(1, 1, 0); // MapGuide 2008
@@ -453,23 +321,23 @@
             Ptr<MgByteReader> rdr = m_svcResource->GetResourceContent(sdres);
             Ptr<MgByteSink> sink = new MgByteSink(rdr);
             Ptr<MgByte> bytes = sink->ToBuffer();
-            CPPUNIT_ASSERT(bytes->GetLength() > 0);
+            REQUIRE(bytes->GetLength() > 0);
 
             parser.ParseString((const char*)bytes->Bytes(), bytes->GetLength());
-            CPPUNIT_ASSERT(parser.GetSucceeded());
+            REQUIRE(parser.GetSucceeded());
 
             // write the file using each version - this exercises MdfParser serialization
             unique_ptr<SymbolDefinition> symbolDef1(parser.DetachSymbolDefinition());
-            CPPUNIT_ASSERT(symbolDef1.get() != NULL);
+            REQUIRE(symbolDef1.get() != nullptr);
 
             parser.WriteToFile("../UnitTestFiles/MdfTestCompoundSymbol_v10_Copy1.sd", symbolDef1.get(), &symbolDefVersion10);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestCompoundSymbol_v10_Copy1.sd"));
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestCompoundSymbol_v10_Copy1.sd"));
 
             parser.WriteToFile("../UnitTestFiles/MdfTestCompoundSymbol_v11_Copy1.sd", symbolDef1.get(), &symbolDefVersion11);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestCompoundSymbol_v11_Copy1.sd"));
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestCompoundSymbol_v11_Copy1.sd"));
 
             parser.WriteToFile("../UnitTestFiles/MdfTestCompoundSymbol_v24_Copy1.sd", symbolDef1.get(), &symbolDefVersion24);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestCompoundSymbol_v24_Copy1.sd"));
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestCompoundSymbol_v24_Copy1.sd"));
 
             // parse and resave the newly written files
             Ptr<MgByteSource> src1_10 = new MgByteSource(L"../UnitTestFiles/MdfTestCompoundSymbol_v10_Copy1.sd");
@@ -478,10 +346,10 @@
             Ptr<MgByte> bytes1_10 = sink1_10->ToBuffer();
             parser.ParseString((const char*)bytes1_10->Bytes(), bytes1_10->GetLength());
             unique_ptr<SymbolDefinition> symbolDef2_10(parser.DetachSymbolDefinition());
-            CPPUNIT_ASSERT(symbolDef2_10.get() != NULL);
+            REQUIRE(symbolDef2_10.get() != nullptr);
 
             parser.WriteToFile("../UnitTestFiles/MdfTestCompoundSymbol_v10_Copy2.sd", symbolDef2_10.get(), &symbolDefVersion10);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestCompoundSymbol_v10_Copy2.sd"));
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestCompoundSymbol_v10_Copy2.sd"));
 
             Ptr<MgByteSource> src1_11 = new MgByteSource(L"../UnitTestFiles/MdfTestCompoundSymbol_v11_Copy1.sd");
             Ptr<MgByteReader> rdr1_11 = src1_11->GetReader();
@@ -489,10 +357,10 @@
             Ptr<MgByte> bytes1_11 = sink1_11->ToBuffer();
             parser.ParseString((const char*)bytes1_11->Bytes(), bytes1_11->GetLength());
             unique_ptr<SymbolDefinition> symbolDef2_11(parser.DetachSymbolDefinition());
-            CPPUNIT_ASSERT(symbolDef2_11.get() != NULL);
+            REQUIRE(symbolDef2_11.get() != nullptr);
 
             parser.WriteToFile("../UnitTestFiles/MdfTestCompoundSymbol_v11_Copy2.sd", symbolDef2_11.get(), &symbolDefVersion11);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestCompoundSymbol_v11_Copy2.sd"));
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestCompoundSymbol_v11_Copy2.sd"));
 
             Ptr<MgByteSource> src1_24 = new MgByteSource(L"../UnitTestFiles/MdfTestCompoundSymbol_v24_Copy1.sd");
             Ptr<MgByteReader> rdr1_24 = src1_24->GetReader();
@@ -500,10 +368,10 @@
             Ptr<MgByte> bytes1_24 = sink1_24->ToBuffer();
             parser.ParseString((const char*)bytes1_24->Bytes(), bytes1_24->GetLength());
             unique_ptr<SymbolDefinition> symbolDef2_24(parser.DetachSymbolDefinition());
-            CPPUNIT_ASSERT(symbolDef2_24.get() != NULL);
+            REQUIRE(symbolDef2_24.get() != nullptr);
 
             parser.WriteToFile("../UnitTestFiles/MdfTestCompoundSymbol_v24_Copy2.sd", symbolDef2_24.get(), &symbolDefVersion24);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestCompoundSymbol_v24_Copy2.sd"));
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestCompoundSymbol_v24_Copy2.sd"));
 
             // compare the files
             Ptr<MgByteSource> src2_10 = new MgByteSource(L"../UnitTestFiles/MdfTestCompoundSymbol_v10_Copy2.sd");
@@ -510,22 +378,22 @@
             Ptr<MgByteReader> rdr2_10 = src2_10->GetReader();
             Ptr<MgByteSink> sink2_10 = new MgByteSink(rdr2_10);
             Ptr<MgByte> bytes2_10 = sink2_10->ToBuffer();
-            CPPUNIT_ASSERT(bytes1_10->GetLength() == bytes2_10->GetLength());
-            CPPUNIT_ASSERT(memcmp(bytes1_10->Bytes(), bytes2_10->Bytes(), bytes1_10->GetLength()) == 0);
+            REQUIRE(bytes1_10->GetLength() == bytes2_10->GetLength());
+            REQUIRE(memcmp(bytes1_10->Bytes(), bytes2_10->Bytes(), bytes1_10->GetLength()) == 0);
 
             Ptr<MgByteSource> src2_11 = new MgByteSource(L"../UnitTestFiles/MdfTestCompoundSymbol_v11_Copy2.sd");
             Ptr<MgByteReader> rdr2_11 = src2_11->GetReader();
             Ptr<MgByteSink> sink2_11 = new MgByteSink(rdr2_11);
             Ptr<MgByte> bytes2_11 = sink2_11->ToBuffer();
-            CPPUNIT_ASSERT(bytes1_11->GetLength() == bytes2_11->GetLength());
-            CPPUNIT_ASSERT(memcmp(bytes1_11->Bytes(), bytes2_11->Bytes(), bytes1_11->GetLength()) == 0);
+            REQUIRE(bytes1_11->GetLength() == bytes2_11->GetLength());
+            REQUIRE(memcmp(bytes1_11->Bytes(), bytes2_11->Bytes(), bytes1_11->GetLength()) == 0);
 
             Ptr<MgByteSource> src2_24 = new MgByteSource(L"../UnitTestFiles/MdfTestCompoundSymbol_v24_Copy2.sd");
             Ptr<MgByteReader> rdr2_24 = src2_24->GetReader();
             Ptr<MgByteSink> sink2_24 = new MgByteSink(rdr2_24);
             Ptr<MgByte> bytes2_24 = sink2_24->ToBuffer();
-            CPPUNIT_ASSERT(bytes1_24->GetLength() == bytes2_24->GetLength());
-            CPPUNIT_ASSERT(memcmp(bytes1_24->Bytes(), bytes2_24->Bytes(), bytes2_24->GetLength()) == 0);
+            REQUIRE(bytes1_24->GetLength() == bytes2_24->GetLength());
+            REQUIRE(memcmp(bytes1_24->Bytes(), bytes2_24->Bytes(), bytes2_24->GetLength()) == 0);
 
             // verify extended data support is working...
             //   - symbolDef2_10 was loaded from XML containing extended data
@@ -534,13 +402,13 @@
             // the data in these object models should be the same
 
             parser.WriteToFile("../UnitTestFiles/MdfTestCompoundSymbol_v24_Copy3a.sd", symbolDef2_10.get(), &symbolDefVersion24);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestCompoundSymbol_v24_Copy3a.sd"));
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestCompoundSymbol_v24_Copy3a.sd"));
 
             parser.WriteToFile("../UnitTestFiles/MdfTestCompoundSymbol_v24_Copy3b.sd", symbolDef2_11.get(), &symbolDefVersion24);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestCompoundSymbol_v24_Copy3b.sd"));
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestCompoundSymbol_v24_Copy3b.sd"));
 
             parser.WriteToFile("../UnitTestFiles/MdfTestCompoundSymbol_v24_Copy3c.sd", symbolDef2_24.get(), &symbolDefVersion24);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestCompoundSymbol_v24_Copy3c.sd"));
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestCompoundSymbol_v24_Copy3c.sd"));
 
             Ptr<MgByteSource> src3a_24 = new MgByteSource(L"../UnitTestFiles/MdfTestCompoundSymbol_v24_Copy3a.sd");
             Ptr<MgByteReader> rdr3a_24 = src3a_24->GetReader();
@@ -557,20 +425,20 @@
             Ptr<MgByteSink> sink3c_24 = new MgByteSink(rdr3c_24);
             Ptr<MgByte> bytes3c_24 = sink3c_24->ToBuffer();
 
-            CPPUNIT_ASSERT(bytes3a_24->GetLength() == bytes3b_24->GetLength());
-            CPPUNIT_ASSERT(memcmp(bytes3a_24->Bytes(), bytes3b_24->Bytes(), bytes3a_24->GetLength()) == 0);
+            REQUIRE(bytes3a_24->GetLength() == bytes3b_24->GetLength());
+            REQUIRE(memcmp(bytes3a_24->Bytes(), bytes3b_24->Bytes(), bytes3a_24->GetLength()) == 0);
 
-            CPPUNIT_ASSERT(bytes3a_24->GetLength() == bytes3c_24->GetLength());
-            CPPUNIT_ASSERT(memcmp(bytes3a_24->Bytes(), bytes3c_24->Bytes(), bytes3a_24->GetLength()) == 0);
+            REQUIRE(bytes3a_24->GetLength() == bytes3c_24->GetLength());
+            REQUIRE(memcmp(bytes3a_24->Bytes(), bytes3c_24->Bytes(), bytes3a_24->GetLength()) == 0);
 
             // save the new resources to the repository to validate the XML
-            m_svcResource->SetResource(sdresV, rdr1_10, NULL);
+            m_svcResource->SetResource(sdresV, rdr1_10, nullptr);
             m_svcResource->DeleteResource(sdresV);
-            m_svcResource->SetResource(sdresV, rdr1_11, NULL);
+            m_svcResource->SetResource(sdresV, rdr1_11, nullptr);
             m_svcResource->DeleteResource(sdresV);
-            m_svcResource->SetResource(sdresV, rdr1_24, NULL);
+            m_svcResource->SetResource(sdresV, rdr1_24, nullptr);
             m_svcResource->DeleteResource(sdresV);
-            m_svcResource->SetResource(sdresV, rdr3a_24, NULL);
+            m_svcResource->SetResource(sdresV, rdr3a_24, nullptr);
             m_svcResource->DeleteResource(sdresV);
         }
 
@@ -597,35 +465,35 @@
             Ptr<MgByteReader> rdr = m_svcResource->GetResourceContent(ldfres);
             Ptr<MgByteSink> sink = new MgByteSink(rdr);
             Ptr<MgByte> bytes = sink->ToBuffer();
-            CPPUNIT_ASSERT(bytes->GetLength() > 0);
+            REQUIRE(bytes->GetLength() > 0);
 
             parser.ParseString((const char*)bytes->Bytes(), bytes->GetLength());
-            CPPUNIT_ASSERT(parser.GetSucceeded());
+            REQUIRE(parser.GetSucceeded());
 
             // write the file using each version - this exercises MdfParser serialization
             unique_ptr<VectorLayerDefinition> layerDef1(parser.DetachVectorLayerDefinition());
-            CPPUNIT_ASSERT(layerDef1.get() != NULL);
+            REQUIRE(layerDef1.get() != nullptr);
 
-            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v09_Copy1.ldf", NULL, layerDef1.get(), NULL, NULL, NULL, NULL, &layerDefVersion09);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v09_Copy1.ldf"));
+            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v09_Copy1.ldf", nullptr, layerDef1.get(), nullptr, nullptr, nullptr, nullptr, &layerDefVersion09);
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v09_Copy1.ldf"));
 
-            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v10_Copy1.ldf", NULL, layerDef1.get(), NULL, NULL, NULL, NULL, &layerDefVersion10);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v10_Copy1.ldf"));
+            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v10_Copy1.ldf", nullptr, layerDef1.get(), nullptr, nullptr, nullptr, nullptr, &layerDefVersion10);
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v10_Copy1.ldf"));
 
-            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v11_Copy1.ldf", NULL, layerDef1.get(), NULL, NULL, NULL, NULL, &layerDefVersion11);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v11_Copy1.ldf"));
+            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v11_Copy1.ldf", nullptr, layerDef1.get(), nullptr, nullptr, nullptr, nullptr, &layerDefVersion11);
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v11_Copy1.ldf"));
 
-            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v12_Copy1.ldf", NULL, layerDef1.get(), NULL, NULL, NULL, NULL, &layerDefVersion12);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v12_Copy1.ldf"));
+            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v12_Copy1.ldf", nullptr, layerDef1.get(), nullptr, nullptr, nullptr, nullptr, &layerDefVersion12);
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v12_Copy1.ldf"));
 
-            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v13_Copy1.ldf", NULL, layerDef1.get(), NULL, NULL, NULL, NULL, &layerDefVersion13);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v13_Copy1.ldf"));
+            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v13_Copy1.ldf", nullptr, layerDef1.get(), nullptr, nullptr, nullptr, nullptr, &layerDefVersion13);
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v13_Copy1.ldf"));
 
-            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v23_Copy1.ldf", NULL, layerDef1.get(), NULL, NULL, NULL, NULL, &layerDefVersion23);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v23_Copy1.ldf"));
+            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v23_Copy1.ldf", nullptr, layerDef1.get(), nullptr, nullptr, nullptr, nullptr, &layerDefVersion23);
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v23_Copy1.ldf"));
 
-            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v24_Copy1.ldf", NULL, layerDef1.get(), NULL, NULL, NULL, NULL, &layerDefVersion24);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v24_Copy1.ldf"));
+            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v24_Copy1.ldf", nullptr, layerDef1.get(), nullptr, nullptr, nullptr, nullptr, &layerDefVersion24);
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v24_Copy1.ldf"));
 
             // parse and resave the newly written files
             Ptr<MgByteSource> src1_09 = new MgByteSource(L"../UnitTestFiles/MdfTestTypeStyles_v09_Copy1.ldf");
@@ -634,10 +502,10 @@
             Ptr<MgByte> bytes1_09 = sink1_09->ToBuffer();
             parser.ParseString((const char*)bytes1_09->Bytes(), bytes1_09->GetLength());
             unique_ptr<VectorLayerDefinition> layerDef2_09(parser.DetachVectorLayerDefinition());
-            CPPUNIT_ASSERT(layerDef2_09.get() != NULL);
+            REQUIRE(layerDef2_09.get() != nullptr);
 
-            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v09_Copy2.ldf", NULL, layerDef2_09.get(), NULL, NULL, NULL, NULL, &layerDefVersion09);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v09_Copy2.ldf"));
+            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v09_Copy2.ldf", nullptr, layerDef2_09.get(), nullptr, nullptr, nullptr, nullptr, &layerDefVersion09);
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v09_Copy2.ldf"));
 
             Ptr<MgByteSource> src1_10 = new MgByteSource(L"../UnitTestFiles/MdfTestTypeStyles_v10_Copy1.ldf");
             Ptr<MgByteReader> rdr1_10 = src1_10->GetReader();
@@ -645,10 +513,10 @@
             Ptr<MgByte> bytes1_10 = sink1_10->ToBuffer();
             parser.ParseString((const char*)bytes1_10->Bytes(), bytes1_10->GetLength());
             unique_ptr<VectorLayerDefinition> layerDef2_10(parser.DetachVectorLayerDefinition());
-            CPPUNIT_ASSERT(layerDef2_10.get() != NULL);
+            REQUIRE(layerDef2_10.get() != nullptr);
 
-            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v10_Copy2.ldf", NULL, layerDef2_10.get(), NULL, NULL, NULL, NULL, &layerDefVersion10);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v10_Copy2.ldf"));
+            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v10_Copy2.ldf", nullptr, layerDef2_10.get(), nullptr, nullptr, nullptr, nullptr, &layerDefVersion10);
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v10_Copy2.ldf"));
 
             Ptr<MgByteSource> src1_11 = new MgByteSource(L"../UnitTestFiles/MdfTestTypeStyles_v11_Copy1.ldf");
             Ptr<MgByteReader> rdr1_11 = src1_11->GetReader();
@@ -656,10 +524,10 @@
             Ptr<MgByte> bytes1_11 = sink1_11->ToBuffer();
             parser.ParseString((const char*)bytes1_11->Bytes(), bytes1_11->GetLength());
             unique_ptr<VectorLayerDefinition> layerDef2_11(parser.DetachVectorLayerDefinition());
-            CPPUNIT_ASSERT(layerDef2_11.get() != NULL);
+            REQUIRE(layerDef2_11.get() != nullptr);
 
-            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v11_Copy2.ldf", NULL, layerDef2_11.get(), NULL, NULL, NULL, NULL, &layerDefVersion11);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v11_Copy2.ldf"));
+            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v11_Copy2.ldf", nullptr, layerDef2_11.get(), nullptr, nullptr, nullptr, nullptr, &layerDefVersion11);
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v11_Copy2.ldf"));
 
             Ptr<MgByteSource> src1_12 = new MgByteSource(L"../UnitTestFiles/MdfTestTypeStyles_v12_Copy1.ldf");
             Ptr<MgByteReader> rdr1_12 = src1_12->GetReader();
@@ -667,10 +535,10 @@
             Ptr<MgByte> bytes1_12 = sink1_12->ToBuffer();
             parser.ParseString((const char*)bytes1_12->Bytes(), bytes1_12->GetLength());
             unique_ptr<VectorLayerDefinition> layerDef2_12(parser.DetachVectorLayerDefinition());
-            CPPUNIT_ASSERT(layerDef2_12.get() != NULL);
+            REQUIRE(layerDef2_12.get() != nullptr);
 
-            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v12_Copy2.ldf", NULL, layerDef2_12.get(), NULL, NULL, NULL, NULL, &layerDefVersion12);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v12_Copy2.ldf"));
+            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v12_Copy2.ldf", nullptr, layerDef2_12.get(), nullptr, nullptr, nullptr, nullptr, &layerDefVersion12);
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v12_Copy2.ldf"));
 
             Ptr<MgByteSource> src1_13 = new MgByteSource(L"../UnitTestFiles/MdfTestTypeStyles_v13_Copy1.ldf");
             Ptr<MgByteReader> rdr1_13 = src1_13->GetReader();
@@ -678,10 +546,10 @@
             Ptr<MgByte> bytes1_13 = sink1_13->ToBuffer();
             parser.ParseString((const char*)bytes1_13->Bytes(), bytes1_13->GetLength());
             unique_ptr<VectorLayerDefinition> layerDef2_13(parser.DetachVectorLayerDefinition());
-            CPPUNIT_ASSERT(layerDef2_13.get() != NULL);
+            REQUIRE(layerDef2_13.get() != nullptr);
 
-            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v13_Copy2.ldf", NULL, layerDef2_13.get(), NULL, NULL, NULL, NULL, &layerDefVersion13);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v13_Copy2.ldf"));
+            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v13_Copy2.ldf", nullptr, layerDef2_13.get(), nullptr, nullptr, nullptr, nullptr, &layerDefVersion13);
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v13_Copy2.ldf"));
 
             Ptr<MgByteSource> src1_23 = new MgByteSource(L"../UnitTestFiles/MdfTestTypeStyles_v23_Copy1.ldf");
             Ptr<MgByteReader> rdr1_23 = src1_23->GetReader();
@@ -689,10 +557,10 @@
             Ptr<MgByte> bytes1_23 = sink1_23->ToBuffer();
             parser.ParseString((const char*)bytes1_23->Bytes(), bytes1_23->GetLength());
             unique_ptr<VectorLayerDefinition> layerDef2_23(parser.DetachVectorLayerDefinition());
-            CPPUNIT_ASSERT(layerDef2_23.get() != NULL);
+            REQUIRE(layerDef2_23.get() != nullptr);
 
-            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v23_Copy2.ldf", NULL, layerDef2_23.get(), NULL, NULL, NULL, NULL, &layerDefVersion23);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v23_Copy2.ldf"));
+            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v23_Copy2.ldf", nullptr, layerDef2_23.get(), nullptr, nullptr, nullptr, nullptr, &layerDefVersion23);
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v23_Copy2.ldf"));
 
             Ptr<MgByteSource> src1_24 = new MgByteSource(L"../UnitTestFiles/MdfTestTypeStyles_v24_Copy1.ldf");
             Ptr<MgByteReader> rdr1_24 = src1_24->GetReader();
@@ -700,10 +568,10 @@
             Ptr<MgByte> bytes1_24 = sink1_24->ToBuffer();
             parser.ParseString((const char*)bytes1_24->Bytes(), bytes1_24->GetLength());
             unique_ptr<VectorLayerDefinition> layerDef2_24(parser.DetachVectorLayerDefinition());
-            CPPUNIT_ASSERT(layerDef2_24.get() != NULL);
+            REQUIRE(layerDef2_24.get() != nullptr);
 
-            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v24_Copy2.ldf", NULL, layerDef2_24.get(), NULL, NULL, NULL, NULL, &layerDefVersion24);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v24_Copy2.ldf"));
+            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v24_Copy2.ldf", nullptr, layerDef2_24.get(), nullptr, nullptr, nullptr, nullptr, &layerDefVersion24);
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v24_Copy2.ldf"));
 
             // compare the files
             Ptr<MgByteSource> src2_09 = new MgByteSource(L"../UnitTestFiles/MdfTestTypeStyles_v09_Copy2.ldf");
@@ -710,50 +578,50 @@
             Ptr<MgByteReader> rdr2_09 = src2_09->GetReader();
             Ptr<MgByteSink> sink2_09 = new MgByteSink(rdr2_09);
             Ptr<MgByte> bytes2_09 = sink2_09->ToBuffer();
-            CPPUNIT_ASSERT(bytes1_09->GetLength() == bytes2_09->GetLength());
-            CPPUNIT_ASSERT(memcmp(bytes1_09->Bytes(), bytes2_09->Bytes(), bytes1_09->GetLength()) == 0);
+            REQUIRE(bytes1_09->GetLength() == bytes2_09->GetLength());
+            REQUIRE(memcmp(bytes1_09->Bytes(), bytes2_09->Bytes(), bytes1_09->GetLength()) == 0);
 
             Ptr<MgByteSource> src2_10 = new MgByteSource(L"../UnitTestFiles/MdfTestTypeStyles_v10_Copy2.ldf");
             Ptr<MgByteReader> rdr2_10 = src2_10->GetReader();
             Ptr<MgByteSink> sink2_10 = new MgByteSink(rdr2_10);
             Ptr<MgByte> bytes2_10 = sink2_10->ToBuffer();
-            CPPUNIT_ASSERT(bytes1_10->GetLength() == bytes2_10->GetLength());
-            CPPUNIT_ASSERT(memcmp(bytes1_10->Bytes(), bytes2_10->Bytes(), bytes1_10->GetLength()) == 0);
+            REQUIRE(bytes1_10->GetLength() == bytes2_10->GetLength());
+            REQUIRE(memcmp(bytes1_10->Bytes(), bytes2_10->Bytes(), bytes1_10->GetLength()) == 0);
 
             Ptr<MgByteSource> src2_11 = new MgByteSource(L"../UnitTestFiles/MdfTestTypeStyles_v11_Copy2.ldf");
             Ptr<MgByteReader> rdr2_11 = src2_11->GetReader();
             Ptr<MgByteSink> sink2_11 = new MgByteSink(rdr2_11);
             Ptr<MgByte> bytes2_11 = sink2_11->ToBuffer();
-            CPPUNIT_ASSERT(bytes1_11->GetLength() == bytes2_11->GetLength());
-            CPPUNIT_ASSERT(memcmp(bytes1_11->Bytes(), bytes2_11->Bytes(), bytes1_11->GetLength()) == 0);
+            REQUIRE(bytes1_11->GetLength() == bytes2_11->GetLength());
+            REQUIRE(memcmp(bytes1_11->Bytes(), bytes2_11->Bytes(), bytes1_11->GetLength()) == 0);
 
             Ptr<MgByteSource> src2_12 = new MgByteSource(L"../UnitTestFiles/MdfTestTypeStyles_v12_Copy2.ldf");
             Ptr<MgByteReader> rdr2_12 = src2_12->GetReader();
             Ptr<MgByteSink> sink2_12 = new MgByteSink(rdr2_12);
             Ptr<MgByte> bytes2_12 = sink2_12->ToBuffer();
-            CPPUNIT_ASSERT(bytes1_12->GetLength() == bytes2_12->GetLength());
-            CPPUNIT_ASSERT(memcmp(bytes1_12->Bytes(), bytes2_12->Bytes(), bytes1_12->GetLength()) == 0);
+            REQUIRE(bytes1_12->GetLength() == bytes2_12->GetLength());
+            REQUIRE(memcmp(bytes1_12->Bytes(), bytes2_12->Bytes(), bytes1_12->GetLength()) == 0);
 
             Ptr<MgByteSource> src2_13 = new MgByteSource(L"../UnitTestFiles/MdfTestTypeStyles_v13_Copy2.ldf");
             Ptr<MgByteReader> rdr2_13 = src2_13->GetReader();
             Ptr<MgByteSink> sink2_13 = new MgByteSink(rdr2_13);
             Ptr<MgByte> bytes2_13 = sink2_13->ToBuffer();
-            CPPUNIT_ASSERT(bytes1_13->GetLength() == bytes2_13->GetLength());
-            CPPUNIT_ASSERT(memcmp(bytes1_13->Bytes(), bytes2_13->Bytes(), bytes1_13->GetLength()) == 0);
+            REQUIRE(bytes1_13->GetLength() == bytes2_13->GetLength());
+            REQUIRE(memcmp(bytes1_13->Bytes(), bytes2_13->Bytes(), bytes1_13->GetLength()) == 0);
 
             Ptr<MgByteSource> src2_23 = new MgByteSource(L"../UnitTestFiles/MdfTestTypeStyles_v23_Copy2.ldf");
             Ptr<MgByteReader> rdr2_23 = src2_23->GetReader();
             Ptr<MgByteSink> sink2_23 = new MgByteSink(rdr2_23);
             Ptr<MgByte> bytes2_23 = sink2_23->ToBuffer();
-            CPPUNIT_ASSERT(bytes1_23->GetLength() == bytes2_23->GetLength());
-            CPPUNIT_ASSERT(memcmp(bytes1_23->Bytes(), bytes2_23->Bytes(), bytes1_23->GetLength()) == 0);
+            REQUIRE(bytes1_23->GetLength() == bytes2_23->GetLength());
+            REQUIRE(memcmp(bytes1_23->Bytes(), bytes2_23->Bytes(), bytes1_23->GetLength()) == 0);
 
             Ptr<MgByteSource> src2_24 = new MgByteSource(L"../UnitTestFiles/MdfTestTypeStyles_v24_Copy2.ldf");
             Ptr<MgByteReader> rdr2_24 = src2_24->GetReader();
             Ptr<MgByteSink> sink2_24 = new MgByteSink(rdr2_24);
             Ptr<MgByte> bytes2_24 = sink2_24->ToBuffer();
-            CPPUNIT_ASSERT(bytes1_24->GetLength() == bytes2_24->GetLength());
-            CPPUNIT_ASSERT(memcmp(bytes1_24->Bytes(), bytes2_24->Bytes(), bytes1_24->GetLength()) == 0);
+            REQUIRE(bytes1_24->GetLength() == bytes2_24->GetLength());
+            REQUIRE(memcmp(bytes1_24->Bytes(), bytes2_24->Bytes(), bytes1_24->GetLength()) == 0);
 
             // verify extended data support is working...
             //   - layerDef2_10 was loaded from XML containing extended data
@@ -764,23 +632,23 @@
             //     layerDef2_24 was loaded from XML containing no extended data
             // the data in these object models should be the same
 
-            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v24_Copy3a.ldf", NULL, layerDef2_10.get(), NULL, NULL, NULL, NULL, &layerDefVersion24);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v24_Copy3a.ldf"));
+            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v24_Copy3a.ldf", nullptr, layerDef2_10.get(), nullptr, nullptr, nullptr, nullptr, &layerDefVersion24);
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v24_Copy3a.ldf"));
 
-            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v24_Copy3b.ldf", NULL, layerDef2_11.get(), NULL, NULL, NULL, NULL, &layerDefVersion24);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v24_Copy3b.ldf"));
+            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v24_Copy3b.ldf", nullptr, layerDef2_11.get(), nullptr, nullptr, nullptr, nullptr, &layerDefVersion24);
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v24_Copy3b.ldf"));
 
-            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v24_Copy3c.ldf", NULL, layerDef2_12.get(), NULL, NULL, NULL, NULL, &layerDefVersion24);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v24_Copy3c.ldf"));
+            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v24_Copy3c.ldf", nullptr, layerDef2_12.get(), nullptr, nullptr, nullptr, nullptr, &layerDefVersion24);
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v24_Copy3c.ldf"));
 
-            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v24_Copy3d.ldf", NULL, layerDef2_13.get(), NULL, NULL, NULL, NULL, &layerDefVersion24);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v24_Copy3d.ldf"));
+            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v24_Copy3d.ldf", nullptr, layerDef2_13.get(), nullptr, nullptr, nullptr, nullptr, &layerDefVersion24);
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v24_Copy3d.ldf"));
 
-            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v24_Copy3e.ldf", NULL, layerDef2_23.get(), NULL, NULL, NULL, NULL, &layerDefVersion24);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v24_Copy3e.ldf"));
+            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v24_Copy3e.ldf", nullptr, layerDef2_23.get(), nullptr, nullptr, nullptr, nullptr, &layerDefVersion24);
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v24_Copy3e.ldf"));
 
-            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v24_Copy3f.ldf", NULL, layerDef2_24.get(), NULL, NULL, NULL, NULL, &layerDefVersion24);
-            CPPUNIT_ASSERT(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v24_Copy3f.ldf"));
+            parser.WriteToFile("../UnitTestFiles/MdfTestTypeStyles_v24_Copy3f.ldf", nullptr, layerDef2_24.get(), nullptr, nullptr, nullptr, nullptr, &layerDefVersion24);
+            REQUIRE(MgFileUtil::IsFile(L"../UnitTestFiles/MdfTestTypeStyles_v24_Copy3f.ldf"));
 
             Ptr<MgByteSource> src3a_24 = new MgByteSource(L"../UnitTestFiles/MdfTestTypeStyles_v24_Copy3a.ldf");
             Ptr<MgByteReader> rdr3a_24 = src3a_24->GetReader();
@@ -812,32 +680,32 @@
             Ptr<MgByteSink> sink3f_24 = new MgByteSink(rdr3f_24);
             Ptr<MgByte> bytes3f_24 = sink3f_24->ToBuffer();
 
-            CPPUNIT_ASSERT(bytes3a_24->GetLength() == bytes3b_24->GetLength());
-            CPPUNIT_ASSERT(bytes3b_24->GetLength() == bytes3c_24->GetLength());
-            CPPUNIT_ASSERT(bytes3c_24->GetLength() == bytes3d_24->GetLength());
-            CPPUNIT_ASSERT(bytes3d_24->GetLength() == bytes3e_24->GetLength());
-            CPPUNIT_ASSERT(bytes3e_24->GetLength() == bytes3f_24->GetLength());
-            CPPUNIT_ASSERT(memcmp(bytes3a_24->Bytes(), bytes3b_24->Bytes(), bytes3a_24->GetLength()) == 0);
-            CPPUNIT_ASSERT(memcmp(bytes3b_24->Bytes(), bytes3c_24->Bytes(), bytes3b_24->GetLength()) == 0);
-            CPPUNIT_ASSERT(memcmp(bytes3c_24->Bytes(), bytes3d_24->Bytes(), bytes3c_24->GetLength()) == 0);
-            CPPUNIT_ASSERT(memcmp(bytes3d_24->Bytes(), bytes3e_24->Bytes(), bytes3d_24->GetLength()) == 0);
-            CPPUNIT_ASSERT(memcmp(bytes3e_24->Bytes(), bytes3f_24->Bytes(), bytes3e_24->GetLength()) == 0);
+            REQUIRE(bytes3a_24->GetLength() == bytes3b_24->GetLength());
+            REQUIRE(bytes3b_24->GetLength() == bytes3c_24->GetLength());
+            REQUIRE(bytes3c_24->GetLength() == bytes3d_24->GetLength());
+            REQUIRE(bytes3d_24->GetLength() == bytes3e_24->GetLength());
+            REQUIRE(bytes3e_24->GetLength() == bytes3f_24->GetLength());
+            REQUIRE(memcmp(bytes3a_24->Bytes(), bytes3b_24->Bytes(), bytes3a_24->GetLength()) == 0);
+            REQUIRE(memcmp(bytes3b_24->Bytes(), bytes3c_24->Bytes(), bytes3b_24->GetLength()) == 0);
+            REQUIRE(memcmp(bytes3c_24->Bytes(), bytes3d_24->Bytes(), bytes3c_24->GetLength()) == 0);
+            REQUIRE(memcmp(bytes3d_24->Bytes(), bytes3e_24->Bytes(), bytes3d_24->GetLength()) == 0);
+            REQUIRE(memcmp(bytes3e_24->Bytes(), bytes3f_24->Bytes(), bytes3e_24->GetLength()) == 0);
             // save the new resources to the repository to validate the XML
-            m_svcResource->SetResource(ldfresV, rdr1_09, NULL);
+            m_svcResource->SetResource(ldfresV, rdr1_09, nullptr);
             m_svcResource->DeleteResource(ldfresV);
-            m_svcResource->SetResource(ldfresV, rdr1_10, NULL);
+            m_svcResource->SetResource(ldfresV, rdr1_10, nullptr);
             m_svcResource->DeleteResource(ldfresV);
-            m_svcResource->SetResource(ldfresV, rdr1_11, NULL);
+            m_svcResource->SetResource(ldfresV, rdr1_11, nullptr);
             m_svcResource->DeleteResource(ldfresV);
-            m_svcResource->SetResource(ldfresV, rdr1_12, NULL);
+            m_svcResource->SetResource(ldfresV, rdr1_12, nullptr);
             m_svcResource->DeleteResource(ldfresV);
-            m_svcResource->SetResource(ldfresV, rdr1_13, NULL);
+            m_svcResource->SetResource(ldfresV, rdr1_13, nullptr);
             m_svcResource->DeleteResource(ldfresV);
-            m_svcResource->SetResource(ldfresV, rdr1_23, NULL);
+            m_svcResource->SetResource(ldfresV, rdr1_23, nullptr);
             m_svcResource->DeleteResource(ldfresV);
-            m_svcResource->SetResource(ldfresV, rdr1_24, NULL);
+            m_svcResource->SetResource(ldfresV, rdr1_24, nullptr);
             m_svcResource->DeleteResource(ldfresV);
-            m_svcResource->SetResource(ldfresV, rdr3a_24, NULL);
+            m_svcResource->SetResource(ldfresV, rdr3a_24, nullptr);
             m_svcResource->DeleteResource(ldfresV);
         }
 
@@ -875,16 +743,18 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
-void TestMdfModel::TestCase_TileSetDefinitionDefault()
+TEST_CASE("TileSetDefinitionDefaultProvider", "[MdfModel]")
 {
     try
     {
+        Ptr<MgResourceService> m_svcResource = TestServiceFactory::CreateResourceService();
+
         Ptr<MgResourceIdentifier> tsId = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestTileSet.TileSetDefinition");
         Ptr<MgByteReader> content = m_svcResource->GetResourceContent(tsId);
         Ptr<MgByteSink> sink = new MgByteSink(content);
@@ -893,13 +763,13 @@
         MdfParser::SAX2Parser parser;
         parser.ParseString((const char*)bytes->Bytes(), bytes->GetLength());
 
-        CPPUNIT_ASSERT(parser.GetSucceeded());
+        REQUIRE(parser.GetSucceeded());
         MdfModel::TileSetDefinition* tileset = parser.DetachTileSetDefinition();
-        CPPUNIT_ASSERT(NULL != tileset);
+        REQUIRE(nullptr != tileset);
 
         MdfModel::TileStoreParameters* tilesetParams = tileset->GetTileStoreParameters();
-        CPPUNIT_ASSERT(NULL != tilesetParams);
-        CPPUNIT_ASSERT(MG_TILE_PROVIDER_DEFAULT == tilesetParams->GetTileProvider());
+        REQUIRE(nullptr != tilesetParams);
+        REQUIRE(MG_TILE_PROVIDER_DEFAULT == tilesetParams->GetTileProvider());
 
         STRING path;
         INT32 width;
@@ -938,65 +808,67 @@
             }
         }
 
-        CPPUNIT_ASSERT(256 == width);
-        CPPUNIT_ASSERT(256 == height);
-        CPPUNIT_ASSERT(L"PNG" == format);
-        CPPUNIT_ASSERT(MgResourceTag::TileCachePath == path);
+        REQUIRE(256 == width);
+        REQUIRE(256 == height);
+        REQUIRE(L"PNG" == format);
+        REQUIRE(MgResourceTag::TileCachePath == path);
 
         const MdfModel::Box2D& extents = tileset->GetExtents();
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(-87.79786601383196, extents.GetMinX(), 0.00000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL( 43.686857862181,   extents.GetMinY(), 0.000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(-87.66452777186925, extents.GetMaxX(), 0.00000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL( 43.8037962206133,  extents.GetMaxY(), 0.0000000000001);
+        REQUIRE(Approx(-87.79786601383196) == extents.GetMinX());
+        REQUIRE(Approx(43.686857862181) == extents.GetMinY());
+        REQUIRE(Approx(-87.66452777186925) == extents.GetMaxX());
+        REQUIRE(Approx(43.8037962206133) == extents.GetMaxY());
 
-        CPPUNIT_ASSERT(10 == scales.size());
-        CPPUNIT_ASSERT(200000 == scales.at(0));
-        CPPUNIT_ASSERT(100000 == scales.at(1));
-        CPPUNIT_ASSERT(50000 == scales.at(2));
-        CPPUNIT_ASSERT(25000 == scales.at(3));
-        CPPUNIT_ASSERT(12500 == scales.at(4));
-        CPPUNIT_ASSERT(6250 == scales.at(5));
-        CPPUNIT_ASSERT(3125 == scales.at(6));
-        CPPUNIT_ASSERT(1562.5 == scales.at(7));
-        CPPUNIT_ASSERT(781.25 == scales.at(8));
-        CPPUNIT_ASSERT(390.625 == scales.at(9));
+        REQUIRE(10 == scales.size());
+        REQUIRE(200000 == scales.at(0));
+        REQUIRE(100000 == scales.at(1));
+        REQUIRE(50000 == scales.at(2));
+        REQUIRE(25000 == scales.at(3));
+        REQUIRE(12500 == scales.at(4));
+        REQUIRE(6250 == scales.at(5));
+        REQUIRE(3125 == scales.at(6));
+        REQUIRE(1562.5 == scales.at(7));
+        REQUIRE(781.25 == scales.at(8));
+        REQUIRE(390.625 == scales.at(9));
 
         MdfModel::BaseMapLayerGroupCollection* groups = tileset->GetBaseMapLayerGroups();
-        CPPUNIT_ASSERT(1 == groups->GetCount());
-        CPPUNIT_ASSERT(L"BaseLayers" == groups->GetAt(0)->GetName());
-        CPPUNIT_ASSERT(L"Base Layers" == groups->GetAt(0)->GetLegendLabel());
-        CPPUNIT_ASSERT(groups->GetAt(0)->IsShowInLegend());
-        CPPUNIT_ASSERT(groups->GetAt(0)->IsExpandInLegend());
+        REQUIRE(1 == groups->GetCount());
+        REQUIRE(L"BaseLayers" == groups->GetAt(0)->GetName());
+        REQUIRE(L"Base Layers" == groups->GetAt(0)->GetLegendLabel());
+        REQUIRE(groups->GetAt(0)->IsShowInLegend());
+        REQUIRE(groups->GetAt(0)->IsExpandInLegend());
 
         MdfModel::BaseMapLayerCollection* layers = groups->GetAt(0)->GetLayers();
-        CPPUNIT_ASSERT(2 == layers->GetCount());
+        REQUIRE(2 == layers->GetCount());
 
-        CPPUNIT_ASSERT(L"Parcels" == layers->GetAt(0)->GetName());
-        CPPUNIT_ASSERT(L"Parcels" == layers->GetAt(0)->GetLegendLabel());
-        CPPUNIT_ASSERT(L"Library://UnitTests/Layers/Parcels.LayerDefinition" == layers->GetAt(0)->GetLayerResourceID());
-        CPPUNIT_ASSERT(!layers->GetAt(0)->IsExpandInLegend());
-        CPPUNIT_ASSERT(layers->GetAt(0)->IsShowInLegend());
-        CPPUNIT_ASSERT(layers->GetAt(0)->IsSelectable());
+        REQUIRE(L"Parcels" == layers->GetAt(0)->GetName());
+        REQUIRE(L"Parcels" == layers->GetAt(0)->GetLegendLabel());
+        REQUIRE(L"Library://UnitTests/Layers/Parcels.LayerDefinition" == layers->GetAt(0)->GetLayerResourceID());
+        REQUIRE(!layers->GetAt(0)->IsExpandInLegend());
+        REQUIRE(layers->GetAt(0)->IsShowInLegend());
+        REQUIRE(layers->GetAt(0)->IsSelectable());
 
-        CPPUNIT_ASSERT(L"VotingDistricts" == layers->GetAt(1)->GetName());
-        CPPUNIT_ASSERT(L"Voting Districts" == layers->GetAt(1)->GetLegendLabel());
-        CPPUNIT_ASSERT(L"Library://UnitTests/Layers/VotingDistricts.LayerDefinition" == layers->GetAt(1)->GetLayerResourceID());
-        CPPUNIT_ASSERT(!layers->GetAt(1)->IsExpandInLegend());
-        CPPUNIT_ASSERT(layers->GetAt(1)->IsShowInLegend());
-        CPPUNIT_ASSERT(layers->GetAt(1)->IsSelectable());
+        REQUIRE(L"VotingDistricts" == layers->GetAt(1)->GetName());
+        REQUIRE(L"Voting Districts" == layers->GetAt(1)->GetLegendLabel());
+        REQUIRE(L"Library://UnitTests/Layers/VotingDistricts.LayerDefinition" == layers->GetAt(1)->GetLayerResourceID());
+        REQUIRE(!layers->GetAt(1)->IsExpandInLegend());
+        REQUIRE(layers->GetAt(1)->IsShowInLegend());
+        REQUIRE(layers->GetAt(1)->IsSelectable());
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
-void TestMdfModel::TestCase_TileSetDefinitionXYZ()
+TEST_CASE("TileSetDefinitionXyzProvider", "[MdfModel]")
 {
     try
     {
+        Ptr<MgResourceService> m_svcResource = TestServiceFactory::CreateResourceService();
+
         Ptr<MgResourceIdentifier> tsId = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/XYZTestTileSet.TileSetDefinition");
         Ptr<MgByteReader> content = m_svcResource->GetResourceContent(tsId);
         Ptr<MgByteSink> sink = new MgByteSink(content);
@@ -1005,13 +877,13 @@
         MdfParser::SAX2Parser parser;
         parser.ParseString((const char*)bytes->Bytes(), bytes->GetLength());
 
-        CPPUNIT_ASSERT(parser.GetSucceeded());
+        REQUIRE(parser.GetSucceeded());
         MdfModel::TileSetDefinition* tileset = parser.DetachTileSetDefinition();
-        CPPUNIT_ASSERT(NULL != tileset);
+        REQUIRE(nullptr != tileset);
 
         MdfModel::TileStoreParameters* tilesetParams = tileset->GetTileStoreParameters();
-        CPPUNIT_ASSERT(NULL != tilesetParams);
-        CPPUNIT_ASSERT(MG_TILE_PROVIDER_XYZ == tilesetParams->GetTileProvider());
+        REQUIRE(nullptr != tilesetParams);
+        REQUIRE(MG_TILE_PROVIDER_XYZ == tilesetParams->GetTileProvider());
 
         STRING path;
         STRING format;
@@ -1030,51 +902,53 @@
             }
         }
 
-        CPPUNIT_ASSERT(L"PNG" == format);
-        CPPUNIT_ASSERT(MgResourceTag::TileCachePath == path);
+        REQUIRE(L"PNG" == format);
+        REQUIRE(MgResourceTag::TileCachePath == path);
 
         const MdfModel::Box2D& extents = tileset->GetExtents();
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(-87.79786601383196, extents.GetMinX(), 0.00000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL( 43.686857862181,   extents.GetMinY(), 0.000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(-87.66452777186925, extents.GetMaxX(), 0.00000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL( 43.8037962206133,  extents.GetMaxY(), 0.0000000000001);
+        REQUIRE(Approx(-87.79786601383196) == extents.GetMinX());
+        REQUIRE(Approx(43.686857862181) == extents.GetMinY());
+        REQUIRE(Approx(-87.66452777186925) == extents.GetMaxX());
+        REQUIRE(Approx(43.8037962206133) == extents.GetMaxY());
 
         MdfModel::BaseMapLayerGroupCollection* groups = tileset->GetBaseMapLayerGroups();
-        CPPUNIT_ASSERT(1 == groups->GetCount());
-        CPPUNIT_ASSERT(L"BaseLayers" == groups->GetAt(0)->GetName());
-        CPPUNIT_ASSERT(L"Base Layers" == groups->GetAt(0)->GetLegendLabel());
-        CPPUNIT_ASSERT(groups->GetAt(0)->IsShowInLegend());
-        CPPUNIT_ASSERT(groups->GetAt(0)->IsExpandInLegend());
+        REQUIRE(1 == groups->GetCount());
+        REQUIRE(L"BaseLayers" == groups->GetAt(0)->GetName());
+        REQUIRE(L"Base Layers" == groups->GetAt(0)->GetLegendLabel());
+        REQUIRE(groups->GetAt(0)->IsShowInLegend());
+        REQUIRE(groups->GetAt(0)->IsExpandInLegend());
 
         MdfModel::BaseMapLayerCollection* layers = groups->GetAt(0)->GetLayers();
-        CPPUNIT_ASSERT(2 == layers->GetCount());
+        REQUIRE(2 == layers->GetCount());
 
-        CPPUNIT_ASSERT(L"Parcels" == layers->GetAt(0)->GetName());
-        CPPUNIT_ASSERT(L"Parcels" == layers->GetAt(0)->GetLegendLabel());
-        CPPUNIT_ASSERT(L"Library://UnitTests/Layers/Parcels.LayerDefinition" == layers->GetAt(0)->GetLayerResourceID());
-        CPPUNIT_ASSERT(!layers->GetAt(0)->IsExpandInLegend());
-        CPPUNIT_ASSERT(layers->GetAt(0)->IsShowInLegend());
-        CPPUNIT_ASSERT(layers->GetAt(0)->IsSelectable());
+        REQUIRE(L"Parcels" == layers->GetAt(0)->GetName());
+        REQUIRE(L"Parcels" == layers->GetAt(0)->GetLegendLabel());
+        REQUIRE(L"Library://UnitTests/Layers/Parcels.LayerDefinition" == layers->GetAt(0)->GetLayerResourceID());
+        REQUIRE(!layers->GetAt(0)->IsExpandInLegend());
+        REQUIRE(layers->GetAt(0)->IsShowInLegend());
+        REQUIRE(layers->GetAt(0)->IsSelectable());
 
-        CPPUNIT_ASSERT(L"VotingDistricts" == layers->GetAt(1)->GetName());
-        CPPUNIT_ASSERT(L"Voting Districts" == layers->GetAt(1)->GetLegendLabel());
-        CPPUNIT_ASSERT(L"Library://UnitTests/Layers/VotingDistricts.LayerDefinition" == layers->GetAt(1)->GetLayerResourceID());
-        CPPUNIT_ASSERT(!layers->GetAt(1)->IsExpandInLegend());
-        CPPUNIT_ASSERT(layers->GetAt(1)->IsShowInLegend());
-        CPPUNIT_ASSERT(layers->GetAt(1)->IsSelectable());
+        REQUIRE(L"VotingDistricts" == layers->GetAt(1)->GetName());
+        REQUIRE(L"Voting Districts" == layers->GetAt(1)->GetLegendLabel());
+        REQUIRE(L"Library://UnitTests/Layers/VotingDistricts.LayerDefinition" == layers->GetAt(1)->GetLayerResourceID());
+        REQUIRE(!layers->GetAt(1)->IsExpandInLegend());
+        REQUIRE(layers->GetAt(1)->IsShowInLegend());
+        REQUIRE(layers->GetAt(1)->IsSelectable());
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
-void TestMdfModel::TestCase_LayerDef_DisabledBounds()
+TEST_CASE("LayerDefinitionDisabledBounds", "[MdfModel]")
 {
     try
     {
+        Ptr<MgResourceService> m_svcResource = TestServiceFactory::CreateResourceService();
+
         Ptr<MgResourceIdentifier> ldfId = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestDisabledBounds.LayerDefinition");
         Ptr<MgByteReader> rdr = m_svcResource->GetResourceContent(ldfId);
 
@@ -1082,21 +956,21 @@
 
         Ptr<MgByteSink> sink = new MgByteSink(rdr);
         Ptr<MgByte> bytes = sink->ToBuffer();
-        CPPUNIT_ASSERT(bytes->GetLength() > 0);
+        REQUIRE(bytes->GetLength() > 0);
 
         parser.ParseString((const char*)bytes->Bytes(), bytes->GetLength());
-        CPPUNIT_ASSERT(parser.GetSucceeded());
+        REQUIRE(parser.GetSucceeded());
 
         unique_ptr<LayerDefinition> ldf(parser.DetachLayerDefinition());
-        CPPUNIT_ASSERT(ldf.get() != NULL);
+        REQUIRE(ldf.get() != nullptr);
 
         VectorLayerDefinition* vl = dynamic_cast<VectorLayerDefinition*>(ldf.get());
-        CPPUNIT_ASSERT(vl != NULL);
+        REQUIRE(vl != nullptr);
 
-        CPPUNIT_ASSERT(!vl->GetIncludeBoundsForSelectedFeatures());
+        REQUIRE(!vl->GetIncludeBoundsForSelectedFeatures());
 
         Ptr<MgLayer> layer = new MgLayer(ldfId, m_svcResource);
-        CPPUNIT_ASSERT(!layer->GetIncludeBoundsForSelectedFeatures());
+        REQUIRE(!layer->GetIncludeBoundsForSelectedFeatures());
 
         Ptr<MgMemoryStreamHelper> helper = new MgMemoryStreamHelper();
         Ptr<MgStream> stream = new MgStream(helper);
@@ -1104,12 +978,12 @@
 
         Ptr<MgLayer> layer2 = new MgLayer();
         layer2->Deserialize(stream);
-        CPPUNIT_ASSERT(!layer2->GetIncludeBoundsForSelectedFeatures());
+        REQUIRE(!layer2->GetIncludeBoundsForSelectedFeatures());
     }
-    catch (MgException * e)
+    catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
\ No newline at end of file

Deleted: trunk/MgDev/Server/src/UnitTesting/TestMdfModel.h
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestMdfModel.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestMdfModel.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,59 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _TESTMDFMODEL_H
-#define _TESTMDFMODEL_H
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestMdfModel : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestMdfModel);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_Serialization);
-    CPPUNIT_TEST(TestCase_Versioning);
-
-    CPPUNIT_TEST(TestCase_TileSetDefinitionDefault);
-    CPPUNIT_TEST(TestCase_TileSetDefinitionXYZ);
-
-    CPPUNIT_TEST(TestCase_LayerDef_DisabledBounds);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    TestMdfModel();
-    ~TestMdfModel();
-
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    void TestCase_Serialization();
-    void TestCase_Versioning();
-    void TestCase_TileSetDefinitionDefault();
-    void TestCase_TileSetDefinitionXYZ();
-
-    void TestCase_LayerDef_DisabledBounds();
-
-private:
-    Ptr<MgResourceService> m_svcResource;
-};
-
-#endif // _TESTMDFMODEL_H

Modified: trunk/MgDev/Server/src/UnitTesting/TestMisc.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestMisc.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestMisc.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -16,17 +16,16 @@
 //
 
 #include "MapGuideCommon.h"
-#include "TestMisc.h"
 #include "ServiceManager.h"
 #include "ServerResourceService.h"
 #include "ServerSiteService.h"
-#include "../UnitTesting/CppUnitExtensions.h"
 #include "FoundationDefs.h"
 #include "FdoConnectionManager.h"
 #include "LineBuffer.h"
 #include "RS_BufferOutputStream.h"
+#include "TestServiceFactory.h"
+#include "catch.hpp"
 
-const STRING TEST_LOCALE = L"en";
 static const INT32 MG_TEST_THREADS = 16;
 
 // define thread group for config tests
@@ -33,294 +32,53 @@
 #define THREAD_GROUP 65520
 #define TESTREQUESTS 5000
 
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestMisc, "TestMisc");
-
-TestMisc::TestMisc()
+TEST_CASE("CommonExceptionMessages", "[Misc]")
 {
-    // Initialize service objects.
-    MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-
-    m_svcResource = dynamic_cast<MgResourceService*>(
-        serviceManager->RequestService(MgServiceType::ResourceService));
-    assert(m_svcResource != NULL);
-
-    // Initialize a site connection.
-    Ptr<MgServerSiteService> svcSite = dynamic_cast<MgServerSiteService*>(
-        serviceManager->RequestService(MgServiceType::SiteService));
-    assert(svcSite != NULL);
-
-    Ptr<MgUserInformation> userInfo = new MgUserInformation(
-        L"Administrator", L"admin");
-    userInfo->SetLocale(TEST_LOCALE);
-
-    // Set the current MgUserInformation
-    // This must be done before calling CreateSession()
-    MgUserInformation::SetCurrentUserInfo(userInfo);
-
-    STRING session = svcSite->CreateSession();
-    assert(!session.empty());
-    userInfo->SetMgSessionId(session);
-
-    // Set the current MgUserInformation
-    MgUserInformation::SetCurrentUserInfo(userInfo);
-
-    m_siteConnection = new MgSiteConnection();
-    m_siteConnection->Open(userInfo);
-}
-
-
-TestMisc::~TestMisc()
-{
-}
-
-
-void TestMisc::setUp()
-{
-}
-
-
-void TestMisc::tearDown()
-{
-}
-
-
-void TestMisc::TestStart()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Miscellaneous tests.\n")));
-
-    //Reusing Mapping Service test data
     try
     {
-        #ifdef _DEBUG
-        MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
-        if(pFdoConnectionManager)
-        {
-            pFdoConnectionManager->ShowCache();
-        }
-        #endif
-
-        //set user info
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
-        MgUserInformation::SetCurrentUserInfo(userInfo);
-
-        //publish the map definition
-        Ptr<MgResourceIdentifier> mapres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
-        Ptr<MgByteSource> mdfsrc = new MgByteSource(L"../UnitTestFiles/UT_Sheboygan.mdf", false);
-        Ptr<MgByteReader> mdfrdr = mdfsrc->GetReader();
-        m_svcResource->SetResource(mapres, mdfrdr, NULL);
-
-        Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan_833.MapDefinition");
-        Ptr<MgByteSource> mdfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Sheboygan_833.mdf", false);
-        Ptr<MgByteReader> mdfrdr2 = mdfsrc2->GetReader();
-        m_svcResource->SetResource(mapres2, mdfrdr2, NULL);
-
-        //publish the layer definitions
-        Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.ldf", false);
-        Ptr<MgByteReader> ldfrdr1 = ldfsrc1->GetReader();
-        m_svcResource->SetResource(ldfres1, ldfrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.ldf", false);
-        Ptr<MgByteReader> ldfrdr2 = ldfsrc2->GetReader();
-        m_svcResource->SetResource(ldfres2, ldfrdr2, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.ldf", false);
-        Ptr<MgByteReader> ldfrdr3 = ldfsrc3->GetReader();
-        m_svcResource->SetResource(ldfres3, ldfrdr3, NULL);
-
-        //publish the feature sources
-        Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
-        Ptr<MgByteSource> fssrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.fs", false);
-        Ptr<MgByteReader> fsrdr1 = fssrc1->GetReader();
-        m_svcResource->SetResource(fsres1, fsrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
-        Ptr<MgByteSource> fssrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.fs", false);
-        Ptr<MgByteReader> fsrdr2 = fssrc2->GetReader();
-        m_svcResource->SetResource(fsres2, fsrdr2, NULL);
-
-        Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
-        Ptr<MgByteSource> fssrc3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.fs", false);
-        Ptr<MgByteReader> fsrdr3 = fssrc3->GetReader();
-        m_svcResource->SetResource(fsres3, fsrdr3, NULL);
-
-        // publish the resource data
-        Ptr<MgByteSource> dataSource1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.sdf", false);
-        Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
-        m_svcResource->SetResourceData(fsres1, L"UT_HydrographicPolygons.sdf", L"File", dataReader1);
-
-        Ptr<MgByteSource> dataSource2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.sdf", false);
-        Ptr<MgByteReader> dataReader2 = dataSource2->GetReader();
-        m_svcResource->SetResourceData(fsres2, L"UT_Parcels.sdf", L"File", dataReader2);
-
-        Ptr<MgByteSource> dataSource3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.sdf", false);
-        Ptr<MgByteReader> dataReader3 = dataSource3->GetReader();
-        m_svcResource->SetResourceData(fsres3, L"UT_Rail.sdf", L"File", dataReader3);
-
-        // publish the print layouts
-        Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
-        Ptr<MgByteSource> plsrc1 = new MgByteSource(L"../UnitTestFiles/UT_AllElements.pl", false);
-        Ptr<MgByteReader> plrdr1 = plsrc1->GetReader();
-        m_svcResource->SetResource(plres1, plrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
-        Ptr<MgByteSource> plsrc2 = new MgByteSource(L"../UnitTestFiles/UT_NoLegend.pl", false);
-        Ptr<MgByteReader> plrdr2 = plsrc2->GetReader();
-        m_svcResource->SetResource(plres2, plrdr2, NULL);
-
-        // publish the symbol library
-        Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
-        Ptr<MgByteSource> slsrc1 = new MgByteSource(L"../UnitTestFiles/UT_SymbolMart.sl", false);
-        Ptr<MgByteReader> slrdr1 = slsrc1->GetReader();
-        m_svcResource->SetResource(slres1, slrdr1, NULL);
-        Ptr<MgByteSource> datasrc = new MgByteSource(L"../UnitTestFiles/UT_Symbols.dwf", false);
-        Ptr<MgByteReader> datardr = datasrc->GetReader();
-        m_svcResource->SetResourceData(slres1, L"symbols.dwf", L"File", datardr);
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-}
-
-
-void TestMisc::TestEnd()
-{
-    try
-    {
-        //set user info
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
-        MgUserInformation::SetCurrentUserInfo(userInfo);
-
-        //delete the map definition
-        Ptr<MgResourceIdentifier> mapres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
-        m_svcResource->DeleteResource(mapres);
-
-        Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan_833.MapDefinition");
-        m_svcResource->DeleteResource(mapres2);
-
-        //delete the layer definitions
-        Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres1);
-
-        Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres2);
-
-        Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres3);
-
-        //delete the feature sources
-        Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
-        m_svcResource->DeleteResource(fsres1);
-
-        Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
-        m_svcResource->DeleteResource(fsres2);
-
-        Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
-        m_svcResource->DeleteResource(fsres3);
-
-        // delete the print layouts
-        Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
-        m_svcResource->DeleteResource(plres1);
-
-        Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
-        m_svcResource->DeleteResource(plres2);
-
-        // delete the symbol library
-        Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
-        m_svcResource->DeleteResource(slres1);
-
-        #ifdef _DEBUG
-        MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
-        if(pFdoConnectionManager)
-        {
-            pFdoConnectionManager->ShowCache();
-        }
-        #endif
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nMiscellaneous tests completed.\n\n")));
-}
-
-void TestMisc::TestCase_CommonExceptionMessages()
-{
-    try
-    {
-        MgObject* ptr = NULL;
+        MgObject* ptr = nullptr;
         CHECKNULL(ptr, L"TestMisc::TestCase_CommonExceptionMessages");
     }
     catch(MgException* ex)
     {
-        STRING msg = ex->GetExceptionMessage(TEST_LOCALE);
-        //ACE_DEBUG((LM_INFO, ACE_TEXT("Exception: %W\n"), msg.c_str()));
-        std::string assertMsg = "Expected identifier 'ptr' in exception message: ";
-        assertMsg += MgUtil::WideCharToMultiByte(msg);
-        CPPUNIT_ASSERT_MESSAGE(assertMsg, msg.find(L"ptr") != STRING::npos);
+        STRING msg = ex->GetExceptionMessage(TestServiceFactory::TEST_LOCALE);
+        REQUIRE(msg.find(L"ptr") != STRING::npos);
         ex->Release();
     }
 
     try
     {
-        MgObject* ptr2 = NULL;
+        MgObject* ptr2 = nullptr;
         CHECKNULL((void*)ptr2, L"TestMisc::TestCase_CommonExceptionMessages");
     }
     catch(MgException* ex)
     {
-        STRING msg = ex->GetExceptionMessage(TEST_LOCALE);
-        //ACE_DEBUG((LM_INFO, ACE_TEXT("Exception: %W\n"), msg.c_str()));
-        std::string assertMsg = "Expected identifier 'ptr2' in exception message: ";
-        assertMsg += MgUtil::WideCharToMultiByte(msg);
-        CPPUNIT_ASSERT_MESSAGE(assertMsg, msg.find(L"ptr2") != STRING::npos);
+        STRING msg = ex->GetExceptionMessage(TestServiceFactory::TEST_LOCALE);
+        REQUIRE(msg.find(L"ptr2") != STRING::npos);
         ex->Release();
     }
 
     try
     {
-        MgObject* ptr3 = NULL;
+        MgObject* ptr3 = nullptr;
         CHECKARGUMENTNULL(ptr3, L"TestMisc::TestCase_CommonExceptionMessages");
     }
     catch(MgException* ex)
     {
-        STRING msg = ex->GetExceptionMessage(TEST_LOCALE);
-        //ACE_DEBUG((LM_INFO, ACE_TEXT("Exception: %W\n"), msg.c_str()));
-        std::string assertMsg = "Expected identifier 'ptr3' in exception message: ";
-        assertMsg += MgUtil::WideCharToMultiByte(msg);
-        CPPUNIT_ASSERT_MESSAGE(assertMsg, msg.find(L"ptr3") != STRING::npos);
+        STRING msg = ex->GetExceptionMessage(TestServiceFactory::TEST_LOCALE);
+        REQUIRE(msg.find(L"ptr3") != STRING::npos);
         ex->Release();
     }
 
     try
     {
-        MgObject* ptr4 = NULL;
+        MgObject* ptr4 = nullptr;
         CHECKARGUMENTNULL((void*)ptr4, L"TestMisc::TestCase_CommonExceptionMessages");
     }
     catch(MgException* ex)
     {
-        STRING msg = ex->GetExceptionMessage(TEST_LOCALE);
-        //ACE_DEBUG((LM_INFO, ACE_TEXT("Exception: %W\n"), msg.c_str()));
-        std::string assertMsg = "Expected identifier 'ptr4' in exception message: ";
-        assertMsg += MgUtil::WideCharToMultiByte(msg);
-        CPPUNIT_ASSERT_MESSAGE(assertMsg, msg.find(L"ptr4") != STRING::npos);
+        STRING msg = ex->GetExceptionMessage(TestServiceFactory::TEST_LOCALE);
+        REQUIRE(msg.find(L"ptr4") != STRING::npos);
         ex->Release();
     }
 
@@ -331,11 +89,8 @@
     }
     catch (MgException* ex)
     {
-        STRING msg = ex->GetExceptionMessage(TEST_LOCALE);
-        //ACE_DEBUG((LM_INFO, ACE_TEXT("Exception: %W\n"), msg.c_str()));
-        std::string assertMsg = "Expected identifier 'arg5' in exception message: ";
-        assertMsg += MgUtil::WideCharToMultiByte(msg);
-        CPPUNIT_ASSERT_MESSAGE(assertMsg, msg.find(L"arg5") != STRING::npos);
+        STRING msg = ex->GetExceptionMessage(TestServiceFactory::TEST_LOCALE);
+        REQUIRE(msg.find(L"arg5") != STRING::npos);
         ex->Release();
     }
 
@@ -346,11 +101,8 @@
     }
     catch(MgException* ex)
     {
-        STRING msg = ex->GetExceptionMessage(TEST_LOCALE);
-        //ACE_DEBUG((LM_INFO, ACE_TEXT("Exception: %W\n"), msg.c_str()));
-        std::string assertMsg = "Expected identifier 'val' in exception message: ";
-        assertMsg += MgUtil::WideCharToMultiByte(msg);
-        CPPUNIT_ASSERT_MESSAGE(assertMsg, msg.find(L"val") != STRING::npos);
+        STRING msg = ex->GetExceptionMessage(TestServiceFactory::TEST_LOCALE);
+        REQUIRE(msg.find(L"val") != STRING::npos);
         ex->Release();
     }
 
@@ -363,11 +115,8 @@
     }
     catch(MgException* ex)
     {
-        STRING msg = ex->GetExceptionMessage(TEST_LOCALE);
-        //ACE_DEBUG((LM_INFO, ACE_TEXT("Exception: %W\n"), msg.c_str()));
-        std::string assertMsg = "Expected identifier '' in exception message: ";
-        assertMsg += MgUtil::WideCharToMultiByte(msg);
-        CPPUNIT_ASSERT_MESSAGE(assertMsg, msg.find(L"") != STRING::npos);
+        STRING msg = ex->GetExceptionMessage(TestServiceFactory::TEST_LOCALE);
+        REQUIRE(msg.find(L"val") != STRING::npos);
         ex->Release();
     }
 
@@ -378,11 +127,8 @@
     }
     catch(MgException* ex)
     {
-        STRING msg = ex->GetExceptionMessage(TEST_LOCALE);
-        //ACE_DEBUG((LM_INFO, ACE_TEXT("Exception: %W\n"), msg.c_str()));
-        std::string assertMsg = "Expected identifier '' in exception message: ";
-        assertMsg += MgUtil::WideCharToMultiByte(msg);
-        CPPUNIT_ASSERT_MESSAGE(assertMsg, msg.find(L"") != STRING::npos);
+        STRING msg = ex->GetExceptionMessage(TestServiceFactory::TEST_LOCALE);
+        REQUIRE(msg.find(L"val") != STRING::npos);
         ex->Release();
     }
 
@@ -395,11 +141,8 @@
     }
     catch(MgException* ex)
     {
-        STRING msg = ex->GetExceptionMessage(TEST_LOCALE);
-        //ACE_DEBUG((LM_INFO, ACE_TEXT("Exception: %W\n"), msg.c_str()));
-        std::string assertMsg = "Expected identifier '' in exception message: ";
-        assertMsg += MgUtil::WideCharToMultiByte(msg);
-        CPPUNIT_ASSERT_MESSAGE(assertMsg, msg.find(L"") != STRING::npos);
+        STRING msg = ex->GetExceptionMessage(TestServiceFactory::TEST_LOCALE);
+        REQUIRE(msg.find(L"val") != STRING::npos);
         ex->Release();
     }
 
@@ -410,11 +153,8 @@
     }
     catch(MgException* ex)
     {
-        STRING msg = ex->GetExceptionMessage(TEST_LOCALE);
-        //ACE_DEBUG((LM_INFO, ACE_TEXT("Exception: %W\n"), msg.c_str()));
-        std::string assertMsg = "Expected identifier '' in exception message: ";
-        assertMsg += MgUtil::WideCharToMultiByte(msg);
-        CPPUNIT_ASSERT_MESSAGE(assertMsg, msg.find(L"") != STRING::npos);
+        STRING msg = ex->GetExceptionMessage(TestServiceFactory::TEST_LOCALE);
+        REQUIRE(msg.find(L"val") != STRING::npos);
         ex->Release();
     }
 
@@ -427,11 +167,8 @@
     }
     catch(MgException* ex)
     {
-        STRING msg = ex->GetExceptionMessage(TEST_LOCALE);
-        //ACE_DEBUG((LM_INFO, ACE_TEXT("Exception: %W\n"), msg.c_str()));
-        std::string assertMsg = "Expected identifier '' in exception message: ";
-        assertMsg += MgUtil::WideCharToMultiByte(msg);
-        CPPUNIT_ASSERT_MESSAGE(assertMsg, msg.find(L"") != STRING::npos);
+        STRING msg = ex->GetExceptionMessage(TestServiceFactory::TEST_LOCALE);
+        REQUIRE(msg.find(L"val") != STRING::npos);
         ex->Release();
     }
 
@@ -442,11 +179,8 @@
     }
     catch(MgException* ex)
     {
-        STRING msg = ex->GetExceptionMessage(TEST_LOCALE);
-        //ACE_DEBUG((LM_INFO, ACE_TEXT("Exception: %W\n"), msg.c_str()));
-        std::string assertMsg = "Expected identifier '' in exception message: ";
-        assertMsg += MgUtil::WideCharToMultiByte(msg);
-        CPPUNIT_ASSERT_MESSAGE(assertMsg, msg.find(L"") != STRING::npos);
+        STRING msg = ex->GetExceptionMessage(TestServiceFactory::TEST_LOCALE);
+        REQUIRE(msg.find(L"val") != STRING::npos);
         ex->Release();
     }
 
@@ -459,11 +193,8 @@
     }
     catch(MgException* ex)
     {
-        STRING msg = ex->GetExceptionMessage(TEST_LOCALE);
-        //ACE_DEBUG((LM_INFO, ACE_TEXT("Exception: %W\n"), msg.c_str()));
-        std::string assertMsg = "Expected identifier '' in exception message: ";
-        assertMsg += MgUtil::WideCharToMultiByte(msg);
-        CPPUNIT_ASSERT_MESSAGE(assertMsg, msg.find(L"") != STRING::npos);
+        STRING msg = ex->GetExceptionMessage(TestServiceFactory::TEST_LOCALE);
+        REQUIRE(msg.find(L"val") != STRING::npos);
         ex->Release();
     }
 
@@ -474,450 +205,14 @@
     }
     catch(MgException* ex)
     {
-        STRING msg = ex->GetExceptionMessage(TEST_LOCALE);
-        //ACE_DEBUG((LM_INFO, ACE_TEXT("Exception: %W\n"), msg.c_str()));
-        std::string assertMsg = "Expected string 'Foo' in exception message: ";
-        assertMsg += MgUtil::WideCharToMultiByte(msg);
-        CPPUNIT_ASSERT_MESSAGE(assertMsg, msg.find(L"Foo") != STRING::npos);
+        STRING msg = ex->GetExceptionMessage(TestServiceFactory::TEST_LOCALE);
+        REQUIRE(msg.find(L"Foo") != STRING::npos);
         ex->Release();
     }
 }
 
-void TestMisc::TestCase_611()
+TEST_CASE("LineBufferConversion", "[Misc]")
 {
-    try
-    {
-        Ptr<MgResourceIdentifier> mapRes1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
-        Ptr<MgMap> map1 = new MgMap(m_siteConnection);
-        map1->Create(mapRes1, L"UnitTestSheboygan1");
-
-        Ptr<MgLayerGroup> detachedGroup = new MgLayerGroup(L"Detached");
-        Ptr<MgResourceIdentifier> ldf = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
-        Ptr<MgLayer> layer = new MgLayer(ldf, m_svcResource);
-        layer->SetName(L"BelongsToDetachedGroup");
-        layer->SetLegendLabel(L"BelongsToDetachedGroup");
-        layer->SetGroup(detachedGroup);
-        Ptr<MgLayerCollection> mapLayers = map1->GetLayers();
-        mapLayers->Insert(0, layer);
-
-        CPPUNIT_ASSERT_THROW_MG(map1->Save(), MgGroupNotFoundException*);
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-}
-
-void TestMisc::TestCase_833()
-{
-    try
-    {
-        Ptr<MgResourceIdentifier> mapRes1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan_833.MapDefinition");
-        Ptr<MgMap> map1 = new MgMap(m_siteConnection);
-        map1->Create(mapRes1, L"UnitTestSheboygan1");
-
-        Ptr<MgLayerGroupCollection> groups = map1->GetLayerGroups();
-        Ptr<MgLayerCollection> layers = map1->GetLayers();
-
-        //These are the ones initially hidden from the legend
-        Ptr<MgLayerGroup> group = groups->GetItem(L"Municipal");
-        Ptr<MgLayerBase> layer = layers->GetItem(L"HydrographicPolygons");
-
-        CPPUNIT_ASSERT(!group->GetLegendLabel().empty());
-        CPPUNIT_ASSERT(!layer->GetLegendLabel().empty());
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-}
-
-void TestMisc::TestCase_1304()
-{
-    try
-    {
-        Ptr<MgResourceIdentifier> mapRes1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
-        Ptr<MgMap> map1 = new MgMap(m_siteConnection);
-        map1->Create(mapRes1, L"UnitTestSheboygan1");
-
-        Ptr<MgSelection> sel = new MgSelection(map1, L"");
-        Ptr<MgReadOnlyLayerCollection> selLayers = sel->GetLayers();
-        CPPUNIT_ASSERT_MESSAGE("Expected null MgReadOnlyLayerCollection", NULL == selLayers.p); 
-        sel->FromXml(L""); //Should be same result
-        selLayers = sel->GetLayers();
-        CPPUNIT_ASSERT_MESSAGE("Expected null MgReadOnlyLayerCollection", NULL == selLayers.p); 
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-}
-
-void TestMisc::TestCase_CreateMapWithInitialDisplayParams()
-{
-    try 
-    {
-        Ptr<MgResourceIdentifier> mapRes1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
-        Ptr<MgMap> map = new MgMap(m_siteConnection);
-        map->Create(mapRes1, L"TestCase_CreateMapWithInitialDisplayParams", 800, 600, -87.45, 43.32, 8000.0, 256);
-
-        CPPUNIT_ASSERT_MESSAGE("Expected width of 800", map->GetDisplayWidth() == 800);
-        CPPUNIT_ASSERT_MESSAGE("Expected height of 600", map->GetDisplayHeight() == 600);
-        Ptr<MgPoint> pt = map->GetViewCenter();
-        Ptr<MgCoordinate> coord = pt->GetCoordinate();
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(coord->GetX(), -87.45, 0.001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(coord->GetY(), 43.32, 0.001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(map->GetViewScale(), 8000.0, 0.0001);
-        CPPUNIT_ASSERT_MESSAGE("Expected DPI of 256", map->GetDisplayDpi() == 256);
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-}
-
-void TestMisc::TestCase_ApiVersionCheck()
-{
-    try
-    {
-        //Just making sure this macro behaves as we expect
-        CPPUNIT_ASSERT_MESSAGE("Expected 4.1.0 >= 4.0.0", MG_API_VERSION(4, 1, 0) >= MG_API_VERSION(4, 0, 0));
-        CPPUNIT_ASSERT_MESSAGE("Expected 4.0.0 >= 4.0.0", MG_API_VERSION(4, 0, 0) >= MG_API_VERSION(4, 0, 0));
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-}
-
-void TestMisc::TestCase_MapLayerCollections()
-{
-    try
-    {
-        Ptr<MgResourceIdentifier> mapRes1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
-        Ptr<MgMap> map1 = new MgMap(m_siteConnection);
-        map1->Create(mapRes1, L"UnitTestSheboygan1");
-
-        Ptr<MgLayerGroup> detachedGroup = new MgLayerGroup(L"DetachedGroup");
-        Ptr<MgResourceIdentifier> ldf = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
-        Ptr<MgLayer> detachedLayer = new MgLayer(ldf, m_svcResource);
-        detachedLayer->SetName(L"DetachedLayer");
-
-        Ptr<MgLayerCollection> mapLayers = map1->GetLayers();
-        Ptr<MgLayerGroupCollection> mapGroups = map1->GetLayerGroups();
-
-        //Remove() should be returning false when passing in layers/groups that don't belong
-        CPPUNIT_ASSERT(!mapLayers->Remove(detachedLayer));
-        CPPUNIT_ASSERT(!mapGroups->Remove(detachedGroup));
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-}
-
-void TestMisc::TestCase_DoubleToStringWithDecimals()
-{
-    try
-    {
-        double d = 1.23456789032748754;
-
-        std::string s;
-        STRING ws;
-
-        MgUtil::DoubleToString(d, ws, 4);
-        MgUtil::DoubleToString(d, s, 4);
-
-        CPPUNIT_ASSERT(L"1.2346" == ws);
-        CPPUNIT_ASSERT("1.2346" == s);
-
-        ws.clear();
-        s.clear();
-
-        MgUtil::DoubleToString(d, ws, 8);
-        MgUtil::DoubleToString(d, s, 8);
-
-        CPPUNIT_ASSERT(L"1.23456789" == ws);
-        CPPUNIT_ASSERT("1.23456789" == s);
-
-        ws.clear();
-        s.clear();
-
-        std::string s1;
-        STRING ws1;
-        //This should be the equivalent to not even passing in precision at all
-        MgUtil::DoubleToString(d, ws, -1);
-        MgUtil::DoubleToString(d, s, -1);
-        MgUtil::DoubleToString(d, ws1);
-        MgUtil::DoubleToString(d, s1);
-
-        CPPUNIT_ASSERT(ws1 == ws);
-        CPPUNIT_ASSERT(s1 == s);
-
-        double d1 = 1.1;
-
-        ws.clear();
-        s.clear();
-
-        MgUtil::DoubleToString(d1, ws, 4);
-        MgUtil::DoubleToString(d1, s, 4);
-
-        CPPUNIT_ASSERT(L"1.1" == ws);
-        CPPUNIT_ASSERT("1.1" == s);
-
-        double d2 = 123.3457483434945;
-
-        ws.clear();
-        s.clear();
-
-        MgUtil::DoubleToString(d2, ws, 8);
-        MgUtil::DoubleToString(d2, s, 8);
-
-        CPPUNIT_ASSERT(L"123.34574834" == ws);
-        CPPUNIT_ASSERT("123.34574834" == s);
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-}
-
-void TestMisc::TestCase_TryParseDouble()
-{
-    try
-    {
-        double dBad = 0.0;
-        CPPUNIT_ASSERT(!MgUtil::TryParseDouble(L"", dBad));
-        CPPUNIT_ASSERT(!MgUtil::TryParseDouble(L"abc", dBad));
-        CPPUNIT_ASSERT(!MgUtil::TryParseDouble(L"abc123", dBad));
-        CPPUNIT_ASSERT(!MgUtil::TryParseDouble(L"123.asd", dBad));
-        double d1 = 0.0;
-        CPPUNIT_ASSERT(MgUtil::TryParseDouble(L"123", d1));
-        CPPUNIT_ASSERT(123 == d1);
-        double d2 = 0.0;
-        CPPUNIT_ASSERT(MgUtil::TryParseDouble(L"123.23", d2));
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(123.23, d2, 0.001);
-        double d3 = 0.0;
-        CPPUNIT_ASSERT(MgUtil::TryParseDouble(L"0.1237483", d3));
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(0.1237483, d3, 0.00000001);
-        double d4 = 0.0;
-        CPPUNIT_ASSERT(MgUtil::TryParseDouble(L"123.", d4));
-        CPPUNIT_ASSERT(123 == d4);
-        double d5 = 0.0;
-        CPPUNIT_ASSERT(MgUtil::TryParseDouble(L".1235", d5));
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(0.1235, d5, 0.00001);
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-}
-
-void TestMisc::TestCase_BadResourceIdentifier()
-{
-    try
-    {
-        Ptr<MgResourceIdentifier> resId = new MgResourceIdentifier(L"I'm a baaaaad id");
-        CPPUNIT_FAIL("This should've thrown");
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_ASSERT(message.find(L"I'm a baaaaad id") != STRING::npos);
-    }
-    catch (...)
-    {
-        throw;
-    }
-}
-
-// data structure which is passed to each thread
-struct GetConfigValueThreadData
-{
-    INT32 threadId;
-    bool success;
-    bool done;
-    STRING section;
-    STRING key;
-};
-
-ACE_THR_FUNC_RETURN GetConfigValueWorker(void* param)
-{
-    // get the data for this thread
-    GetConfigValueThreadData* threadData = (GetConfigValueThreadData*)param;
-    INT32 threadId = threadData->threadId;
-#ifdef _DEBUG
-    printf("> thread %d started\n", threadId);
-#endif
-
-    try
-    {
-        MgConfiguration* conf = MgConfiguration::GetInstance();
-        bool b = false;
-        conf->GetBoolValue(threadData->section, threadData->key, b, false);
-
-        threadData->success = true;
-    }
-    catch (MgException* e)
-    {
-        threadData->success = false;
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        threadData->success = false;
-        throw;
-    }
-
-#ifdef _DEBUG
-    //  printf("> thread %d done\n", threadId);
-#endif
-
-    threadData->done = true;
-    return 0;
-}
-
-void TestMisc::TestCase_ThreadSafeConfiguration()
-{
-    try
-    {
-        // specify the number of threads to use
-        const INT32 numThreads = MG_TEST_THREADS;
-        GetConfigValueThreadData threadData[numThreads];
-
-        // need a thread manager
-        ACE_Thread_Manager* manager = ACE_Thread_Manager::instance();
-
-        // initialize the thread data
-        for (INT32 i = 0; i < numThreads; i++)
-        {
-            threadData[i].threadId = i;
-            threadData[i].done = true;
-            threadData[i].success = true;
-            threadData[i].section = MgConfigProperties::GeneralPropertiesSection;
-            threadData[i].key = MgConfigProperties::GeneralPropertyMaxLogFileSizeEnabled;
-        }
-
-        INT32 nRequest = 0;
-        INT32 nSuccessful = 0;
-        INT32 nFailed = 0;
-        bool bExceptionOcurred = false;
-        for (;;)
-        {
-            INT32 dc = 0;
-            for (INT32 i = 0; i < numThreads; i++)
-            {
-                // check if the thread is available
-                if (threadData[i].done)
-                {
-                    if (threadData[i].success)
-                        nSuccessful++;
-                    else
-                        nFailed++;
-
-                    // Reset for next run
-                    threadData[i].success = true;
-                    threadData[i].done = false;
-
-                    // spawn a new thread using a specific group id
-                    int thid = manager->spawn(ACE_THR_FUNC(GetConfigValueWorker), &threadData[i], 0, NULL, NULL, 0, THREAD_GROUP);
-                    nRequest++;
-                }
-            }
-
-            // move on if all threads are done
-            if ((nRequest > TESTREQUESTS) || (bExceptionOcurred))
-                break;
-
-            // under Linux we get a deadlock if we don't call this every once in a while
-            if (nRequest % 25 == 0)
-                manager->wait_grp(THREAD_GROUP);
-            else
-            {
-                // pause briefly (10ms) before checking again
-                ACE_Time_Value t(0, 10000);
-                ACE_OS::sleep(t);
-            }
-        }
-
-        // make sure all threads in the group have completed
-        manager->wait_grp(THREAD_GROUP);
-
-        for (INT32 i = 0; i < numThreads; i++)
-        {
-            if (threadData[i].success)
-                nSuccessful++;
-            else
-                nFailed++;
-        }
-
-        CPPUNIT_ASSERT(nFailed == 0);
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-}
-
-void TestMisc::TestCase_LineBuffer_Conversion()
-{
     //This isn't really a test, it's more verification and internal documentation
     //of how LineBuffers are meant to be represented for various geometry types
     try
@@ -943,10 +238,10 @@
             Ptr<MgByte> bytes = agfSink->ToBuffer();
             lb.LoadFromAgf(bytes->Bytes(), bytes->GetLength(), nullptr);
 
-            CPPUNIT_ASSERT(1 == lb.geom_count());
-            CPPUNIT_ASSERT(1 == lb.point_count());
-            CPPUNIT_ASSERT(30 == lb.x_coord(0));
-            CPPUNIT_ASSERT(10 == lb.y_coord(0));
+            REQUIRE(1 == lb.geom_count());
+            REQUIRE(1 == lb.point_count());
+            REQUIRE(30 == lb.x_coord(0));
+            REQUIRE(10 == lb.y_coord(0));
         }
 
         //MultiPoint
@@ -957,16 +252,16 @@
             Ptr<MgByte> bytes = agfSink->ToBuffer();
             lb.LoadFromAgf(bytes->Bytes(), bytes->GetLength(), nullptr);
 
-            CPPUNIT_ASSERT(4 == lb.geom_count());
-            CPPUNIT_ASSERT(4 == lb.point_count());
-            CPPUNIT_ASSERT(10 == lb.x_coord(0));
-            CPPUNIT_ASSERT(40 == lb.y_coord(0));
-            CPPUNIT_ASSERT(40 == lb.x_coord(1));
-            CPPUNIT_ASSERT(30 == lb.y_coord(1));
-            CPPUNIT_ASSERT(20 == lb.x_coord(2));
-            CPPUNIT_ASSERT(20 == lb.y_coord(2));
-            CPPUNIT_ASSERT(30 == lb.x_coord(3));
-            CPPUNIT_ASSERT(10 == lb.y_coord(3));
+            REQUIRE(4 == lb.geom_count());
+            REQUIRE(4 == lb.point_count());
+            REQUIRE(10 == lb.x_coord(0));
+            REQUIRE(40 == lb.y_coord(0));
+            REQUIRE(40 == lb.x_coord(1));
+            REQUIRE(30 == lb.y_coord(1));
+            REQUIRE(20 == lb.x_coord(2));
+            REQUIRE(20 == lb.y_coord(2));
+            REQUIRE(30 == lb.x_coord(3));
+            REQUIRE(10 == lb.y_coord(3));
         }
 
         //LineString
@@ -978,9 +273,9 @@
             lb.LoadFromAgf(bytes->Bytes(), bytes->GetLength(), nullptr);
 
             int lineIdx = 0;
-            CPPUNIT_ASSERT(1 == lb.geom_count());
-            CPPUNIT_ASSERT(1 == lb.cntr_count());
-            CPPUNIT_ASSERT(3 == lb.cntr_size(lineIdx));
+            REQUIRE(1 == lb.geom_count());
+            REQUIRE(1 == lb.cntr_count());
+            REQUIRE(3 == lb.cntr_size(lineIdx));
 
             auto ptOffset = lb.contour_start_point(lineIdx);
             for (int i = 0; i < lb.cntr_size(lineIdx); i++)
@@ -990,16 +285,16 @@
                 switch (i)
                 {
                 case 0:
-                    CPPUNIT_ASSERT(30 == x);
-                    CPPUNIT_ASSERT(10 == y);
+                    REQUIRE(30 == x);
+                    REQUIRE(10 == y);
                     break;
                 case 1:
-                    CPPUNIT_ASSERT(10 == x);
-                    CPPUNIT_ASSERT(30 == y);
+                    REQUIRE(10 == x);
+                    REQUIRE(30 == y);
                     break;
                 case 2:
-                    CPPUNIT_ASSERT(40 == x);
-                    CPPUNIT_ASSERT(40 == y);
+                    REQUIRE(40 == x);
+                    REQUIRE(40 == y);
                     break;
                 }
             }
@@ -1013,12 +308,12 @@
             Ptr<MgByte> bytes = agfSink->ToBuffer();
             lb.LoadFromAgf(bytes->Bytes(), bytes->GetLength(), nullptr);
 
-            CPPUNIT_ASSERT(2 == lb.geom_count());
-            CPPUNIT_ASSERT(1 == lb.geom_size(0));
-            CPPUNIT_ASSERT(1 == lb.geom_size(1));
-            CPPUNIT_ASSERT(2 == lb.cntr_count());
-            CPPUNIT_ASSERT(3 == lb.cntr_size(0));
-            CPPUNIT_ASSERT(4 == lb.cntr_size(1));
+            REQUIRE(2 == lb.geom_count());
+            REQUIRE(1 == lb.geom_size(0));
+            REQUIRE(1 == lb.geom_size(1));
+            REQUIRE(2 == lb.cntr_count());
+            REQUIRE(3 == lb.cntr_size(0));
+            REQUIRE(4 == lb.cntr_size(1));
 
             //LineString 1
             {
@@ -1030,16 +325,16 @@
                     switch (i)
                     {
                     case 0:
-                        CPPUNIT_ASSERT(10 == x);
-                        CPPUNIT_ASSERT(10 == y);
+                        REQUIRE(10 == x);
+                        REQUIRE(10 == y);
                         break;
                     case 1:
-                        CPPUNIT_ASSERT(20 == x);
-                        CPPUNIT_ASSERT(20 == y);
+                        REQUIRE(20 == x);
+                        REQUIRE(20 == y);
                         break;
                     case 2:
-                        CPPUNIT_ASSERT(10 == x);
-                        CPPUNIT_ASSERT(40 == y);
+                        REQUIRE(10 == x);
+                        REQUIRE(40 == y);
                         break;
                     }
                 }
@@ -1055,20 +350,20 @@
                     switch (i)
                     {
                     case 0:
-                        CPPUNIT_ASSERT(40 == x);
-                        CPPUNIT_ASSERT(40 == y);
+                        REQUIRE(40 == x);
+                        REQUIRE(40 == y);
                         break;
                     case 1:
-                        CPPUNIT_ASSERT(30 == x);
-                        CPPUNIT_ASSERT(30 == y);
+                        REQUIRE(30 == x);
+                        REQUIRE(30 == y);
                         break;
                     case 2:
-                        CPPUNIT_ASSERT(40 == x);
-                        CPPUNIT_ASSERT(20 == y);
+                        REQUIRE(40 == x);
+                        REQUIRE(20 == y);
                         break;
                     case 3:
-                        CPPUNIT_ASSERT(30 == x);
-                        CPPUNIT_ASSERT(10 == y);
+                        REQUIRE(30 == x);
+                        REQUIRE(10 == y);
                         break;
                     }
                 }
@@ -1083,13 +378,13 @@
             Ptr<MgByte> bytes = agfSink->ToBuffer();
             lb.LoadFromAgf(bytes->Bytes(), bytes->GetLength(), nullptr);
 
-            CPPUNIT_ASSERT(1 == lb.geom_count());
-            CPPUNIT_ASSERT(1 == lb.geom_size(0));
+            REQUIRE(1 == lb.geom_count());
+            REQUIRE(1 == lb.geom_size(0));
             auto cc = lb.cntr_count();
-            CPPUNIT_ASSERT(1 == cc);
+            REQUIRE(1 == cc);
 
             int lineIdx = 0;
-            CPPUNIT_ASSERT(5 == lb.cntr_size(lineIdx));
+            REQUIRE(5 == lb.cntr_size(lineIdx));
 
             auto ptOffset = lb.contour_start_point(lineIdx);
             for (int i = 0; i < lb.cntr_size(lineIdx); i++)
@@ -1099,24 +394,24 @@
                 switch (i)
                 {
                 case 0:
-                    CPPUNIT_ASSERT(30 == x);
-                    CPPUNIT_ASSERT(10 == y);
+                    REQUIRE(30 == x);
+                    REQUIRE(10 == y);
                     break;
                 case 1:
-                    CPPUNIT_ASSERT(40 == x);
-                    CPPUNIT_ASSERT(40 == y);
+                    REQUIRE(40 == x);
+                    REQUIRE(40 == y);
                     break;
                 case 2:
-                    CPPUNIT_ASSERT(20 == x);
-                    CPPUNIT_ASSERT(40 == y);
+                    REQUIRE(20 == x);
+                    REQUIRE(40 == y);
                     break;
                 case 3:
-                    CPPUNIT_ASSERT(10 == x);
-                    CPPUNIT_ASSERT(20 == y);
+                    REQUIRE(10 == x);
+                    REQUIRE(20 == y);
                     break;
                 case 4:
-                    CPPUNIT_ASSERT(30 == x);
-                    CPPUNIT_ASSERT(10 == y);
+                    REQUIRE(30 == x);
+                    REQUIRE(10 == y);
                     break;
                 }
             }
@@ -1130,14 +425,14 @@
             Ptr<MgByte> bytes = agfSink->ToBuffer();
             lb.LoadFromAgf(bytes->Bytes(), bytes->GetLength(), nullptr);
 
-            CPPUNIT_ASSERT(1 == lb.geom_count());
-            CPPUNIT_ASSERT(2 == lb.geom_size(0));
+            REQUIRE(1 == lb.geom_count());
+            REQUIRE(2 == lb.geom_size(0));
             auto cc = lb.cntr_count();
-            CPPUNIT_ASSERT(2 == cc);
+            REQUIRE(2 == cc);
 
             //Outer Ring
             {
-                CPPUNIT_ASSERT(5 == lb.cntr_size(0));
+                REQUIRE(5 == lb.cntr_size(0));
                 auto ptOffset = lb.contour_start_point(0);
                 for (int i = 0; i < lb.cntr_size(0); i++)
                 {
@@ -1146,24 +441,24 @@
                     switch (i)
                     {
                     case 0:
-                        CPPUNIT_ASSERT(35 == x);
-                        CPPUNIT_ASSERT(10 == y);
+                        REQUIRE(35 == x);
+                        REQUIRE(10 == y);
                         break;
                     case 1:
-                        CPPUNIT_ASSERT(45 == x);
-                        CPPUNIT_ASSERT(45 == y);
+                        REQUIRE(45 == x);
+                        REQUIRE(45 == y);
                         break;
                     case 2:
-                        CPPUNIT_ASSERT(15 == x);
-                        CPPUNIT_ASSERT(40 == y);
+                        REQUIRE(15 == x);
+                        REQUIRE(40 == y);
                         break;
                     case 3:
-                        CPPUNIT_ASSERT(10 == x);
-                        CPPUNIT_ASSERT(20 == y);
+                        REQUIRE(10 == x);
+                        REQUIRE(20 == y);
                         break;
                     case 4:
-                        CPPUNIT_ASSERT(35 == x);
-                        CPPUNIT_ASSERT(10 == y);
+                        REQUIRE(35 == x);
+                        REQUIRE(10 == y);
                         break;
                     }
                 }
@@ -1171,7 +466,7 @@
 
             //Inner Ring
             {
-                CPPUNIT_ASSERT(4 == lb.cntr_size(1));
+                REQUIRE(4 == lb.cntr_size(1));
                 auto ptOffset = lb.contour_start_point(1);
                 for (int i = 0; i < lb.cntr_size(1); i++)
                 {
@@ -1180,20 +475,20 @@
                     switch (i)
                     {
                     case 0:
-                        CPPUNIT_ASSERT(20 == x);
-                        CPPUNIT_ASSERT(30 == y);
+                        REQUIRE(20 == x);
+                        REQUIRE(30 == y);
                         break;
                     case 1:
-                        CPPUNIT_ASSERT(35 == x);
-                        CPPUNIT_ASSERT(35 == y);
+                        REQUIRE(35 == x);
+                        REQUIRE(35 == y);
                         break;
                     case 2:
-                        CPPUNIT_ASSERT(30 == x);
-                        CPPUNIT_ASSERT(20 == y);
+                        REQUIRE(30 == x);
+                        REQUIRE(20 == y);
                         break;
                     case 3:
-                        CPPUNIT_ASSERT(20 == x);
-                        CPPUNIT_ASSERT(30 == y);
+                        REQUIRE(20 == x);
+                        REQUIRE(30 == y);
                         break;
                     }
                 }
@@ -1208,17 +503,17 @@
             Ptr<MgByte> bytes = agfSink->ToBuffer();
             lb.LoadFromAgf(bytes->Bytes(), bytes->GetLength(), nullptr);
 
-            CPPUNIT_ASSERT(2 == lb.geom_count());
-            CPPUNIT_ASSERT(1 == lb.geom_size(0));
-            CPPUNIT_ASSERT(1 == lb.geom_size(1));
+            REQUIRE(2 == lb.geom_count());
+            REQUIRE(1 == lb.geom_size(0));
+            REQUIRE(1 == lb.geom_size(1));
             auto cc = lb.cntr_count();
-            CPPUNIT_ASSERT(2 == cc);
+            REQUIRE(2 == cc);
             auto closed1 = lb.contour_closed(0);
             auto closed2 = lb.contour_closed(1);
 
             //Polygon 1
             {
-                CPPUNIT_ASSERT(4 == lb.cntr_size(0));
+                REQUIRE(4 == lb.cntr_size(0));
                 auto ptOffset = lb.contour_start_point(0);
                 for (int i = 0; i < lb.cntr_size(0); i++)
                 {
@@ -1227,20 +522,20 @@
                     switch (i)
                     {
                     case 0:
-                        CPPUNIT_ASSERT(30 == x);
-                        CPPUNIT_ASSERT(20 == y);
+                        REQUIRE(30 == x);
+                        REQUIRE(20 == y);
                         break;
                     case 1:
-                        CPPUNIT_ASSERT(45 == x);
-                        CPPUNIT_ASSERT(40 == y);
+                        REQUIRE(45 == x);
+                        REQUIRE(40 == y);
                         break;
                     case 2:
-                        CPPUNIT_ASSERT(10 == x);
-                        CPPUNIT_ASSERT(40 == y);
+                        REQUIRE(10 == x);
+                        REQUIRE(40 == y);
                         break;
                     case 3:
-                        CPPUNIT_ASSERT(30 == x);
-                        CPPUNIT_ASSERT(20 == y);
+                        REQUIRE(30 == x);
+                        REQUIRE(20 == y);
                         break;
                     }
                 }
@@ -1248,7 +543,7 @@
 
             //Polygon 2
             {
-                CPPUNIT_ASSERT(5 == lb.cntr_size(1));
+                REQUIRE(5 == lb.cntr_size(1));
                 auto ptOffset = lb.contour_start_point(1);
                 for (int i = 0; i < lb.cntr_size(1); i++)
                 {
@@ -1257,24 +552,24 @@
                     switch (i)
                     {
                     case 0:
-                        CPPUNIT_ASSERT(15 == x);
-                        CPPUNIT_ASSERT(5 == y);
+                        REQUIRE(15 == x);
+                        REQUIRE(5 == y);
                         break;
                     case 1:
-                        CPPUNIT_ASSERT(40 == x);
-                        CPPUNIT_ASSERT(10 == y);
+                        REQUIRE(40 == x);
+                        REQUIRE(10 == y);
                         break;
                     case 2:
-                        CPPUNIT_ASSERT(10 == x);
-                        CPPUNIT_ASSERT(20 == y);
+                        REQUIRE(10 == x);
+                        REQUIRE(20 == y);
                         break;
                     case 3:
-                        CPPUNIT_ASSERT(5 == x);
-                        CPPUNIT_ASSERT(10 == y);
+                        REQUIRE(5 == x);
+                        REQUIRE(10 == y);
                         break;
                     case 4:
-                        CPPUNIT_ASSERT(15 == x);
-                        CPPUNIT_ASSERT(5 == y);
+                        REQUIRE(15 == x);
+                        REQUIRE(5 == y);
                         break;
                     }
                 }
@@ -1283,13 +578,13 @@
             RS_BufferOutputStream ros(bytes->GetLength());
             lb.ToAgf(&ros);
 
-            Ptr<MgByte> obs = new MgByte(ros.data(), ros.length());
+            Ptr<MgByte> obs = new MgByte(ros.data(), (INT32)ros.length());
             Ptr<MgByteSource> bs = new MgByteSource(obs);
             Ptr<MgByteReader> oagf = bs->GetReader();
 
             Ptr<MgGeometry> g2 = agfRw.Read(oagf);
             STRING owkt = wktRw.Write(g2);
-            CPPUNIT_ASSERT(owkt == mpWkt1);
+            REQUIRE(owkt == mpWkt1);
         }
 
         //MultiPolygon 2
@@ -1300,11 +595,11 @@
             Ptr<MgByte> bytes = agfSink->ToBuffer();
             lb.LoadFromAgf(bytes->Bytes(), bytes->GetLength(), nullptr);
 
-            CPPUNIT_ASSERT(2 == lb.geom_count());
-            CPPUNIT_ASSERT(1 == lb.geom_size(0));
-            CPPUNIT_ASSERT(2 == lb.geom_size(1));
+            REQUIRE(2 == lb.geom_count());
+            REQUIRE(1 == lb.geom_size(0));
+            REQUIRE(2 == lb.geom_size(1));
             auto cc = lb.cntr_count();
-            CPPUNIT_ASSERT(3 == cc);
+            REQUIRE(3 == cc);
             auto closed1 = lb.contour_closed(0);
             auto closed2 = lb.contour_closed(1);
             auto closed3 = lb.contour_closed(2);
@@ -1311,7 +606,7 @@
 
             //Polygon 1
             {
-                CPPUNIT_ASSERT(4 == lb.cntr_size(0));
+                REQUIRE(4 == lb.cntr_size(0));
                 auto ptOffset = lb.contour_start_point(0);
                 for (int i = 0; i < lb.cntr_size(0); i++)
                 {
@@ -1320,20 +615,20 @@
                     switch (i)
                     {
                     case 0:
-                        CPPUNIT_ASSERT(40 == x);
-                        CPPUNIT_ASSERT(40 == y);
+                        REQUIRE(40 == x);
+                        REQUIRE(40 == y);
                         break;
                     case 1:
-                        CPPUNIT_ASSERT(20 == x);
-                        CPPUNIT_ASSERT(45 == y);
+                        REQUIRE(20 == x);
+                        REQUIRE(45 == y);
                         break;
                     case 2:
-                        CPPUNIT_ASSERT(45 == x);
-                        CPPUNIT_ASSERT(30 == y);
+                        REQUIRE(45 == x);
+                        REQUIRE(30 == y);
                         break;
                     case 3:
-                        CPPUNIT_ASSERT(40 == x);
-                        CPPUNIT_ASSERT(40 == y);
+                        REQUIRE(40 == x);
+                        REQUIRE(40 == y);
                         break;
                     }
                 }
@@ -1341,7 +636,7 @@
 
             //Polygon 2 (inner ring)
             {
-                CPPUNIT_ASSERT(6 == lb.cntr_size(1));
+                REQUIRE(6 == lb.cntr_size(1));
                 auto ptOffset = lb.contour_start_point(1);
                 for (int i = 0; i < lb.cntr_size(1); i++)
                 {
@@ -1350,28 +645,28 @@
                     switch (i)
                     {
                     case 0:
-                        CPPUNIT_ASSERT(20 == x);
-                        CPPUNIT_ASSERT(35 == y);
+                        REQUIRE(20 == x);
+                        REQUIRE(35 == y);
                         break;
                     case 1:
-                        CPPUNIT_ASSERT(10 == x);
-                        CPPUNIT_ASSERT(30 == y);
+                        REQUIRE(10 == x);
+                        REQUIRE(30 == y);
                         break;
                     case 2:
-                        CPPUNIT_ASSERT(10 == x);
-                        CPPUNIT_ASSERT(10 == y);
+                        REQUIRE(10 == x);
+                        REQUIRE(10 == y);
                         break;
                     case 3:
-                        CPPUNIT_ASSERT(30 == x);
-                        CPPUNIT_ASSERT(5 == y);
+                        REQUIRE(30 == x);
+                        REQUIRE(5 == y);
                         break;
                     case 4:
-                        CPPUNIT_ASSERT(45 == x);
-                        CPPUNIT_ASSERT(20 == y);
+                        REQUIRE(45 == x);
+                        REQUIRE(20 == y);
                         break;
                     case 5:
-                        CPPUNIT_ASSERT(20 == x);
-                        CPPUNIT_ASSERT(35 == y);
+                        REQUIRE(20 == x);
+                        REQUIRE(35 == y);
                         break;
                     }
                 }
@@ -1379,7 +674,7 @@
 
             //Polygon 2 (outer ring)
             {
-                CPPUNIT_ASSERT(4 == lb.cntr_size(2));
+                REQUIRE(4 == lb.cntr_size(2));
                 auto ptOffset = lb.contour_start_point(2);
                 for (int i = 0; i < lb.cntr_size(2); i++)
                 {
@@ -1388,20 +683,20 @@
                     switch (i)
                     {
                     case 0:
-                        CPPUNIT_ASSERT(30 == x);
-                        CPPUNIT_ASSERT(20 == y);
+                        REQUIRE(30 == x);
+                        REQUIRE(20 == y);
                         break;
                     case 1:
-                        CPPUNIT_ASSERT(20 == x);
-                        CPPUNIT_ASSERT(15 == y);
+                        REQUIRE(20 == x);
+                        REQUIRE(15 == y);
                         break;
                     case 2:
-                        CPPUNIT_ASSERT(20 == x);
-                        CPPUNIT_ASSERT(25 == y);
+                        REQUIRE(20 == x);
+                        REQUIRE(25 == y);
                         break;
                     case 3:
-                        CPPUNIT_ASSERT(30 == x);
-                        CPPUNIT_ASSERT(20 == y);
+                        REQUIRE(30 == x);
+                        REQUIRE(20 == y);
                         break;
                     }
                 }
@@ -1410,23 +705,496 @@
             RS_BufferOutputStream ros(bytes->GetLength());
             lb.ToAgf(&ros);
             
-            Ptr<MgByte> obs = new MgByte(ros.data(), ros.length());
+            Ptr<MgByte> obs = new MgByte(ros.data(), (INT32)ros.length());
             Ptr<MgByteSource> bs = new MgByteSource(obs);
             Ptr<MgByteReader> oagf = bs->GetReader();
 
             Ptr<MgGeometry> g2 = agfRw.Read(oagf);
             STRING owkt = wktRw.Write(g2);
-            CPPUNIT_ASSERT(owkt == mpWkt2);
+            REQUIRE(owkt == mpWkt2);
         }
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
         throw;
     }
+}
+
+TEST_CASE("MgUtil_TryParseDouble", "[Misc]")
+{
+    try
+    {
+        double dBad = 0.0;
+        REQUIRE(!MgUtil::TryParseDouble(L"", dBad));
+        REQUIRE(!MgUtil::TryParseDouble(L"abc", dBad));
+        REQUIRE(!MgUtil::TryParseDouble(L"abc123", dBad));
+        REQUIRE(!MgUtil::TryParseDouble(L"123.asd", dBad));
+        double d1 = 0.0;
+        REQUIRE(MgUtil::TryParseDouble(L"123", d1));
+        REQUIRE(123 == d1);
+        double d2 = 0.0;
+        REQUIRE(MgUtil::TryParseDouble(L"123.23", d2));
+        REQUIRE(d2 == Approx(123.23));
+        double d3 = 0.0;
+        REQUIRE(MgUtil::TryParseDouble(L"0.1237483", d3));
+        REQUIRE(d3 == Approx(0.1237483));
+        double d4 = 0.0;
+        REQUIRE(MgUtil::TryParseDouble(L"123.", d4));
+        REQUIRE(123 == d4);
+        double d5 = 0.0;
+        REQUIRE(MgUtil::TryParseDouble(L".1235", d5));
+        REQUIRE(d5 == Approx(0.1235));
+    }
+    catch (MgException* e)
+    {
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+        SAFE_RELEASE(e);
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+    }
+    catch (...)
+    {
+        throw;
+    }
+}
+
+TEST_CASE("BadResourceIdentifier", "[Misc]")
+{
+    try
+    {
+        Ptr<MgResourceIdentifier> resId = new MgResourceIdentifier(L"I'm a baaaaad id");
+        FAIL("This should've thrown");
+    }
+    catch (MgException* e)
+    {
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+        SAFE_RELEASE(e);
+        REQUIRE(message.find(L"I'm a baaaaad id") != STRING::npos);
+    }
+    catch (...)
+    {
+        throw;
+    }
+}
+
+TEST_CASE("DoubleToStringWithDecimals", "[Misc]")
+{
+    try
+    {
+        double d = 1.23456789032748754;
+
+        std::string s;
+        STRING ws;
+
+        MgUtil::DoubleToString(d, ws, 4);
+        MgUtil::DoubleToString(d, s, 4);
+
+        REQUIRE(L"1.2346" == ws);
+        REQUIRE("1.2346" == s);
+
+        ws.clear();
+        s.clear();
+
+        MgUtil::DoubleToString(d, ws, 8);
+        MgUtil::DoubleToString(d, s, 8);
+
+        REQUIRE(L"1.23456789" == ws);
+        REQUIRE("1.23456789" == s);
+
+        ws.clear();
+        s.clear();
+
+        std::string s1;
+        STRING ws1;
+        //This should be the equivalent to not even passing in precision at all
+        MgUtil::DoubleToString(d, ws, -1);
+        MgUtil::DoubleToString(d, s, -1);
+        MgUtil::DoubleToString(d, ws1);
+        MgUtil::DoubleToString(d, s1);
+
+        REQUIRE(ws1 == ws);
+        REQUIRE(s1 == s);
+
+        double d1 = 1.1;
+
+        ws.clear();
+        s.clear();
+
+        MgUtil::DoubleToString(d1, ws, 4);
+        MgUtil::DoubleToString(d1, s, 4);
+
+        REQUIRE(L"1.1" == ws);
+        REQUIRE("1.1" == s);
+
+        double d2 = 123.3457483434945;
+
+        ws.clear();
+        s.clear();
+
+        MgUtil::DoubleToString(d2, ws, 8);
+        MgUtil::DoubleToString(d2, s, 8);
+
+        REQUIRE(L"123.34574834" == ws);
+        REQUIRE("123.34574834" == s);
+    }
+    catch (MgException* e)
+    {
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+        SAFE_RELEASE(e);
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+    }
+    catch (...)
+    {
+        throw;
+    }
+}
+
+TEST_CASE("ApiVersionCheck", "[Misc]")
+{
+    try
+    {
+        //Just making sure this macro behaves as we expect
+        REQUIRE(MG_API_VERSION(4, 1, 0) >= MG_API_VERSION(4, 0, 0));
+        REQUIRE(MG_API_VERSION(4, 0, 0) >= MG_API_VERSION(4, 0, 0));
+    }
+    catch (MgException* e)
+    {
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+        SAFE_RELEASE(e);
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+    }
+    catch (...)
+    {
+        throw;
+    }
+}
+
+TEST_CASE("TracTicket611", "[Misc]")
+{
+    try
+    {
+        Ptr<MgResourceService> m_svcResource = TestServiceFactory::CreateResourceService();
+        // Initialize a site connection.
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
+
+        // ========================== Begin Test ======================== //
+
+        Ptr<MgResourceIdentifier> mapRes1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+        Ptr<MgMap> map1 = new MgMap(m_siteConnection);
+        map1->Create(mapRes1, L"UnitTestSheboygan1");
+
+        Ptr<MgLayerGroup> detachedGroup = new MgLayerGroup(L"Detached");
+        Ptr<MgResourceIdentifier> ldf = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
+        Ptr<MgLayer> layer = new MgLayer(ldf, m_svcResource);
+        layer->SetName(L"BelongsToDetachedGroup");
+        layer->SetLegendLabel(L"BelongsToDetachedGroup");
+        layer->SetGroup(detachedGroup);
+        Ptr<MgLayerCollection> mapLayers = map1->GetLayers();
+        mapLayers->Insert(0, layer);
+
+        try
+        {
+            map1->Save();
+            FAIL("Expected MgGroupNotFoundException to be thrown");
+        }
+        catch (MgGroupNotFoundException* gnex)
+        {
+            SAFE_RELEASE(gnex);
+        }
+    }
+    catch (MgException* e)
+    {
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+        SAFE_RELEASE(e);
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+    }
+    catch (...)
+    {
+        throw;
+    }
+}
+
+TEST_CASE("TracTicket833", "[Misc]")
+{
+    try
+    {
+        // Initialize a site connection.
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
+
+        // ========================== Begin Test ======================== //
+
+        Ptr<MgResourceIdentifier> mapRes1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan_833.MapDefinition");
+        Ptr<MgMap> map1 = new MgMap(m_siteConnection);
+        map1->Create(mapRes1, L"UnitTestSheboygan1");
+
+        Ptr<MgLayerGroupCollection> groups = map1->GetLayerGroups();
+        Ptr<MgLayerCollection> layers = map1->GetLayers();
+
+        //These are the ones initially hidden from the legend
+        Ptr<MgLayerGroup> group = groups->GetItem(L"Municipal");
+        Ptr<MgLayerBase> layer = layers->GetItem(L"HydrographicPolygons");
+
+        REQUIRE(!group->GetLegendLabel().empty());
+        REQUIRE(!layer->GetLegendLabel().empty());
+    }
+    catch (MgException* e)
+    {
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+        SAFE_RELEASE(e);
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+    }
+    catch (...)
+    {
+        throw;
+    }
+}
+
+TEST_CASE("TracTicket1304", "[Misc]")
+{
+    try
+    {
+        // Initialize a site connection.
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
+
+        // ========================== Begin Test ======================== //
+
+        Ptr<MgResourceIdentifier> mapRes1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+        Ptr<MgMap> map1 = new MgMap(m_siteConnection);
+        map1->Create(mapRes1, L"UnitTestSheboygan1");
+
+        Ptr<MgSelection> sel = new MgSelection(map1, L"");
+        Ptr<MgReadOnlyLayerCollection> selLayers = sel->GetLayers();
+        REQUIRE(nullptr == selLayers.p);
+        sel->FromXml(L""); //Should be same result
+        selLayers = sel->GetLayers();
+        REQUIRE(nullptr == selLayers.p);
+    }
+    catch (MgException* e)
+    {
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+        SAFE_RELEASE(e);
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+    }
+    catch (...)
+    {
+        throw;
+    }
+}
+
+TEST_CASE("CreateMapWithInitialDisplayParams", "[Misc]")
+{
+    try 
+    {
+        // Initialize a site connection.
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
+
+        // ========================== Begin Test ======================== //
+
+        Ptr<MgResourceIdentifier> mapRes1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+        Ptr<MgMap> map = new MgMap(m_siteConnection);
+        map->Create(mapRes1, L"TestCase_CreateMapWithInitialDisplayParams", 800, 600, -87.45, 43.32, 8000.0, 256);
+
+        REQUIRE(map->GetDisplayWidth() == 800);
+        REQUIRE(map->GetDisplayHeight() == 600);
+        Ptr<MgPoint> pt = map->GetViewCenter();
+        Ptr<MgCoordinate> coord = pt->GetCoordinate();
+        REQUIRE(coord->GetX() == Approx(-87.45));
+        REQUIRE(coord->GetY() == Approx(43.32));
+        REQUIRE(map->GetViewScale() == Approx(8000.0));
+        REQUIRE(map->GetDisplayDpi() == 256);
+    }
+    catch (MgException* e)
+    {
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+        SAFE_RELEASE(e);
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+    }
+    catch (...)
+    {
+        throw;
+    }
+}
+
+TEST_CASE("MapLayerCollection", "[Misc]")
+{
+    try
+    {
+        Ptr<MgResourceService> m_svcResource = TestServiceFactory::CreateResourceService();
+        // Initialize a site connection.
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
+
+        // ========================== Begin Test ======================== //
+
+        Ptr<MgResourceIdentifier> mapRes1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+        Ptr<MgMap> map1 = new MgMap(m_siteConnection);
+        map1->Create(mapRes1, L"UnitTestSheboygan1");
+
+        Ptr<MgLayerGroup> detachedGroup = new MgLayerGroup(L"DetachedGroup");
+        Ptr<MgResourceIdentifier> ldf = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
+        Ptr<MgLayer> detachedLayer = new MgLayer(ldf, m_svcResource);
+        detachedLayer->SetName(L"DetachedLayer");
+
+        Ptr<MgLayerCollection> mapLayers = map1->GetLayers();
+        Ptr<MgLayerGroupCollection> mapGroups = map1->GetLayerGroups();
+
+        //Remove() should be returning false when passing in layers/groups that don't belong
+        REQUIRE(!mapLayers->Remove(detachedLayer));
+        REQUIRE(!mapGroups->Remove(detachedGroup));
+    }
+    catch (MgException* e)
+    {
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+        SAFE_RELEASE(e);
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+    }
+    catch (...)
+    {
+        throw;
+    }
+}
+
+// data structure which is passed to each thread
+struct GetConfigValueThreadData
+{
+    INT32 threadId;
+    bool success;
+    bool done;
+    STRING section;
+    STRING key;
+};
+
+ACE_THR_FUNC_RETURN GetConfigValueWorker(void* param)
+{
+    // get the data for this thread
+    GetConfigValueThreadData* threadData = (GetConfigValueThreadData*)param;
+    INT32 threadId = threadData->threadId;
+#ifdef _DEBUG
+    printf("> thread %d started\n", threadId);
+#endif
+
+    try
+    {
+        MgConfiguration* conf = MgConfiguration::GetInstance();
+        bool b = false;
+        conf->GetBoolValue(threadData->section, threadData->key, b, false);
+
+        threadData->success = true;
+    }
+    catch (MgException* e)
+    {
+        threadData->success = false;
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+        SAFE_RELEASE(e);
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+    }
+    catch (...)
+    {
+        threadData->success = false;
+        throw;
+    }
+
+#ifdef _DEBUG
+    //  printf("> thread %d done\n", threadId);
+#endif
+
+    threadData->done = true;
+    return 0;
+}
+
+TEST_CASE("ThreadSafeConfiguration", "[Misc]")
+{
+    try
+    {
+        // specify the number of threads to use
+        const INT32 numThreads = MG_TEST_THREADS;
+        GetConfigValueThreadData threadData[numThreads];
+
+        // need a thread manager
+        ACE_Thread_Manager* manager = ACE_Thread_Manager::instance();
+
+        // initialize the thread data
+        for (INT32 i = 0; i < numThreads; i++)
+        {
+            threadData[i].threadId = i;
+            threadData[i].done = true;
+            threadData[i].success = true;
+            threadData[i].section = MgConfigProperties::GeneralPropertiesSection;
+            threadData[i].key = MgConfigProperties::GeneralPropertyMaxLogFileSizeEnabled;
+        }
+
+        INT32 nRequest = 0;
+        INT32 nSuccessful = 0;
+        INT32 nFailed = 0;
+        bool bExceptionOcurred = false;
+        for (;;)
+        {
+            INT32 dc = 0;
+            for (INT32 i = 0; i < numThreads; i++)
+            {
+                // check if the thread is available
+                if (threadData[i].done)
+                {
+                    if (threadData[i].success)
+                        nSuccessful++;
+                    else
+                        nFailed++;
+
+                    // Reset for next run
+                    threadData[i].success = true;
+                    threadData[i].done = false;
+
+                    // spawn a new thread using a specific group id
+                    int thid = manager->spawn(ACE_THR_FUNC(GetConfigValueWorker), &threadData[i], 0, nullptr, nullptr, 0, THREAD_GROUP);
+                    nRequest++;
+                }
+            }
+
+            // move on if all threads are done
+            if ((nRequest > TESTREQUESTS) || (bExceptionOcurred))
+                break;
+
+            // under Linux we get a deadlock if we don't call this every once in a while
+            if (nRequest % 25 == 0)
+                manager->wait_grp(THREAD_GROUP);
+            else
+            {
+                // pause briefly (10ms) before checking again
+                ACE_Time_Value t(0, 10000);
+                ACE_OS::sleep(t);
+            }
+        }
+
+        // make sure all threads in the group have completed
+        manager->wait_grp(THREAD_GROUP);
+
+        for (INT32 i = 0; i < numThreads; i++)
+        {
+            if (threadData[i].success)
+                nSuccessful++;
+            else
+                nFailed++;
+        }
+
+        REQUIRE(nFailed == 0);
+    }
+    catch (MgException* e)
+    {
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+        SAFE_RELEASE(e);
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+    }
+    catch (...)
+    {
+        throw;
+    }
 }
\ No newline at end of file

Deleted: trunk/MgDev/Server/src/UnitTesting/TestMisc.h
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestMisc.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestMisc.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,70 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _TESTTILESERVICE_H
-#define _TESTTILESERVICE_H
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestMisc : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestMisc);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_CommonExceptionMessages);
-    CPPUNIT_TEST(TestCase_611);
-    CPPUNIT_TEST(TestCase_833);
-    CPPUNIT_TEST(TestCase_1304);
-    CPPUNIT_TEST(TestCase_MapLayerCollections);
-    CPPUNIT_TEST(TestCase_ApiVersionCheck);
-    CPPUNIT_TEST(TestCase_DoubleToStringWithDecimals);
-    CPPUNIT_TEST(TestCase_TryParseDouble);
-    CPPUNIT_TEST(TestCase_BadResourceIdentifier);
-    CPPUNIT_TEST(TestCase_ThreadSafeConfiguration);
-    CPPUNIT_TEST(TestCase_LineBuffer_Conversion);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    TestMisc();
-    ~TestMisc();
-
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    void TestCase_CommonExceptionMessages();
-    void TestCase_611();
-    void TestCase_833();
-    void TestCase_1304();
-    void TestCase_MapLayerCollections();
-    void TestCase_CreateMapWithInitialDisplayParams();
-    void TestCase_ApiVersionCheck();
-    void TestCase_DoubleToStringWithDecimals();
-    void TestCase_TryParseDouble();
-    void TestCase_BadResourceIdentifier();
-    void TestCase_ThreadSafeConfiguration();
-    void TestCase_LineBuffer_Conversion();
-
-private:
-    Ptr<MgSiteConnection> m_siteConnection;
-    Ptr<MgResourceService> m_svcResource;
-};
-
-#endif

Modified: trunk/MgDev/Server/src/UnitTesting/TestPerformance.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestPerformance.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestPerformance.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -16,8 +16,6 @@
 //
 
 #include "MapGuideCommon.h"
-#include "TestPerformance.h"
-#include "CppUnitExtensions.h"
 #include "ServiceManager.h"
 #include "FdoConnectionManager.h"
 #include "Services/FeatureService.h"
@@ -24,161 +22,36 @@
 #include "ServerFeatureService.h"
 #include "Fdo.h"
 #include "FoundationDefs.h"
+
+#include "TestServiceFactory.h"
+#include "catch.hpp"
+
 // **************************************** PLEASE READ ****************************************
 // Note: The resources used here require that the following packages are installed:
 //       1) PerformanceTest.mgp
 //       2) JoinTest.mgp
 
-const STRING TEST_LOCALE = L"en";
 
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestPerformance, "TestPerformance");
-
-
-void TestPerformance::setUp()
-{
-}
-
-
-void TestPerformance::tearDown()
-{
-}
-
-
-void TestPerformance::TestStart()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Performance tests.\n")));
-
-    try
-    {
-        #ifdef _DEBUG
-        MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
-        if(pFdoConnectionManager)
-        {
-            pFdoConnectionManager->ShowCache();
-        }
-        #endif
-
-        MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
-        {
-            throw new MgNullReferenceException(L"TestPerformance.TestStart", __LINE__, __WFILE__, NULL, L"", NULL);
-        }
-
-        Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
-        {
-            throw new MgServiceNotAvailableException(L"TestPerformance.TestStart", __LINE__, __WFILE__, NULL, L"", NULL);
-        }
-
-        //Set the user information for the current thread to be administrator
-        MgUserInformation::SetCurrentUserInfo(NULL);
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        if (userInfo != NULL)
-        {
-            userInfo->SetLocale(TEST_LOCALE);
-            MgUserInformation::SetCurrentUserInfo(userInfo);
-
-            MgResourceIdentifier resourceIdentifier1(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
-
-#ifdef _WIN32
-            STRING resourceContentFileName1 = L"..\\UnitTestFiles\\Sheboygan_Parcels.FeatureSource";
-            STRING dataFileName1 = L"..\\UnitTestFiles\\Sheboygan_Parcels.sdf";
-#else
-            STRING resourceContentFileName1 = L"../UnitTestFiles/Sheboygan_Parcels.FeatureSource";
-            STRING dataFileName1 = L"../UnitTestFiles/Sheboygan_Parcels.sdf";
-#endif
-
-            //Add a new resource
-            Ptr<MgByteSource> contentSource1 = new MgByteSource(resourceContentFileName1);
-            Ptr<MgByteReader> contentReader1 = contentSource1->GetReader();
-            pService->SetResource(&resourceIdentifier1, contentReader1, NULL);
-
-            //Set the resource data
-            Ptr<MgByteSource> dataSource1 = new MgByteSource(dataFileName1);
-            Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
-            pService->SetResourceData(&resourceIdentifier1, L"Sheboygan_Parcels.sdf", L"File", dataReader1);
-
-        }
-    }
-    catch(MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-}
-
-
-void TestPerformance::TestEnd()
-{
-    try
-    {
-        MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
-        {
-            throw new MgNullReferenceException(L"TestPerformance.TestEnd",
-                __LINE__, __WFILE__, NULL, L"", NULL);
-        }
-
-        Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
-        {
-            throw new MgServiceNotAvailableException(L"TestPerformance.TestEnd",
-                __LINE__, __WFILE__, NULL, L"", NULL);
-        }
-
-        // set user info
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
-        MgUserInformation::SetCurrentUserInfo(userInfo);
-
-        // delete the feature sources definition
-        Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
-        pService->DeleteResource(mapres1);
-
-        #ifdef _DEBUG
-        MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
-        if(pFdoConnectionManager)
-        {
-            pFdoConnectionManager->ShowCache();
-        }
-        #endif
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nFeature Service tests completed.\n\n")));
-}
-
-
 ///----------------------------------------------------------------------------
 /// Test Case Description:
 ///
 /// This test case benchmarks selecting features.
 ///----------------------------------------------------------------------------
-void TestPerformance::TestCase_BenchmarkSelectFeatures()
+TEST_CASE("BenchmarkSelectFeatures", "[Performance]")
 {
     try
     {
         ACE_DEBUG((LM_INFO, ACE_TEXT("\nTestCase_BenchmarkSelectFeatures - START\n")));
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if(serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestPerformance.TestCase_BenchmarkSelectFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestPerformance.TestCase_BenchmarkSelectFeatures", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestPerformance.TestCase_BenchmarkSelectFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestPerformance.TestCase_BenchmarkSelectFeatures", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> resource = new MgResourceIdentifier();
@@ -198,7 +71,7 @@
             }
 
             reader->Close();
-            CPPUNIT_ASSERT(nFeatures == 17565);
+            REQUIRE(nFeatures == 17565);
         }
 
         ACE_DEBUG((LM_INFO, ACE_TEXT("  Execution Time (Average of %d runs): = %6.4f (s)\n"), iterations, ((GetTickCount()-lStart)/1000.0)/(double)iterations ));
@@ -206,20 +79,20 @@
     }
     catch(MgResourceNotFoundException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
         ACE_DEBUG((LM_INFO, ACE_TEXT("\n%W\nAre the performance test resources installed?\n\n"), message.c_str()));
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -232,23 +105,23 @@
 ///
 /// This test case benchmarks joining features.
 ///----------------------------------------------------------------------------
-void TestPerformance::TestCase_BenchmarkJoinFeatures()
+TEST_CASE("BenchmarkJoinFeatures", "[Performance]")
 {
     try
     {
         ACE_DEBUG((LM_INFO, ACE_TEXT("\nTestCase_BenchmarkJoinFeatures - START\n\n")));
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if(serviceManager == nullptr)
         {
             throw new MgNullReferenceException(L"TestPerformance.TestCase_BenchmarkJoinFeatures",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgFeatureService> pService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
             throw new MgServiceNotAvailableException(L"TestPerformance.TestCase_BenchmarkJoinFeatures",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceIdentifier> lFeatureSource = new MgResourceIdentifier(L"Library://JoinTest/Data/World_Countries_Join.FeatureSource");
@@ -265,7 +138,7 @@
         for(int i=0;i<iterations;i++)
         {
             nFeatures = 0;
-            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"World_Countries", NULL);
+            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"World_Countries", nullptr);
             while(reader->ReadNext())
             {
                 STRING s1 = L"<null>";
@@ -300,7 +173,7 @@
         for(int i=0;i<iterations;i++)
         {
             nFeatures = 0;
-            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"Join", NULL);
+            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"Join", nullptr);
             while(reader->ReadNext())
             {
                 STRING s1 = L"<null>";
@@ -350,7 +223,7 @@
         for(int i=0;i<iterations;i++)
         {
             nFeatures = 0;
-            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"World_Countries", NULL);
+            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"World_Countries", nullptr);
             while(reader->ReadNext())
             {
                 INT32 n1 = 0;
@@ -385,7 +258,7 @@
         for(int i=0;i<iterations;i++)
         {
             nFeatures = 0;
-            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"Join", NULL);
+            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"Join", nullptr);
             while(reader->ReadNext())
             {
                 INT32 n1 = 0;
@@ -435,7 +308,7 @@
         for(int i=0;i<iterations;i++)
         {
             nFeatures = 0;
-            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"geonames_n83", NULL);
+            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"geonames_n83", nullptr);
             while(reader->ReadNext())
             {
                 INT32 fid = 0;
@@ -473,7 +346,7 @@
         for(int i=0;i<iterations;i++)
         {
             nFeatures = 0;
-            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"GEONAMES_N83", NULL);
+            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"GEONAMES_N83", nullptr);
             while(reader->ReadNext())
             {
                 INT32 fid = 0;
@@ -511,7 +384,7 @@
         for(int i=0;i<iterations;i++)
         {
             nFeatures = 0;
-            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"Join", NULL);
+            Ptr<MgFeatureReader> reader = pService->SelectFeatures(lFeatureSource, L"Join", nullptr);
             while(reader->ReadNext())
             {
                 INT32 fid = 0;
@@ -556,20 +429,20 @@
     }
     catch(MgResourceNotFoundException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
         ACE_DEBUG((LM_INFO, ACE_TEXT("\n%W\nAre the performance test resources installed?\n\n"), message.c_str()));
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {

Deleted: trunk/MgDev/Server/src/UnitTesting/TestPerformance.h
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestPerformance.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestPerformance.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,44 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _TESTPERFORMANCE_H
-#define _TESTPERFORMANCE_H
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestPerformance : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestPerformance);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_BenchmarkSelectFeatures);
-    CPPUNIT_TEST(TestCase_BenchmarkJoinFeatures);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    void TestCase_BenchmarkSelectFeatures();
-    void TestCase_BenchmarkJoinFeatures();
-};
-
-#endif // _TESTPERFORMANCE_H

Modified: trunk/MgDev/Server/src/UnitTesting/TestProfilingService.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestProfilingService.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestProfilingService.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -16,493 +16,109 @@
 //
 
 #include "MapGuideCommon.h"
-#include "TestProfilingService.h"
 #include "ServiceManager.h"
 #include "ServerSiteService.h"
 #include "StylizationDefs.h"
-#include "../Common/Manager/FdoConnectionManager.h"
 #include "FoundationDefs.h"
-const STRING TEST_LOCALE = L"en";
+#include "TestServiceFactory.h"
+#include "catch.hpp"
 
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestProfilingService, "TestProfilingService");
-
-
-TestProfilingService::TestProfilingService()
+static MgMap* CreateTestMap(MgSiteConnection* siteConn)
 {
-    // Initialize service objects.
-    MgServiceManager* serviceManager = MgServiceManager::GetInstance();
+    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+    MgMap* map = new MgMap(siteConn);
+    map->Create(mdfres, L"UnitTestSheboygan");
 
-    m_svcResource = dynamic_cast<MgResourceService*>(
-        serviceManager->RequestService(MgServiceType::ResourceService));
-    assert(m_svcResource != NULL);
+    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
+    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
+    map->SetViewCenter(ptNewCenter);
+    map->SetViewScale(75000.0);
+    map->SetDisplayDpi(96);
+    map->SetDisplayWidth(1024);
+    map->SetDisplayHeight(1024);
 
-    m_svcProfiling = dynamic_cast<MgProfilingService*>(
-        serviceManager->RequestService(MgServiceType::ProfilingService));
-    assert(m_svcProfiling != NULL);
-
-    // Initialize a site connection.
-    Ptr<MgServerSiteService> svcSite = dynamic_cast<MgServerSiteService*>(
-        serviceManager->RequestService(MgServiceType::SiteService));
-    assert(svcSite != NULL);
-
-    Ptr<MgUserInformation> userInfo = new MgUserInformation(
-        L"Administrator", L"admin");
-    userInfo->SetLocale(TEST_LOCALE);
-
-    // Set the current MgUserInformation
-    // This must be done before calling CreateSession()
-    MgUserInformation::SetCurrentUserInfo(userInfo);
-
-    STRING session = svcSite->CreateSession();
-    assert(!session.empty());
-    userInfo->SetMgSessionId(session);
-
-    // Set the current MgUserInformation
-    MgUserInformation::SetCurrentUserInfo(userInfo);
-
-    m_siteConnection = new MgSiteConnection();
-    m_siteConnection->Open(userInfo);
+    return map;
 }
 
-
-TestProfilingService::~TestProfilingService()
+static MgMap* CreateTestMapWithWatermark(MgSiteConnection* siteConn)
 {
-}
+    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWithWatermark.MapDefinition");
+    MgMap* map = new MgMap(siteConn);
+    map->Create(mdfres, L"UnitTestSheboyganWithWatermark");
 
+    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
+    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
+    map->SetViewCenter(ptNewCenter);
+    map->SetViewScale(75000.0);
+    map->SetDisplayDpi(96);
+    map->SetDisplayWidth(1024);
+    map->SetDisplayHeight(1024);
 
-void TestProfilingService::setUp()
-{
+    return map;
 }
 
-
-void TestProfilingService::tearDown()
+static MgSelection* CreateSelection(MgMap* map)
 {
-}
+    // make a selection in normal map
+    STRING layerId;
+    Ptr<MgLayerCollection> layers = map->GetLayers();
 
-
-void TestProfilingService::TestStart()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Profiling Service tests.\n")));
-
-    try
+    for (int i = 0; i < layers->GetCount(); i++)
     {
-        #ifdef _DEBUG
-        MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
-        if(pFdoConnectionManager)
+        Ptr<MgLayerBase> layer = layers->GetItem(i);
+        if (L"HydrographicPolygons" == layer->GetName())
         {
-            pFdoConnectionManager->ShowCache();
+            layerId = layer->GetObjectId();
         }
-        #endif
+    }
+    STRING selectionStr = L"<?xml version=\"1.0\" encoding=\"UTF-8\"?><FeatureSet><Layer id=\"";
+    selectionStr.append(layerId);
+    selectionStr.append(L"\"><Class id=\"SHP_Schema:HydrographicPolygons\"><ID>HQAAAA==</ID></Class></Layer></FeatureSet>");
 
-        // set user info
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
-        MgUserInformation::SetCurrentUserInfo(userInfo);
-
-        // publish the map definition
-        Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
-        Ptr<MgByteSource> mdfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_Sheboygan.mdf", false);
-        Ptr<MgByteReader> mdfrdr1 = mdfsrc1->GetReader();
-        m_svcResource->SetResource(mapres1, mdfrdr1, NULL);
-
-        // publish the layer definitions
-        Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.ldf", false);
-        Ptr<MgByteReader> ldfrdr1 = ldfsrc1->GetReader();
-        m_svcResource->SetResource(ldfres1, ldfrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.ldf", false);
-        Ptr<MgByteReader> ldfrdr2 = ldfsrc2->GetReader();
-        m_svcResource->SetResource(ldfres2, ldfrdr2, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.ldf", false);
-        Ptr<MgByteReader> ldfrdr3 = ldfsrc3->GetReader();
-        m_svcResource->SetResource(ldfres3, ldfrdr3, NULL);
-
-        // publish the feature sources
-        Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
-        Ptr<MgByteSource> fssrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.fs", false);
-        Ptr<MgByteReader> fsrdr1 = fssrc1->GetReader();
-        m_svcResource->SetResource(fsres1, fsrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
-        Ptr<MgByteSource> fssrc2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.fs", false);
-        Ptr<MgByteReader> fsrdr2 = fssrc2->GetReader();
-        m_svcResource->SetResource(fsres2, fsrdr2, NULL);
-
-        Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
-        Ptr<MgByteSource> fssrc3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.fs", false);
-        Ptr<MgByteReader> fsrdr3 = fssrc3->GetReader();
-        m_svcResource->SetResource(fsres3, fsrdr3, NULL);
-
-        // publish the resource data
-        Ptr<MgByteSource> dataSource1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.sdf", false);
-        Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
-        m_svcResource->SetResourceData(fsres1, L"UT_HydrographicPolygons.sdf", L"File", dataReader1);
-
-        Ptr<MgByteSource> dataSource2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.sdf", false);
-        Ptr<MgByteReader> dataReader2 = dataSource2->GetReader();
-        m_svcResource->SetResourceData(fsres2, L"UT_Rail.sdf", L"File", dataReader2);
-
-        Ptr<MgByteSource> dataSource3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.sdf", false);
-        Ptr<MgByteReader> dataReader3 = dataSource3->GetReader();
-        m_svcResource->SetResourceData(fsres3, L"UT_Parcels.sdf", L"File", dataReader3);
-
-        // publish the print layouts
-        Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
-        Ptr<MgByteSource> plsrc1 = new MgByteSource(L"../UnitTestFiles/UT_AllElements.pl", false);
-        Ptr<MgByteReader> plrdr1 = plsrc1->GetReader();
-        m_svcResource->SetResource(plres1, plrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
-        Ptr<MgByteSource> plsrc2 = new MgByteSource(L"../UnitTestFiles/UT_NoLegend.pl", false);
-        Ptr<MgByteReader> plrdr2 = plsrc2->GetReader();
-        m_svcResource->SetResource(plres2, plrdr2, NULL);
-
-        // publish the symbol library
-        Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
-        Ptr<MgByteSource> slsrc1 = new MgByteSource(L"../UnitTestFiles/UT_SymbolMart.sl", false);
-        Ptr<MgByteReader> slrdr1 = slsrc1->GetReader();
-        m_svcResource->SetResource(slres1, slrdr1, NULL);
-        Ptr<MgByteSource> datasrc = new MgByteSource(L"../UnitTestFiles/UT_Symbols.dwf", false);
-        Ptr<MgByteReader> datardr = datasrc->GetReader();
-        m_svcResource->SetResourceData(slres1, L"symbols.dwf", L"File", datardr);
-
-        //
-        // publish symbology stuff
-        //
-
-        // the point feature source
-        Ptr<MgResourceIdentifier> fsres4 = new MgResourceIdentifier(L"Library://UnitTests/Data/Capitals.FeatureSource");
-        Ptr<MgByteSource> fssrc4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.fs", false);
-        Ptr<MgByteReader> fsrdr4 = fssrc4->GetReader();
-        m_svcResource->SetResource(fsres4, fsrdr4, NULL);
-
-        // point sdf file
-        Ptr<MgByteSource> dataSource4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.sdf", false);
-        Ptr<MgByteReader> dataReader4 = dataSource4->GetReader();
-        m_svcResource->SetResourceData(fsres4, L"UT_SymbologyPoints.sdf", L"File", dataReader4);
-
-        // point symbols
-        Ptr<MgResourceIdentifier> sdres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbol.SymbolDefinition");
-        Ptr<MgByteSource> sdsrc1 = new MgByteSource(L"../UnitTestFiles/symbol.sd", false);
-        Ptr<MgByteReader> sdrdr1 = sdsrc1->GetReader();
-        m_svcResource->SetResource(sdres1, sdrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> sdres2 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbolParam.SymbolDefinition");
-        Ptr<MgByteSource> sdsrc2 = new MgByteSource(L"../UnitTestFiles/symbolp.sd", false);
-        Ptr<MgByteReader> sdrdr2 = sdsrc2->GetReader();
-        m_svcResource->SetResource(sdres2, sdrdr2, NULL);
-
-        // point ldf
-        Ptr<MgResourceIdentifier> ldfres4 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Capitals.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.ldf", false);
-        Ptr<MgByteReader> ldfrdr4 = ldfsrc4->GetReader();
-        m_svcResource->SetResource(ldfres4, ldfrdr4, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres5 = new MgResourceIdentifier(L"Library://UnitTests/Layers/CapitalsParam.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPointsParam.ldf", false);
-        Ptr<MgByteReader> ldfrdr5 = ldfsrc5->GetReader();
-        m_svcResource->SetResource(ldfres5, ldfrdr5, NULL);
-
-        // point mdf
-        Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Capitals.MapDefinition");
-        Ptr<MgByteSource> mdfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.mdf", false);
-        Ptr<MgByteReader> mdfrdr2 = mdfsrc2->GetReader();
-        m_svcResource->SetResource(mapres2, mdfrdr2, NULL);
-
-        Ptr<MgResourceIdentifier> mapres3 = new MgResourceIdentifier(L"Library://UnitTests/Maps/CapitalsParam.MapDefinition");
-        Ptr<MgByteSource> mdfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPointsParam.mdf", false);
-        Ptr<MgByteReader> mdfrdr3 = mdfsrc3->GetReader();
-        m_svcResource->SetResource(mapres3, mdfrdr3, NULL);
-
-        // the line feature source
-        Ptr<MgResourceIdentifier> fsres5 = new MgResourceIdentifier(L"Library://UnitTests/Data/Lines.FeatureSource");
-        Ptr<MgByteSource> fssrc5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.fs", false);
-        Ptr<MgByteReader> fsrdr5 = fssrc5->GetReader();
-        m_svcResource->SetResource(fsres5, fsrdr5, NULL);
-
-        // line sdf file
-        Ptr<MgByteSource> dataSource5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.sdf", false);
-        Ptr<MgByteReader> dataReader5 = dataSource5->GetReader();
-        m_svcResource->SetResourceData(fsres5, L"UT_SymbologyLines.sdf", L"File", dataReader5);
-
-        // line symbols
-        Ptr<MgResourceIdentifier> sdres3 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/LineSymbol.SymbolDefinition");
-        Ptr<MgByteSource> sdsrc3 = new MgByteSource(L"../UnitTestFiles/linesymbol.sd", false);
-        Ptr<MgByteReader> sdrdr3 = sdsrc3->GetReader();
-        m_svcResource->SetResource(sdres3, sdrdr3, NULL);
-
-        Ptr<MgResourceIdentifier> sdres4 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/MTYP1500a.SymbolDefinition");
-        Ptr<MgByteSource> sdsrc4 = new MgByteSource(L"../UnitTestFiles/MTYP1500a.sd", false);
-        Ptr<MgByteReader> sdrdr4 = sdsrc4->GetReader();
-        m_svcResource->SetResource(sdres4, sdrdr4, NULL);
-
-        // line ldf
-        Ptr<MgResourceIdentifier> ldfres6 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Lines.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc6 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.ldf", false);
-        Ptr<MgByteReader> ldfrdr6 = ldfsrc6->GetReader();
-        m_svcResource->SetResource(ldfres6, ldfrdr6, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres7 = new MgResourceIdentifier(L"Library://UnitTests/Layers/LinesCrossTick.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc7 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLinesCrossTick.ldf", false);
-        Ptr<MgByteReader> ldfrdr7 = ldfsrc7->GetReader();
-        m_svcResource->SetResource(ldfres7, ldfrdr7, NULL);
-
-        // line mdf
-        Ptr<MgResourceIdentifier> mapres4 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Lines.MapDefinition");
-        Ptr<MgByteSource> mdfsrc4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.mdf", false);
-        Ptr<MgByteReader> mdfrdr4 = mdfsrc4->GetReader();
-        m_svcResource->SetResource(mapres4, mdfrdr4, NULL);
-
-        Ptr<MgResourceIdentifier> mapres5 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinesCrossTick.MapDefinition");
-        Ptr<MgByteSource> mdfsrc5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLinesCrossTick.mdf", false);
-        Ptr<MgByteReader> mdfrdr5 = mdfsrc5->GetReader();
-        m_svcResource->SetResource(mapres5, mdfrdr5, NULL);
-
-        // annotation ldf - this shares the point sdf
-        Ptr<MgResourceIdentifier> ldfres8 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation1.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc8 = new MgByteSource(L"../UnitTestFiles/UT_Annotation1.ldf", false);
-        Ptr<MgByteReader> ldfrdr8 = ldfsrc8->GetReader();
-        m_svcResource->SetResource(ldfres8, ldfrdr8, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres9 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation2.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc9 = new MgByteSource(L"../UnitTestFiles/UT_Annotation2.ldf", false);
-        Ptr<MgByteReader> ldfrdr9 = ldfsrc9->GetReader();
-        m_svcResource->SetResource(ldfres9, ldfrdr9, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres10 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation3.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc10 = new MgByteSource(L"../UnitTestFiles/UT_Annotation3.ldf", false);
-        Ptr<MgByteReader> ldfrdr10 = ldfsrc10->GetReader();
-        m_svcResource->SetResource(ldfres10, ldfrdr10, NULL);
-
-        // annotation mdf
-        Ptr<MgResourceIdentifier> mapres8 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation1.MapDefinition");
-        Ptr<MgByteSource> mdfsrc8 = new MgByteSource(L"../UnitTestFiles/UT_Annotation1.mdf", false);
-        Ptr<MgByteReader> mdfrdr8 = mdfsrc8->GetReader();
-        m_svcResource->SetResource(mapres8, mdfrdr8, NULL);
-
-        Ptr<MgResourceIdentifier> mapres9 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation2.MapDefinition");
-        Ptr<MgByteSource> mdfsrc9 = new MgByteSource(L"../UnitTestFiles/UT_Annotation2.mdf", false);
-        Ptr<MgByteReader> mdfrdr9 = mdfsrc9->GetReader();
-        m_svcResource->SetResource(mapres9, mdfrdr9, NULL);
-
-        Ptr<MgResourceIdentifier> mapres10 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation3.MapDefinition");
-        Ptr<MgByteSource> mdfsrc10 = new MgByteSource(L"../UnitTestFiles/UT_Annotation3.mdf", false);
-        Ptr<MgByteReader> mdfrdr10 = mdfsrc10->GetReader();
-        m_svcResource->SetResource(mapres10, mdfrdr10, NULL);
-
-        //symbology - polygons
-        Ptr<MgResourceIdentifier> mapres11 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_SymbologyPolygons.MapDefinition");
-        Ptr<MgByteSource> mdfsrc11 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPolygons.mdf", false);
-        Ptr<MgByteReader> mdfrdr11 = mdfsrc11->GetReader();
-        m_svcResource->SetResource(mapres11, mdfrdr11, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres11 = new MgResourceIdentifier(L"Library://UnitTests/Layers/SymbologyParcels.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc11 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyParcels.ldf", false);
-        Ptr<MgByteReader> ldfrdr11 = ldfsrc11->GetReader();
-        m_svcResource->SetResource(ldfres11, ldfrdr11, NULL);
-
-        Ptr<MgResourceIdentifier> sdres5 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/AreaSymbol.SymbolDefinition");
-        Ptr<MgByteSource> sdsrc5 = new MgByteSource(L"../UnitTestFiles/areasymbol.sd", false);
-        Ptr<MgByteReader> sdrdr5 = sdsrc5->GetReader();
-        m_svcResource->SetResource(sdres5, sdrdr5, NULL);
-
-        // For watermark test
-        // publish the map definition
-        Ptr<MgResourceIdentifier> mapres12 = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWithWatermark.MapDefinition");
-        Ptr<MgByteSource> mdfsrc12 = new MgByteSource(L"../UnitTestFiles/UT_SheboyganWithWatermark.mdf", false);
-        Ptr<MgByteReader> mdfrdr12 = mdfsrc12->GetReader();
-        m_svcResource->SetResource(mapres12, mdfrdr12, NULL);
-
-        // publish the watermark definition
-        Ptr<MgResourceIdentifier> wdfres1 = new MgResourceIdentifier(L"Library://UnitTests/Watermarks/PoweredByMapGuide.WatermarkDefinition");
-        Ptr<MgByteSource> wdfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_PoweredByMapGuide.wdf", false);
-        Ptr<MgByteReader> wdfrdr1 = wdfsrc1->GetReader();
-        m_svcResource->SetResource(wdfres1, wdfrdr1, NULL);
-
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
+    MgSelection* selection = new MgSelection(map, selectionStr);
+    return selection;
 }
 
-
-void TestProfilingService::TestEnd()
+TEST_CASE("ProfileRenderDynamicOverlay", "[ProfilingService]")
 {
     try
     {
-        // set user info
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
-        MgUserInformation::SetCurrentUserInfo(userInfo);
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgProfilingService> svcProfiling = TestServiceFactory::CreateProfilingService();
+        Ptr<MgSiteConnection> siteConn = TestServiceFactory::CreateSiteConnection(svcSite);
 
-        // delete the map definition
-        Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
-        m_svcResource->DeleteResource(mapres1);
-
-        // delete the layer definitions
-        Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres1);
-
-        Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres2);
-
-        Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres3);
-
-        // delete the feature sources
-        Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
-        m_svcResource->DeleteResource(fsres1);
-
-        Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
-        m_svcResource->DeleteResource(fsres2);
-
-        Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
-        m_svcResource->DeleteResource(fsres3);
-
-        // delete the print layouts
-        Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
-        m_svcResource->DeleteResource(plres1);
-
-        Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
-        m_svcResource->DeleteResource(plres2);
-
-        // delete the symbol library
-        Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
-        m_svcResource->DeleteResource(slres1);
-
-        // delete symbology stuff
-        Ptr<MgResourceIdentifier> fsres4 = new MgResourceIdentifier(L"Library://UnitTests/Data/Capitals.FeatureSource");
-        m_svcResource->DeleteResource(fsres4);
-        Ptr<MgResourceIdentifier> sdres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbol.SymbolDefinition");
-        m_svcResource->DeleteResource(sdres1);
-        Ptr<MgResourceIdentifier> sdres2 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbolParam.SymbolDefinition");
-        m_svcResource->DeleteResource(sdres2);
-        Ptr<MgResourceIdentifier> ldfres4 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Capitals.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres4);
-        Ptr<MgResourceIdentifier> ldfres5 = new MgResourceIdentifier(L"Library://UnitTests/Layers/CapitalsParam.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres5);
-        Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Capitals.MapDefinition");
-        m_svcResource->DeleteResource(mapres2);
-        Ptr<MgResourceIdentifier> mapres3 = new MgResourceIdentifier(L"Library://UnitTests/Maps/CapitalsParam.MapDefinition");
-        m_svcResource->DeleteResource(mapres3);
-
-        Ptr<MgResourceIdentifier> fsres5 = new MgResourceIdentifier(L"Library://UnitTests/Data/Lines.FeatureSource");
-        m_svcResource->DeleteResource(fsres5);
-        Ptr<MgResourceIdentifier> sdres3 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/LineSymbol.SymbolDefinition");
-        m_svcResource->DeleteResource(sdres3);
-        Ptr<MgResourceIdentifier> sdres4 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/MTYP1500a.SymbolDefinition");
-        m_svcResource->DeleteResource(sdres4);
-        Ptr<MgResourceIdentifier> ldfres6 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Lines.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres6);
-        Ptr<MgResourceIdentifier> ldfres7 = new MgResourceIdentifier(L"Library://UnitTests/Layers/LinesCrossTick.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres7);
-        Ptr<MgResourceIdentifier> mapres4 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Lines.MapDefinition");
-        m_svcResource->DeleteResource(mapres4);
-        Ptr<MgResourceIdentifier> mapres5 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinesCrossTick.MapDefinition");
-        m_svcResource->DeleteResource(mapres5);
-
-        Ptr<MgResourceIdentifier> ldfres8 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation1.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres8);
-        Ptr<MgResourceIdentifier> ldfres9 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation2.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres9);
-        Ptr<MgResourceIdentifier> ldfres10 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation3.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres10);
-        Ptr<MgResourceIdentifier> mapres8 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation1.MapDefinition");
-        m_svcResource->DeleteResource(mapres8);
-        Ptr<MgResourceIdentifier> mapres9 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation2.MapDefinition");
-        m_svcResource->DeleteResource(mapres9);
-        Ptr<MgResourceIdentifier> mapres10 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation3.MapDefinition");
-        m_svcResource->DeleteResource(mapres10);
-
-        Ptr<MgResourceIdentifier> mapres11 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_SymbologyPolygons.MapDefinition");
-        m_svcResource->DeleteResource(mapres11);
-        Ptr<MgResourceIdentifier> ldfres11 = new MgResourceIdentifier(L"Library://UnitTests/Layers/SymbologyParcels.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres11);
-        Ptr<MgResourceIdentifier> sdres5 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/AreaSymbol.SymbolDefinition");
-        m_svcResource->DeleteResource(sdres5);
-        
-        Ptr<MgResourceIdentifier> mapres12 = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWithWatermark.MapDefinition");
-        m_svcResource->DeleteResource(mapres12);
-        Ptr<MgResourceIdentifier> wdfres1 = new MgResourceIdentifier(L"Library://UnitTests/Watermarks/PoweredByMapGuide.WatermarkDefinition");
-        m_svcResource->DeleteResource(wdfres1);
-
-       #ifdef _DEBUG
-        MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
-        if(pFdoConnectionManager)
-        {
-            pFdoConnectionManager->ShowCache();
-        }
-        #endif
-    }
-    catch(MgFileIoException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        ACE_DEBUG((LM_INFO, ACE_TEXT("\nMgFileIoException - Possible file permission error.\nError: %W\n"), message.c_str()));
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        message += e->GetStackTrace(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nProfiling Service tests completed.\n\n")));
-}
-
-
-void TestProfilingService::TestCase_ProfileRenderDynamicOverlay()
-{
-    try
-    {
         // make a runtime normal map
-        Ptr<MgMap> map = CreateTestMap();
+        Ptr<MgMap> map = CreateTestMap(siteConn);
         Ptr<MgSelection> selectionOnMap = CreateSelection(map);
 
         // make a runtime map with watermark
-        Ptr<MgMap> mapWithWatermark = CreateTestMapWithWatermark();
+        Ptr<MgMap> mapWithWatermark = CreateTestMapWithWatermark(siteConn);
         Ptr<MgSelection> selectionOnMapWithWatermark = CreateSelection(mapWithWatermark);
 
         // make a rendering option
-        Ptr<MgRenderingOptions> options = new MgRenderingOptions(L"PNG",MgRenderingOptions::RenderSelection| MgRenderingOptions::RenderLayers| MgRenderingOptions::KeepSelection,NULL);
+        Ptr<MgRenderingOptions> options = new MgRenderingOptions(L"PNG",MgRenderingOptions::RenderSelection| MgRenderingOptions::RenderLayers| MgRenderingOptions::KeepSelection,nullptr);
         
         // profile rendering normal map
-        Ptr<MgByteReader> rdr1 = m_svcProfiling->ProfileRenderDynamicOverlay(map, NULL, options);
+        Ptr<MgByteReader> rdr1 = svcProfiling->ProfileRenderDynamicOverlay(map, nullptr, options);
         rdr1->ToFile(L"../UnitTestFiles/ProfileRenderDynamicOverlay_Normal.xml");
 
         // profile rendering normal map with selection
-        Ptr<MgByteReader> rdr2 = m_svcProfiling->ProfileRenderDynamicOverlay(map, selectionOnMap, options);
+        Ptr<MgByteReader> rdr2 = svcProfiling->ProfileRenderDynamicOverlay(map, selectionOnMap, options);
         rdr2->ToFile(L"../UnitTestFiles/ProfileRenderDynamicOverlay_Selection.xml");
 
         // profile rendering map with watermark
-        Ptr<MgByteReader> rdr3 = m_svcProfiling->ProfileRenderDynamicOverlay(mapWithWatermark, NULL, options);
+        Ptr<MgByteReader> rdr3 = svcProfiling->ProfileRenderDynamicOverlay(mapWithWatermark, nullptr, options);
         rdr3->ToFile(L"../UnitTestFiles/ProfileRenderDynamicOverlay_Watermark.xml");
 
         // profile rendering map with both watermark and selection
-        Ptr<MgByteReader> rdr4 = m_svcProfiling->ProfileRenderDynamicOverlay(mapWithWatermark, selectionOnMapWithWatermark, options);
+        Ptr<MgByteReader> rdr4 = svcProfiling->ProfileRenderDynamicOverlay(mapWithWatermark, selectionOnMapWithWatermark, options);
         rdr4->ToFile(L"../UnitTestFiles/ProfileRenderDynamicOverlay_Watermark_Selection.xml");
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -510,106 +126,52 @@
     }
 }
 
-
-void TestProfilingService::TestCase_ProfileRenderMap()
+TEST_CASE("ProfileRenderMap", "[ProfilingService]")
 {
     try
     {
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgProfilingService> svcProfiling = TestServiceFactory::CreateProfilingService();
+        Ptr<MgSiteConnection> siteConn = TestServiceFactory::CreateSiteConnection(svcSite);
+
         // make a runtime normal map
-        Ptr<MgMap> map = CreateTestMap();
+        Ptr<MgMap> map = CreateTestMap(siteConn);
         Ptr<MgSelection> selectionOnMap = CreateSelection(map);
 
         // make a runtime map with watermark
-        Ptr<MgMap> mapWithWatermark = CreateTestMapWithWatermark();
+        Ptr<MgMap> mapWithWatermark = CreateTestMapWithWatermark(siteConn);
         Ptr<MgSelection> selectionOnMapWithWatermark = CreateSelection(mapWithWatermark);
 
         // make a rendering option
-        Ptr<MgRenderingOptions> options = new MgRenderingOptions(L"PNG",MgRenderingOptions::RenderSelection| MgRenderingOptions::RenderLayers| MgRenderingOptions::KeepSelection,NULL);
+        Ptr<MgRenderingOptions> options = new MgRenderingOptions(L"PNG",MgRenderingOptions::RenderSelection| MgRenderingOptions::RenderLayers| MgRenderingOptions::KeepSelection,nullptr);
 
         Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
         Ptr<MgColor> bgc = new MgColor(255, 255, 255, 255);
 
         // profile rendering normal map
-        Ptr<MgByteReader> rdr1 = m_svcProfiling->ProfileRenderMap(map, NULL, coordNewCenter, 75000, 1024, 1024, bgc, L"PNG", false);
+        Ptr<MgByteReader> rdr1 = svcProfiling->ProfileRenderMap(map, nullptr, coordNewCenter, 75000, 1024, 1024, bgc, L"PNG", false);
         rdr1->ToFile(L"../UnitTestFiles/ProfileRenderMap_Normal.xml");
 
         // profile rendering normal map with selection
-        Ptr<MgByteReader> rdr2 = m_svcProfiling->ProfileRenderMap(map, selectionOnMap, coordNewCenter, 75000, 1024, 1024, bgc, L"PNG", false);
+        Ptr<MgByteReader> rdr2 = svcProfiling->ProfileRenderMap(map, selectionOnMap, coordNewCenter, 75000, 1024, 1024, bgc, L"PNG", false);
         rdr2->ToFile(L"../UnitTestFiles/ProfileRenderMap_Selection.xml");
 
         // profile rendering normal map with watermark
-        Ptr<MgByteReader> rdr3 = m_svcProfiling->ProfileRenderMap(mapWithWatermark, NULL, coordNewCenter, 75000, 1024, 1024, bgc, L"PNG", false);
+        Ptr<MgByteReader> rdr3 = svcProfiling->ProfileRenderMap(mapWithWatermark, nullptr, coordNewCenter, 75000, 1024, 1024, bgc, L"PNG", false);
         rdr3->ToFile(L"../UnitTestFiles/ProfileRenderMap_Watermark.xml");
 
         // profile rendering normal map with watermark
-        Ptr<MgByteReader> rdr4 = m_svcProfiling->ProfileRenderMap(mapWithWatermark, selectionOnMapWithWatermark, coordNewCenter, 75000, 1024, 1024, bgc, L"PNG", false);
+        Ptr<MgByteReader> rdr4 = svcProfiling->ProfileRenderMap(mapWithWatermark, selectionOnMapWithWatermark, coordNewCenter, 75000, 1024, 1024, bgc, L"PNG", false);
         rdr4->ToFile(L"../UnitTestFiles/ProfileRenderMap_Watermark_Selection.xml");
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
         throw;
     }
-}
-
-MgMap* TestProfilingService::CreateTestMap()
-{
-    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
-    MgMap* map = new MgMap(m_siteConnection);
-    map->Create(mdfres, L"UnitTestSheboygan");
-
-    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
-    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
-    map->SetViewCenter(ptNewCenter);
-    map->SetViewScale(75000.0);
-    map->SetDisplayDpi(96);
-    map->SetDisplayWidth(1024);
-    map->SetDisplayHeight(1024);
-
-    return map;
-}
-
-MgMap* TestProfilingService::CreateTestMapWithWatermark()
-{
-    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWithWatermark.MapDefinition");
-    MgMap* map = new MgMap(m_siteConnection);
-    map->Create(mdfres, L"UnitTestSheboyganWithWatermark");
-
-    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
-    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
-    map->SetViewCenter(ptNewCenter);
-    map->SetViewScale(75000.0);
-    map->SetDisplayDpi(96);
-    map->SetDisplayWidth(1024);
-    map->SetDisplayHeight(1024);
-
-    return map;
-}
-
-MgSelection* TestProfilingService::CreateSelection(MgMap* map)
-{
-    // make a selection in normal map
-    STRING layerId;
-    Ptr<MgLayerCollection> layers = map->GetLayers();
-
-    for (int i=0; i<layers->GetCount(); i++)
-    {
-        Ptr<MgLayerBase> layer = layers->GetItem(i);
-        if(L"HydrographicPolygons" ==layer->GetName())
-        {
-            layerId = layer->GetObjectId();
-        }
-    }
-    STRING selectionStr = L"<?xml version=\"1.0\" encoding=\"UTF-8\"?><FeatureSet><Layer id=\"";
-    selectionStr.append(layerId);
-    selectionStr.append(L"\"><Class id=\"SHP_Schema:HydrographicPolygons\"><ID>HQAAAA==</ID></Class></Layer></FeatureSet>");
-
-    MgSelection* selection = new MgSelection(map, selectionStr);
-    return selection;
-}
-
+}
\ No newline at end of file

Deleted: trunk/MgDev/Server/src/UnitTesting/TestProfilingService.h
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestProfilingService.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestProfilingService.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,57 +0,0 @@
-//
-//  Copyright (C) 2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _TESTPROFILINGSERVICE_H
-#define _TESTPROFILINGSERVICE_H
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestProfilingService : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestProfilingService);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_ProfileRenderDynamicOverlay);
-    CPPUNIT_TEST(TestCase_ProfileRenderMap);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    TestProfilingService();
-    ~TestProfilingService();
-
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    void TestCase_ProfileRenderDynamicOverlay();
-    void TestCase_ProfileRenderMap();
-
-private:
-    MgMap* CreateTestMap();
-    MgMap* CreateTestMapWithWatermark();
-    MgSelection* CreateSelection(MgMap* map);
-
-private:
-    Ptr<MgSiteConnection> m_siteConnection;
-    Ptr<MgResourceService> m_svcResource;
-    Ptr<MgProfilingService> m_svcProfiling;
-};
-
-#endif // _TESTPROFILINGSERVICE_H

Modified: trunk/MgDev/Server/src/UnitTesting/TestRenderingService.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestRenderingService.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestRenderingService.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -16,605 +16,167 @@
 //
 
 #include "MapGuideCommon.h"
-#include "TestRenderingService.h"
 #include "ServiceManager.h"
 #include "ServerSiteService.h"
+#include "Fdo.h"
 #include "StylizationDefs.h"
-#include "../Common/Manager/FdoConnectionManager.h"
 #include "MVTRenderer.h"
+//#include "AGGRenderer.h"
 #include "FoundationDefs.h"
 #include "SE_Renderer.h"
 
-const STRING TEST_LOCALE = L"en";
+#include "TestServiceFactory.h"
+#include "catch.hpp"
 
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestRenderingService, "TestRenderingService");
-
-
-TestRenderingService::TestRenderingService()
+static MgMap* CreateTestMapWithWatermark()
 {
-    // Initialize service objects.
-    MgServiceManager* serviceManager = MgServiceManager::GetInstance();
+    Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+    Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
 
-    m_svcResource = dynamic_cast<MgResourceService*>(
-        serviceManager->RequestService(MgServiceType::ResourceService));
-    assert(m_svcResource != NULL);
+    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWithWatermark.MapDefinition");
+    MgMap* map = new MgMap(m_siteConnection);
+    map->Create(mdfres, L"UnitTestSheboyganWithWatermark");
 
-    m_svcRendering = dynamic_cast<MgRenderingService*>(
-        serviceManager->RequestService(MgServiceType::RenderingService));
-    assert(m_svcRendering != NULL);
+    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
+    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
+    map->SetViewCenter(ptNewCenter);
+    map->SetViewScale(75000.0);
+    map->SetDisplayDpi(96);
+    map->SetDisplayWidth(1024);
+    map->SetDisplayHeight(1024);
 
-    // Initialize a site connection.
-    Ptr<MgServerSiteService> svcSite = dynamic_cast<MgServerSiteService*>(
-        serviceManager->RequestService(MgServiceType::SiteService));
-    assert(svcSite != NULL);
+    return map;
+}
 
-    Ptr<MgUserInformation> userInfo = new MgUserInformation(
-        L"Administrator", L"admin");
-    userInfo->SetLocale(TEST_LOCALE);
+static MgMap* CreateTestMap()
+{
+    Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+    Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
 
-    // Set the current MgUserInformation
-    // This must be done before calling CreateSession()
-    MgUserInformation::SetCurrentUserInfo(userInfo);
+    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+    MgMap* map = new MgMap(m_siteConnection);
+    map->Create(mdfres, L"UnitTestSheboygan");
 
-    STRING session = svcSite->CreateSession();
-    assert(!session.empty());
-    userInfo->SetMgSessionId(session);
+    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
+    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
+    map->SetViewCenter(ptNewCenter);
+    map->SetViewScale(75000.0);
+    map->SetDisplayDpi(96);
+    map->SetDisplayWidth(1024);
+    map->SetDisplayHeight(1024);
 
-    // Set the current MgUserInformation
-    MgUserInformation::SetCurrentUserInfo(userInfo);
-
-    m_siteConnection = new MgSiteConnection();
-    m_siteConnection->Open(userInfo);
+    return map;
 }
 
-
-TestRenderingService::~TestRenderingService()
+static MgMap* CreateTestStylizationFunctionMap()
 {
-}
+    Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+    Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
 
+    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/StylizationFuncs.MapDefinition");
+    MgMap* map = new MgMap(m_siteConnection);
+    map->Create(mdfres, L"StylizationFuncs");
 
-void TestRenderingService::setUp()
-{
-}
+    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
+    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
+    map->SetViewCenter(ptNewCenter);
+    map->SetViewScale(60000.0);
+    map->SetDisplayDpi(96);
+    map->SetDisplayWidth(1024);
+    map->SetDisplayHeight(1024);
 
-
-void TestRenderingService::tearDown()
-{
+    return map;
 }
 
-
-void TestRenderingService::TestStart()
+static MgMap* CreateTestXYZMap()
 {
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Rendering Service tests.\n")));
+    Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+    Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
 
-    try
-    {
-        #ifdef _DEBUG
-        MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
-        if(pFdoConnectionManager)
-        {
-            pFdoConnectionManager->ShowCache();
-        }
-        #endif
+    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
+    MgMap* map = new MgMap(m_siteConnection);
+    map->Create(mdfres, L"UnitTestSheboyganXYZ");
 
-        // set user info
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
-        MgUserInformation::SetCurrentUserInfo(userInfo);
+    Ptr<MgLayerCollection> layers = map->GetLayers();
+    Ptr<MgLayerGroupCollection> groups = map->GetLayerGroups();
+    Ptr<MgLayerBase> roads = layers->GetItem(L"RoadCenterLines");
+    Ptr<MgLayerGroup> baseGroup = groups->GetItem(L"BaseLayers");
+    roads->SetGroup(baseGroup);
 
-        // publish the map definition
-        Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
-        Ptr<MgByteSource> mdfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_Sheboygan.mdf", false);
-        Ptr<MgByteReader> mdfrdr1 = mdfsrc1->GetReader();
-        m_svcResource->SetResource(mapres1, mdfrdr1, NULL);
+    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
+    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
+    map->SetViewCenter(ptNewCenter);
+    map->SetViewScale(75000.0);
+    map->SetDisplayDpi(96);
+    map->SetDisplayWidth(1024);
+    map->SetDisplayHeight(1024);
 
-        // publish tile set
-        Ptr<MgResourceIdentifier> tilesetres1 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/XYZ.TileSetDefinition");
-        Ptr<MgByteSource> tsdsrc1 = new MgByteSource(L"../UnitTestFiles/UT_XYZ.tsd", false);
-        Ptr<MgByteReader> tsdrdr1 = tsdsrc1->GetReader();
-        m_svcResource->SetResource(tilesetres1, tsdrdr1, NULL);
+    return map;
+}
 
-        // publish the layer definitions
-        Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.ldf", false);
-        Ptr<MgByteReader> ldfrdr1 = ldfsrc1->GetReader();
-        m_svcResource->SetResource(ldfres1, ldfrdr1, NULL);
+static MgMap* CreateTestTiledMap()
+{
+    Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+    Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
 
-        Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.ldf", false);
-        Ptr<MgByteReader> ldfrdr2 = ldfsrc2->GetReader();
-        m_svcResource->SetResource(ldfres2, ldfrdr2, NULL);
+    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
+    MgMap* map = new MgMap(m_siteConnection);
+    map->Create(mdfres, L"UnitTestSheboyganTiled");
 
-        Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.ldf", false);
-        Ptr<MgByteReader> ldfrdr3 = ldfsrc3->GetReader();
-        m_svcResource->SetResource(ldfres3, ldfrdr3, NULL);
+    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
+    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
+    map->SetViewCenter(ptNewCenter);
+    map->SetViewScale(75000.0);
+    map->SetDisplayDpi(96);
+    map->SetDisplayWidth(1024);
+    map->SetDisplayHeight(1024);
 
-        // publish the feature sources
-        Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
-        Ptr<MgByteSource> fssrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.fs", false);
-        Ptr<MgByteReader> fsrdr1 = fssrc1->GetReader();
-        m_svcResource->SetResource(fsres1, fsrdr1, NULL);
+    return map;
+}
 
-        Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
-        Ptr<MgByteSource> fssrc2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.fs", false);
-        Ptr<MgByteReader> fsrdr2 = fssrc2->GetReader();
-        m_svcResource->SetResource(fsres2, fsrdr2, NULL);
+// creates a selection bounds in mapping space
+static MgPolygon* CreateSelectionPolygon(MgMap* map, double width, double height)
+{
+    Ptr<MgPoint> centerPt = map->GetViewCenter();
+    Ptr<MgCoordinate> center = centerPt->GetCoordinate();
+    double xMin = center->GetX() - 0.5 * width;
+    double yMin = center->GetY() - 0.5 * height;
+    double xMax = center->GetX() + 0.5 * width;
+    double yMax = center->GetY() + 0.5 * height;
+    Ptr<MgCoordinateXY> c1 = new MgCoordinateXY(xMin, yMin);
+    Ptr<MgCoordinateXY> c2 = new MgCoordinateXY(xMax, yMin);
+    Ptr<MgCoordinateXY> c3 = new MgCoordinateXY(xMax, yMax);
+    Ptr<MgCoordinateXY> c4 = new MgCoordinateXY(xMin, yMax);
+    Ptr<MgCoordinateXY> c5 = new MgCoordinateXY(xMin, yMin);
 
-        Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
-        Ptr<MgByteSource> fssrc3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.fs", false);
-        Ptr<MgByteReader> fsrdr3 = fssrc3->GetReader();
-        m_svcResource->SetResource(fsres3, fsrdr3, NULL);
+    Ptr<MgCoordinateCollection> cc = new MgCoordinateCollection();
+    cc->Add(c1);
+    cc->Add(c2);
+    cc->Add(c3);
+    cc->Add(c4);
+    cc->Add(c5);
 
-        // publish the resource data
-        Ptr<MgByteSource> dataSource1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.sdf", false);
-        Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
-        m_svcResource->SetResourceData(fsres1, L"UT_HydrographicPolygons.sdf", L"File", dataReader1);
-
-        Ptr<MgByteSource> dataSource2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.sdf", false);
-        Ptr<MgByteReader> dataReader2 = dataSource2->GetReader();
-        m_svcResource->SetResourceData(fsres2, L"UT_Rail.sdf", L"File", dataReader2);
-
-        Ptr<MgByteSource> dataSource3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.sdf", false);
-        Ptr<MgByteReader> dataReader3 = dataSource3->GetReader();
-        m_svcResource->SetResourceData(fsres3, L"UT_Parcels.sdf", L"File", dataReader3);
-
-        // publish the print layouts
-        Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
-        Ptr<MgByteSource> plsrc1 = new MgByteSource(L"../UnitTestFiles/UT_AllElements.pl", false);
-        Ptr<MgByteReader> plrdr1 = plsrc1->GetReader();
-        m_svcResource->SetResource(plres1, plrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
-        Ptr<MgByteSource> plsrc2 = new MgByteSource(L"../UnitTestFiles/UT_NoLegend.pl", false);
-        Ptr<MgByteReader> plrdr2 = plsrc2->GetReader();
-        m_svcResource->SetResource(plres2, plrdr2, NULL);
-
-        // publish the symbol library
-        Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
-        Ptr<MgByteSource> slsrc1 = new MgByteSource(L"../UnitTestFiles/UT_SymbolMart.sl", false);
-        Ptr<MgByteReader> slrdr1 = slsrc1->GetReader();
-        m_svcResource->SetResource(slres1, slrdr1, NULL);
-        Ptr<MgByteSource> datasrc = new MgByteSource(L"../UnitTestFiles/UT_Symbols.dwf", false);
-        Ptr<MgByteReader> datardr = datasrc->GetReader();
-        m_svcResource->SetResourceData(slres1, L"symbols.dwf", L"File", datardr);
-
-        //
-        // publish symbology stuff
-        //
-
-        // the point feature source
-        Ptr<MgResourceIdentifier> fsres4 = new MgResourceIdentifier(L"Library://UnitTests/Data/Capitals.FeatureSource");
-        Ptr<MgByteSource> fssrc4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.fs", false);
-        Ptr<MgByteReader> fsrdr4 = fssrc4->GetReader();
-        m_svcResource->SetResource(fsres4, fsrdr4, NULL);
-
-        // point sdf file
-        Ptr<MgByteSource> dataSource4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.sdf", false);
-        Ptr<MgByteReader> dataReader4 = dataSource4->GetReader();
-        m_svcResource->SetResourceData(fsres4, L"UT_SymbologyPoints.sdf", L"File", dataReader4);
-
-        // point symbols
-        Ptr<MgResourceIdentifier> sdres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbol.SymbolDefinition");
-        Ptr<MgByteSource> sdsrc1 = new MgByteSource(L"../UnitTestFiles/symbol.sd", false);
-        Ptr<MgByteReader> sdrdr1 = sdsrc1->GetReader();
-        m_svcResource->SetResource(sdres1, sdrdr1, NULL);
-
-        Ptr<MgResourceIdentifier> sdres2 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbolParam.SymbolDefinition");
-        Ptr<MgByteSource> sdsrc2 = new MgByteSource(L"../UnitTestFiles/symbolp.sd", false);
-        Ptr<MgByteReader> sdrdr2 = sdsrc2->GetReader();
-        m_svcResource->SetResource(sdres2, sdrdr2, NULL);
-
-        // point ldf
-        Ptr<MgResourceIdentifier> ldfres4 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Capitals.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.ldf", false);
-        Ptr<MgByteReader> ldfrdr4 = ldfsrc4->GetReader();
-        m_svcResource->SetResource(ldfres4, ldfrdr4, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres5 = new MgResourceIdentifier(L"Library://UnitTests/Layers/CapitalsParam.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPointsParam.ldf", false);
-        Ptr<MgByteReader> ldfrdr5 = ldfsrc5->GetReader();
-        m_svcResource->SetResource(ldfres5, ldfrdr5, NULL);
-
-        // point mdf
-        Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Capitals.MapDefinition");
-        Ptr<MgByteSource> mdfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.mdf", false);
-        Ptr<MgByteReader> mdfrdr2 = mdfsrc2->GetReader();
-        m_svcResource->SetResource(mapres2, mdfrdr2, NULL);
-
-        Ptr<MgResourceIdentifier> mapres3 = new MgResourceIdentifier(L"Library://UnitTests/Maps/CapitalsParam.MapDefinition");
-        Ptr<MgByteSource> mdfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPointsParam.mdf", false);
-        Ptr<MgByteReader> mdfrdr3 = mdfsrc3->GetReader();
-        m_svcResource->SetResource(mapres3, mdfrdr3, NULL);
-
-        // the line feature source
-        Ptr<MgResourceIdentifier> fsres5 = new MgResourceIdentifier(L"Library://UnitTests/Data/Lines.FeatureSource");
-        Ptr<MgByteSource> fssrc5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.fs", false);
-        Ptr<MgByteReader> fsrdr5 = fssrc5->GetReader();
-        m_svcResource->SetResource(fsres5, fsrdr5, NULL);
-
-        // line sdf file
-        Ptr<MgByteSource> dataSource5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.sdf", false);
-        Ptr<MgByteReader> dataReader5 = dataSource5->GetReader();
-        m_svcResource->SetResourceData(fsres5, L"UT_SymbologyLines.sdf", L"File", dataReader5);
-
-        // line symbols
-        Ptr<MgResourceIdentifier> sdres3 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/LineSymbol.SymbolDefinition");
-        Ptr<MgByteSource> sdsrc3 = new MgByteSource(L"../UnitTestFiles/linesymbol.sd", false);
-        Ptr<MgByteReader> sdrdr3 = sdsrc3->GetReader();
-        m_svcResource->SetResource(sdres3, sdrdr3, NULL);
-
-        Ptr<MgResourceIdentifier> sdres4 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/MTYP1500a.SymbolDefinition");
-        Ptr<MgByteSource> sdsrc4 = new MgByteSource(L"../UnitTestFiles/MTYP1500a.sd", false);
-        Ptr<MgByteReader> sdrdr4 = sdsrc4->GetReader();
-        m_svcResource->SetResource(sdres4, sdrdr4, NULL);
-
-        // line ldf
-        Ptr<MgResourceIdentifier> ldfres6 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Lines.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc6 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.ldf", false);
-        Ptr<MgByteReader> ldfrdr6 = ldfsrc6->GetReader();
-        m_svcResource->SetResource(ldfres6, ldfrdr6, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres7 = new MgResourceIdentifier(L"Library://UnitTests/Layers/LinesCrossTick.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc7 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLinesCrossTick.ldf", false);
-        Ptr<MgByteReader> ldfrdr7 = ldfsrc7->GetReader();
-        m_svcResource->SetResource(ldfres7, ldfrdr7, NULL);
-
-        // line mdf
-        Ptr<MgResourceIdentifier> mapres4 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Lines.MapDefinition");
-        Ptr<MgByteSource> mdfsrc4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.mdf", false);
-        Ptr<MgByteReader> mdfrdr4 = mdfsrc4->GetReader();
-        m_svcResource->SetResource(mapres4, mdfrdr4, NULL);
-
-        Ptr<MgResourceIdentifier> mapres5 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinesCrossTick.MapDefinition");
-        Ptr<MgByteSource> mdfsrc5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLinesCrossTick.mdf", false);
-        Ptr<MgByteReader> mdfrdr5 = mdfsrc5->GetReader();
-        m_svcResource->SetResource(mapres5, mdfrdr5, NULL);
-
-        // annotation ldf - this shares the point sdf
-        Ptr<MgResourceIdentifier> ldfres8 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation1.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc8 = new MgByteSource(L"../UnitTestFiles/UT_Annotation1.ldf", false);
-        Ptr<MgByteReader> ldfrdr8 = ldfsrc8->GetReader();
-        m_svcResource->SetResource(ldfres8, ldfrdr8, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres9 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation2.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc9 = new MgByteSource(L"../UnitTestFiles/UT_Annotation2.ldf", false);
-        Ptr<MgByteReader> ldfrdr9 = ldfsrc9->GetReader();
-        m_svcResource->SetResource(ldfres9, ldfrdr9, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres10 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation3.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc10 = new MgByteSource(L"../UnitTestFiles/UT_Annotation3.ldf", false);
-        Ptr<MgByteReader> ldfrdr10 = ldfsrc10->GetReader();
-        m_svcResource->SetResource(ldfres10, ldfrdr10, NULL);
-
-        // annotation mdf
-        Ptr<MgResourceIdentifier> mapres8 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation1.MapDefinition");
-        Ptr<MgByteSource> mdfsrc8 = new MgByteSource(L"../UnitTestFiles/UT_Annotation1.mdf", false);
-        Ptr<MgByteReader> mdfrdr8 = mdfsrc8->GetReader();
-        m_svcResource->SetResource(mapres8, mdfrdr8, NULL);
-
-        Ptr<MgResourceIdentifier> mapres9 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation2.MapDefinition");
-        Ptr<MgByteSource> mdfsrc9 = new MgByteSource(L"../UnitTestFiles/UT_Annotation2.mdf", false);
-        Ptr<MgByteReader> mdfrdr9 = mdfsrc9->GetReader();
-        m_svcResource->SetResource(mapres9, mdfrdr9, NULL);
-
-        Ptr<MgResourceIdentifier> mapres10 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation3.MapDefinition");
-        Ptr<MgByteSource> mdfsrc10 = new MgByteSource(L"../UnitTestFiles/UT_Annotation3.mdf", false);
-        Ptr<MgByteReader> mdfrdr10 = mdfsrc10->GetReader();
-        m_svcResource->SetResource(mapres10, mdfrdr10, NULL);
-
-        //symbology - polygons
-        Ptr<MgResourceIdentifier> mapres11 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_SymbologyPolygons.MapDefinition");
-        Ptr<MgByteSource> mdfsrc11 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPolygons.mdf", false);
-        Ptr<MgByteReader> mdfrdr11 = mdfsrc11->GetReader();
-        m_svcResource->SetResource(mapres11, mdfrdr11, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres11 = new MgResourceIdentifier(L"Library://UnitTests/Layers/SymbologyParcels.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc11 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyParcels.ldf", false);
-        Ptr<MgByteReader> ldfrdr11 = ldfsrc11->GetReader();
-        m_svcResource->SetResource(ldfres11, ldfrdr11, NULL);
-
-        Ptr<MgResourceIdentifier> sdres5 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/AreaSymbol.SymbolDefinition");
-        Ptr<MgByteSource> sdsrc5 = new MgByteSource(L"../UnitTestFiles/areasymbol.sd", false);
-        Ptr<MgByteReader> sdrdr5 = sdsrc5->GetReader();
-        m_svcResource->SetResource(sdres5, sdrdr5, NULL);
-
-        // For watermark test
-        // publish the map definition
-        Ptr<MgResourceIdentifier> mapres12 = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWithWatermark.MapDefinition");
-        Ptr<MgByteSource> mdfsrc12 = new MgByteSource(L"../UnitTestFiles/UT_SheboyganWithWatermark.mdf", false);
-        Ptr<MgByteReader> mdfrdr12 = mdfsrc12->GetReader();
-        m_svcResource->SetResource(mapres12, mdfrdr12, NULL);
-
-        // publish the watermark definition
-        Ptr<MgResourceIdentifier> wdfres1 = new MgResourceIdentifier(L"Library://UnitTests/Watermarks/PoweredByMapGuide.WatermarkDefinition");
-        Ptr<MgByteSource> wdfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_PoweredByMapGuide.wdf", false);
-        Ptr<MgByteReader> wdfrdr1 = wdfsrc1->GetReader();
-        m_svcResource->SetResource(wdfres1, wdfrdr1, NULL);
-
-        // ------------------------------------------------------
-        // base map source data
-        // ------------------------------------------------------
-        // publish the map definition
-        Ptr<MgResourceIdentifier> mapres13 = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
-        Ptr<MgByteSource> mdfsrc13 = new MgByteSource(L"../UnitTestFiles/UT_BaseMap.mdf", false);
-        Ptr<MgByteReader> mdfrdr13 = mdfsrc13->GetReader();
-        m_svcResource->SetResource(mapres13, mdfrdr13, NULL);
-
-        // publish the layer definitions
-        Ptr<MgResourceIdentifier> ldfres12 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RoadCenterLines.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc12 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.ldf", false);
-        Ptr<MgByteReader> ldfrdr12 = ldfsrc12->GetReader();
-        m_svcResource->SetResource(ldfres12, ldfrdr12, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres13 = new MgResourceIdentifier(L"Library://UnitTests/Layers/VotingDistricts.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc13 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.ldf", false);
-        Ptr<MgByteReader> ldfrdr13 = ldfsrc13->GetReader();
-        m_svcResource->SetResource(ldfres13, ldfrdr13, NULL);
-
-        // publish the feature sources
-        Ptr<MgResourceIdentifier> fsres6 = new MgResourceIdentifier(L"Library://UnitTests/Data/RoadCenterLines.FeatureSource");
-        Ptr<MgByteSource> fssrc6 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.fs", false);
-        Ptr<MgByteReader> fsrdr6 = fssrc6->GetReader();
-        m_svcResource->SetResource(fsres6, fsrdr6, NULL);
-
-        Ptr<MgResourceIdentifier> fsres7 = new MgResourceIdentifier(L"Library://UnitTests/Data/VotingDistricts.FeatureSource");
-        Ptr<MgByteSource> fssrc7 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.fs", false);
-        Ptr<MgByteReader> fsrdr7 = fssrc7->GetReader();
-        m_svcResource->SetResource(fsres7, fsrdr7, NULL);
-
-        // publish the resource data
-        Ptr<MgByteSource> dataSource6 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.sdf", false);
-        Ptr<MgByteReader> dataReader6 = dataSource6->GetReader();
-        m_svcResource->SetResourceData(fsres6, L"UT_RoadCenterLines.sdf", L"File", dataReader6);
-
-        Ptr<MgByteSource> dataSource7 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.sdf", false);
-        Ptr<MgByteReader> dataReader7 = dataSource7->GetReader();
-        m_svcResource->SetResourceData(fsres7, L"UT_VotingDistricts.sdf", L"File", dataReader7);
-
-        // ---------------------------------------------------------
-        // Data for exercising legend rendering
-        // ---------------------------------------------------------
-        Ptr<MgResourceIdentifier> ldfres14 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTS.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc14 = new MgByteSource(L"../UnitTestFiles/UT_MultiFTS.ldf", false);
-        Ptr<MgByteReader> ldfrdr14 = ldfsrc14->GetReader();
-        m_svcResource->SetResource(ldfres14, ldfrdr14, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres15 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTS.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc15 = new MgByteSource(L"../UnitTestFiles/UT_MultiCTS.ldf", false);
-        Ptr<MgByteReader> ldfrdr15 = ldfsrc15->GetReader();
-        m_svcResource->SetResource(ldfres15, ldfrdr15, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres16 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTSWithTheme.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc16 = new MgByteSource(L"../UnitTestFiles/UT_MultiFTSWithTheme.ldf", false);
-        Ptr<MgByteReader> ldfrdr16 = ldfsrc16->GetReader();
-        m_svcResource->SetResource(ldfres16, ldfrdr16, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres17 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTSWithTheme.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc17 = new MgByteSource(L"../UnitTestFiles/UT_MultiCTSWithTheme.ldf", false);
-        Ptr<MgByteReader> ldfrdr17 = ldfsrc17->GetReader();
-        m_svcResource->SetResource(ldfres17, ldfrdr17, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres18 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTSSingleCTS.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc18 = new MgByteSource(L"../UnitTestFiles/UT_MultiFTSSingleCTS.ldf", false);
-        Ptr<MgByteReader> ldfrdr18 = ldfsrc18->GetReader();
-        m_svcResource->SetResource(ldfres18, ldfrdr18, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres19 = new MgResourceIdentifier(L"Library://UnitTests/Layers/SingleFTSMultiCTS.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc19 = new MgByteSource(L"../UnitTestFiles/UT_SingleFTSMultiCTS.ldf", false);
-        Ptr<MgByteReader> ldfrdr19 = ldfsrc19->GetReader();
-        m_svcResource->SetResource(ldfres19, ldfrdr19, NULL);
-
-        // Data related to stylization function tests
-        Ptr<MgResourceIdentifier> ldfres20 = new MgResourceIdentifier(L"Library://UnitTests/Layers/StylizationFuncs.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc20 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistrictsFunctions.ldf", false);
-        Ptr<MgByteReader> ldfrdr20 = ldfsrc20->GetReader();
-        m_svcResource->SetResource(ldfres20, ldfrdr20, NULL);
-
-        Ptr<MgResourceIdentifier> mapres15 = new MgResourceIdentifier(L"Library://UnitTests/Maps/StylizationFuncs.MapDefinition");
-        Ptr<MgByteSource> mdfsrc15 = new MgByteSource(L"../UnitTestFiles/UT_StylizationFuncs.mdf", false);
-        Ptr<MgByteReader> mdfrdr15 = mdfsrc15->GetReader();
-        m_svcResource->SetResource(mapres15, mdfrdr15, NULL);
-
-        // For layer watermark test
-        Ptr<MgResourceIdentifier> wdfres2 = new MgResourceIdentifier(L"Library://UnitTests/Watermarks/Rail.WatermarkDefinition");
-        Ptr<MgByteSource> wdfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.wdf", false);
-        Ptr<MgByteReader> wdfrdr2 = wdfsrc2->GetReader();
-        m_svcResource->SetResource(wdfres2, wdfrdr2, NULL);
-
-        Ptr<MgResourceIdentifier> ldfres21 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RailWatermark.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc21 = new MgByteSource(L"../UnitTestFiles/UT_Rail_Watermark.ldf", false);
-        Ptr<MgByteReader> ldfrdr21 = ldfsrc21->GetReader();
-        m_svcResource->SetResource(ldfres21, ldfrdr21, NULL);
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
+    Ptr<MgLinearRing> outer = new MgLinearRing(cc);
+    return new MgPolygon(outer, nullptr);
 }
 
-
-void TestRenderingService::TestEnd()
+static STRING GetPath(CREFSTRING basePath, CREFSTRING imageFormat, CREFSTRING extension)
 {
-    try
-    {
-        // set user info
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
-        MgUserInformation::SetCurrentUserInfo(userInfo);
-
-        // delete the map definition
-        Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
-        m_svcResource->DeleteResource(mapres1);
-
-        // delete tile set
-        Ptr<MgResourceIdentifier> tilesetres1 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/XYZ.TileSetDefinition");
-        m_svcResource->DeleteResource(tilesetres1);
-
-        // delete the layer definitions
-        Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres1);
-
-        Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres2);
-
-        Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres3);
-
-        // delete the feature sources
-        Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
-        m_svcResource->DeleteResource(fsres1);
-
-        Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
-        m_svcResource->DeleteResource(fsres2);
-
-        Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
-        m_svcResource->DeleteResource(fsres3);
-
-        // delete the print layouts
-        Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
-        m_svcResource->DeleteResource(plres1);
-
-        Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
-        m_svcResource->DeleteResource(plres2);
-
-        // delete the symbol library
-        Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
-        m_svcResource->DeleteResource(slres1);
-
-        // delete symbology stuff
-        Ptr<MgResourceIdentifier> fsres4 = new MgResourceIdentifier(L"Library://UnitTests/Data/Capitals.FeatureSource");
-        m_svcResource->DeleteResource(fsres4);
-        Ptr<MgResourceIdentifier> sdres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbol.SymbolDefinition");
-        m_svcResource->DeleteResource(sdres1);
-        Ptr<MgResourceIdentifier> sdres2 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbolParam.SymbolDefinition");
-        m_svcResource->DeleteResource(sdres2);
-        Ptr<MgResourceIdentifier> ldfres4 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Capitals.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres4);
-        Ptr<MgResourceIdentifier> ldfres5 = new MgResourceIdentifier(L"Library://UnitTests/Layers/CapitalsParam.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres5);
-        Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Capitals.MapDefinition");
-        m_svcResource->DeleteResource(mapres2);
-        Ptr<MgResourceIdentifier> mapres3 = new MgResourceIdentifier(L"Library://UnitTests/Maps/CapitalsParam.MapDefinition");
-        m_svcResource->DeleteResource(mapres3);
-
-        Ptr<MgResourceIdentifier> fsres5 = new MgResourceIdentifier(L"Library://UnitTests/Data/Lines.FeatureSource");
-        m_svcResource->DeleteResource(fsres5);
-        Ptr<MgResourceIdentifier> sdres3 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/LineSymbol.SymbolDefinition");
-        m_svcResource->DeleteResource(sdres3);
-        Ptr<MgResourceIdentifier> sdres4 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/MTYP1500a.SymbolDefinition");
-        m_svcResource->DeleteResource(sdres4);
-        Ptr<MgResourceIdentifier> ldfres6 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Lines.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres6);
-        Ptr<MgResourceIdentifier> ldfres7 = new MgResourceIdentifier(L"Library://UnitTests/Layers/LinesCrossTick.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres7);
-        Ptr<MgResourceIdentifier> mapres4 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Lines.MapDefinition");
-        m_svcResource->DeleteResource(mapres4);
-        Ptr<MgResourceIdentifier> mapres5 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinesCrossTick.MapDefinition");
-        m_svcResource->DeleteResource(mapres5);
-
-        Ptr<MgResourceIdentifier> ldfres8 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation1.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres8);
-        Ptr<MgResourceIdentifier> ldfres9 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation2.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres9);
-        Ptr<MgResourceIdentifier> ldfres10 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation3.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres10);
-        Ptr<MgResourceIdentifier> mapres8 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation1.MapDefinition");
-        m_svcResource->DeleteResource(mapres8);
-        Ptr<MgResourceIdentifier> mapres9 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation2.MapDefinition");
-        m_svcResource->DeleteResource(mapres9);
-        Ptr<MgResourceIdentifier> mapres10 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation3.MapDefinition");
-        m_svcResource->DeleteResource(mapres10);
-
-        Ptr<MgResourceIdentifier> mapres11 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_SymbologyPolygons.MapDefinition");
-        m_svcResource->DeleteResource(mapres11);
-        Ptr<MgResourceIdentifier> ldfres11 = new MgResourceIdentifier(L"Library://UnitTests/Layers/SymbologyParcels.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres11);
-        Ptr<MgResourceIdentifier> sdres5 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/AreaSymbol.SymbolDefinition");
-        m_svcResource->DeleteResource(sdres5);
-        
-        Ptr<MgResourceIdentifier> mapres12 = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWithWatermark.MapDefinition");
-        m_svcResource->DeleteResource(mapres12);
-        Ptr<MgResourceIdentifier> wdfres1 = new MgResourceIdentifier(L"Library://UnitTests/Watermarks/PoweredByMapGuide.WatermarkDefinition");
-        m_svcResource->DeleteResource(wdfres1);
-
-        Ptr<MgResourceIdentifier> mapres13 = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
-        m_svcResource->DeleteResource(mapres13);
-        Ptr<MgResourceIdentifier> ldfres12 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RoadCenterLines.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres12);
-        Ptr<MgResourceIdentifier> ldfres13 = new MgResourceIdentifier(L"Library://UnitTests/Layers/VotingDistricts.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres13);
-        Ptr<MgResourceIdentifier> fsres6 = new MgResourceIdentifier(L"Library://UnitTests/Data/RoadCenterLines.FeatureSource");
-        m_svcResource->DeleteResource(fsres6);
-        Ptr<MgResourceIdentifier> fsres7 = new MgResourceIdentifier(L"Library://UnitTests/Data/VotingDistricts.FeatureSource");
-        m_svcResource->DeleteResource(fsres7);
-
-        Ptr<MgResourceIdentifier> ldfres14 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTS.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres14);
-        Ptr<MgResourceIdentifier> ldfres15 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTS.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres15);
-        Ptr<MgResourceIdentifier> ldfres16 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTSWithTheme.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres16);
-        Ptr<MgResourceIdentifier> ldfres17 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTSWithTheme.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres17);
-        Ptr<MgResourceIdentifier> ldfres18 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTSSingleCTS.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres18);
-        Ptr<MgResourceIdentifier> ldfres19 = new MgResourceIdentifier(L"Library://UnitTests/Layers/SingleFTSMultiCTS.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres19);
-
-        // Data related to stylization function tests
-        Ptr<MgResourceIdentifier> ldfres20 = new MgResourceIdentifier(L"Library://UnitTests/Layers/StylizationFuncs.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres20);
-
-        Ptr<MgResourceIdentifier> mapres15 = new MgResourceIdentifier(L"Library://UnitTests/Maps/StylizationFuncs.MapDefinition");
-        m_svcResource->DeleteResource(mapres15);
-
-        // Layer watermark test
-        Ptr<MgResourceIdentifier> wdfres2 = new MgResourceIdentifier(L"Library://UnitTests/Watermarks/Rail.WatermarkDefinition");
-        m_svcResource->DeleteResource(wdfres2);
-        Ptr<MgResourceIdentifier> ldfres21 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RailWatermark.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres21);
-
-        #ifdef _DEBUG
-        MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
-        if(pFdoConnectionManager)
-        {
-            pFdoConnectionManager->ShowCache();
-        }
-        #endif
-    }
-    catch(MgFileIoException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        ACE_DEBUG((LM_INFO, ACE_TEXT("\nMgFileIoException - Possible file permission error.\nError: %W\n"), message.c_str()));
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        message += e->GetStackTrace(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRendering Service tests completed.\n\n")));
+    STRING ret;
+    ret += basePath;
+    ret += L"_";
+    ret += imageFormat;
+    ret += L".";
+    ret += extension;
+    return ret;
 }
 
-
-void TestRenderingService::TestCase_RenderDynamicOverlay(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderDynamicOverlay(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         // make a runtime map
         Ptr<MgMap> map = CreateTestMap();
 
@@ -625,7 +187,7 @@
 
 //        for (int i=0; i<10; i++)
 //        {
-            Ptr<MgByteReader> rdr1 = m_svcRendering->RenderDynamicOverlay(map, NULL, imageFormat);
+            Ptr<MgByteReader> rdr1 = m_svcRendering->RenderDynamicOverlay(map, nullptr, imageFormat);
             rdr1->ToFile(GetPath(L"../UnitTestFiles/RenderDynamicOverlay75k", imageFormat, extension));
 //        }
 
@@ -633,7 +195,7 @@
 
 //        for (int i=0; i<100; i++)
 //        {
-            Ptr<MgByteReader> rdr2 = m_svcRendering->RenderDynamicOverlay(map, NULL, imageFormat);
+            Ptr<MgByteReader> rdr2 = m_svcRendering->RenderDynamicOverlay(map, nullptr, imageFormat);
             rdr2->ToFile(GetPath(L"../UnitTestFiles/RenderDynamicOverlay12k", imageFormat, extension));
 //        }
 
@@ -642,9 +204,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -653,31 +215,33 @@
 }
 
 
-void TestRenderingService::TestCase_RenderDynamicOverlayTiledMap(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderDynamicOverlayTiledMap(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         // make a runtime map
         Ptr<MgMap> map = CreateTestTiledMap();
 
 //        clock_t t0 = clock();
 
-        Ptr<MgRenderingOptions> renderOpts = new MgRenderingOptions(imageFormat, MgRenderingOptions::RenderLayers | MgRenderingOptions::RenderBaseLayers, NULL);
+        Ptr<MgRenderingOptions> renderOpts = new MgRenderingOptions(imageFormat, MgRenderingOptions::RenderLayers | MgRenderingOptions::RenderBaseLayers, nullptr);
 
         map->SetViewScale(12000.0);
 //        for (int i=0; i<10; i++)
 //        {
             //EXPECT: Tiled layers rendered with transparent background for applicable formats
-            Ptr<MgByteReader> rdr1 = m_svcRendering->RenderDynamicOverlay(map, NULL, renderOpts);
+            Ptr<MgByteReader> rdr1 = m_svcRendering->RenderDynamicOverlay(map, nullptr, renderOpts);
             rdr1->ToFile(GetPath(L"../UnitTestFiles/RenderDynamicOverlayTiled_WithBase12k", imageFormat, extension));
 //        }
 
-        Ptr<MgRenderingOptions> renderOpts2 = new MgRenderingOptions(imageFormat, MgRenderingOptions::RenderLayers, NULL);
+        Ptr<MgRenderingOptions> renderOpts2 = new MgRenderingOptions(imageFormat, MgRenderingOptions::RenderLayers, nullptr);
 
 //        for (int i=0; i<100; i++)
 //        {
             //EXPECT: Nothing, with transparent background for applicable formats
-            Ptr<MgByteReader> rdr2 = m_svcRendering->RenderDynamicOverlay(map, NULL, renderOpts2);
+            Ptr<MgByteReader> rdr2 = m_svcRendering->RenderDynamicOverlay(map, nullptr, renderOpts2);
             rdr2->ToFile(GetPath(L"../UnitTestFiles/RenderDynamicOverlayTiled_NoBase12k", imageFormat, extension));
 //        }
 
@@ -686,9 +250,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -697,27 +261,29 @@
 }
 
 
-void TestRenderingService::TestCase_RenderMap(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderMap(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         // make a runtime map
         Ptr<MgMap> map = CreateTestMap();
 
         // call the API using scales of 75000 and 12000
         map->SetViewScale(75000.0);
-        Ptr<MgByteReader> rdr1 = m_svcRendering->RenderMap(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr1 = m_svcRendering->RenderMap(map, nullptr, imageFormat);
         rdr1->ToFile(GetPath(L"../UnitTestFiles/RenderMap75k", imageFormat, extension));
 
         map->SetViewScale(12000.0);
-        Ptr<MgByteReader> rdr2 = m_svcRendering->RenderMap(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr2 = m_svcRendering->RenderMap(map, nullptr, imageFormat);
         rdr2->ToFile(GetPath(L"../UnitTestFiles/RenderMap12k", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -725,10 +291,12 @@
     }
 }
 
-void TestRenderingService::TestCase_RenderMapWithSelection(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderMapWithSelection(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         // make a runtime map
         Ptr<MgMap> map = CreateTestMap();
 
@@ -738,7 +306,7 @@
         
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
         Ptr<MgFeatureService> featSvc = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        assert(featSvc != NULL);
+        assert(featSvc != nullptr);
 
         Ptr<MgFeatureQueryOptions> query = new MgFeatureQueryOptions();
         query->SetFilter(L"Autogenerated_SDF_ID = 1");
@@ -798,9 +366,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -808,27 +376,29 @@
     }
 }
 
-void TestRenderingService::TestCase_RenderMapWithWatermark(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderMapWithWatermark(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         // make a runtime map
         Ptr<MgMap> map = CreateTestMapWithWatermark();
 
         // call the API using scales of 75000 and 12000
         map->SetViewScale(75000.0);
-        Ptr<MgByteReader> rdr1 = m_svcRendering->RenderMap(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr1 = m_svcRendering->RenderMap(map, nullptr, imageFormat);
         rdr1->ToFile(GetPath(L"../UnitTestFiles/RenderMapWithWatermark75k", imageFormat, extension));
 
         map->SetViewScale(12000.0);
-        Ptr<MgByteReader> rdr2 = m_svcRendering->RenderMap(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr2 = m_svcRendering->RenderMap(map, nullptr, imageFormat);
         rdr2->ToFile(GetPath(L"../UnitTestFiles/RenderMapWithWatermark12k", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -837,10 +407,13 @@
 }
 
 
-void TestRenderingService::TestCase_RenderLegend(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderLegend(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgResourceService> m_svcResource = TestServiceFactory::CreateResourceService();
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         // make a runtime map
         Ptr<MgMap> map = CreateTestMap();
 
@@ -915,9 +488,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -925,10 +498,12 @@
     }
 }
 
-void TestRenderingService::TestCase_RenderLegendEmptyGroups(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderLegendEmptyGroups(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         // make a runtime map
         Ptr<MgMap> map = CreateTestMap();
         map->SetViewScale(75000.0);
@@ -967,9 +542,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -977,21 +552,23 @@
     }
 }
 
-void TestRenderingService::TestCase_StylizationFunctions(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_StylizationFunctions(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         Ptr<MgMap> map = CreateTestStylizationFunctionMap();
         
         // call the API using a scale of 75000
         map->SetViewScale(75000.0);
 
-        Ptr<MgByteReader> rdr1 = m_svcRendering->RenderDynamicOverlay(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr1 = m_svcRendering->RenderDynamicOverlay(map, nullptr, imageFormat);
         rdr1->ToFile(GetPath(L"../UnitTestFiles/StylizationFunc_75k", imageFormat, extension));
 
         // call the API using a scale of 12000
         map->SetViewScale(12000);
-        Ptr<MgByteReader> rdr2 = m_svcRendering->RenderDynamicOverlay(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr2 = m_svcRendering->RenderDynamicOverlay(map, nullptr, imageFormat);
         rdr2->ToFile(GetPath(L"../UnitTestFiles/StylizationFunc_12k", imageFormat, extension));
 
         // Move around
@@ -998,14 +575,14 @@
         Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733753, 43.746899);
         Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
         map->SetViewCenter(ptNewCenter);
-        Ptr<MgByteReader> rdr3 = m_svcRendering->RenderDynamicOverlay(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr3 = m_svcRendering->RenderDynamicOverlay(map, nullptr, imageFormat);
         rdr3->ToFile(GetPath(L"../UnitTestFiles/StylizationFunc_12k_Moved", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1013,10 +590,13 @@
     }
 }
 
-void TestRenderingService::TestCase_RenderLegendMultiFTS(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderLegendMultiFTS(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgResourceService> m_svcResource = TestServiceFactory::CreateResourceService();
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         // make a runtime map
         Ptr<MgMap> map = CreateTestMap();
 
@@ -1037,9 +617,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1047,10 +627,13 @@
     }
 }
 
-void TestRenderingService::TestCase_RenderLegendMultiCTS(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderLegendMultiCTS(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgResourceService> m_svcResource = TestServiceFactory::CreateResourceService();
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         // make a runtime map
         Ptr<MgMap> map = CreateTestMap();
 
@@ -1071,9 +654,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1081,10 +664,13 @@
     }
 }
 
-void TestRenderingService::TestCase_RenderLegendMultiFTSWithTheme(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderLegendMultiFTSWithTheme(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgResourceService> m_svcResource = TestServiceFactory::CreateResourceService();
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         // make a runtime map
         Ptr<MgMap> map = CreateTestMap();
 
@@ -1105,9 +691,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1115,10 +701,13 @@
     }
 }
 
-void TestRenderingService::TestCase_RenderLegendMultiCTSWithTheme(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderLegendMultiCTSWithTheme(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgResourceService> m_svcResource = TestServiceFactory::CreateResourceService();
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         // make a runtime map
         Ptr<MgMap> map = CreateTestMap();
 
@@ -1139,9 +728,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1149,10 +738,13 @@
     }
 }
 
-void TestRenderingService::TestCase_RenderLegendMultiFTSSingleCTS(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderLegendMultiFTSSingleCTS(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgResourceService> m_svcResource = TestServiceFactory::CreateResourceService();
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         // make a runtime map
         Ptr<MgMap> map = CreateTestMap();
 
@@ -1173,9 +765,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1184,10 +776,13 @@
 }
 
 
-void TestRenderingService::TestCase_RenderLegendSingleFTSMultiCTS(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderLegendSingleFTSMultiCTS(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgResourceService> m_svcResource = TestServiceFactory::CreateResourceService();
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         // make a runtime map
         Ptr<MgMap> map = CreateTestMap();
 
@@ -1208,9 +803,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1218,10 +813,13 @@
     }
 }
 
-void TestRenderingService::TestCase_LayerWatermark(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_LayerWatermark(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgResourceService> m_svcResource = TestServiceFactory::CreateResourceService();
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         // make a runtime map
         Ptr<MgMap> map = CreateTestMap();
 
@@ -1244,19 +842,19 @@
 
         Ptr<MgColor> selColor = new MgColor(0, 0, 255);
         Ptr<MgRenderingOptions> renderOpts = new MgRenderingOptions(imageFormat, MgRenderingOptions::RenderLayers | MgRenderingOptions::RenderBaseLayers, selColor);
-        Ptr<MgByteReader> img = m_svcRendering->RenderDynamicOverlay(map, NULL, renderOpts);
+        Ptr<MgByteReader> img = m_svcRendering->RenderDynamicOverlay(map, nullptr, renderOpts);
         img->ToFile(GetPath(L"../UnitTestFiles/LayerWatermarkOn", imageFormat, extension));
 
         layer->SetVisible(false);
         map->Save();
-        img = m_svcRendering->RenderDynamicOverlay(map, NULL, renderOpts);
+        img = m_svcRendering->RenderDynamicOverlay(map, nullptr, renderOpts);
         img->ToFile(GetPath(L"../UnitTestFiles/LayerWatermarkOff", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1264,10 +862,12 @@
     }
 }
 
-void TestRenderingService::TestCase_QueryFeatures()
+TEST_CASE("QueryFeatures", "[RenderingService]")
 {
     try
     {
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         // make a runtime map
         Ptr<MgMap> map = CreateTestMap();
 
@@ -1299,9 +899,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1309,128 +909,15 @@
     }
 }
 
-MgMap* TestRenderingService::CreateTestMapWithWatermark()
-{
-    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWithWatermark.MapDefinition");
-    MgMap* map = new MgMap(m_siteConnection);
-    map->Create(mdfres, L"UnitTestSheboyganWithWatermark");
 
-    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
-    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
-    map->SetViewCenter(ptNewCenter);
-    map->SetViewScale(75000.0);
-    map->SetDisplayDpi(96);
-    map->SetDisplayWidth(1024);
-    map->SetDisplayHeight(1024);
-
-    return map;
-}
-
-MgMap* TestRenderingService::CreateTestMap()
+static void TestCase_SymbologyPoints(CREFSTRING imageFormat, CREFSTRING extension)
 {
-    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
-    MgMap* map = new MgMap(m_siteConnection);
-    map->Create(mdfres, L"UnitTestSheboygan");
-
-    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
-    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
-    map->SetViewCenter(ptNewCenter);
-    map->SetViewScale(75000.0);
-    map->SetDisplayDpi(96);
-    map->SetDisplayWidth(1024);
-    map->SetDisplayHeight(1024);
-
-    return map;
-}
-
-MgMap* TestRenderingService::CreateTestStylizationFunctionMap()
-{
-    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/StylizationFuncs.MapDefinition");
-    MgMap* map = new MgMap(m_siteConnection);
-    map->Create(mdfres, L"StylizationFuncs");
-
-    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
-    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
-    map->SetViewCenter(ptNewCenter);
-    map->SetViewScale(60000.0);
-    map->SetDisplayDpi(96);
-    map->SetDisplayWidth(1024);
-    map->SetDisplayHeight(1024);
-
-    return map;
-}
-
-MgMap* TestRenderingService::CreateTestXYZMap()
-{
-    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
-    MgMap* map = new MgMap(m_siteConnection);
-    map->Create(mdfres, L"UnitTestSheboyganXYZ");
-
-    Ptr<MgLayerCollection> layers = map->GetLayers();
-    Ptr<MgLayerGroupCollection> groups = map->GetLayerGroups();
-    Ptr<MgLayerBase> roads = layers->GetItem(L"RoadCenterLines");
-    Ptr<MgLayerGroup> baseGroup = groups->GetItem(L"BaseLayers");
-    roads->SetGroup(baseGroup);
-
-    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
-    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
-    map->SetViewCenter(ptNewCenter);
-    map->SetViewScale(75000.0);
-    map->SetDisplayDpi(96);
-    map->SetDisplayWidth(1024);
-    map->SetDisplayHeight(1024);
-
-    return map;
-}
-
-MgMap* TestRenderingService::CreateTestTiledMap()
-{
-    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
-    MgMap* map = new MgMap(m_siteConnection);
-    map->Create(mdfres, L"UnitTestSheboyganTiled");
-
-    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.733253, 43.746199);
-    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
-    map->SetViewCenter(ptNewCenter);
-    map->SetViewScale(75000.0);
-    map->SetDisplayDpi(96);
-    map->SetDisplayWidth(1024);
-    map->SetDisplayHeight(1024);
-
-    return map;
-}
-
-// creates a selection bounds in mapping space
-MgPolygon* TestRenderingService::CreateSelectionPolygon(MgMap* map, double width, double height)
-{
-    Ptr<MgPoint> centerPt = map->GetViewCenter();
-    Ptr<MgCoordinate> center = centerPt->GetCoordinate();
-    double xMin = center->GetX() - 0.5*width;
-    double yMin = center->GetY() - 0.5*height;
-    double xMax = center->GetX() + 0.5*width;
-    double yMax = center->GetY() + 0.5*height;
-    Ptr<MgCoordinateXY> c1 = new MgCoordinateXY(xMin, yMin);
-    Ptr<MgCoordinateXY> c2 = new MgCoordinateXY(xMax, yMin);
-    Ptr<MgCoordinateXY> c3 = new MgCoordinateXY(xMax, yMax);
-    Ptr<MgCoordinateXY> c4 = new MgCoordinateXY(xMin, yMax);
-    Ptr<MgCoordinateXY> c5 = new MgCoordinateXY(xMin, yMin);
-
-    Ptr<MgCoordinateCollection> cc = new MgCoordinateCollection();
-    cc->Add(c1);
-    cc->Add(c2);
-    cc->Add(c3);
-    cc->Add(c4);
-    cc->Add(c5);
-
-    Ptr<MgLinearRing> outer = new MgLinearRing(cc);
-    return new MgPolygon(outer, NULL);
-}
-
-
-void TestRenderingService::TestCase_SymbologyPoints(CREFSTRING imageFormat, CREFSTRING extension)
-{
     try
     {
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Capitals.MapDefinition");
         Ptr<MgMap> map = new MgMap(m_siteConnection);
@@ -1452,22 +939,26 @@
         map->SetViewScale(scale);
 
         // call the API
-        Ptr<MgByteReader> rdr = m_svcRendering->RenderMap(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr = m_svcRendering->RenderMap(map, nullptr, imageFormat);
         rdr->ToFile(GetPath(L"../UnitTestFiles/SymbologyPoints", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
 
-void TestRenderingService::TestCase_SymbologyPointsParam(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_SymbologyPointsParam(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/CapitalsParam.MapDefinition");
         Ptr<MgMap> map = new MgMap(m_siteConnection);
@@ -1489,22 +980,26 @@
         map->SetViewScale(scale);
 
         // call the API
-        Ptr<MgByteReader> rdr = m_svcRendering->RenderMap(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr = m_svcRendering->RenderMap(map, nullptr, imageFormat);
         rdr->ToFile(GetPath(L"../UnitTestFiles/SymbologyPointsParam", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
 
-void TestRenderingService::TestCase_SymbologyLines(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_SymbologyLines(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Lines.MapDefinition");
         Ptr<MgMap> map = new MgMap(m_siteConnection);
@@ -1526,22 +1021,26 @@
         map->SetViewScale(scale);
 
         // call the API
-        Ptr<MgByteReader> rdr = m_svcRendering->RenderMap(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr = m_svcRendering->RenderMap(map, nullptr, imageFormat);
         rdr->ToFile(GetPath(L"../UnitTestFiles/SymbologyLines", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
 
-void TestRenderingService::TestCase_SymbologyLinesCrossTick(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_SymbologyLinesCrossTick(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinesCrossTick.MapDefinition");
         Ptr<MgMap> map = new MgMap(m_siteConnection);
@@ -1563,22 +1062,26 @@
         map->SetViewScale(scale);
 
         // call the API
-        Ptr<MgByteReader> rdr = m_svcRendering->RenderMap(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr = m_svcRendering->RenderMap(map, nullptr, imageFormat);
         rdr->ToFile(GetPath(L"../UnitTestFiles/SymbologyLinesCrossTick", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
 
-void TestRenderingService::TestCase_Annotation1(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_Annotation1(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation1.MapDefinition");
         Ptr<MgMap> map = new MgMap(m_siteConnection);
@@ -1600,22 +1103,26 @@
         map->SetViewScale(scale);
 
         // call the API
-        Ptr<MgByteReader> rdr = m_svcRendering->RenderMap(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr = m_svcRendering->RenderMap(map, nullptr, imageFormat);
         rdr->ToFile(GetPath(L"../UnitTestFiles/Annotation1", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
 
-void TestRenderingService::TestCase_Annotation2(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_Annotation2(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation2.MapDefinition");
         Ptr<MgMap> map = new MgMap(m_siteConnection);
@@ -1637,22 +1144,26 @@
         map->SetViewScale(scale);
 
         // call the API
-        Ptr<MgByteReader> rdr = m_svcRendering->RenderMap(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr = m_svcRendering->RenderMap(map, nullptr, imageFormat);
         rdr->ToFile(GetPath(L"../UnitTestFiles/Annotation2", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
 
-void TestRenderingService::TestCase_Annotation3(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_Annotation3(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation3.MapDefinition");
         Ptr<MgMap> map = new MgMap(m_siteConnection);
@@ -1674,22 +1185,26 @@
         map->SetViewScale(scale);
 
         // call the API
-        Ptr<MgByteReader> rdr = m_svcRendering->RenderMap(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr = m_svcRendering->RenderMap(map, nullptr, imageFormat);
         rdr->ToFile(GetPath(L"../UnitTestFiles/Annotation3", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
 
-void TestRenderingService::TestCase_SymbologyPolygons(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_SymbologyPolygons(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         // make a runtime map
         Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_SymbologyPolygons.MapDefinition");
         Ptr<MgMap> map = new MgMap(m_siteConnection);
@@ -1703,21 +1218,23 @@
         map->SetDisplayHeight(1024);
 
         map->SetViewScale(12000.0);
-        Ptr<MgByteReader> rdr2 = m_svcRendering->RenderMap(map, NULL, imageFormat);
+        Ptr<MgByteReader> rdr2 = m_svcRendering->RenderMap(map, nullptr, imageFormat);
         rdr2->ToFile(GetPath(L"../UnitTestFiles/SymbologyPolygons", imageFormat, extension));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
-void TestRenderingService::TestCase_RenderMetatile(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderMetatile(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         Ptr<MgMap> map = CreateTestTiledMap();
         map->SetViewScale(12500.0);
         Ptr<MgByteReader> tile4_6_baseline = m_svcRendering->RenderTile(map, L"BaseLayers", 4, 6, MgTileParameters::tileWidth, MgTileParameters::tileHeight, MgTileParameters::tileDPI, imageFormat);
@@ -1731,13 +1248,13 @@
         tile5_7_baseline->ToFile(GetPath(L"../UnitTestFiles/RenderTile_5_7_Baseline", imageFormat, extension));
 
         MgRenderingService* renderSvc = dynamic_cast<MgRenderingService*>(m_svcRendering.p);
-        CPPUNIT_ASSERT(NULL != renderSvc);
+        REQUIRE(nullptr != renderSvc);
 
         // Render a 2x2 metatile which should cover the same tiles as the baseline test.
         INT32 metaTileFactor = 2;
         Ptr<MgMetatile> metaTile = renderSvc->RenderMetatile(map, L"BaseLayers", 4, 6, MgTileParameters::tileWidth, MgTileParameters::tileHeight, MgTileParameters::tileDPI, imageFormat, MgConfigProperties::DefaultRenderingServicePropertyTileExtentOffset, metaTileFactor);
         //metaTile->ToFile(L"../UnitTestFiles/RenderTile_Metatile at 4_6.png");
-        //CPPUNIT_ASSERT(metaTile->IsRewindable());
+        //REQUIRE(metaTile->IsRewindable());
         //metaTile->Rewind();
         Ptr<MgByteReader> tile4_6 = renderSvc->RenderTileFromMetaTile(map, metaTile, 0, 0);
         Ptr<MgByteReader> tile4_7 = renderSvc->RenderTileFromMetaTile(map, metaTile, 0, 1);
@@ -1752,16 +1269,18 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
-void TestRenderingService::TestCase_RenderXYZMetatile(CREFSTRING imageFormat, CREFSTRING extension, INT32 retinaScale)
+static void TestCase_RenderXYZMetatile(CREFSTRING imageFormat, CREFSTRING extension, INT32 retinaScale)
 {
     try
     {
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         STRING retinaSuffix = L"";
         if (retinaScale > 1)
         {
@@ -1784,13 +1303,13 @@
         tile_16799_23892_baseline->ToFile(GetPath(L"../UnitTestFiles/RenderTileXYZ_16799_23892_16_Baseline" + retinaSuffix, imageFormat, extension));
 
         MgRenderingService* renderSvc = dynamic_cast<MgRenderingService*>(m_svcRendering.p);
-        CPPUNIT_ASSERT(NULL != renderSvc);
+        REQUIRE(nullptr != renderSvc);
 
         // Render a 2x2 metatile which should cover the same tiles as the baseline test.
         INT32 metaTileFactor = 2;
         Ptr<MgMetatile> metaTile = renderSvc->RenderMetatileXYZ(map, L"BaseLayers", 16798, 23891, 16, MgTileParameters::tileDPI, imageFormat, MgConfigProperties::DefaultRenderingServicePropertyTileExtentOffset, metaTileFactor, retinaScale);
         //metaTile->ToFile(L"../UnitTestFiles/RenderTileXYZ_Metatile at 16798_23891_16.png");
-        //CPPUNIT_ASSERT(metaTile->IsRewindable());
+        //REQUIRE(metaTile->IsRewindable());
         //metaTile->Rewind();
         Ptr<MgByteReader> tile_16798_23891 = renderSvc->RenderTileFromMetaTile(map, metaTile, 0, 0);
         Ptr<MgByteReader> tile_16799_23891 = renderSvc->RenderTileFromMetaTile(map, metaTile, 1, 0);
@@ -1804,16 +1323,18 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
-void TestRenderingService::TestCase_RenderTile(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderTile(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         Ptr<MgMap> map = CreateTestTiledMap();
         map->SetViewScale(12500.0);
         Ptr<MgByteReader> tile4_6 = m_svcRendering->RenderTile(map, L"BaseLayers", 4, 6, 300, 300, 96, imageFormat);
@@ -1838,16 +1359,18 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
-void TestRenderingService::TestCase_RenderTileXYZ(CREFSTRING imageFormat, CREFSTRING extension)
+static void TestCase_RenderTileXYZ(CREFSTRING imageFormat, CREFSTRING extension)
 {
     try
     {
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         Ptr<MgMap> map = CreateTestTiledMap();
         Ptr<MgByteReader> tileTL = m_svcRendering->RenderTileXYZ(map, L"BaseLayers", 2099, 2985, 13, 96, imageFormat);
         Ptr<MgByteReader> tileTR = m_svcRendering->RenderTileXYZ(map, L"BaseLayers", 2100, 2985, 13, 96, imageFormat);
@@ -1861,16 +1384,18 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
-void TestRenderingService::TestCase_RenderTileUTFGrid()
+TEST_CASE("RenderTileUTFGrid", "[RenderingService]")
 {
     try
     {
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         Ptr<MgMap> map = CreateTestXYZMap();
 
         //For ease of visual verfication, render the XYZ image tiles as baseline
@@ -1897,16 +1422,18 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
-void TestRenderingService::TestCase_RenderTileMVT()
+TEST_CASE("RenderTileMVT", "[RenderingService]")
 {
     try
     {
+        Ptr<MgRenderingService> m_svcRendering = TestServiceFactory::CreateRenderingService();
+
         Ptr<MgMap> map = CreateTestXYZMap();
 
         //For ease of visual verfication, render the XYZ image tiles as baseline
@@ -1926,15 +1453,15 @@
         Ptr<MgByteReader> mvtBL = m_svcRendering->RenderTileMVT(map, L"BaseLayers", 16797, 23894, 16, 96);
         Ptr<MgByteReader> mvtBR = m_svcRendering->RenderTileMVT(map, L"BaseLayers", 16798, 23894, 16, 96);
 
-        CPPUNIT_ASSERT(MgMimeType::Mvt == mvtTL->GetMimeType());
-        CPPUNIT_ASSERT(MgMimeType::Mvt == mvtTR->GetMimeType());
-        CPPUNIT_ASSERT(MgMimeType::Mvt == mvtBL->GetMimeType());
-        CPPUNIT_ASSERT(MgMimeType::Mvt == mvtBR->GetMimeType());
+        REQUIRE(MgMimeType::Mvt == mvtTL->GetMimeType());
+        REQUIRE(MgMimeType::Mvt == mvtTR->GetMimeType());
+        REQUIRE(MgMimeType::Mvt == mvtBL->GetMimeType());
+        REQUIRE(MgMimeType::Mvt == mvtBR->GetMimeType());
 
-        CPPUNIT_ASSERT(mvtTL->GetLength() > 0);
-        CPPUNIT_ASSERT(mvtTR->GetLength() > 0);
-        CPPUNIT_ASSERT(mvtBL->GetLength() > 0);
-        CPPUNIT_ASSERT(mvtBR->GetLength() > 0);
+        REQUIRE(mvtTL->GetLength() > 0);
+        REQUIRE(mvtTR->GetLength() > 0);
+        REQUIRE(mvtBL->GetLength() > 0);
+        REQUIRE(mvtBR->GetLength() > 0);
 
         mvtTL->ToFile(L"../UnitTestFiles/RenderTileMVT_TL.mvt");
         mvtTR->ToFile(L"../UnitTestFiles/RenderTileMVT_TR.mvt");
@@ -1956,31 +1483,20 @@
         Ptr<MgByte> bytesBL = sinkBL->ToBuffer();
         Ptr<MgByte> bytesBR = sinkBR->ToBuffer();
 
-        CPPUNIT_ASSERT(MVTRenderer::IsValidTile(bytesTL->Bytes(), bytesTL->GetLength()));
-        CPPUNIT_ASSERT(MVTRenderer::IsValidTile(bytesTR->Bytes(), bytesTR->GetLength()));
-        CPPUNIT_ASSERT(MVTRenderer::IsValidTile(bytesBL->Bytes(), bytesBL->GetLength()));
-        CPPUNIT_ASSERT(MVTRenderer::IsValidTile(bytesBR->Bytes(), bytesBR->GetLength()));
+        REQUIRE(MVTRenderer::IsValidTile(bytesTL->Bytes(), bytesTL->GetLength()));
+        REQUIRE(MVTRenderer::IsValidTile(bytesTR->Bytes(), bytesTR->GetLength()));
+        REQUIRE(MVTRenderer::IsValidTile(bytesBL->Bytes(), bytesBL->GetLength()));
+        REQUIRE(MVTRenderer::IsValidTile(bytesBR->Bytes(), bytesBR->GetLength()));
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
-STRING TestRenderingService::GetPath(CREFSTRING basePath, CREFSTRING imageFormat, CREFSTRING extension)
-{
-    STRING ret;
-    ret += basePath;
-    ret += L"_";
-    ret += imageFormat;
-    ret += L".";
-    ret += extension;
-    return ret;
-}
-
-//void TestRenderingService::TestCase_RendererPerformance()
+//TEST_CASE("RendererPerformance", "[Performance]")
 //{
 //    /*
 //    LineBuffer lb(8);
@@ -1989,8 +1505,8 @@
 //    lb.LineTo(50, 201.2);
 //    lb.LineTo(207, 203);
 //    lb.Close();
-//*/
-//
+//    */
+//    
 //    LineBuffer lb(8);
 //    lb.MoveTo(1,1);
 //    lb.LineTo(1023, 1);
@@ -1997,45 +1513,154 @@
 //    lb.LineTo(1023, 1023);
 //    lb.LineTo(1, 1023);
 //    lb.Close();
-//
+//    
 //    RS_LineStroke stroke(RS_Color(0), 0, L"Solid", RS_Units_Device);
 //    RS_FillStyle fillstyle(stroke, RS_Color(255,0,0,255), RS_Color(0), L"Solid");
-//
+//    
 //    AGGRenderer* agg = new AGGRenderer(1024, 1024, RS_Color(0xffffffff), false, false, 0.0);
-//
-//    agg->StartMap(NULL, RS_Bounds(0,0,0,1024,1024,0), 1.0, 1.0, 1.0, NULL);
-//
+//    
+//    agg->StartMap(nullptr, RS_Bounds(0,0,0,1024,1024,0), 1.0, 1.0, 1.0, nullptr);
+//    
 //    clock_t t0 = clock();
-//
+//    
 //    for (int i=0; i<10000; i++)
 //        agg->ProcessPolygon(&lb, fillstyle);
-//
+//    
 //    clock_t t1 = clock();
-//
+//    
 //    printf ("diff %d\n", t1 - t0);
-//
+//    
 //    agg->EndMap();
-//
+//    
 //    agg->Save(L"c:\\agg.png", L"PNG");
-//
-//
-//
-//    GDRenderer* gd = new GDRenderer(1024, 1024, RS_Color(0xffffffff), false);
-//
-//    gd->StartMap(NULL, RS_Bounds(0,0,0,1024,1024,0), 1.0, 1.0, 1.0, NULL);
-//
-//    t0 = clock();
-//
-//    for (int i=0; i<10000; i++)
-//        gd->ProcessPolygon(&lb, fillstyle);
-//
-//    t1 = clock();
-//
-//    printf ("diff %d\n", t1 - t0);
-//
-//    gd->EndMap();
-//
-//    gd->Save(L"c:\\gd.png", L"PNG");
-//
-//
 //}
+
+//PNG output tests
+TEST_CASE("RenderDynamicOverlayPNG", "[RenderingService]") { TestCase_RenderDynamicOverlay(L"PNG", L"png"); }
+TEST_CASE("RenderDynamicOverlayTiledMapPNG", "[RenderingService]") { TestCase_RenderDynamicOverlayTiledMap(L"PNG", L"png"); }
+TEST_CASE("RenderMapPNG", "[RenderingService]") { TestCase_RenderMap(L"PNG", L"png"); }
+TEST_CASE("RenderMapWithSelectionPNG", "[RenderingService]") { TestCase_RenderMapWithSelection(L"PNG", L"png"); }
+TEST_CASE("RenderMapWithWatermarkPNG", "[RenderingService]") { TestCase_RenderMapWithWatermark(L"PNG", L"png"); }
+TEST_CASE("RenderLegendPNG", "[RenderingService]") { TestCase_RenderLegend(L"PNG", L"png"); }
+TEST_CASE("RenderLegendEmptyGroupsPNG", "[RenderingService]") { TestCase_RenderLegendEmptyGroups(L"PNG", L"png"); }
+TEST_CASE("SymbologyPointsPNG", "[RenderingService]") { TestCase_SymbologyPoints(L"PNG", L"png"); }
+TEST_CASE("SymbologyPointsParamPNG", "[RenderingService]") { TestCase_SymbologyPointsParam(L"PNG", L"png"); }
+TEST_CASE("SymbologyLinesPNG", "[RenderingService]") { TestCase_SymbologyLines(L"PNG", L"png"); }
+TEST_CASE("SymbologyLinesCrossTickPNG", "[RenderingService]") { TestCase_SymbologyLinesCrossTick(L"PNG", L"png"); }
+TEST_CASE("SymbologyPolygonsPNG", "[RenderingService]") { TestCase_SymbologyPolygons(L"PNG", L"png"); }
+TEST_CASE("Annotation1PNG", "[RenderingService]") { TestCase_Annotation1(L"PNG", L"png"); }
+TEST_CASE("Annotation2PNG", "[RenderingService]") { TestCase_Annotation2(L"PNG", L"png"); }
+TEST_CASE("Annotation3PNG", "[RenderingService]") { TestCase_Annotation3(L"PNG", L"png"); }
+TEST_CASE("RenderLegendMultiFTSPNG", "[RenderingService]") { TestCase_RenderLegendMultiFTS(L"PNG", L"png"); }
+TEST_CASE("RenderLegendMultiCTSPNG", "[RenderingService]") { TestCase_RenderLegendMultiCTS(L"PNG", L"png"); }
+TEST_CASE("RenderLegendMultiFTSWithThemePNG", "[RenderingService]") { TestCase_RenderLegendMultiFTSWithTheme(L"PNG", L"png"); }
+TEST_CASE("RenderLegendMultiCTSWithThemePNG", "[RenderingService]") { TestCase_RenderLegendMultiCTSWithTheme(L"PNG", L"png"); }
+TEST_CASE("RenderLegendMultiFTSSingleCTSPNG", "[RenderingService]") { TestCase_RenderLegendMultiFTSSingleCTS(L"PNG", L"png"); }
+TEST_CASE("RenderLegendSingleFTSMultiCTSPNG", "[RenderingService]") { TestCase_RenderLegendSingleFTSMultiCTS(L"PNG", L"png"); }
+TEST_CASE("StylizationFunctionsPNG", "[RenderingService]") { TestCase_StylizationFunctions(L"PNG", L"png"); }
+TEST_CASE("LayerWatermarkPNG", "[RenderingService]") { TestCase_LayerWatermark(L"PNG", L"png"); }
+TEST_CASE("RenderTilePNG", "[RenderingService]") { TestCase_RenderTile(L"PNG", L"png"); }
+TEST_CASE("RenderTileXYZ_PNG", "[RenderingService]") { TestCase_RenderTileXYZ(L"PNG", L"png"); }
+
+//PNG8 output tests
+TEST_CASE("RenderDynamicOverlayPNG8", "[RenderingService]") { TestCase_RenderDynamicOverlay(L"PNG8", L"png"); }
+TEST_CASE("RenderDynamicOverlayTiledMapPNG8", "[RenderingService]") { TestCase_RenderDynamicOverlayTiledMap(L"PNG8", L"png"); }
+TEST_CASE("RenderMapPNG8", "[RenderingService]") { TestCase_RenderMap(L"PNG8", L"png"); }
+TEST_CASE("RenderMapWithSelectionPNG8", "[RenderingService]") { TestCase_RenderMapWithSelection(L"PNG8", L"png"); }
+TEST_CASE("RenderMapWithWatermarkPNG8", "[RenderingService]") { TestCase_RenderMapWithWatermark(L"PNG8", L"png"); }
+TEST_CASE("RenderLegendPNG8", "[RenderingService]") { TestCase_RenderLegend(L"PNG8", L"png"); }
+TEST_CASE("RenderLegendEmptyGroupsPNG8", "[RenderingService]") { TestCase_RenderLegendEmptyGroups(L"PNG8", L"png"); }
+TEST_CASE("SymbologyPointsPNG8", "[RenderingService]") { TestCase_SymbologyPoints(L"PNG8", L"png"); }
+TEST_CASE("SymbologyPointsParamPNG8", "[RenderingService]") { TestCase_SymbologyPointsParam(L"PNG8", L"png"); }
+TEST_CASE("SymbologyLinesPNG8", "[RenderingService]") { TestCase_SymbologyLines(L"PNG8", L"png"); }
+TEST_CASE("SymbologyLinesCrossTickPNG8", "[RenderingService]") { TestCase_SymbologyLinesCrossTick(L"PNG8", L"png"); }
+TEST_CASE("SymbologyPolygonsPNG8", "[RenderingService]") { TestCase_SymbologyPolygons(L"PNG8", L"png"); }
+TEST_CASE("Annotation1PNG8", "[RenderingService]") { TestCase_Annotation1(L"PNG8", L"png"); }
+TEST_CASE("Annotation2PNG8", "[RenderingService]") { TestCase_Annotation2(L"PNG8", L"png"); }
+TEST_CASE("Annotation3PNG8", "[RenderingService]") { TestCase_Annotation3(L"PNG8", L"png"); }
+TEST_CASE("RenderLegendMultiFTSPNG8", "[RenderingService]") { TestCase_RenderLegendMultiFTS(L"PNG8", L"png"); }
+TEST_CASE("RenderLegendMultiCTSPNG8", "[RenderingService]") { TestCase_RenderLegendMultiCTS(L"PNG8", L"png"); }
+TEST_CASE("RenderLegendMultiFTSWithThemePNG8", "[RenderingService]") { TestCase_RenderLegendMultiFTSWithTheme(L"PNG8", L"png"); }
+TEST_CASE("RenderLegendMultiCTSWithThemePNG8", "[RenderingService]") { TestCase_RenderLegendMultiCTSWithTheme(L"PNG8", L"png"); }
+TEST_CASE("RenderLegendMultiFTSSingleCTSPNG8", "[RenderingService]") { TestCase_RenderLegendMultiFTSSingleCTS(L"PNG8", L"png"); }
+TEST_CASE("RenderLegendSingleFTSMultiCTSPNG8", "[RenderingService]") { TestCase_RenderLegendSingleFTSMultiCTS(L"PNG8", L"png"); }
+TEST_CASE("StylizationFunctionsPNG8", "[RenderingService]") { TestCase_StylizationFunctions(L"PNG8", L"png"); }
+TEST_CASE("LayerWatermarkPNG8", "[RenderingService]") { TestCase_LayerWatermark(L"PNG8", L"png"); }
+TEST_CASE("RenderTilePNG8", "[RenderingService]") { TestCase_RenderTile(L"PNG8", L"png"); }
+TEST_CASE("RenderTileXYZ_PNG8", "[RenderingService]") { TestCase_RenderTileXYZ(L"PNG8", L"png"); }
+
+//GIF output tests
+TEST_CASE("RenderDynamicOverlayGIF", "[RenderingService]") { TestCase_RenderDynamicOverlay(L"GIF", L"gif"); }
+TEST_CASE("RenderDynamicOverlayTiledMapGIF", "[RenderingService]") { TestCase_RenderDynamicOverlayTiledMap(L"GIF", L"gif"); }
+TEST_CASE("RenderMapGIF", "[RenderingService]") { TestCase_RenderMap(L"GIF", L"gif"); }
+TEST_CASE("RenderMapWithSelectionGIF", "[RenderingService]") { TestCase_RenderMapWithSelection(L"GIF", L"gif"); }
+TEST_CASE("RenderMapWithWatermarkGIF", "[RenderingService]") { TestCase_RenderMapWithWatermark(L"GIF", L"gif"); }
+TEST_CASE("RenderLegendGIF", "[RenderingService]") { TestCase_RenderLegend(L"GIF", L"gif"); }
+TEST_CASE("RenderLegendEmptyGroupsGIF", "[RenderingService]") { TestCase_RenderLegendEmptyGroups(L"GIF", L"gif"); }
+TEST_CASE("SymbologyPointsGIF", "[RenderingService]") { TestCase_SymbologyPoints(L"GIF", L"gif"); }
+TEST_CASE("SymbologyPointsParamGIF", "[RenderingService]") { TestCase_SymbologyPointsParam(L"GIF", L"gif"); }
+TEST_CASE("SymbologyLinesGIF", "[RenderingService]") { TestCase_SymbologyLines(L"GIF", L"gif"); }
+TEST_CASE("SymbologyLinesCrossTickGIF", "[RenderingService]") { TestCase_SymbologyLinesCrossTick(L"GIF", L"gif"); }
+TEST_CASE("SymbologyPolygonsGIF", "[RenderingService]") { TestCase_SymbologyPolygons(L"GIF", L"gif"); }
+TEST_CASE("Annotation1GIF", "[RenderingService]") { TestCase_Annotation1(L"GIF", L"gif"); }
+TEST_CASE("Annotation2GIF", "[RenderingService]") { TestCase_Annotation2(L"GIF", L"gif"); }
+TEST_CASE("Annotation3GIF", "[RenderingService]") { TestCase_Annotation3(L"GIF", L"gif"); }
+TEST_CASE("RenderLegendMultiFTSGIF", "[RenderingService]") { TestCase_RenderLegendMultiFTS(L"GIF", L"gif"); }
+TEST_CASE("RenderLegendMultiCTSGIF", "[RenderingService]") { TestCase_RenderLegendMultiCTS(L"GIF", L"gif"); }
+TEST_CASE("RenderLegendMultiFTSWithThemeGIF", "[RenderingService]") { TestCase_RenderLegendMultiFTSWithTheme(L"GIF", L"gif"); }
+TEST_CASE("RenderLegendMultiCTSWithThemeGIF", "[RenderingService]") { TestCase_RenderLegendMultiCTSWithTheme(L"GIF", L"gif"); }
+TEST_CASE("RenderLegendMultiFTSSingleCTSGIF", "[RenderingService]") { TestCase_RenderLegendMultiFTSSingleCTS(L"GIF", L"gif"); }
+TEST_CASE("RenderLegendSingleFTSMultiCTSGIF", "[RenderingService]") { TestCase_RenderLegendSingleFTSMultiCTS(L"GIF", L"gif"); }
+TEST_CASE("StylizationFunctionsGIF", "[RenderingService]") { TestCase_StylizationFunctions(L"GIF", L"gif"); }
+TEST_CASE("LayerWatermarkGIF", "[RenderingService]") { TestCase_LayerWatermark(L"GIF", L"gif"); }
+TEST_CASE("RenderTileGIF", "[RenderingService]") { TestCase_RenderTile(L"GIF", L"gif"); }
+TEST_CASE("RenderTileXYZ_GIF", "[RenderingService]") { TestCase_RenderTileXYZ(L"GIF", L"gif"); }
+
+//JPG output tests
+TEST_CASE("RenderDynamicOverlayJPG", "[RenderingService]") { TestCase_RenderDynamicOverlay(L"JPG", L"jpg"); }
+TEST_CASE("RenderDynamicOverlayTiledMapJPG", "[RenderingService]") { TestCase_RenderDynamicOverlayTiledMap(L"JPG", L"jpg"); }
+TEST_CASE("RenderMapJPG", "[RenderingService]") { TestCase_RenderMap(L"JPG", L"jpg"); }
+TEST_CASE("RenderMapWithSelectionJPG", "[RenderingService]") { TestCase_RenderMapWithSelection(L"JPG", L"jpg"); }
+TEST_CASE("RenderMapWithWatermarkJPG", "[RenderingService]") { TestCase_RenderMapWithWatermark(L"JPG", L"jpg"); }
+TEST_CASE("RenderLegendJPG", "[RenderingService]") { TestCase_RenderLegend(L"JPG", L"jpg"); }
+TEST_CASE("RenderLegendEmptyGroupsJPG", "[RenderingService]") { TestCase_RenderLegendEmptyGroups(L"JPG", L"jpg"); }
+TEST_CASE("SymbologyPointsJPG", "[RenderingService]") { TestCase_SymbologyPoints(L"JPG", L"jpg"); }
+TEST_CASE("SymbologyPointsParamJPG", "[RenderingService]") { TestCase_SymbologyPointsParam(L"JPG", L"jpg"); }
+TEST_CASE("SymbologyLinesJPG", "[RenderingService]") { TestCase_SymbologyLines(L"JPG", L"jpg"); }
+TEST_CASE("SymbologyLinesCrossTickJPG", "[RenderingService]") { TestCase_SymbologyLinesCrossTick(L"JPG", L"jpg"); }
+TEST_CASE("SymbologyPolygonsJPG", "[RenderingService]") { TestCase_SymbologyPolygons(L"JPG", L"jpg"); }
+TEST_CASE("Annotation1JPG", "[RenderingService]") { TestCase_Annotation1(L"JPG", L"jpg"); }
+TEST_CASE("Annotation2JPG", "[RenderingService]") { TestCase_Annotation2(L"JPG", L"jpg"); }
+TEST_CASE("Annotation3JPG", "[RenderingService]") { TestCase_Annotation3(L"JPG", L"jpg"); }
+TEST_CASE("RenderLegendMultiFTSJPG", "[RenderingService]") { TestCase_RenderLegendMultiFTS(L"JPG", L"jpg"); }
+TEST_CASE("RenderLegendMultiCTSJPG", "[RenderingService]") { TestCase_RenderLegendMultiCTS(L"JPG", L"jpg"); }
+TEST_CASE("RenderLegendMultiFTSWithThemeJPG", "[RenderingService]") { TestCase_RenderLegendMultiFTSWithTheme(L"JPG", L"jpg"); }
+TEST_CASE("RenderLegendMultiCTSWithThemeJPG", "[RenderingService]") { TestCase_RenderLegendMultiCTSWithTheme(L"JPG", L"jpg"); }
+TEST_CASE("RenderLegendMultiFTSSingleCTSJPG", "[RenderingService]") { TestCase_RenderLegendMultiFTSSingleCTS(L"JPG", L"jpg"); }
+TEST_CASE("RenderLegendSingleFTSMultiCTSJPG", "[RenderingService]") { TestCase_RenderLegendSingleFTSMultiCTS(L"JPG", L"jpg"); }
+TEST_CASE("StylizationFunctionsJPG", "[RenderingService]") { TestCase_StylizationFunctions(L"JPG", L"jpg"); }
+TEST_CASE("LayerWatermarkJPG", "[RenderingService]") { TestCase_LayerWatermark(L"JPG", L"jpg"); }
+TEST_CASE("RenderTileJPG", "[RenderingService]") { TestCase_RenderTile(L"JPG", L"jpg"); }
+TEST_CASE("RenderTileXYZ_JPG", "[RenderingService]") { TestCase_RenderTileXYZ(L"JPG", L"jpg"); }
+
+//TEST_CASE("RendererPerformance();
+
+TEST_CASE("RenderMetatilePNG", "[RenderingService]") { TestCase_RenderMetatile(L"PNG", L"png"); }
+TEST_CASE("RenderMetatilePNG8", "[RenderingService]") { TestCase_RenderMetatile(L"PNG8", L"png"); }
+TEST_CASE("RenderMetatileJPG", "[RenderingService]") { TestCase_RenderMetatile(L"JPG", L"jpg"); }
+TEST_CASE("RenderMetatileGIF", "[RenderingService]") { TestCase_RenderMetatile(L"GIF", L"gif"); }
+
+TEST_CASE("RenderXYZMetatilePNG", "[RenderingService]") { TestCase_RenderXYZMetatile(L"PNG", L"png", 1); }
+TEST_CASE("RenderXYZMetatilePNG8", "[RenderingService]") { TestCase_RenderXYZMetatile(L"PNG8", L"png", 1); }
+TEST_CASE("RenderXYZMetatileJPG", "[RenderingService]") { TestCase_RenderXYZMetatile(L"JPG", L"jpg", 1); }
+TEST_CASE("RenderXYZMetatileGIF", "[RenderingService]") { TestCase_RenderXYZMetatile(L"GIF", L"gif", 1); }
+
+TEST_CASE("RenderXYZMetatilePNG_2x", "[RenderingService]") { TestCase_RenderXYZMetatile(L"PNG", L"png", 2); }
+TEST_CASE("RenderXYZMetatilePNG8_2x", "[RenderingService]") { TestCase_RenderXYZMetatile(L"PNG8", L"png", 2); }
+TEST_CASE("RenderXYZMetatileJPG_2x", "[RenderingService]") { TestCase_RenderXYZMetatile(L"JPG", L"jpg", 2); }
+TEST_CASE("RenderXYZMetatileGIF_2x", "[RenderingService]") { TestCase_RenderXYZMetatile(L"GIF", L"gif", 2); }
+
+TEST_CASE("RenderXYZMetatilePNG_4x", "[RenderingService]") { TestCase_RenderXYZMetatile(L"PNG", L"png", 4); }
+TEST_CASE("RenderXYZMetatilePNG8_4x", "[RenderingService]") { TestCase_RenderXYZMetatile(L"PNG8", L"png", 4); }
+TEST_CASE("RenderXYZMetatileJPG_4x", "[RenderingService]") { TestCase_RenderXYZMetatile(L"JPG", L"jpg", 4); }
+TEST_CASE("RenderXYZMetatileGIF_4x", "[RenderingService]") { TestCase_RenderXYZMetatile(L"GIF", L"gif", 4); }
\ No newline at end of file

Deleted: trunk/MgDev/Server/src/UnitTesting/TestRenderingService.h
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestRenderingService.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestRenderingService.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,364 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _TESTRENDERINGSERVICE_H
-#define _TESTRENDERINGSERVICE_H
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestRenderingService : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestRenderingService);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_RenderXYZMetatilePNG);
-    CPPUNIT_TEST(TestCase_RenderXYZMetatilePNG8);
-    CPPUNIT_TEST(TestCase_RenderXYZMetatileJPG);
-    CPPUNIT_TEST(TestCase_RenderXYZMetatileGIF);
-
-    CPPUNIT_TEST(TestCase_RenderXYZMetatilePNG_2x);
-    CPPUNIT_TEST(TestCase_RenderXYZMetatilePNG8_2x);
-    CPPUNIT_TEST(TestCase_RenderXYZMetatileJPG_2x);
-    CPPUNIT_TEST(TestCase_RenderXYZMetatileGIF_2x);
-
-    CPPUNIT_TEST(TestCase_RenderXYZMetatilePNG_4x);
-    CPPUNIT_TEST(TestCase_RenderXYZMetatilePNG8_4x);
-    CPPUNIT_TEST(TestCase_RenderXYZMetatileJPG_4x);
-    CPPUNIT_TEST(TestCase_RenderXYZMetatileGIF_4x);
-    
-    CPPUNIT_TEST(TestCase_RenderMetatilePNG);
-    CPPUNIT_TEST(TestCase_RenderMetatilePNG8);
-    CPPUNIT_TEST(TestCase_RenderMetatileJPG);
-    CPPUNIT_TEST(TestCase_RenderMetatileGIF);
-    
-    CPPUNIT_TEST(TestCase_StylizationFunctionsPNG);
-
-    CPPUNIT_TEST(TestCase_SymbologyPointsPNG);
-    CPPUNIT_TEST(TestCase_SymbologyPointsParamPNG);
-    CPPUNIT_TEST(TestCase_SymbologyLinesPNG);
-    CPPUNIT_TEST(TestCase_SymbologyLinesCrossTickPNG);
-    CPPUNIT_TEST(TestCase_SymbologyPolygonsPNG);
-
-    CPPUNIT_TEST(TestCase_Annotation1PNG);
-    CPPUNIT_TEST(TestCase_Annotation2PNG);
-    CPPUNIT_TEST(TestCase_Annotation3PNG);
-
-    CPPUNIT_TEST(TestCase_RenderDynamicOverlayPNG);
-    CPPUNIT_TEST(TestCase_RenderDynamicOverlayTiledMapPNG);
-    CPPUNIT_TEST(TestCase_RenderMapPNG);
-    CPPUNIT_TEST(TestCase_RenderMapWithSelectionPNG);
-    CPPUNIT_TEST(TestCase_RenderMapWithWatermarkPNG);
-    CPPUNIT_TEST(TestCase_RenderLegendPNG);
-    CPPUNIT_TEST(TestCase_RenderLegendEmptyGroupsPNG);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiFTSPNG);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiCTSPNG);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiFTSWithThemePNG);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiCTSWithThemePNG);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiFTSSingleCTSPNG);
-    CPPUNIT_TEST(TestCase_RenderLegendSingleFTSMultiCTSPNG);
-    CPPUNIT_TEST(TestCase_LayerWatermarkPNG);
-    CPPUNIT_TEST(TestCase_RenderTilePNG);
-    CPPUNIT_TEST(TestCase_RenderTileXYZ_PNG);
-    CPPUNIT_TEST(TestCase_RenderTileUTFGrid);
-    CPPUNIT_TEST(TestCase_RenderTileMVT);
-
-    CPPUNIT_TEST(TestCase_StylizationFunctionsPNG8);
-
-    CPPUNIT_TEST(TestCase_SymbologyPointsPNG8);
-    CPPUNIT_TEST(TestCase_SymbologyPointsParamPNG8);
-    CPPUNIT_TEST(TestCase_SymbologyLinesPNG8);
-    CPPUNIT_TEST(TestCase_SymbologyLinesCrossTickPNG8);
-    CPPUNIT_TEST(TestCase_SymbologyPolygonsPNG8);
-
-    CPPUNIT_TEST(TestCase_Annotation1PNG8);
-    CPPUNIT_TEST(TestCase_Annotation2PNG8);
-    CPPUNIT_TEST(TestCase_Annotation3PNG8);
-
-    CPPUNIT_TEST(TestCase_RenderDynamicOverlayPNG8);
-    CPPUNIT_TEST(TestCase_RenderDynamicOverlayTiledMapPNG8);
-    CPPUNIT_TEST(TestCase_RenderMapPNG8);
-    CPPUNIT_TEST(TestCase_RenderMapWithSelectionPNG8);
-    CPPUNIT_TEST(TestCase_RenderMapWithWatermarkPNG8);
-    CPPUNIT_TEST(TestCase_RenderLegendPNG8);
-    CPPUNIT_TEST(TestCase_RenderLegendEmptyGroupsPNG8);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiFTSPNG8);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiCTSPNG8);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiFTSWithThemePNG8);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiCTSWithThemePNG8);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiFTSSingleCTSPNG8);
-    CPPUNIT_TEST(TestCase_RenderLegendSingleFTSMultiCTSPNG8);
-    CPPUNIT_TEST(TestCase_LayerWatermarkPNG8);
-    CPPUNIT_TEST(TestCase_RenderTilePNG8);
-    CPPUNIT_TEST(TestCase_RenderTileXYZ_PNG8);
-
-    CPPUNIT_TEST(TestCase_StylizationFunctionsGIF);
-
-    CPPUNIT_TEST(TestCase_SymbologyPointsGIF);
-    CPPUNIT_TEST(TestCase_SymbologyPointsParamGIF);
-    CPPUNIT_TEST(TestCase_SymbologyLinesGIF);
-    CPPUNIT_TEST(TestCase_SymbologyLinesCrossTickGIF);
-    CPPUNIT_TEST(TestCase_SymbologyPolygonsGIF);
-
-    CPPUNIT_TEST(TestCase_Annotation1GIF);
-    CPPUNIT_TEST(TestCase_Annotation2GIF);
-    CPPUNIT_TEST(TestCase_Annotation3GIF);
-
-    CPPUNIT_TEST(TestCase_RenderDynamicOverlayGIF);
-    CPPUNIT_TEST(TestCase_RenderDynamicOverlayTiledMapGIF);
-    CPPUNIT_TEST(TestCase_RenderMapGIF);
-    CPPUNIT_TEST(TestCase_RenderMapWithSelectionGIF);
-    CPPUNIT_TEST(TestCase_RenderMapWithWatermarkGIF);
-    CPPUNIT_TEST(TestCase_RenderLegendGIF);
-    CPPUNIT_TEST(TestCase_RenderLegendEmptyGroupsGIF);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiFTSGIF);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiCTSGIF);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiFTSWithThemeGIF);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiCTSWithThemeGIF);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiFTSSingleCTSGIF);
-    CPPUNIT_TEST(TestCase_RenderLegendSingleFTSMultiCTSGIF);
-    CPPUNIT_TEST(TestCase_LayerWatermarkGIF);
-    CPPUNIT_TEST(TestCase_RenderTileGIF);
-    CPPUNIT_TEST(TestCase_RenderTileXYZ_GIF);
-
-    CPPUNIT_TEST(TestCase_StylizationFunctionsJPG);
-
-    CPPUNIT_TEST(TestCase_SymbologyPointsJPG);
-    CPPUNIT_TEST(TestCase_SymbologyPointsParamJPG);
-    CPPUNIT_TEST(TestCase_SymbologyLinesJPG);
-    CPPUNIT_TEST(TestCase_SymbologyLinesCrossTickJPG);
-    CPPUNIT_TEST(TestCase_SymbologyPolygonsJPG);
-
-    CPPUNIT_TEST(TestCase_Annotation1JPG);
-    CPPUNIT_TEST(TestCase_Annotation2JPG);
-    CPPUNIT_TEST(TestCase_Annotation3JPG);
-
-    CPPUNIT_TEST(TestCase_RenderDynamicOverlayJPG);
-    CPPUNIT_TEST(TestCase_RenderDynamicOverlayTiledMapJPG);
-    CPPUNIT_TEST(TestCase_RenderMapJPG);
-    CPPUNIT_TEST(TestCase_RenderMapWithSelectionJPG);
-    CPPUNIT_TEST(TestCase_RenderMapWithWatermarkJPG);
-    CPPUNIT_TEST(TestCase_RenderLegendJPG);
-    CPPUNIT_TEST(TestCase_RenderLegendEmptyGroupsJPG);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiFTSJPG);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiCTSJPG);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiFTSWithThemeJPG);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiCTSWithThemeJPG);
-    CPPUNIT_TEST(TestCase_RenderLegendMultiFTSSingleCTSJPG);
-    CPPUNIT_TEST(TestCase_RenderLegendSingleFTSMultiCTSJPG);
-    CPPUNIT_TEST(TestCase_LayerWatermarkJPG);
-    CPPUNIT_TEST(TestCase_RenderTileJPG);
-    CPPUNIT_TEST(TestCase_RenderTileXYZ_JPG);
-
-    CPPUNIT_TEST(TestCase_QueryFeatures);
-    //CPPUNIT_TEST(TestCase_RendererPerformance);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    TestRenderingService();
-    ~TestRenderingService();
-
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    void TestCase_QueryFeatures();
-    void TestCase_RenderTileUTFGrid();
-    void TestCase_RenderTileMVT();
-
-    void TestCase_RenderMetatile(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_RenderXYZMetatile(CREFSTRING imageFormat, CREFSTRING extension, INT32 retinaScale);
-    void TestCase_RenderTile(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_RenderTileXYZ(CREFSTRING imageFormat, CREFSTRING extension);
-
-    //Parameterized versions that all format-specific tests call into
-    void TestCase_RenderDynamicOverlay(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_RenderDynamicOverlayTiledMap(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_RenderMap(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_RenderMapWithSelection(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_RenderMapWithWatermark(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_RenderLegend(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_RenderLegendEmptyGroups(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_RenderLegendMultiFTS(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_RenderLegendMultiCTS(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_RenderLegendMultiFTSWithTheme(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_RenderLegendMultiCTSWithTheme(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_RenderLegendMultiFTSSingleCTS(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_RenderLegendSingleFTSMultiCTS(CREFSTRING imageFormat, CREFSTRING extension);
-
-    void TestCase_LayerWatermark(CREFSTRING imageFormat, CREFSTRING extension);
-    
-    void TestCase_SymbologyPoints(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_SymbologyPointsParam(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_SymbologyLines(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_SymbologyLinesCrossTick(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_SymbologyPolygons(CREFSTRING imageFormat, CREFSTRING extension);
-
-    void TestCase_Annotation1(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_Annotation2(CREFSTRING imageFormat, CREFSTRING extension);
-    void TestCase_Annotation3(CREFSTRING imageFormat, CREFSTRING extension);
-
-    void TestCase_StylizationFunctions(CREFSTRING imageFormat, CREFSTRING extension);
-
-    //PNG output tests
-    void TestCase_RenderDynamicOverlayPNG() { TestCase_RenderDynamicOverlay(L"PNG", L"png"); }
-    void TestCase_RenderDynamicOverlayTiledMapPNG() { TestCase_RenderDynamicOverlayTiledMap(L"PNG", L"png"); }
-    void TestCase_RenderMapPNG() { TestCase_RenderMap(L"PNG", L"png"); }
-    void TestCase_RenderMapWithSelectionPNG() { TestCase_RenderMapWithSelection(L"PNG", L"png"); }
-    void TestCase_RenderMapWithWatermarkPNG() { TestCase_RenderMapWithWatermark(L"PNG", L"png"); }
-    void TestCase_RenderLegendPNG() { TestCase_RenderLegend(L"PNG", L"png"); }
-    void TestCase_RenderLegendEmptyGroupsPNG() { TestCase_RenderLegendEmptyGroups(L"PNG", L"png"); }
-    void TestCase_SymbologyPointsPNG() { TestCase_SymbologyPoints(L"PNG", L"png"); }
-    void TestCase_SymbologyPointsParamPNG() { TestCase_SymbologyPointsParam(L"PNG", L"png"); }
-    void TestCase_SymbologyLinesPNG() { TestCase_SymbologyLines(L"PNG", L"png"); }
-    void TestCase_SymbologyLinesCrossTickPNG() { TestCase_SymbologyLinesCrossTick(L"PNG", L"png"); }
-    void TestCase_SymbologyPolygonsPNG() { TestCase_SymbologyPolygons(L"PNG", L"png"); }
-    void TestCase_Annotation1PNG() { TestCase_Annotation1(L"PNG", L"png"); }
-    void TestCase_Annotation2PNG() { TestCase_Annotation2(L"PNG", L"png"); }
-    void TestCase_Annotation3PNG() { TestCase_Annotation3(L"PNG", L"png"); }
-    void TestCase_RenderLegendMultiFTSPNG() { TestCase_RenderLegendMultiFTS(L"PNG", L"png"); }
-    void TestCase_RenderLegendMultiCTSPNG() { TestCase_RenderLegendMultiCTS(L"PNG", L"png"); }
-    void TestCase_RenderLegendMultiFTSWithThemePNG() { TestCase_RenderLegendMultiFTSWithTheme(L"PNG", L"png"); }
-    void TestCase_RenderLegendMultiCTSWithThemePNG() { TestCase_RenderLegendMultiCTSWithTheme(L"PNG", L"png"); }
-    void TestCase_RenderLegendMultiFTSSingleCTSPNG() { TestCase_RenderLegendMultiFTSSingleCTS(L"PNG", L"png"); }
-    void TestCase_RenderLegendSingleFTSMultiCTSPNG() { TestCase_RenderLegendSingleFTSMultiCTS(L"PNG", L"png"); }
-    void TestCase_StylizationFunctionsPNG() { TestCase_StylizationFunctions(L"PNG", L"png"); }
-    void TestCase_LayerWatermarkPNG() { TestCase_LayerWatermark(L"PNG", L"png"); }
-    void TestCase_RenderTilePNG() { TestCase_RenderTile(L"PNG", L"png"); }
-    void TestCase_RenderTileXYZ_PNG() { TestCase_RenderTileXYZ(L"PNG", L"png"); }
-
-    //PNG8 output tests
-    void TestCase_RenderDynamicOverlayPNG8() { TestCase_RenderDynamicOverlay(L"PNG8", L"png"); }
-    void TestCase_RenderDynamicOverlayTiledMapPNG8() { TestCase_RenderDynamicOverlayTiledMap(L"PNG8", L"png"); }
-    void TestCase_RenderMapPNG8() { TestCase_RenderMap(L"PNG8", L"png"); }
-    void TestCase_RenderMapWithSelectionPNG8() { TestCase_RenderMapWithSelection(L"PNG8", L"png"); }
-    void TestCase_RenderMapWithWatermarkPNG8() { TestCase_RenderMapWithWatermark(L"PNG8", L"png"); }
-    void TestCase_RenderLegendPNG8() { TestCase_RenderLegend(L"PNG8", L"png"); }
-    void TestCase_RenderLegendEmptyGroupsPNG8() { TestCase_RenderLegendEmptyGroups(L"PNG8", L"png"); }
-    void TestCase_SymbologyPointsPNG8() { TestCase_SymbologyPoints(L"PNG8", L"png"); }
-    void TestCase_SymbologyPointsParamPNG8() { TestCase_SymbologyPointsParam(L"PNG8", L"png"); }
-    void TestCase_SymbologyLinesPNG8() { TestCase_SymbologyLines(L"PNG8", L"png"); }
-    void TestCase_SymbologyLinesCrossTickPNG8() { TestCase_SymbologyLinesCrossTick(L"PNG8", L"png"); }
-    void TestCase_SymbologyPolygonsPNG8() { TestCase_SymbologyPolygons(L"PNG8", L"png"); }
-    void TestCase_Annotation1PNG8() { TestCase_Annotation1(L"PNG8", L"png"); }
-    void TestCase_Annotation2PNG8() { TestCase_Annotation2(L"PNG8", L"png"); }
-    void TestCase_Annotation3PNG8() { TestCase_Annotation3(L"PNG8", L"png"); }
-    void TestCase_RenderLegendMultiFTSPNG8() { TestCase_RenderLegendMultiFTS(L"PNG8", L"png"); }
-    void TestCase_RenderLegendMultiCTSPNG8() { TestCase_RenderLegendMultiCTS(L"PNG8", L"png"); }
-    void TestCase_RenderLegendMultiFTSWithThemePNG8() { TestCase_RenderLegendMultiFTSWithTheme(L"PNG8", L"png"); }
-    void TestCase_RenderLegendMultiCTSWithThemePNG8() { TestCase_RenderLegendMultiCTSWithTheme(L"PNG8", L"png"); }
-    void TestCase_RenderLegendMultiFTSSingleCTSPNG8() { TestCase_RenderLegendMultiFTSSingleCTS(L"PNG8", L"png"); }
-    void TestCase_RenderLegendSingleFTSMultiCTSPNG8() { TestCase_RenderLegendSingleFTSMultiCTS(L"PNG8", L"png"); }
-    void TestCase_StylizationFunctionsPNG8() { TestCase_StylizationFunctions(L"PNG8", L"png"); }
-    void TestCase_LayerWatermarkPNG8() { TestCase_LayerWatermark(L"PNG8", L"png"); }
-    void TestCase_RenderTilePNG8() { TestCase_RenderTile(L"PNG8", L"png"); }
-    void TestCase_RenderTileXYZ_PNG8() { TestCase_RenderTileXYZ(L"PNG8", L"png"); }
-
-    //GIF output tests
-    void TestCase_RenderDynamicOverlayGIF() { TestCase_RenderDynamicOverlay(L"GIF", L"gif"); }
-    void TestCase_RenderDynamicOverlayTiledMapGIF() { TestCase_RenderDynamicOverlayTiledMap(L"GIF", L"gif"); }
-    void TestCase_RenderMapGIF() { TestCase_RenderMap(L"GIF", L"gif"); }
-    void TestCase_RenderMapWithSelectionGIF() { TestCase_RenderMapWithSelection(L"GIF", L"gif"); }
-    void TestCase_RenderMapWithWatermarkGIF() { TestCase_RenderMapWithWatermark(L"GIF", L"gif"); }
-    void TestCase_RenderLegendGIF() { TestCase_RenderLegend(L"GIF", L"gif"); }
-    void TestCase_RenderLegendEmptyGroupsGIF() { TestCase_RenderLegendEmptyGroups(L"GIF", L"gif"); }
-    void TestCase_SymbologyPointsGIF() { TestCase_SymbologyPoints(L"GIF", L"gif"); }
-    void TestCase_SymbologyPointsParamGIF() { TestCase_SymbologyPointsParam(L"GIF", L"gif"); }
-    void TestCase_SymbologyLinesGIF() { TestCase_SymbologyLines(L"GIF", L"gif"); }
-    void TestCase_SymbologyLinesCrossTickGIF() { TestCase_SymbologyLinesCrossTick(L"GIF", L"gif"); }
-    void TestCase_SymbologyPolygonsGIF() { TestCase_SymbologyPolygons(L"GIF", L"gif"); }
-    void TestCase_Annotation1GIF() { TestCase_Annotation1(L"GIF", L"gif"); }
-    void TestCase_Annotation2GIF() { TestCase_Annotation2(L"GIF", L"gif"); }
-    void TestCase_Annotation3GIF() { TestCase_Annotation3(L"GIF", L"gif"); }
-    void TestCase_RenderLegendMultiFTSGIF() { TestCase_RenderLegendMultiFTS(L"GIF", L"gif"); }
-    void TestCase_RenderLegendMultiCTSGIF() { TestCase_RenderLegendMultiCTS(L"GIF", L"gif"); }
-    void TestCase_RenderLegendMultiFTSWithThemeGIF() { TestCase_RenderLegendMultiFTSWithTheme(L"GIF", L"gif"); }
-    void TestCase_RenderLegendMultiCTSWithThemeGIF() { TestCase_RenderLegendMultiCTSWithTheme(L"GIF", L"gif"); }
-    void TestCase_RenderLegendMultiFTSSingleCTSGIF() { TestCase_RenderLegendMultiFTSSingleCTS(L"GIF", L"gif"); }
-    void TestCase_RenderLegendSingleFTSMultiCTSGIF() { TestCase_RenderLegendSingleFTSMultiCTS(L"GIF", L"gif"); }
-    void TestCase_StylizationFunctionsGIF() { TestCase_StylizationFunctions(L"GIF", L"gif"); }
-    void TestCase_LayerWatermarkGIF() { TestCase_LayerWatermark(L"GIF", L"gif"); }
-    void TestCase_RenderTileGIF() { TestCase_RenderTile(L"GIF", L"gif"); }
-    void TestCase_RenderTileXYZ_GIF() { TestCase_RenderTileXYZ(L"GIF", L"gif"); }
-
-    //JPG output tests
-    void TestCase_RenderDynamicOverlayJPG() { TestCase_RenderDynamicOverlay(L"JPG", L"jpg"); }
-    void TestCase_RenderDynamicOverlayTiledMapJPG() { TestCase_RenderDynamicOverlayTiledMap(L"JPG", L"jpg"); }
-    void TestCase_RenderMapJPG() { TestCase_RenderMap(L"JPG", L"jpg"); }
-    void TestCase_RenderMapWithSelectionJPG() { TestCase_RenderMapWithSelection(L"JPG", L"jpg"); }
-    void TestCase_RenderMapWithWatermarkJPG() { TestCase_RenderMapWithWatermark(L"JPG", L"jpg"); }
-    void TestCase_RenderLegendJPG() { TestCase_RenderLegend(L"JPG", L"jpg"); }
-    void TestCase_RenderLegendEmptyGroupsJPG() { TestCase_RenderLegendEmptyGroups(L"JPG", L"jpg"); }
-    void TestCase_SymbologyPointsJPG() { TestCase_SymbologyPoints(L"JPG", L"jpg"); }
-    void TestCase_SymbologyPointsParamJPG() { TestCase_SymbologyPointsParam(L"JPG", L"jpg"); }
-    void TestCase_SymbologyLinesJPG() { TestCase_SymbologyLines(L"JPG", L"jpg"); }
-    void TestCase_SymbologyLinesCrossTickJPG() { TestCase_SymbologyLinesCrossTick(L"JPG", L"jpg"); }
-    void TestCase_SymbologyPolygonsJPG() { TestCase_SymbologyPolygons(L"JPG", L"jpg"); }
-    void TestCase_Annotation1JPG() { TestCase_Annotation1(L"JPG", L"jpg"); }
-    void TestCase_Annotation2JPG() { TestCase_Annotation2(L"JPG", L"jpg"); }
-    void TestCase_Annotation3JPG() { TestCase_Annotation3(L"JPG", L"jpg"); }
-    void TestCase_RenderLegendMultiFTSJPG() { TestCase_RenderLegendMultiFTS(L"JPG", L"jpg"); }
-    void TestCase_RenderLegendMultiCTSJPG() { TestCase_RenderLegendMultiCTS(L"JPG", L"jpg"); }
-    void TestCase_RenderLegendMultiFTSWithThemeJPG() { TestCase_RenderLegendMultiFTSWithTheme(L"JPG", L"jpg"); }
-    void TestCase_RenderLegendMultiCTSWithThemeJPG() { TestCase_RenderLegendMultiCTSWithTheme(L"JPG", L"jpg"); }
-    void TestCase_RenderLegendMultiFTSSingleCTSJPG() { TestCase_RenderLegendMultiFTSSingleCTS(L"JPG", L"jpg"); }
-    void TestCase_RenderLegendSingleFTSMultiCTSJPG() { TestCase_RenderLegendSingleFTSMultiCTS(L"JPG", L"jpg"); }
-    void TestCase_StylizationFunctionsJPG() { TestCase_StylizationFunctions(L"JPG", L"jpg"); }
-    void TestCase_LayerWatermarkJPG() { TestCase_LayerWatermark(L"JPG", L"jpg"); }
-    void TestCase_RenderTileJPG() { TestCase_RenderTile(L"JPG", L"jpg"); }
-    void TestCase_RenderTileXYZ_JPG() { TestCase_RenderTileXYZ(L"JPG", L"jpg"); }
-
-    //void TestCase_RendererPerformance();
-
-    void TestCase_RenderMetatilePNG() { TestCase_RenderMetatile(L"PNG", L"png"); }
-    void TestCase_RenderMetatilePNG8() { TestCase_RenderMetatile(L"PNG8", L"png"); }
-    void TestCase_RenderMetatileJPG() { TestCase_RenderMetatile(L"JPG", L"jpg"); }
-    void TestCase_RenderMetatileGIF() { TestCase_RenderMetatile(L"GIF", L"gif"); }
-
-    void TestCase_RenderXYZMetatilePNG() { TestCase_RenderXYZMetatile(L"PNG", L"png", 1); }
-    void TestCase_RenderXYZMetatilePNG8() { TestCase_RenderXYZMetatile(L"PNG8", L"png", 1); }
-    void TestCase_RenderXYZMetatileJPG() { TestCase_RenderXYZMetatile(L"JPG", L"jpg", 1); }
-    void TestCase_RenderXYZMetatileGIF() { TestCase_RenderXYZMetatile(L"GIF", L"gif", 1); }
-
-    void TestCase_RenderXYZMetatilePNG_2x() { TestCase_RenderXYZMetatile(L"PNG", L"png", 2); }
-    void TestCase_RenderXYZMetatilePNG8_2x() { TestCase_RenderXYZMetatile(L"PNG8", L"png", 2); }
-    void TestCase_RenderXYZMetatileJPG_2x() { TestCase_RenderXYZMetatile(L"JPG", L"jpg", 2); }
-    void TestCase_RenderXYZMetatileGIF_2x() { TestCase_RenderXYZMetatile(L"GIF", L"gif", 2); }
-
-    void TestCase_RenderXYZMetatilePNG_4x() { TestCase_RenderXYZMetatile(L"PNG", L"png", 4); }
-    void TestCase_RenderXYZMetatilePNG8_4x() { TestCase_RenderXYZMetatile(L"PNG8", L"png", 4); }
-    void TestCase_RenderXYZMetatileJPG_4x() { TestCase_RenderXYZMetatile(L"JPG", L"jpg", 4); }
-    void TestCase_RenderXYZMetatileGIF_4x() { TestCase_RenderXYZMetatile(L"GIF", L"gif", 4); }
-
-private:
-    MgMap* CreateTestMap();
-    MgMap* CreateTestTiledMap();
-    MgMap* CreateTestXYZMap();
-    MgMap* CreateTestStylizationFunctionMap();
-    MgMap* CreateTestMapWithWatermark();
-    MgPolygon* CreateSelectionPolygon(MgMap* map, double width, double height);
-    static STRING GetPath(CREFSTRING basePath, CREFSTRING imageFormat, CREFSTRING extension);
-
-private:
-    Ptr<MgSiteConnection> m_siteConnection;
-    Ptr<MgResourceService> m_svcResource;
-    Ptr<MgRenderingService> m_svcRendering;
-};
-
-#endif // _TESTRENDERINGSERVICE_H

Modified: trunk/MgDev/Server/src/UnitTesting/TestResourceService.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestResourceService.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestResourceService.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -18,19 +18,20 @@
 #include "MapGuideCommon.h"
 #include "ServiceManager.h"
 #include "ServerResourceService.h"
-#include "TestResourceService.h"
-#include "CppUnitExtensions.h"
+#include "CatchHelperMacros.h"
 #include "SecurityCache.h"
-#include "../Common/Manager/FdoConnectionManager.h"
 #include "FoundationDefs.h"
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestResourceService, "TestResourceService");
+#include "Fdo.h"
+#include "TestServiceFactory.h"
+#include "catch.hpp"
 
+
 // define thread group for tiling tests
 #define THREAD_GROUP 65530
 
 #define TESTREQUESTS 500
 
-static const INT32 MG_TEST_THREADS = 8; // Adjust this to get failures!
+const INT32 MG_TEST_THREADS = 8; // Adjust this to get failures!
 
 const STRING adminName = L"Administrator";
 const STRING adminPass = L"admin";
@@ -67,78 +68,75 @@
 STRING packageName = L"../UnitTestFiles/Shuttle.zip";
 #endif
 
-void TestResourceService::setUp()
+// data structure which is passed to each thread
+struct ResourceThreadData
 {
-}
+    INT32 threadId;
+    INT32 command;
+    bool success;
+    bool done;
+    STRING session;
+};
 
-void TestResourceService::tearDown()
+// the method which gets executed by the ACE worker thread
+ACE_THR_FUNC_RETURN RepositoryWorker(void* param)
 {
-}
+    // get the data for this thread
+    ResourceThreadData* threadData = (ResourceThreadData*)param;
+    INT32 threadId = threadData->threadId;
+    INT32 command = threadData->command;
+    STRING session = threadData->session;
 
-void TestResourceService::TestStart()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Resource Service tests.\n")));
+    ACE_DEBUG((LM_INFO, ACE_TEXT("> thread %d started\n"), threadId));
 
     try
     {
-        #ifdef _DEBUG
-        MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
-        if(pFdoConnectionManager)
-        {
-            pFdoConnectionManager->ShowCache();
-        }
-        #endif
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-}
-
-void TestResourceService::TestEnd()
-{
-    try
-    {
-        MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
-        {
-            throw new MgNullReferenceException(L"TestResourceService.TestEnd", __LINE__, __WFILE__, NULL, L"", NULL);
-        }
-
-        Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
-        {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestEnd", __LINE__, __WFILE__, NULL, L"", NULL);
-        }
-
         // set user info
         Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
         userInfo->SetLocale(TEST_LOCALE);
+        userInfo->SetMgSessionId(session);
         MgUserInformation::SetCurrentUserInfo(userInfo);
 
-        // delete the drawing source definition
-        Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/Shuttle.DrawingSource");
-        pService->DeleteResource(mapres1);
+        // get the tile service instance
+        MgServiceManager* serviceManager = MgServiceManager::GetInstance();
+        Ptr<MgResourceService> svcResource = dynamic_cast<MgResourceService*>(
+            serviceManager->RequestService(MgServiceType::ResourceService));
+        assert(svcResource != nullptr);
 
-        #ifdef _DEBUG
-        MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
-        if(pFdoConnectionManager)
+        STRING resource = L"Session:";
+        resource += session;
+        resource += L"//UnitTests/Data/test-1.FeatureSource";
+        Ptr<MgResourceIdentifier> resId = new MgResourceIdentifier(resource);
+
+        switch (command)
         {
-            pFdoConnectionManager->ShowCache();
+        case 0:
+        {
+            //Set the resource
+            Ptr<MgByteSource> contentSource = new MgByteSource(resourceContentFileName);
+            Ptr<MgByteReader> contentReader = contentSource->GetReader();
+            svcResource->SetResource(resId, contentReader, nullptr);
         }
-        #endif
+        case 1:
+        {
+            //Set the resource data
+            Ptr<MgByteSource> dataSource = new MgByteSource(dataFileName);
+            Ptr<MgByteReader> dataReader = dataSource->GetReader();
+            svcResource->SetResourceData(resId, resourceDataName, L"File", dataReader);
+        }
+        // Need to add a case that updates the session with runtime map
+        }
+
+        MgUserInformation::SetCurrentUserInfo(nullptr);
+        threadData->success = true;
     }
     catch (MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
+        message += L"\n";
+        message += e->GetStackTrace(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        ACE_DEBUG((LM_INFO, ACE_TEXT("RepositoryWorker(%d) - Exception:\n%W\n"), threadId, message.c_str()));
     }
     catch (...)
     {
@@ -145,7 +143,13 @@
         throw;
     }
 
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nResource Service tests completed.\n\n")));
+    // clear the user info to prevent leaks - if an exception happens and this is not called it leaks about 500 bytes!
+    MgUserInformation::SetCurrentUserInfo(nullptr);
+
+    ACE_DEBUG((LM_INFO, ACE_TEXT("> thread %d done\n"), threadId));
+
+    threadData->done = true;
+    return 0;
 }
 
 ///----------------------------------------------------------------------------
@@ -153,49 +157,49 @@
 ///
 /// This test case enumerates the repositories.
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_EnumerateRepositories()
+TEST_CASE("EnumerateRepositories", "[ResourceService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestResourceService.TestCase_EnumerateRepositories", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestResourceService.TestCase_EnumerateRepositories", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_EnumerateRepositories", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_EnumerateRepositories", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgUserInformation> userInfo;
 
         //Sets the user information for the current thread to be administrator
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(adminName, adminPass);
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
             //Try to enumerate an invalid type of repository
-            CPPUNIT_ASSERT_THROW_MG(pService->EnumerateRepositories(L"Library"), MgInvalidRepositoryTypeException*);
+            REQUIRE_THROWS_MG(pService->EnumerateRepositories(L"Library"), MgInvalidRepositoryTypeException*);
 
             //Enumerate the Session repositories
             Ptr<MgByteReader> byteReader = pService->EnumerateRepositories(L"Session");
             STRING mimeType = byteReader->GetMimeType();
-            CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+            REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
         }
 
         //Try to enumerate repositories while not an admin
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(L"", L"");
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
-            CPPUNIT_ASSERT_THROW_MG(pService->EnumerateRepositories(L"Session"), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->EnumerateRepositories(L"Session"), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -202,7 +206,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -211,53 +215,53 @@
 ///
 /// This test case creates a new repository
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_CreateRepository()
+TEST_CASE("CreateRepository", "[ResourceService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestResourceService.TestCase_CreateRepository", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestResourceService.TestCase_CreateRepository", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_CreateRepository", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_CreateRepository", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgUserInformation> userInfo;
 
         //Sets the user information for the current thread to be administrator
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(adminName, adminPass);
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
-            //Try to create a repository using a NULL identifier
-            CPPUNIT_ASSERT_THROW_MG(pService->CreateRepository(NULL, NULL, NULL), MgNullArgumentException*);
+            //Try to create a repository using a nullptr identifier
+            REQUIRE_THROWS_MG(pService->CreateRepository(nullptr, nullptr, nullptr), MgNullArgumentException*);
 
             //Try to create a repository using an invalid repository identifier
-            CPPUNIT_ASSERT_THROW_MG(pService->CreateRepository(&resourceIdentifier, NULL, NULL), MgInvalidRepositoryTypeException*);
+            REQUIRE_THROWS_MG(pService->CreateRepository(&resourceIdentifier, nullptr, nullptr), MgInvalidRepositoryTypeException*);
 
             //Create a new repository
-            pService->CreateRepository(&sessionRepositoryIdentifier, NULL, NULL);
+            pService->CreateRepository(&sessionRepositoryIdentifier, nullptr, nullptr);
 
             //Try to create the same repository again
-            CPPUNIT_ASSERT_THROW_MG(pService->CreateRepository(&sessionRepositoryIdentifier, NULL, NULL), MgDuplicateRepositoryException*);
+            REQUIRE_THROWS_MG(pService->CreateRepository(&sessionRepositoryIdentifier, nullptr, nullptr), MgDuplicateRepositoryException*);
         }
 
         //Try to create a repository while not an admin
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(L"", L"");
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
-            CPPUNIT_ASSERT_THROW_MG(pService->CreateRepository(&sessionRepositoryIdentifier, NULL, NULL), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->CreateRepository(&sessionRepositoryIdentifier, nullptr, nullptr), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -264,7 +268,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -273,20 +277,20 @@
 ///
 /// This test case updates the repository that was created earlier
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_UpdateRepository()
+TEST_CASE("UpdateRepository", "[ResourceService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestResourceService.TestCase_UpdateRepository", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestResourceService.TestCase_UpdateRepository", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_UpdateRepository", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_UpdateRepository", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgUserInformation> userInfo;
@@ -295,42 +299,42 @@
         Ptr<MgByteSource> contentSource;
 
         //Sets the user information for the current thread to be administrator
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(adminName, adminPass);
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
-            //Try to use a NULL argument
-            CPPUNIT_ASSERT_THROW_MG(pService->UpdateRepository(NULL, NULL, NULL), MgNullArgumentException*);
-            CPPUNIT_ASSERT_THROW_MG(pService->UpdateRepository(&sessionRepositoryIdentifier, NULL, NULL), MgNullArgumentException*);
+            //Try to use a nullptr argument
+            REQUIRE_THROWS_MG(pService->UpdateRepository(nullptr, nullptr, nullptr), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->UpdateRepository(&sessionRepositoryIdentifier, nullptr, nullptr), MgNullArgumentException*);
 
             //Try to update a repository that doesn't exist
             contentSource = new MgByteSource(repositoryContentFileName);
             Ptr<MgByteReader> contentReader = contentSource->GetReader();
-            CPPUNIT_ASSERT_THROW_MG(pService->UpdateRepository(&sessionRepositoryNotExist, contentReader, NULL), MgRepositoryNotFoundException*);
+            REQUIRE_THROWS_MG(pService->UpdateRepository(&sessionRepositoryNotExist, contentReader, nullptr), MgRepositoryNotFoundException*);
 
             //Try to update the repository using invalid content
             string str = "asdf";
             Ptr<MgByteReader> byteReader = MgUtil::GetByteReader(str);
-            CPPUNIT_ASSERT_THROW_MG(pService->UpdateRepository(&sessionRepositoryIdentifier, byteReader, NULL), MgDbXmlException*);
+            REQUIRE_THROWS_MG(pService->UpdateRepository(&sessionRepositoryIdentifier, byteReader, nullptr), MgDbXmlException*);
 
             //Try to update the repository using valid header
             headerSource = new MgByteSource(repositoryHeaderFileName);
             Ptr<MgByteReader> headerReader = headerSource->GetReader();
-            pService->UpdateRepository(&libraryRepositoryIdentifier, NULL, headerReader);
+            pService->UpdateRepository(&libraryRepositoryIdentifier, nullptr, headerReader);
         }
 
         //Try to update repository while not an admin
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(L"", L"");
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
             Ptr<MgByteReader> contentReader = contentSource->GetReader();
-            CPPUNIT_ASSERT_THROW_MG(pService->UpdateRepository(&sessionRepositoryIdentifier, contentReader, NULL), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->UpdateRepository(&sessionRepositoryIdentifier, contentReader, nullptr), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -337,7 +341,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -346,52 +350,52 @@
 ///
 /// This test case gets the content of the repository created earlier
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_GetRepositoryContent()
+TEST_CASE("GetRepositoryContent", "[ResourceService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestResourceService.TestCase_GetRepositoryContent", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestResourceService.TestCase_GetRepositoryContent", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_GetRepositoryContent", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_GetRepositoryContent", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgUserInformation> userInfo;
 
         //Sets the user information for the current thread to be administrator
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(adminName, adminPass);
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
-            //Try to get repository content using a NULL argument
-            CPPUNIT_ASSERT_THROW_MG(pService->GetRepositoryContent(NULL), MgNullArgumentException*);
+            //Try to get repository content using a nullptr argument
+            REQUIRE_THROWS_MG(pService->GetRepositoryContent(nullptr), MgNullArgumentException*);
 
             //Try to get the repository contents of a repository that doesn't exist
-            CPPUNIT_ASSERT_THROW_MG(pService->GetRepositoryContent(&sessionRepositoryNotExist), MgRepositoryNotFoundException*);
+            REQUIRE_THROWS_MG(pService->GetRepositoryContent(&sessionRepositoryNotExist), MgRepositoryNotFoundException*);
 
             //Get the repository content using a valid argument
             Ptr<MgByteReader> byteReader = pService->GetRepositoryContent(&sessionRepositoryIdentifier);
             STRING mimeType = byteReader->GetMimeType();
-            CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+            REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
         }
 
         //Try to get repository content while not an admin
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(L"", L"");
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
-            CPPUNIT_ASSERT_THROW_MG(pService->GetRepositoryContent(&sessionRepositoryIdentifier), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->GetRepositoryContent(&sessionRepositoryIdentifier), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -398,7 +402,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -407,27 +411,27 @@
 ///
 /// This test case gets the header of the Library:// repository
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_GetRepositoryHeader()
+TEST_CASE("GetRepositoryHeader", "[ResourceService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestResourceService.TestCase_GetRepositoryHeader", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestResourceService.TestCase_GetRepositoryHeader", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_GetRepositoryHeader", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_GetRepositoryHeader", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
-        //Try to get repository header using a NULL argument
-        CPPUNIT_ASSERT_THROW_MG(pService->GetRepositoryHeader(NULL), MgNullArgumentException*);
+        //Try to get repository header using a nullptr argument
+        REQUIRE_THROWS_MG(pService->GetRepositoryHeader(nullptr), MgNullArgumentException*);
 
         //Try to get repository header of a repository other than Library://
-        CPPUNIT_ASSERT_THROW_MG(pService->GetRepositoryHeader(&sessionRepositoryIdentifier), MgInvalidRepositoryTypeException*);
+        REQUIRE_THROWS_MG(pService->GetRepositoryHeader(&sessionRepositoryIdentifier), MgInvalidRepositoryTypeException*);
 
         // Set the user information for the current thread to be administrator.
         Ptr<MgUserInformation> adminUserInfo = new MgUserInformation(adminName, adminPass);
@@ -436,13 +440,13 @@
         // Get the Library repository header.
         Ptr<MgByteReader> byteReader = pService->GetRepositoryHeader(&libraryRepositoryIdentifier);
         STRING mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -451,34 +455,34 @@
 ///
 /// This test case applies a resource package
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_ApplyResourcePackage()
+TEST_CASE("ApplyResourcePackage", "[ResourceService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestResourceService.TestCase_ApplyResourcePackage", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestResourceService.TestCase_ApplyResourcePackage", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_ApplyResourcePackage", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_ApplyResourcePackage", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgUserInformation> userInfo;
 
         //Sets the user information for the current thread to be administrator
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(adminName, adminPass);
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
-            //Try using NULL argument
-            CPPUNIT_ASSERT_THROW_MG(pService->ApplyResourcePackage(NULL), MgNullArgumentException*);
+            //Try using nullptr argument
+            REQUIRE_THROWS_MG(pService->ApplyResourcePackage(nullptr), MgNullArgumentException*);
 
             Ptr<MgByteSource> byteSource = new MgByteSource(packageName);
             byteSource->SetMimeType(MgMimeType::Binary);
@@ -488,9 +492,9 @@
         }
 
         //Try to apply a package while not an admin
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(anonymousName, L"");
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
@@ -499,7 +503,7 @@
             byteSource->SetMimeType(MgMimeType::Binary);
             Ptr<MgByteReader> byteReader = byteSource->GetReader();
 
-            CPPUNIT_ASSERT_THROW_MG(pService->ApplyResourcePackage(byteReader), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->ApplyResourcePackage(byteReader), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -506,7 +510,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -515,47 +519,47 @@
 ///
 /// This test case deletes the repository created earlier
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_DeleteRepository()
+TEST_CASE("DeleteRepository", "[ResourceService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestResourceService.TestCase_DeleteRepository", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestResourceService.TestCase_DeleteRepository", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_DeleteRepository", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_DeleteRepository", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgUserInformation> userInfo;
 
         //Try to delete repository while not an admin
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(L"", L"");
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
-            CPPUNIT_ASSERT_THROW_MG(pService->DeleteRepository(&sessionRepositoryIdentifier), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->DeleteRepository(&sessionRepositoryIdentifier), MgUnauthorizedAccessException*);
         }
 
         //Sets the user information for the current thread to be administrator
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(adminName, adminPass);
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
-            //Try to use a NULL argument
-            CPPUNIT_ASSERT_THROW_MG(pService->DeleteRepository(NULL), MgNullArgumentException*);
+            //Try to use a nullptr argument
+            REQUIRE_THROWS_MG(pService->DeleteRepository(nullptr), MgNullArgumentException*);
 
             //Try to delete a repository that does not exist
-            CPPUNIT_ASSERT_THROW_MG(pService->DeleteRepository(&sessionRepositoryNotExist), MgRepositoryNotFoundException*);
+            REQUIRE_THROWS_MG(pService->DeleteRepository(&sessionRepositoryNotExist), MgRepositoryNotFoundException*);
 
             //Delete the repository that was created earlier in TestCase_CreateRepository
             pService->DeleteRepository(&sessionRepositoryIdentifier);
@@ -565,7 +569,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -574,27 +578,27 @@
 ///
 /// This test case checks to see if the specified resource exists.
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_ResourceExists()
+TEST_CASE("ResourceExists", "[ResourceService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
 
-        if (NULL == serviceManager)
+        if (nullptr == serviceManager)
         {
             throw new MgNullReferenceException(
                 L"TestResourceService.TestCase_ResourceExists",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> service = dynamic_cast<MgResourceService*>(
             serviceManager->RequestService(MgServiceType::ResourceService));
 
-        if (NULL == service)
+        if (nullptr == service)
         {
             throw new MgServiceNotAvailableException(
                 L"TestResourceService.TestCase_ResourceExists",
-                __LINE__, __WFILE__, NULL, L"", NULL);
+                __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         // Set the user information for the current thread to be administrator.
@@ -601,23 +605,23 @@
         Ptr<MgUserInformation> adminUserInfo = new MgUserInformation(adminName, adminPass);
         MgUserInformation::SetCurrentUserInfo(adminUserInfo);
 
-        // Try to check a NULL resource.
+        // Try to check a nullptr resource.
         bool existed = false;
-        CPPUNIT_ASSERT_THROW_MG(service->ResourceExists(NULL), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(service->ResourceExists(nullptr), MgNullArgumentException*);
 
         // Try to check a resource that exists
         existed = service->ResourceExists(&libraryRepositoryIdentifier);
-        CPPUNIT_ASSERT(existed);
+        REQUIRE(existed);
 
         // Try to check a resource that does not exist.
         existed = service->ResourceExists(&resourceNotExist);
-        CPPUNIT_ASSERT(!existed);
+        REQUIRE(!existed);
     }
     catch (MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -626,35 +630,35 @@
 ///
 /// This test case enumerates the resources in Library://
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_EnumerateResources()
+TEST_CASE("EnumerateResources", "[ResourceService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestResourceService.TestCase_EnumerateResources", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestResourceService.TestCase_EnumerateResources", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_EnumerateResources", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_EnumerateResources", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
-        //Try to enumerate resources using a NULL argument
-        CPPUNIT_ASSERT_THROW_MG(pService->EnumerateResources(NULL, -1, L"", true), MgNullArgumentException*);
+        //Try to enumerate resources using a nullptr argument
+        REQUIRE_THROWS_MG(pService->EnumerateResources(nullptr, -1, L"", true), MgNullArgumentException*);
 
         // Enumerate the Library resource.
         Ptr<MgByteReader> byteReader = pService->EnumerateResources(&libraryRepositoryIdentifier, -1, L"", true);
         STRING mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -664,64 +668,64 @@
 /// This test case uses the SetResource function to add and update
 /// a resource
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_SetResource()
+TEST_CASE("SetResource", "[ResourceService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestResourceService.TestCase_SetResource", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestResourceService.TestCase_SetResource", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_SetResource", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_SetResource", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgByteSource> contentSource;
-        contentSource = NULL;
+        contentSource = nullptr;
 
         Ptr<MgUserInformation> userInfo;
 
         //Sets the user information for the current thread to be administrator
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(adminName, adminPass);
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
-            //Try to use NULL arguments
-            CPPUNIT_ASSERT_THROW_MG(pService->SetResource(NULL, NULL, NULL), MgNullArgumentException*);
-            CPPUNIT_ASSERT_THROW_MG(pService->SetResource(&resourceIdentifier, NULL, NULL), MgNullArgumentException*);
+            //Try to use nullptr arguments
+            REQUIRE_THROWS_MG(pService->SetResource(nullptr, nullptr, nullptr), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->SetResource(&resourceIdentifier, nullptr, nullptr), MgNullArgumentException*);
 
             //Add a new resource
             contentSource = new MgByteSource(resourceContentFileName);
             Ptr<MgByteReader> contentReader = contentSource->GetReader();
-            pService->SetResource(&resourceIdentifier, contentReader, NULL);
+            pService->SetResource(&resourceIdentifier, contentReader, nullptr);
 
             //Try to add the same resource again (should be fine and just update it)
             contentSource = new MgByteSource(resourceContentFileName);
             contentReader = contentSource->GetReader();
-            pService->SetResource(&resourceIdentifier, contentReader, NULL);
+            pService->SetResource(&resourceIdentifier, contentReader, nullptr);
 
             //Add another resource layer definition, which references to the feature source. This is for cascade MoveResource test.
             contentSource = new MgByteSource(resourceContentFileName2);
             contentReader = contentSource->GetReader();
-            pService->SetResource(&resourceIdentifier4, contentReader, NULL);
+            pService->SetResource(&resourceIdentifier4, contentReader, nullptr);
         }
 
         //Try to add resource while not an admin
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(L"", L"");
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
             Ptr<MgByteReader> contentReader = contentSource->GetReader();
-            CPPUNIT_ASSERT_THROW_MG(pService->SetResource(&resourceIdentifier2, contentReader, NULL), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->SetResource(&resourceIdentifier2, contentReader, nullptr), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -728,7 +732,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -738,40 +742,40 @@
 /// This test case moves the resource that was created earlier to a new
 /// location
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_MoveResource()
+TEST_CASE("MoveResource", "[ResourceService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestResourceService.TestCase_MoveResource", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestResourceService.TestCase_MoveResource", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_MoveResource", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_MoveResource", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgUserInformation> userInfo;
 
         //Sets the user information for the current thread to be administrator
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(adminName, adminPass);
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
 
-            //Try to use NULL arguments
-            CPPUNIT_ASSERT_THROW_MG(pService->MoveResource(NULL, NULL, true, false), MgNullArgumentException*);
-            CPPUNIT_ASSERT_THROW_MG(pService->MoveResource(&resourceIdentifier, NULL, true, true), MgNullArgumentException*);
-            CPPUNIT_ASSERT_THROW_MG(pService->MoveResource(NULL, &resourceIdentifier, true, false), MgNullArgumentException*);
+            //Try to use nullptr arguments
+            REQUIRE_THROWS_MG(pService->MoveResource(nullptr, nullptr, true, false), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->MoveResource(&resourceIdentifier, nullptr, true, true), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->MoveResource(nullptr, &resourceIdentifier, true, false), MgNullArgumentException*);
 
             //Try to move a resource that doesn't exist
-            CPPUNIT_ASSERT_THROW_MG(pService->MoveResource(&resourceNotExist, &resourceIdentifier2, false, true), MgResourceNotFoundException*);
+            REQUIRE_THROWS_MG(pService->MoveResource(&resourceNotExist, &resourceIdentifier2, false, true), MgResourceNotFoundException*);
 
             //Move the resource that was added earlier with cascade = true, and check referencing resource.
             pService->MoveResource(&resourceIdentifier, &resourceIdentifier2, false, true);
@@ -778,7 +782,7 @@
             Ptr<MgByteReader> byteReader = pService->GetResourceContent(&resourceIdentifier4, L"");
             STRING referenceContent = byteReader->ToString();
             STRING featureIdTag = L"<ResourceId>Library://UnitTests/Data/test-2.FeatureSource</ResourceId>";
-            CPPUNIT_ASSERT(referenceContent.find(featureIdTag) != STRING::npos);
+            REQUIRE(referenceContent.find(featureIdTag) != STRING::npos);
 
             //Move the resource again with cascade = false, and check referencing resource.
             pService->MoveResource(&resourceIdentifier2, &resourceIdentifier, false, false);
@@ -785,21 +789,21 @@
             byteReader = pService->GetResourceContent(&resourceIdentifier4, L"");
             referenceContent = byteReader->ToString();
             featureIdTag = L"<ResourceId>Library://UnitTests/Data/test-2.FeatureSource</ResourceId>";
-            CPPUNIT_ASSERT(referenceContent.find(featureIdTag) != STRING::npos);
+            REQUIRE(referenceContent.find(featureIdTag) != STRING::npos);
 
             //Try to move the resource into itself (ie. itself)
-            CPPUNIT_ASSERT_THROW_MG(pService->MoveResource(&resourceIdentifier, &resourceIdentifier, false), MgInvalidArgumentException*);
+            REQUIRE_THROWS_MG(pService->MoveResource(&resourceIdentifier, &resourceIdentifier, false), MgInvalidArgumentException*);
         }
 
 
         //Try to move resource while not an admin
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(L"", L"");
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
-            CPPUNIT_ASSERT_THROW_MG(pService->MoveResource(&resourceIdentifier, &resourceIdentifier2, false), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->MoveResource(&resourceIdentifier, &resourceIdentifier2, false), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -806,7 +810,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -816,55 +820,55 @@
 /// This test case copies the resource that was just moved to the original
 /// location that it was moved from.
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_CopyResource()
+TEST_CASE("CopyResource", "[ResourceService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestResourceService.TestCase_CopyResource", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestResourceService.TestCase_CopyResource", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_CopyResource", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_CopyResource", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgUserInformation> userInfo;
 
         //Sets the user information for the current thread to be administrator
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(adminName, adminPass);
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
-            //Try to use NULL arguments
-            CPPUNIT_ASSERT_THROW_MG(pService->CopyResource(NULL, NULL, true), MgNullArgumentException*);
-            CPPUNIT_ASSERT_THROW_MG(pService->CopyResource(&resourceIdentifier, NULL, true), MgNullArgumentException*);
-            CPPUNIT_ASSERT_THROW_MG(pService->CopyResource(NULL, &resourceIdentifier2, true), MgNullArgumentException*);
+            //Try to use nullptr arguments
+            REQUIRE_THROWS_MG(pService->CopyResource(nullptr, nullptr, true), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->CopyResource(&resourceIdentifier, nullptr, true), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->CopyResource(nullptr, &resourceIdentifier2, true), MgNullArgumentException*);
 
             //Try to use source & destination as the same thing
-            CPPUNIT_ASSERT_THROW_MG(pService->CopyResource(&resourceIdentifier2, &resourceIdentifier2, false), MgInvalidArgumentException*);
+            REQUIRE_THROWS_MG(pService->CopyResource(&resourceIdentifier2, &resourceIdentifier2, false), MgInvalidArgumentException*);
 
             //Copy the moved resource to another location
             pService->CopyResource(&resourceIdentifier, &resourceIdentifier2, false);
 
             //Try to copy a resource to one that should now exist
-            CPPUNIT_ASSERT_THROW_MG(pService->CopyResource(&resourceIdentifier2, &resourceIdentifier, false), MgDuplicateResourceException*);
+            REQUIRE_THROWS_MG(pService->CopyResource(&resourceIdentifier2, &resourceIdentifier, false), MgDuplicateResourceException*);
         }
 
         //Try to copy resource while not an admin
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(L"", L"");
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
-            CPPUNIT_ASSERT_THROW_MG(pService->CopyResource(&resourceIdentifier, &resourceIdentifier2, false), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->CopyResource(&resourceIdentifier, &resourceIdentifier2, false), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -871,7 +875,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 ///----------------------------------------------------------------------------
@@ -879,20 +883,20 @@
 ///
 /// This test case gets the content of the resource
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_GetResourceContent()
+TEST_CASE("GetResourceContent", "[ResourceService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestResourceService.TestCase_GetResourceContent", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestResourceService.TestCase_GetResourceContent", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_GetResourceContent", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_GetResourceContent", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         // Set the user information for the current thread to be administrator.
@@ -900,24 +904,24 @@
         MgUserInformation::SetCurrentUserInfo(adminUserInfo);
 
         Ptr<MgByteReader> byteReader;
-        byteReader = NULL;
+        byteReader = nullptr;
 
-        //Try to get the content using NULL arguments
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceContent(NULL, L""), MgNullArgumentException*);
+        //Try to get the content using nullptr arguments
+        REQUIRE_THROWS_MG(pService->GetResourceContent(nullptr, L""), MgNullArgumentException*);
 
         //Try to get the content of a resource that doesn't exist
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceContent(&resourceNotExist, L""), MgResourceNotFoundException*);
+        REQUIRE_THROWS_MG(pService->GetResourceContent(&resourceNotExist, L""), MgResourceNotFoundException*);
 
         //Get the content of the resource that was added in TestCase_SetResource
         byteReader = pService->GetResourceContent(&resourceIdentifier, L"");
         STRING mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -926,20 +930,20 @@
 ///
 /// This test case gets the contents of a collection of resources
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_GetResourceContents()
+TEST_CASE("GetResourceContents", "[ResourceService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestResourceService.TestCase_GetResourceContents", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestResourceService.TestCase_GetResourceContents", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_GetResourceContents", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_GetResourceContents", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         // Set the user information for the current thread to be administrator.
@@ -946,24 +950,24 @@
         Ptr<MgUserInformation> adminUserInfo = new MgUserInformation(adminName, adminPass);
         MgUserInformation::SetCurrentUserInfo(adminUserInfo);
 
-        //Try to get the contents using NULL arguments
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceContents(NULL, NULL), MgNullArgumentException*);
+        //Try to get the contents using nullptr arguments
+        REQUIRE_THROWS_MG(pService->GetResourceContents(nullptr, nullptr), MgNullArgumentException*);
 
         //Try to get the content of a resource that doesn't exist
         Ptr<MgStringCollection> resourceNotExistCol = new MgStringCollection();
         resourceNotExistCol->Add(resourceNotExist.ToString());
         resourceNotExistCol->Add(resourceIdentifier.ToString());
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceContents(resourceNotExistCol, NULL), MgResourceNotFoundException*);
+        REQUIRE_THROWS_MG(pService->GetResourceContents(resourceNotExistCol, nullptr), MgResourceNotFoundException*);
 
         //Get the content of the resource that was added in TestCase_SetResource
         Ptr<MgStringCollection> resourceIds = new MgStringCollection();
         resourceIds->Add(resourceIdentifier.ToString());
         resourceIds->Add(resourceIdentifier4.ToString());
-        Ptr<MgStringCollection> ret = pService->GetResourceContents(resourceIds, NULL);
-        CPPUNIT_ASSERT(ret->GetCount() == 2);
+        Ptr<MgStringCollection> ret = pService->GetResourceContents(resourceIds, nullptr);
+        REQUIRE(ret->GetCount() == 2);
         for(int i = 0; i < ret->GetCount(); i ++)
         {
-            CPPUNIT_ASSERT(!ret->GetItem(i).empty());
+            REQUIRE(!ret->GetItem(i).empty());
         }
     }
     catch(MgException* e)
@@ -970,7 +974,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -979,20 +983,20 @@
 ///
 /// This test case gets the header of the resource
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_GetResourceHeader()
+TEST_CASE("GetResourceHeader", "[ResourceService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestResourceService.TestCase_GetResourceHeader", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestResourceService.TestCase_GetResourceHeader", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_GetResourceHeader", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_GetResourceHeader", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         // Set the user information for the current thread to be administrator.
@@ -1000,24 +1004,24 @@
         MgUserInformation::SetCurrentUserInfo(adminUserInfo);
 
         Ptr<MgByteReader> byteReader;
-        byteReader = NULL;
+        byteReader = nullptr;
 
-        //Try to get the content using NULL arguments
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceHeader(NULL), MgNullArgumentException*);
+        //Try to get the content using nullptr arguments
+        REQUIRE_THROWS_MG(pService->GetResourceHeader(nullptr), MgNullArgumentException*);
 
         //Try to get the content of a resource that doesn't exist
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceHeader(&resourceNotExist), MgResourceNotFoundException*);
+        REQUIRE_THROWS_MG(pService->GetResourceHeader(&resourceNotExist), MgResourceNotFoundException*);
 
         //Get the content of the resource that was added in TestCase_SetResource
         byteReader = pService->GetResourceHeader(&resourceIdentifier);
         STRING mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -1026,20 +1030,20 @@
 ///
 /// This test case enumerates the references of the resource
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_EnumerateReferences()
+TEST_CASE("EnumerateReferences", "[ResourceService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestResourceService.TestCase_EnumerateReferences", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestResourceService.TestCase_EnumerateReferences", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_EnumerateReferences", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_EnumerateReferences", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         // Set the user information for the current thread to be administrator.
@@ -1047,21 +1051,21 @@
         MgUserInformation::SetCurrentUserInfo(adminUserInfo);
 
         Ptr<MgByteReader> byteReader;
-        byteReader = NULL;
+        byteReader = nullptr;
 
-        //Try to get the content using NULL arguments
-        CPPUNIT_ASSERT_THROW_MG(pService->EnumerateReferences(NULL), MgNullArgumentException*);
+        //Try to get the content using nullptr arguments
+        REQUIRE_THROWS_MG(pService->EnumerateReferences(nullptr), MgNullArgumentException*);
 
         //Get the content of the resource that was added in TestCase_SetResource
         byteReader = pService->EnumerateReferences(&resourceIdentifier);
         STRING mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -1070,41 +1074,41 @@
 ///
 /// This test case changes the owner of a resource
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_ChangeResourceOwner()
+TEST_CASE("ChangeResourceOwner", "[ResourceService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestResourceService.TestCase_ChangeResourceOwner", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestResourceService.TestCase_ChangeResourceOwner", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_ChangeResourceOwner", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_ChangeResourceOwner", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgUserInformation> userInfo;
 
         //Sets the user information for the current thread to be administrator
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(adminName, adminPass);
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
-            //Try to change the user using NULL arguments
-            CPPUNIT_ASSERT_THROW_MG(pService->ChangeResourceOwner(NULL, L"", false), MgNullArgumentException*);
+            //Try to change the user using nullptr arguments
+            REQUIRE_THROWS_MG(pService->ChangeResourceOwner(nullptr, L"", false), MgNullArgumentException*);
 
             //Try to change the owner of a resource that doesn't exist
             //TODO: this does not throw exception, should it?
-            //CPPUNIT_ASSERT_THROW_MG(pService->ChangeResourceOwner(&resourceNotExist, adminName, false), MgResourceNotFoundException*);
+            //REQUIRE_THROWS_MG(pService->ChangeResourceOwner(&resourceNotExist, adminName, false), MgResourceNotFoundException*);
 
             //Try to change the owner of the resource created to a user that doesn't exist
-            CPPUNIT_ASSERT_THROW_MG(pService->ChangeResourceOwner(&resourceIdentifier, L"DoesNotExist", false), MgUserNotFoundException*);
+            REQUIRE_THROWS_MG(pService->ChangeResourceOwner(&resourceIdentifier, L"DoesNotExist", false), MgUserNotFoundException*);
 
             //Change the resource owner to administrator
             pService->ChangeResourceOwner(&resourceIdentifier, adminName, false);
@@ -1111,13 +1115,13 @@
         }
 
         //Try to copy resource while not an admin
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(L"", L"");
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
-            CPPUNIT_ASSERT_THROW_MG(pService->ChangeResourceOwner(&resourceIdentifier, adminName, false), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->ChangeResourceOwner(&resourceIdentifier, adminName, false), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -1124,7 +1128,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -1133,34 +1137,34 @@
 ///
 /// This test case sets all decendants of the resource to inherit permissions
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_InheritPermissionsFrom()
+TEST_CASE("InheritPermissionsFrom", "[ResourceService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestResourceService.TestCase_InheritPermissionsFrom", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestResourceService.TestCase_InheritPermissionsFrom", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_InheritPermissionsFrom", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_InheritPermissionsFrom", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgUserInformation> userInfo;
 
         //Sets the user information for the current thread to be administrator
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(adminName, adminPass);
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
-            //Try to use a NULL argument
-            CPPUNIT_ASSERT_THROW_MG(pService->InheritPermissionsFrom(NULL), MgNullArgumentException*);
+            //Try to use a nullptr argument
+            REQUIRE_THROWS_MG(pService->InheritPermissionsFrom(nullptr), MgNullArgumentException*);
 
             //Set resources to inherit permissions
             pService->InheritPermissionsFrom(&libraryRepositoryIdentifier);
@@ -1167,13 +1171,13 @@
         }
 
         //Try to perform this operation while not an administrator
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(L"", L"");
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
-            CPPUNIT_ASSERT_THROW_MG(pService->InheritPermissionsFrom(&libraryRepositoryIdentifier), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->InheritPermissionsFrom(&libraryRepositoryIdentifier), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -1180,7 +1184,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -1190,20 +1194,20 @@
 /// This test case enumerates the resource data of the resource that was
 /// added earlier
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_EnumerateResourceData()
+TEST_CASE("EnumerateResourceData", "[ResourceService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestResourceService.TestCase_EnumerateResourceData", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestResourceService.TestCase_EnumerateResourceData", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_EnumerateResourceData", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_EnumerateResourceData", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         // Set the user information for the current thread to be administrator.
@@ -1211,24 +1215,24 @@
         MgUserInformation::SetCurrentUserInfo(adminUserInfo);
 
         Ptr<MgByteReader> byteReader;
-        byteReader = NULL;
+        byteReader = nullptr;
 
-        //Try enumerating using a NULL argument
-        CPPUNIT_ASSERT_THROW_MG(pService->EnumerateResourceData(NULL), MgNullArgumentException*);
+        //Try enumerating using a nullptr argument
+        REQUIRE_THROWS_MG(pService->EnumerateResourceData(nullptr), MgNullArgumentException*);
 
         //Try enumerating using a resource that doesn't exist
-        CPPUNIT_ASSERT_THROW_MG(pService->EnumerateResourceData(&resourceNotExist), MgResourceNotFoundException*);
+        REQUIRE_THROWS_MG(pService->EnumerateResourceData(&resourceNotExist), MgResourceNotFoundException*);
 
         //Enumerate the resource data of the resource added earlier
         byteReader = pService->EnumerateResourceData(&resourceIdentifier);
         STRING mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -1237,42 +1241,42 @@
 ///
 /// This test case sets the data of a resource
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_SetResourceData()
+TEST_CASE("SetResourceData", "[ResourceService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestResourceService.TestCase_SetResourceData", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestResourceService.TestCase_SetResourceData", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_SetResourceData", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_SetResourceData", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgUserInformation> userInfo;
 
         Ptr<MgByteSource> dataSource;
-        dataSource = NULL;
+        dataSource = nullptr;
 
         //Sets the user information for the current thread to be administrator
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(adminName, adminPass);
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
-            //Try using a NULL identifier
-            CPPUNIT_ASSERT_THROW_MG(pService->SetResourceData(NULL, L"", L"", NULL), MgNullArgumentException*);
+            //Try using a nullptr identifier
+            REQUIRE_THROWS_MG(pService->SetResourceData(nullptr, L"", L"", nullptr), MgNullArgumentException*);
 
             //Try to name the resource data with a 0 character string
             dataSource = new MgByteSource(dataFileName);
             Ptr<MgByteReader> dataReader = dataSource->GetReader();
-            CPPUNIT_ASSERT_THROW_MG(pService->SetResourceData(&resourceIdentifier, L"", L"File", dataReader), MgInvalidArgumentException*);
+            REQUIRE_THROWS_MG(pService->SetResourceData(&resourceIdentifier, L"", L"File", dataReader), MgInvalidArgumentException*);
 
             //Set the resource data
             dataSource = new MgByteSource(dataFileName);
@@ -1282,14 +1286,14 @@
         }
 
         //Try to set resource data while not an admin
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(L"", L"");
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
             Ptr<MgByteReader> dataReader = dataSource->GetReader();
-            CPPUNIT_ASSERT_THROW_MG(pService->SetResourceData(&resourceIdentifier, resourceDataName, L"File", dataReader), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->SetResourceData(&resourceIdentifier, resourceDataName, L"File", dataReader), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -1296,7 +1300,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -1305,43 +1309,43 @@
 ///
 /// This test case renames a resource's data
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_RenameResourceData()
+TEST_CASE("RenameResourceData", "[ResourceService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestResourceService.TestCase_RenameResourceData", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestResourceService.TestCase_RenameResourceData", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_RenameResourceData", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_RenameResourceData", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgUserInformation> userInfo;
 
         //Sets the user information for the current thread to be administrator
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(adminName, adminPass);
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
             //Try using a null argument for the idenfier
-            CPPUNIT_ASSERT_THROW_MG(pService->RenameResourceData(NULL, resourceDataName, resourceDataName2, true), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->RenameResourceData(nullptr, resourceDataName, resourceDataName2, true), MgNullArgumentException*);
 
             //Try using a resource identifier that doesn't exist
-            CPPUNIT_ASSERT_THROW_MG(pService->RenameResourceData(&resourceNotExist, resourceDataName, resourceDataName2, true), MgResourceNotFoundException*);
+            REQUIRE_THROWS_MG(pService->RenameResourceData(&resourceNotExist, resourceDataName, resourceDataName2, true), MgResourceNotFoundException*);
 
             //Try to use a resource data name that doesn't exist
-            CPPUNIT_ASSERT_THROW_MG(pService->RenameResourceData(&resourceIdentifier, L"DoesNotExist", resourceDataName2, true), MgResourceDataNotFoundException*);
+            REQUIRE_THROWS_MG(pService->RenameResourceData(&resourceIdentifier, L"DoesNotExist", resourceDataName2, true), MgResourceDataNotFoundException*);
 
             //Try to name the resource data with a 0 character string
-            CPPUNIT_ASSERT_THROW_MG(pService->RenameResourceData(&resourceIdentifier, resourceDataName, L"", true), MgInvalidArgumentException*);
+            REQUIRE_THROWS_MG(pService->RenameResourceData(&resourceIdentifier, resourceDataName, L"", true), MgInvalidArgumentException*);
 
             //Try to do a valid rename
             pService->RenameResourceData(&resourceIdentifier, resourceDataName, resourceDataName2, false);
@@ -1349,13 +1353,13 @@
         }
 
         //Try to rename resource data while not an admin
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(L"", L"");
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
-            CPPUNIT_ASSERT_THROW_MG(pService->RenameResourceData(&resourceIdentifier, resourceDataName, resourceDataName2, false), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->RenameResourceData(&resourceIdentifier, resourceDataName, resourceDataName2, false), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -1362,7 +1366,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -1371,20 +1375,20 @@
 ///
 /// This test case retrieves the data of the resource
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_GetResourceData()
+TEST_CASE("GetResourceData", "[ResourceService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestResourceService.TestCase_GetResourceData", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestResourceService.TestCase_GetResourceData", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_GetResourceData", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_GetResourceData", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         // Set the user information for the current thread to be administrator.
@@ -1392,19 +1396,19 @@
         MgUserInformation::SetCurrentUserInfo(adminUserInfo);
 
         Ptr<MgByteReader> byteReader;
-        byteReader = NULL;
+        byteReader = nullptr;
 
-        //Try to get resource data using a NULL identifier
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceData(NULL, resourceDataName, L""), MgNullArgumentException*);
+        //Try to get resource data using a nullptr identifier
+        REQUIRE_THROWS_MG(pService->GetResourceData(nullptr, resourceDataName, L""), MgNullArgumentException*);
 
         //Try to get resource data using an empty data name string
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceData(&resourceIdentifier, L"", L""), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetResourceData(&resourceIdentifier, L"", L""), MgInvalidArgumentException*);
 
         //Try to get the resource data of a resource that does not exist
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceData(&resourceNotExist, resourceDataName, L""), MgResourceNotFoundException*);
+        REQUIRE_THROWS_MG(pService->GetResourceData(&resourceNotExist, resourceDataName, L""), MgResourceNotFoundException*);
 
         //Try to get the resource data of a data name that doesn't exist
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceData(&resourceIdentifier, L"DoesNotExist", L""), MgResourceDataNotFoundException*);
+        REQUIRE_THROWS_MG(pService->GetResourceData(&resourceIdentifier, L"DoesNotExist", L""), MgResourceDataNotFoundException*);
 
         //Get resource data using valid arguments
         byteReader = pService->GetResourceData(&resourceIdentifier, resourceDataName, L"");
@@ -1413,7 +1417,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -1422,40 +1426,40 @@
 ///
 /// This test case deletes the data of the resource
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_DeleteResourceData()
+TEST_CASE("DeleteResourceData", "[ResourceService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestResourceService.TestCase_DeleteResourceData", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestResourceService.TestCase_DeleteResourceData", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_DeleteResourceData", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_DeleteResourceData", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgUserInformation> userInfo;
 
         //Sets the user information for the current thread to be administrator
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(adminName, adminPass);
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
-            //Try using a NULL resource identifier
-            CPPUNIT_ASSERT_THROW_MG(pService->DeleteResourceData(NULL, resourceDataName), MgNullArgumentException*);
+            //Try using a nullptr resource identifier
+            REQUIRE_THROWS_MG(pService->DeleteResourceData(nullptr, resourceDataName), MgNullArgumentException*);
 
             //Try using an empty string for the resource data name
-            CPPUNIT_ASSERT_THROW_MG(pService->DeleteResourceData(&resourceIdentifier, L""), MgInvalidArgumentException*);
+            REQUIRE_THROWS_MG(pService->DeleteResourceData(&resourceIdentifier, L""), MgInvalidArgumentException*);
 
             //Try deleting data that does not exist
-            CPPUNIT_ASSERT_THROW_MG(pService->DeleteResourceData(&resourceIdentifier, L"DoesNotExist"), MgResourceDataNotFoundException*);
+            REQUIRE_THROWS_MG(pService->DeleteResourceData(&resourceIdentifier, L"DoesNotExist"), MgResourceDataNotFoundException*);
 
             //Delete the resource data that was set earlier
             pService->DeleteResourceData(&resourceIdentifier, resourceDataName);
@@ -1462,13 +1466,13 @@
         }
 
         //Try to rename resource data while not an admin
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(L"", L"");
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
-            CPPUNIT_ASSERT_THROW_MG(pService->DeleteResourceData(&resourceIdentifier, resourceDataName2), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->DeleteResourceData(&resourceIdentifier, resourceDataName2), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -1475,7 +1479,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -1485,40 +1489,40 @@
 /// This test case deletes the resources that were added and copied in the
 /// earlier tests
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_DeleteResource()
+TEST_CASE("DeleteResource", "[ResourceService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestResourceService.TestCase_DeleteResource", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestResourceService.TestCase_DeleteResource", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_DeleteResource", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_DeleteResource", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgFeatureService> pFeatureService = dynamic_cast<MgFeatureService*>(serviceManager->RequestService(MgServiceType::FeatureService));
-        if (pFeatureService == 0)
+        if (pFeatureService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_DeleteResource", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_DeleteResource", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgUserInformation> userInfo;
 
         //Sets the user information for the current thread to be administrator
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(adminName, adminPass);
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
-            //Try to use a NULL argument
-            CPPUNIT_ASSERT_THROW_MG(pService->DeleteResource(NULL), MgNullArgumentException*);
+            //Try to use a nullptr argument
+            REQUIRE_THROWS_MG(pService->DeleteResource(nullptr), MgNullArgumentException*);
 
             //Try to delete a resource that doesn't exist. We allow doing this for performance reason.
             pService->DeleteResource(&resourceNotExist);
@@ -1530,19 +1534,19 @@
         }
 
         //Try to delete resource while not an admin
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(L"", L"");
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
-            CPPUNIT_ASSERT_THROW_MG(pService->DeleteResource(&resourceIdentifier), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->DeleteResource(&resourceIdentifier), MgUnauthorizedAccessException*);
         }
 
         // Try to delete resource after FDO exception
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(adminName, adminPass);
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             Ptr<MgResourceIdentifier> resource;
             resource = new MgResourceIdentifier(L"Library://UnitTests/Data/TEST.FeatureSource");
@@ -1561,7 +1565,7 @@
             Ptr<MgByteSource> contentSource;
             contentSource = new MgByteSource(rcName);
             Ptr<MgByteReader> contentReader = contentSource->GetReader();
-            pService->SetResource(resource, contentReader, NULL);
+            pService->SetResource(resource, contentReader, nullptr);
 
             Ptr<MgByteSource> dataSource;
             dataSource = new MgByteSource(dfName);
@@ -1569,7 +1573,7 @@
             Ptr<MgByteReader> dataReader;
             dataReader = dataSource->GetReader();
             pService->SetResourceData(resource, L"TEST.sdf", L"File", dataReader);
-            dataReader = NULL; // Holds on to the file, so must release resources!
+            dataReader = nullptr; // Holds on to the file, so must release resources!
 
             // Force an FDO exception
             Ptr<MgFeatureAggregateOptions> options = new MgFeatureAggregateOptions();
@@ -1578,10 +1582,10 @@
 
             Ptr<MgDataReader> reader = pFeatureService->SelectAggregate(resource, className, options);
             bool bResult = reader->ReadNext();
-            CPPUNIT_ASSERT(bResult);
+            REQUIRE(bResult);
 
             reader->Close();
-            reader = NULL; // Holds on to the file, so must release resources!
+            reader = nullptr; // Holds on to the file, so must release resources!
 
             // Attempt to delete the resource
             pService->DeleteResource(resource);
@@ -1591,12 +1595,12 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -1609,126 +1613,42 @@
 ///
 /// This test case enumerates the unmanaged data
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_EnumerateUnmanagedData()
+TEST_CASE("EnumerateUnmanagedData", "[ResourceService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestResourceService.TestCase_EnumerateUnmanagedData", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestResourceService.TestCase_EnumerateUnmanagedData", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_EnumerateUnmanagedData", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestResourceService.TestCase_EnumerateUnmanagedData", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         // Try to enumerate mappings
         Ptr<MgByteReader> byteReader0 = pService->EnumerateUnmanagedData(L"", false, L"FOLDERS", L"");
         STRING mimeType0 = byteReader0->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType0.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType0.c_str(), MgMimeType::Xml.c_str()) == 0);
 
         // Enumerate all unmanaged data files
         Ptr<MgByteReader> byteReader1 = pService->EnumerateUnmanagedData(L"", true, L"FILES", L"");
         STRING mimeType1 = byteReader1->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType1.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType1.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
-// data structure which is passed to each thread
-struct ResourceThreadData
+TEST_CASE("RepositoryBusy", "[ResourceService]")
 {
-    INT32 threadId;
-    INT32 command;
-    bool success;
-    bool done;
-    STRING session;
-};
-
-// the method which gets executed by the ACE worker thread
-ACE_THR_FUNC_RETURN RepositoryWorker(void* param)
-{
-    // get the data for this thread
-    ResourceThreadData* threadData = (ResourceThreadData*)param;
-    INT32 threadId = threadData->threadId;
-    INT32 command = threadData->command;
-    STRING session = threadData->session;
-
-    ACE_DEBUG((LM_INFO, ACE_TEXT("> thread %d started\n"), threadId));
-
-    try
-    {
-        // set user info
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
-        userInfo->SetMgSessionId(session);
-        MgUserInformation::SetCurrentUserInfo(userInfo);
-
-        // get the tile service instance
-        MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        Ptr<MgResourceService> svcResource = dynamic_cast<MgResourceService*>(
-            serviceManager->RequestService(MgServiceType::ResourceService));
-        assert(svcResource != NULL);
-
-        STRING resource = L"Session:";
-        resource += session;
-        resource += L"//UnitTests/Data/test-1.FeatureSource";
-        Ptr<MgResourceIdentifier> resId = new MgResourceIdentifier(resource);
-
-        switch (command)
-        {
-        case 0:
-            {
-            //Set the resource
-            Ptr<MgByteSource> contentSource = new MgByteSource(resourceContentFileName);
-            Ptr<MgByteReader> contentReader = contentSource->GetReader();
-            svcResource->SetResource(resId, contentReader, NULL);
-            }
-        case 1:
-            {
-            //Set the resource data
-            Ptr<MgByteSource> dataSource = new MgByteSource(dataFileName);
-            Ptr<MgByteReader> dataReader = dataSource->GetReader();
-            svcResource->SetResourceData(resId, resourceDataName, L"File", dataReader);
-            }
-            // Need to add a case that updates the session with runtime map
-        }
-
-        MgUserInformation::SetCurrentUserInfo(NULL);
-        threadData->success = true;
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        message += L"\n";
-        message += e->GetStackTrace(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        ACE_DEBUG((LM_INFO, ACE_TEXT("RepositoryWorker(%d) - Exception:\n%W\n"), threadId, message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-
-    // clear the user info to prevent leaks - if an exception happens and this is not called it leaks about 500 bytes!
-    MgUserInformation::SetCurrentUserInfo(NULL);
-
-    ACE_DEBUG((LM_INFO, ACE_TEXT("> thread %d done\n"), threadId));
-
-    threadData->done = true;
-    return 0;
-}
-
-void TestResourceService::TestCase_RepositoryBusy()
-{
     // specify the number of threads to use
     const INT32 numThreads = MG_TEST_THREADS;
     ResourceThreadData threadData[numThreads];
@@ -1741,7 +1661,7 @@
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
         Ptr<MgResourceService> svcResource = dynamic_cast<MgResourceService*>(
             serviceManager->RequestService(MgServiceType::ResourceService));
-        assert(svcResource != NULL);
+        assert(svcResource != nullptr);
 
         // set user info
         Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
@@ -1766,7 +1686,7 @@
 
             // Create session resource
             Ptr<MgResourceIdentifier> resIdSession = new MgResourceIdentifier(resource);
-            svcResource->CreateRepository(resIdSession, NULL, NULL);
+            svcResource->CreateRepository(resIdSession, nullptr, nullptr);
 
             // Create feature source resource
             resource += L"UnitTests/Data/test-1.FeatureSource";
@@ -1773,7 +1693,7 @@
             Ptr<MgResourceIdentifier> resId = new MgResourceIdentifier(resource);
             Ptr<MgByteSource> contentSource = new MgByteSource(resourceContentFileName);
             Ptr<MgByteReader> contentReader = contentSource->GetReader();
-            svcResource->SetResource(resId, contentReader, NULL);
+            svcResource->SetResource(resId, contentReader, nullptr);
 
             // Set the thread specific data
             threadData[i].threadId = i;
@@ -1803,7 +1723,7 @@
                     threadData[i].command = i%2;
 
                     // spawn a new thread using a specific group id
-                    int thid = manager->spawn(ACE_THR_FUNC(RepositoryWorker), &threadData[i], 0, NULL, NULL, 0, THREAD_GROUP);
+                    int thid = manager->spawn(ACE_THR_FUNC(RepositoryWorker), &threadData[i], 0, nullptr, nullptr, 0, THREAD_GROUP);
                     nRequest++;
                 }
             }
@@ -1838,7 +1758,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {

Deleted: trunk/MgDev/Server/src/UnitTesting/TestResourceService.h
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestResourceService.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestResourceService.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,103 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef TESTRESOURCESERVICE_H_
-#define TESTRESOURCESERVICE_H_
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestResourceService : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestResourceService);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_EnumerateRepositories);
-    CPPUNIT_TEST(TestCase_CreateRepository);
-    CPPUNIT_TEST(TestCase_UpdateRepository);
-    CPPUNIT_TEST(TestCase_GetRepositoryContent);
-    CPPUNIT_TEST(TestCase_GetRepositoryHeader);
-    CPPUNIT_TEST(TestCase_ApplyResourcePackage);
-    CPPUNIT_TEST(TestCase_DeleteRepository);
-
-    CPPUNIT_TEST(TestCase_ResourceExists);
-    CPPUNIT_TEST(TestCase_EnumerateResources);
-    CPPUNIT_TEST(TestCase_SetResource);
-    CPPUNIT_TEST(TestCase_MoveResource);
-    CPPUNIT_TEST(TestCase_CopyResource);
-    CPPUNIT_TEST(TestCase_GetResourceContent);
-    CPPUNIT_TEST(TestCase_GetResourceContents);
-    CPPUNIT_TEST(TestCase_GetResourceHeader);
-    CPPUNIT_TEST(TestCase_EnumerateReferences);
-    CPPUNIT_TEST(TestCase_ChangeResourceOwner);
-    CPPUNIT_TEST(TestCase_InheritPermissionsFrom);
-
-    CPPUNIT_TEST(TestCase_EnumerateResourceData);
-    CPPUNIT_TEST(TestCase_SetResourceData);
-    CPPUNIT_TEST(TestCase_RenameResourceData);
-    CPPUNIT_TEST(TestCase_GetResourceData);
-    CPPUNIT_TEST(TestCase_DeleteResourceData);
-
-    CPPUNIT_TEST(TestCase_DeleteResource);
-
-    CPPUNIT_TEST(TestCase_EnumerateUnmanagedData);
-    CPPUNIT_TEST(TestCase_RepositoryBusy);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    // Test Repository Management APIs
-    void TestCase_EnumerateRepositories();
-    void TestCase_CreateRepository();
-    void TestCase_UpdateRepository();
-    void TestCase_GetRepositoryContent();
-    void TestCase_GetRepositoryHeader();
-    void TestCase_ApplyResourcePackage();
-    void TestCase_DeleteRepository();
-
-    // Test Resource Management APIs
-    void TestCase_ResourceExists();
-    void TestCase_EnumerateResources();
-    void TestCase_SetResource();
-    void TestCase_MoveResource();
-    void TestCase_CopyResource();
-    void TestCase_GetResourceContent();
-    void TestCase_GetResourceContents();
-    void TestCase_GetResourceHeader();
-    void TestCase_EnumerateReferences();
-    void TestCase_ChangeResourceOwner();
-    void TestCase_InheritPermissionsFrom();
-
-    // Test Resource Data Management APIs
-    void TestCase_EnumerateResourceData();
-    void TestCase_SetResourceData();
-    void TestCase_RenameResourceData();
-    void TestCase_GetResourceData();
-    void TestCase_DeleteResourceData();
-
-    void TestCase_DeleteResource();
-
-    void TestCase_EnumerateUnmanagedData();
-    void TestCase_RepositoryBusy();
-};
-
-#endif // TESTRESOURCESERVICE_H_

Modified: trunk/MgDev/Server/src/UnitTesting/TestServerAdminService.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestServerAdminService.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestServerAdminService.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -19,10 +19,10 @@
 #include "ServiceManager.h"
 #include "ServerManager.h"
 #include "ServerAdminService.h"
-#include "TestServerAdminService.h"
-#include "CppUnitExtensions.h"
+#include "CatchHelperMacros.h"
 #include "FoundationDefs.h"
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestServerAdminService, "TestServerAdminService");
+#include "TestServiceFactory.h"
+#include "catch.hpp"
 
 const STRING adminName = L"Administrator";
 const STRING adminPass = L"admin";
@@ -32,58 +32,39 @@
 const wchar_t TestName[] = L"TestName.log";
 const wchar_t TestParameters[] =L"TEST PARAMETERS";
 
-const STRING TestServerAdminService::PackageName  = L"World.mgp";
-const STRING TestServerAdminService::PackageName2 = L"World2.mgp";
+const STRING PACKAGE_NAME  = L"World.mgp";
+const STRING PACKAGE_NAME_2 = L"World2.mgp";
 
-void TestServerAdminService::setUp()
-{
-}
-
-void TestServerAdminService::tearDown()
-{
-}
-
-void TestServerAdminService::TestStart()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning ServerAdmin Service tests.\n")));
-}
-
-void TestServerAdminService::TestEnd()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nServerAdmin Service tests completed.\n\n")));
-}
-
-
 ///----------------------------------------------------------------------------
 /// Test Case Description:
 ///
 /// This test case tests taking the server offline.
 ///----------------------------------------------------------------------------
-void TestServerAdminService::TestCase_TakeOffline()
+TEST_CASE("TakeOffline", "[ServerAdminService]")
 {
     try
     {
         MgServiceManager* serviceMan = MgServiceManager::GetInstance();
-        if(serviceMan == 0)
+        if (serviceMan == nullptr)
         {
-            throw new MgNullReferenceException(L"TestServerAdminService.TestCase_TakeOffline", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestServerAdminService.TestCase_TakeOffline", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerAdminService> pService = dynamic_cast<MgServerAdminService*>(serviceMan->RequestService(MgServiceType::ServerAdminService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestServerAdminService.TestCase_TakeOffline", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestServerAdminService.TestCase_TakeOffline", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         pService->TakeOffline();
         bool bOnline = pService->IsOnline();
-        CPPUNIT_ASSERT(bOnline == false);
+        REQUIRE(bOnline == false);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -97,31 +78,31 @@
 ///
 /// This test case tests bringing the server online.
 ///----------------------------------------------------------------------------
-void TestServerAdminService::TestCase_BringOnline()
+TEST_CASE("BringOnline", "[ServerAdminService]")
 {
     try
     {
         MgServiceManager* serviceMan = MgServiceManager::GetInstance();
-        if(serviceMan == 0)
+        if (serviceMan == nullptr)
         {
-            throw new MgNullReferenceException(L"TestServerAdminService.TestCase_BringOnline", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestServerAdminService.TestCase_BringOnline", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerAdminService> pService = dynamic_cast<MgServerAdminService*>(serviceMan->RequestService(MgServiceType::ServerAdminService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestServerAdminService.TestCase_BringOnline", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestServerAdminService.TestCase_BringOnline", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         pService->BringOnline();
         bool bOnline = pService->IsOnline();
-        CPPUNIT_ASSERT(bOnline == true);
+        REQUIRE(bOnline == true);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -135,36 +116,36 @@
 ///
 /// This test case tries to get the server configuration properties
 ///----------------------------------------------------------------------------
-void TestServerAdminService::TestCase_GetConfigurationProperties()
+TEST_CASE("GetConfigurationProperties", "[ServerAdminService]")
 {
     try
     {
         MgServiceManager* serviceMan = MgServiceManager::GetInstance();
-        if(serviceMan == 0)
+        if (serviceMan == nullptr)
         {
-            throw new MgNullReferenceException(L"TestServerAdminService::TestCase_GetConfigurationProperties", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestServerAdminService::TestCase_GetConfigurationProperties", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerAdminService> pService = dynamic_cast<MgServerAdminService*>(serviceMan->RequestService(MgServiceType::ServerAdminService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestServerAdminService::TestCase_GetConfigurationProperties", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestServerAdminService::TestCase_GetConfigurationProperties", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgPropertyCollection> pPropertyCollection1 = MgServerManager::GetInstance()->GetConfigurationProperties(L"GeneralProperties");
         Ptr<MgPropertyCollection> pPropertyCollection2 = pService->GetConfigurationProperties(L"GeneralProperties");
-        CPPUNIT_ASSERT(pPropertyCollection1->GetCount() == pPropertyCollection2->GetCount());
+        REQUIRE(pPropertyCollection1->GetCount() == pPropertyCollection2->GetCount());
 
         Ptr<MgStringProperty> pProperty1 = (MgStringProperty*)pPropertyCollection1->GetItem(L"DefaultMessageLocale");
         Ptr<MgStringProperty> pProperty2 = (MgStringProperty*)pPropertyCollection2->GetItem(L"DefaultMessageLocale");
 
-        CPPUNIT_ASSERT(pProperty1->GetValue() == pProperty2->GetValue());
+        REQUIRE(pProperty1->GetValue() == pProperty2->GetValue());
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -178,20 +159,20 @@
 ///
 /// This test case tries to set the server configuration properties
 ///----------------------------------------------------------------------------
-void TestServerAdminService::TestCase_SetConfigurationProperties()
+TEST_CASE("SetConfigurationProperties", "[ServerAdminService]")
 {
     try
     {
         MgServiceManager* serviceMan = MgServiceManager::GetInstance();
-        if(serviceMan == 0)
+        if (serviceMan == nullptr)
         {
-            throw new MgNullReferenceException(L"TestServerAdminService::TestCase_SetConfigurationProperties", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestServerAdminService::TestCase_SetConfigurationProperties", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerAdminService> pService = dynamic_cast<MgServerAdminService*>(serviceMan->RequestService(MgServiceType::ServerAdminService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestServerAdminService::TestCase_SetConfigurationProperties", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestServerAdminService::TestCase_SetConfigurationProperties", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgPropertyCollection> pPropertyCollection1 = pService->GetConfigurationProperties(L"GeneralProperties");
@@ -204,7 +185,7 @@
         Ptr<MgPropertyCollection> pPropertyCollection2 = pService->GetConfigurationProperties(L"GeneralProperties");
         Ptr<MgStringProperty> pProperty2 = (MgStringProperty*)pPropertyCollection1->GetItem(L"DefaultMessageLocale");
 
-        CPPUNIT_ASSERT(pProperty1->GetValue() == pProperty2->GetValue());
+        REQUIRE(pProperty1->GetValue() == pProperty2->GetValue());
 
         // Restore original value
         pProperty1->SetValue(valueOriginal);
@@ -214,7 +195,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -227,20 +208,20 @@
 ///
 /// This test case tries to remove the server configuration properties
 ///----------------------------------------------------------------------------
-void TestServerAdminService::TestCase_RemoveConfigurationProperties()
+TEST_CASE("RemoveConfigurationProperties", "[ServerAdminService]")
 {
     try
     {
         MgServiceManager* serviceMan = MgServiceManager::GetInstance();
-        if(serviceMan == 0)
+        if (serviceMan == nullptr)
         {
-            throw new MgNullReferenceException(L"TestServerAdminService::TestCase_RemoveConfigurationProperties", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestServerAdminService::TestCase_RemoveConfigurationProperties", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerAdminService> pService = dynamic_cast<MgServerAdminService*>(serviceMan->RequestService(MgServiceType::ServerAdminService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestServerAdminService::TestCase_RemoveConfigurationProperties", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestServerAdminService::TestCase_RemoveConfigurationProperties", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         // add a property to unmanaged data mappings
@@ -254,7 +235,7 @@
         Ptr<MgPropertyCollection> pPropertyCollection2 = pService->GetConfigurationProperties(L"UnmanagedDataMappings");
         Ptr<MgStringProperty> pProperty2 = (MgStringProperty*)pPropertyCollection2->GetItem(L"TestCase_RemoveConfigurationProperties");
 
-        CPPUNIT_ASSERT(pProperty2->GetValue().compare(L"c:\\temp") == 0);
+        REQUIRE(pProperty2->GetValue().compare(L"c:\\temp") == 0);
 
         // remove newly added property
         Ptr<MgPropertyCollection> pPropertyCollectionRemove = new MgPropertyCollection();
@@ -266,13 +247,13 @@
         // check for the removed property
         Ptr<MgPropertyCollection> pPropertyCollection3 = pService->GetConfigurationProperties(L"UnmanagedDataMappings");
 
-        CPPUNIT_ASSERT(!pPropertyCollection3->Contains(L"TestCase_RemoveConfigurationProperties"));
+        REQUIRE(!pPropertyCollection3->Contains(L"TestCase_RemoveConfigurationProperties"));
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -285,35 +266,35 @@
 ///
 /// This test case clears all of the logs
 ///----------------------------------------------------------------------------
-void TestServerAdminService::TestCase_ClearLog()
+TEST_CASE("ClearLog", "[ServerAdminService]")
 {
     try
     {
         MgServiceManager* serviceMan = MgServiceManager::GetInstance();
-        if (serviceMan == 0)
+        if (serviceMan == nullptr)
         {
-            throw new MgNullReferenceException(L"TestServerAdminService.TestCase_ClearLog", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestServerAdminService.TestCase_ClearLog", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerAdminService> pService = dynamic_cast<MgServerAdminService*>(serviceMan->RequestService(MgServiceType::ServerAdminService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestServerAdminService.TestCase_ClearLog", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestServerAdminService.TestCase_ClearLog", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
-        CPPUNIT_ASSERT(pService->ClearLog(MgLogFileType::Access));
-        CPPUNIT_ASSERT(pService->ClearLog(MgLogFileType::Admin));
-        CPPUNIT_ASSERT(pService->ClearLog(MgLogFileType::Authentication));
-        CPPUNIT_ASSERT(pService->ClearLog(MgLogFileType::Error));
-        CPPUNIT_ASSERT(pService->ClearLog(MgLogFileType::Session));
-        CPPUNIT_ASSERT(pService->ClearLog(MgLogFileType::Trace));
-        CPPUNIT_ASSERT_THROW_MG(pService->ClearLog(L"Invalid"), MgInvalidArgumentException*);
+        REQUIRE(pService->ClearLog(MgLogFileType::Access));
+        REQUIRE(pService->ClearLog(MgLogFileType::Admin));
+        REQUIRE(pService->ClearLog(MgLogFileType::Authentication));
+        REQUIRE(pService->ClearLog(MgLogFileType::Error));
+        REQUIRE(pService->ClearLog(MgLogFileType::Session));
+        REQUIRE(pService->ClearLog(MgLogFileType::Trace));
+        REQUIRE_THROWS_MG(pService->ClearLog(L"Invalid"), MgInvalidArgumentException*);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -328,49 +309,49 @@
 /// This test case gets the entire contents of each of the logs.  This checks
 /// whether an MgByteReader was returned or not
 ///----------------------------------------------------------------------------
-void TestServerAdminService::TestCase_GetLog()
+TEST_CASE("GetLog", "[ServerAdminService]")
 {
     try
     {
         MgServiceManager* serviceMan = MgServiceManager::GetInstance();
-        if (serviceMan == 0)
+        if (serviceMan == nullptr)
         {
-            throw new MgNullReferenceException(L"TestServerAdminService.TestCase_GetLog", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestServerAdminService.TestCase_GetLog", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerAdminService> pService = dynamic_cast<MgServerAdminService*>(serviceMan->RequestService(MgServiceType::ServerAdminService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestServerAdminService.TestCase_GetLog", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestServerAdminService.TestCase_GetLog", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgByteReader> byteReader;
 
         byteReader = pService->GetLog(MgLogFileType::Access);
-        CPPUNIT_ASSERT(byteReader != NULL);
+        REQUIRE(byteReader.p != nullptr);
 
         byteReader = pService->GetLog(MgLogFileType::Admin);
-        CPPUNIT_ASSERT(byteReader != NULL);
+        REQUIRE(byteReader.p != nullptr);
 
         byteReader = pService->GetLog(MgLogFileType::Authentication);
-        CPPUNIT_ASSERT(byteReader != NULL);
+        REQUIRE(byteReader.p != nullptr);
 
         byteReader = pService->GetLog(MgLogFileType::Error);
-        CPPUNIT_ASSERT(byteReader != NULL);
+        REQUIRE(byteReader.p != nullptr);
 
         byteReader = pService->GetLog(MgLogFileType::Session);
-        CPPUNIT_ASSERT(byteReader != NULL);
+        REQUIRE(byteReader.p != nullptr);
 
         byteReader = pService->GetLog(MgLogFileType::Trace);
-        CPPUNIT_ASSERT(byteReader != NULL);
+        REQUIRE(byteReader.p != nullptr);
 
-        CPPUNIT_ASSERT_THROW_MG(pService->GetLog(L"Invalid"), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetLog(L"Invalid"), MgInvalidArgumentException*);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -385,49 +366,49 @@
 /// This test case gets the last 3 entries of each of the logs.  Checks to make
 /// sure an MgByteReader is returned.
 ///----------------------------------------------------------------------------
-void TestServerAdminService::TestCase_GetLogEntries()
+TEST_CASE("GetLogEntries", "[ServerAdminService]")
 {
     try
     {
         MgServiceManager* serviceMan = MgServiceManager::GetInstance();
-        if(serviceMan == 0)
+        if (serviceMan == nullptr)
         {
-            throw new MgNullReferenceException(L"TestServerAdminService.TestCase_GetLogEntries", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestServerAdminService.TestCase_GetLogEntries", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerAdminService> pService = dynamic_cast<MgServerAdminService*>(serviceMan->RequestService(MgServiceType::ServerAdminService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestServerAdminService.TestCase_GetLogEntries", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestServerAdminService.TestCase_GetLogEntries", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgByteReader> byteReader;
 
         byteReader = pService->GetLog(MgLogFileType::Access, 3);
-        CPPUNIT_ASSERT(byteReader != NULL);
+        REQUIRE(byteReader.p != nullptr);
 
         byteReader = pService->GetLog(MgLogFileType::Admin, 3);
-        CPPUNIT_ASSERT(byteReader != NULL);
+        REQUIRE(byteReader.p != nullptr);
 
         byteReader = pService->GetLog(MgLogFileType::Authentication, 3);
-        CPPUNIT_ASSERT(byteReader != NULL);
+        REQUIRE(byteReader.p != nullptr);
 
         byteReader = pService->GetLog(MgLogFileType::Error, 3);
-        CPPUNIT_ASSERT(byteReader != NULL);
+        REQUIRE(byteReader.p != nullptr);
 
         byteReader = pService->GetLog(MgLogFileType::Session, 3);
-        CPPUNIT_ASSERT(byteReader != NULL);
+        REQUIRE(byteReader.p != nullptr);
 
         byteReader = pService->GetLog(MgLogFileType::Trace, 3);
-        CPPUNIT_ASSERT(byteReader != NULL);
+        REQUIRE(byteReader.p != nullptr);
 
-        CPPUNIT_ASSERT_THROW_MG(pService->GetLog(MgLogFileType::Access, -1), MgArgumentOutOfRangeException*);
+        REQUIRE_THROWS_MG(pService->GetLog(MgLogFileType::Access, -1), MgArgumentOutOfRangeException*);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -442,20 +423,20 @@
 /// This test case gets the entries of each log between 2 dates.  Checks to make
 /// sure an MgByteReader is returned.
 ///----------------------------------------------------------------------------
-void TestServerAdminService::TestCase_GetLogByDate()
+TEST_CASE("GetLogByDate", "[ServerAdminService]")
 {
     try
     {
         MgServiceManager* serviceMan = MgServiceManager::GetInstance();
-        if(serviceMan == 0)
+        if (serviceMan == nullptr)
         {
-            throw new MgNullReferenceException(L"TestServerAdminService.TestCase_GetLogEntries", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestServerAdminService.TestCase_GetLogEntries", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerAdminService> pService = dynamic_cast<MgServerAdminService*>(serviceMan->RequestService(MgServiceType::ServerAdminService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestServerAdminService.TestCase_GetLogEntries", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestServerAdminService.TestCase_GetLogEntries", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgByteReader> byteReader;
@@ -465,33 +446,33 @@
         Ptr<MgDateTime> invalidDateTime = new MgDateTime(2005, 3, 11);
 
         byteReader = pService->GetLog(MgLogFileType::Access, dateTime1, dateTime2);
-        CPPUNIT_ASSERT(byteReader != NULL);
+        REQUIRE(byteReader.p != nullptr);
 
         byteReader = pService->GetLog(MgLogFileType::Admin, dateTime1, dateTime2);
-        CPPUNIT_ASSERT(byteReader != NULL);
+        REQUIRE(byteReader.p != nullptr);
 
         byteReader = pService->GetLog(MgLogFileType::Authentication, dateTime1, dateTime2);
-        CPPUNIT_ASSERT(byteReader != NULL);
+        REQUIRE(byteReader.p != nullptr);
 
         byteReader = pService->GetLog(MgLogFileType::Error, dateTime1, dateTime2);
-        CPPUNIT_ASSERT(byteReader != NULL);
+        REQUIRE(byteReader.p != nullptr);
 
         byteReader = pService->GetLog(MgLogFileType::Session, dateTime1, dateTime2);
-        CPPUNIT_ASSERT(byteReader != NULL);
+        REQUIRE(byteReader.p != nullptr);
 
         byteReader = pService->GetLog(MgLogFileType::Trace, dateTime1, dateTime2);
-        CPPUNIT_ASSERT(byteReader != NULL);
+        REQUIRE(byteReader.p != nullptr);
 
-        CPPUNIT_ASSERT_THROW_MG(pService->GetLog(MgLogFileType::Access, dateTime1, NULL), MgNullArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->GetLog(MgLogFileType::Access, dateTime2, dateTime1), MgInvalidArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->GetLog(MgLogFileType::Access, dateTime1, dateTime3), MgInvalidArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->GetLog(MgLogFileType::Access, invalidDateTime, dateTime2), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetLog(MgLogFileType::Access, dateTime1, nullptr), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetLog(MgLogFileType::Access, dateTime2, dateTime1), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetLog(MgLogFileType::Access, dateTime1, dateTime3), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetLog(MgLogFileType::Access, invalidDateTime, dateTime2), MgInvalidArgumentException*);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -505,30 +486,30 @@
 ///
 /// This test case tries to get the server information properties
 ///----------------------------------------------------------------------------
-void TestServerAdminService::TestCase_GetInformationProperties()
+TEST_CASE("GetInformationProperties", "[ServerAdminService]")
 {
     try
     {
         MgServiceManager* serviceMan = MgServiceManager::GetInstance();
-        if(serviceMan == 0)
+        if (serviceMan == nullptr)
         {
-            throw new MgNullReferenceException(L"TestServerAdminService::TestCase_GetInformationProperties", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestServerAdminService::TestCase_GetInformationProperties", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerAdminService> pService = dynamic_cast<MgServerAdminService*>(serviceMan->RequestService(MgServiceType::ServerAdminService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestServerAdminService::TestCase_GetInformationProperties", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestServerAdminService::TestCase_GetInformationProperties", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgPropertyCollection> pPropertyCollection = MgServerManager::GetInstance()->GetInformationProperties();
-        CPPUNIT_ASSERT(0 < pPropertyCollection->GetCount());
+        REQUIRE(0 < pPropertyCollection->GetCount());
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -542,20 +523,20 @@
 ///
 /// This test case enumerates the packages in the specified package folder
 ///----------------------------------------------------------------------------
-void TestServerAdminService::TestCase_EnumeratePackages()
+TEST_CASE("EnumeratePackages", "[ServerAdminService]")
 {
     try
     {
         MgServiceManager* serviceMan = MgServiceManager::GetInstance();
-        if(serviceMan == 0)
+        if (serviceMan == nullptr)
         {
-            throw new MgNullReferenceException(L"TestServerAdminService::TestCase_EnumeratePackages", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestServerAdminService::TestCase_EnumeratePackages", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerAdminService> pService = dynamic_cast<MgServerAdminService*>(serviceMan->RequestService(MgServiceType::ServerAdminService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestServerAdminService::TestCase_EnumeratePackages", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestServerAdminService::TestCase_EnumeratePackages", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgPropertyCollection> pPropertyCollection1 = pService->GetConfigurationProperties(L"ResourceServiceProperties");
@@ -574,7 +555,7 @@
         pProperty1->SetValue(valueOriginal);
         pService->SetConfigurationProperties(L"ResourceServiceProperties", pPropertyCollection1);
 
-        CPPUNIT_ASSERT(packages->Contains(TestServerAdminService::PackageName));
+        REQUIRE(packages->Contains(PACKAGE_NAME));
     }
     catch(MgException* e)
     {
@@ -581,7 +562,7 @@
         STRING message = e->GetExceptionMessage(TEST_LOCALE);
         message += e->GetStackTrace(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -595,20 +576,20 @@
 ///
 /// This test case loads a resource package
 ///----------------------------------------------------------------------------
-void TestServerAdminService::TestCase_LoadPackage()
+TEST_CASE("LoadPackage", "[ServerAdminService]")
 {
     try
     {
         MgServiceManager* serviceMan = MgServiceManager::GetInstance();
-        if(serviceMan == 0)
+        if (serviceMan == nullptr)
         {
-            throw new MgNullReferenceException(L"TestServerAdminService::TestCase_LoadPackage", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestServerAdminService::TestCase_LoadPackage", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerAdminService> pService = dynamic_cast<MgServerAdminService*>(serviceMan->RequestService(MgServiceType::ServerAdminService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestServerAdminService::TestCase_LoadPackage", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestServerAdminService::TestCase_LoadPackage", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgPropertyCollection> pPropertyCollection1 = pService->GetConfigurationProperties(L"ResourceServiceProperties");
@@ -624,14 +605,14 @@
         Ptr<MgUserInformation> userInfo;
 
         //Sets the user information for the current thread to be administrator
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(adminName, adminPass);
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
-            pService->LoadPackage(TestServerAdminService::PackageName);
+            pService->LoadPackage(PACKAGE_NAME);
         }
 
         // Restore original value
@@ -643,7 +624,7 @@
         STRING message = e->GetExceptionMessage(TEST_LOCALE);
         message += e->GetStackTrace(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -657,20 +638,20 @@
 /// Creates a package from the specified resource, and then saves it into
 /// the specified name.
 ///
-void TestServerAdminService::TestCase_MakePackage()
+TEST_CASE("MakePackage", "[ServerAdminService]")
 {
     try
     {
         MgServiceManager* serviceMan = MgServiceManager::GetInstance();
-        if(serviceMan == 0)
+        if (serviceMan == nullptr)
         {
-            throw new MgNullReferenceException(L"TestServerAdminService::TestCase_MakePackage", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestServerAdminService::TestCase_MakePackage", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerAdminService> pService = dynamic_cast<MgServerAdminService*>(serviceMan->RequestService(MgServiceType::ServerAdminService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestServerAdminService::TestCase_MakePackage", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestServerAdminService::TestCase_MakePackage", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgPropertyCollection> pPropertyCollection1 = pService->GetConfigurationProperties(L"ResourceServiceProperties");
@@ -686,9 +667,9 @@
         Ptr<MgUserInformation> userInfo;
 
         //Sets the user information for the current thread to be administrator
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(adminName, adminPass);
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
@@ -695,8 +676,7 @@
 
             MgResourceIdentifier resource(L"Library://UnitTests/");
 
-            pService->MakePackage(&resource,
-                TestServerAdminService::PackageName2, L"Unit Test Package");
+            pService->MakePackage(&resource, PACKAGE_NAME_2, L"Unit Test Package");
         }
 
         Ptr<MgStringCollection> packages = pService->EnumeratePackages();
@@ -705,7 +685,7 @@
         pProperty1->SetValue(valueOriginal);
         pService->SetConfigurationProperties(L"ResourceServiceProperties", pPropertyCollection1);
 
-        CPPUNIT_ASSERT(packages->Contains(TestServerAdminService::PackageName2));
+        REQUIRE(packages->Contains(PACKAGE_NAME_2));
     }
     catch(MgFileIoException* e)
     {
@@ -718,7 +698,7 @@
         STRING message = e->GetExceptionMessage(TEST_LOCALE);
         message += e->GetStackTrace(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -731,20 +711,20 @@
 ///
 /// This test case gets a log associated with a resource package
 ///----------------------------------------------------------------------------
-void TestServerAdminService::TestCase_GetPackageLog()
+TEST_CASE("GetPackageLog", "[ServerAdminService]")
 {
     try
     {
         MgServiceManager* serviceMan = MgServiceManager::GetInstance();
-        if(serviceMan == 0)
+        if (serviceMan == nullptr)
         {
-            throw new MgNullReferenceException(L"TestServerAdminService::TestCase_GetPackageLog", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestServerAdminService::TestCase_GetPackageLog", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerAdminService> pService = dynamic_cast<MgServerAdminService*>(serviceMan->RequestService(MgServiceType::ServerAdminService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestServerAdminService::TestCase_GetPackageLog", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestServerAdminService::TestCase_GetPackageLog", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgPropertyCollection> pPropertyCollection1 = pService->GetConfigurationProperties(L"ResourceServiceProperties");
@@ -757,7 +737,7 @@
         Ptr<MgPropertyCollection> pPropertyCollection2 = pService->GetConfigurationProperties(L"ResourceServiceProperties");
         Ptr<MgStringProperty> pProperty2 = (MgStringProperty*)pPropertyCollection1->GetItem(L"PackagesPath");
 
-        Ptr<MgByteReader> byteReader = pService->GetPackageLog(TestServerAdminService::PackageName);
+        Ptr<MgByteReader> byteReader = pService->GetPackageLog(PACKAGE_NAME);
         STRING contents = byteReader->ToString();
 
         // Restore original value
@@ -764,7 +744,7 @@
         pProperty1->SetValue(valueOriginal);
         pService->SetConfigurationProperties(L"ResourceServiceProperties", pPropertyCollection1);
 
-        CPPUNIT_ASSERT(!contents.empty());
+        REQUIRE(!contents.empty());
     }
     catch(MgException* e)
     {
@@ -771,7 +751,7 @@
         STRING message = e->GetExceptionMessage(TEST_LOCALE);
         message += e->GetStackTrace(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -785,20 +765,20 @@
 ///
 /// This test case gets a status associated with a resource package
 ///----------------------------------------------------------------------------
-void TestServerAdminService::TestCase_GetPackageStatus()
+TEST_CASE("GetPackageStatus", "[ServerAdminService]")
 {
     try
     {
         MgServiceManager* serviceMan = MgServiceManager::GetInstance();
-        if(serviceMan == 0)
+        if (serviceMan == nullptr)
         {
-            throw new MgNullReferenceException(L"TestServerAdminService::TestCase_GetPackageStatus", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestServerAdminService::TestCase_GetPackageStatus", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerAdminService> pService = dynamic_cast<MgServerAdminService*>(serviceMan->RequestService(MgServiceType::ServerAdminService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestServerAdminService::TestCase_GetPackageStatus", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestServerAdminService::TestCase_GetPackageStatus", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgPropertyCollection> pPropertyCollection1 = pService->GetConfigurationProperties(L"ResourceServiceProperties");
@@ -811,7 +791,7 @@
         Ptr<MgPropertyCollection> pPropertyCollection2 = pService->GetConfigurationProperties(L"ResourceServiceProperties");
         Ptr<MgStringProperty> pProperty2 = (MgStringProperty*)pPropertyCollection1->GetItem(L"PackagesPath");
 
-        Ptr<MgPackageStatusInformation> statusInfo = pService->GetPackageStatus(TestServerAdminService::PackageName);
+        Ptr<MgPackageStatusInformation> statusInfo = pService->GetPackageStatus(PACKAGE_NAME);
         STRING statusCode = statusInfo->GetStatusCode();
 
         // Restore original value
@@ -818,7 +798,7 @@
         pProperty1->SetValue(valueOriginal);
         pService->SetConfigurationProperties(L"ResourceServiceProperties", pPropertyCollection1);
 
-        CPPUNIT_ASSERT(statusCode == MgPackageStatusCode::Succeeded);
+        REQUIRE(statusCode == MgPackageStatusCode::Succeeded);
     }
     catch(MgException* e)
     {
@@ -825,7 +805,7 @@
         STRING message = e->GetExceptionMessage(TEST_LOCALE);
         message += e->GetStackTrace(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -839,20 +819,20 @@
 ///
 /// This test case gets deletes a package and its associated log
 ///----------------------------------------------------------------------------
-void TestServerAdminService::TestCase_DeletePackage()
+TEST_CASE("DeletePackage", "[ServerAdminService]")
 {
     try
     {
         MgServiceManager* serviceMan = MgServiceManager::GetInstance();
-        if(serviceMan == 0)
+        if (serviceMan == nullptr)
         {
-            throw new MgNullReferenceException(L"TestServerAdminService::TestCase_DeletePackage", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestServerAdminService::TestCase_DeletePackage", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerAdminService> pService = dynamic_cast<MgServerAdminService*>(serviceMan->RequestService(MgServiceType::ServerAdminService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestServerAdminService::TestCase_DeletePackage", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestServerAdminService::TestCase_DeletePackage", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgPropertyCollection> pPropertyCollection1 = pService->GetConfigurationProperties(L"ResourceServiceProperties");
@@ -865,7 +845,7 @@
         Ptr<MgPropertyCollection> pPropertyCollection2 = pService->GetConfigurationProperties(L"ResourceServiceProperties");
         Ptr<MgStringProperty> pProperty2 = (MgStringProperty*)pPropertyCollection1->GetItem(L"PackagesPath");
 
-        pService->DeletePackage(TestServerAdminService::PackageName2);
+        pService->DeletePackage(PACKAGE_NAME_2);
 
         Ptr<MgStringCollection> packages = pService->EnumeratePackages();
 
@@ -873,7 +853,7 @@
         pProperty1->SetValue(valueOriginal);
         pService->SetConfigurationProperties(L"ResourceServiceProperties", pPropertyCollection1);
 
-        CPPUNIT_ASSERT(!packages->Contains(TestServerAdminService::PackageName2));
+        REQUIRE(!packages->Contains(PACKAGE_NAME_2));
     }
     catch(MgException* e)
     {
@@ -880,7 +860,7 @@
         STRING message = e->GetExceptionMessage(TEST_LOCALE);
         message += e->GetStackTrace(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -901,15 +881,15 @@
 //    try
 //    {
 //        MgServiceManager* serviceMan = MgServiceManager::GetInstance();
-//        if(serviceMan == 0)
+//        if (serviceMan == nullptr)
 //        {
-//            throw new MgNullReferenceException(L"TestServerAdminService::TestCase_GetInformationProperties", __LINE__, __WFILE__, NULL, L"", NULL);
+//            throw new MgNullReferenceException(L"TestServerAdminService::TestCase_GetInformationProperties", __LINE__, __WFILE__, nullptr, L"", nullptr);
 //        }
 //
 //        Ptr<MgServerAdminService> pService = dynamic_cast<MgServerAdminService*>(serviceMan->RequestService(MgServiceType::ServerAdminService));
-//        if (pService == 0)
+//        if (pService == nullptr)
 //        {
-//            throw new MgServiceNotAvailableException(L"TestServerAdminService::TestCase_GetInformationProperties", __LINE__, __WFILE__, NULL, L"", NULL);
+//            throw new MgServiceNotAvailableException(L"TestServerAdminService::TestCase_GetInformationProperties", __LINE__, __WFILE__, nullptr, L"", nullptr);
 //        }
 //
 //    }
@@ -917,7 +897,7 @@
 //    {
 //        STRING message = e->GetDetails(TEST_LOCALE);
 //        SAFE_RELEASE(e);
-//        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+//        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
 //    }
 //    catch(...)
 //    {
@@ -936,15 +916,15 @@
 //        try
 //    {
 //        MgServiceManager* serviceMan = MgServiceManager::GetInstance();
-//        if(serviceMan == 0)
+//        if (serviceMan == nullptr)
 //        {
-//            throw new MgNullReferenceException(L"TestServerAdminService::TestCase_GetInformationProperties", __LINE__, __WFILE__, NULL, L"", NULL);
+//            throw new MgNullReferenceException(L"TestServerAdminService::TestCase_GetInformationProperties", __LINE__, __WFILE__, nullptr, L"", nullptr);
 //        }
 //
 //        Ptr<MgServerAdminService> pService = dynamic_cast<MgServerAdminService*>(serviceMan->RequestService(MgServiceType::ServerAdminService));
-//        if (pService == 0)
+//        if (pService == nullptr)
 //        {
-//            throw new MgServiceNotAvailableException(L"TestServerAdminService::TestCase_GetInformationProperties", __LINE__, __WFILE__, NULL, L"", NULL);
+//            throw new MgServiceNotAvailableException(L"TestServerAdminService::TestCase_GetInformationProperties", __LINE__, __WFILE__, nullptr, L"", nullptr);
 //        }
 //    }
 //    catch(MgException* e)
@@ -951,7 +931,7 @@
 //    {
 //        STRING message = e->GetDetails(TEST_LOCALE);
 //        SAFE_RELEASE(e);
-//        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+//        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
 //    }
 //    catch(...)
 //    {
@@ -966,30 +946,30 @@
 /// This test case gets the entire contents of a document.  This checks
 /// whether an MgByteReader was returned or not
 ///----------------------------------------------------------------------------
-void TestServerAdminService::TestCase_GetDocument()
+TEST_CASE("GetDocument", "[ServerAdminService]")
 {
     try
     {
         MgServiceManager* serviceMan = MgServiceManager::GetInstance();
-        if (serviceMan == 0)
+        if (serviceMan == nullptr)
         {
-            throw new MgNullReferenceException(L"TestServerAdminService.TestCase_GetDocument", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestServerAdminService.TestCase_GetDocument", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerAdminService> pService = dynamic_cast<MgServerAdminService*>(serviceMan->RequestService(MgServiceType::ServerAdminService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestServerAdminService.TestCase_GetDocument", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestServerAdminService.TestCase_GetDocument", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgByteReader> byteReader;
 
         // Give invalid document
-        CPPUNIT_ASSERT_THROW_MG(pService->GetDocument(L""), MgInvalidArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->GetDocument(L":test"), MgInvalidArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->GetDocument(L"Wms:..test"), MgInvalidArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->GetDocument(L"Wms:test\\"), MgInvalidArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->GetDocument(L"Wms:/test"), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetDocument(L""), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetDocument(L":test"), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetDocument(L"Wms:..test"), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetDocument(L"Wms:test\\"), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetDocument(L"Wms:/test"), MgInvalidArgumentException*);
 
         // Check to see if the path exists before trying to get document
         STRING path;
@@ -1003,10 +983,10 @@
             if(MgFileUtil::PathnameExists(path))
             {
                 byteReader = pService->GetDocument(L"Wms:1.1.1");
-                CPPUNIT_ASSERT(byteReader != NULL);
+                REQUIRE(byteReader.p != nullptr);
 
                 string test = MgUtil::GetTextFromReader(byteReader);
-                CPPUNIT_ASSERT(test.length() > 0);
+                REQUIRE(test.length() > 0);
             }
         }
     }
@@ -1014,7 +994,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1028,20 +1008,20 @@
 ///
 /// This test case sets the entire contents of a document.
 ///----------------------------------------------------------------------------
-void TestServerAdminService::TestCase_SetDocument()
+TEST_CASE("SetDocument", "[ServerAdminService]")
 {
     try
     {
         MgServiceManager* serviceMan = MgServiceManager::GetInstance();
-        if (serviceMan == 0)
+        if (serviceMan == nullptr)
         {
-            throw new MgNullReferenceException(L"TestServerAdminService.TestCase_SetDocument", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestServerAdminService.TestCase_SetDocument", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerAdminService> pService = dynamic_cast<MgServerAdminService*>(serviceMan->RequestService(MgServiceType::ServerAdminService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestServerAdminService.TestCase_SetDocument", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestServerAdminService.TestCase_SetDocument", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         // Check to see if the path exists before trying to set document
@@ -1067,7 +1047,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {

Deleted: trunk/MgDev/Server/src/UnitTesting/TestServerAdminService.h
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestServerAdminService.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestServerAdminService.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,95 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef TESTSERVERADMINSERVICE_H_
-#define TESTSERVERADMINSERVICE_H_
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestServerAdminService : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestServerAdminService);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_TakeOffline);
-    CPPUNIT_TEST(TestCase_BringOnline);
-    //CPPUNIT_TEST(TestCase_IsOnline);
-    CPPUNIT_TEST(TestCase_GetConfigurationProperties);
-    CPPUNIT_TEST(TestCase_SetConfigurationProperties);
-    CPPUNIT_TEST(TestCase_RemoveConfigurationProperties);
-    CPPUNIT_TEST(TestCase_GetInformationProperties);
-
-    CPPUNIT_TEST(TestCase_ClearLog);
-    CPPUNIT_TEST(TestCase_GetLog);
-    CPPUNIT_TEST(TestCase_GetLogEntries);
-    CPPUNIT_TEST(TestCase_GetLogByDate);
-
-    CPPUNIT_TEST(TestCase_EnumeratePackages);
-    CPPUNIT_TEST(TestCase_LoadPackage);
-    CPPUNIT_TEST(TestCase_MakePackage);
-    CPPUNIT_TEST(TestCase_GetPackageLog);
-    CPPUNIT_TEST(TestCase_GetPackageStatus);
-    CPPUNIT_TEST(TestCase_DeletePackage);
-
-    // TODO: add these tests once methods implemented
-    //CPPUNIT_TEST(TestCase_RegisterServicesOnServer);
-    //CPPUNIT_TEST(TestCase_UnregisterServicesOnServer);
-
-    CPPUNIT_TEST(TestCase_SetDocument);
-    CPPUNIT_TEST(TestCase_GetDocument);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    void TestCase_TakeOffline();
-    void TestCase_BringOnline();
-    //void TestCase_IsOnline();
-    void TestCase_GetConfigurationProperties();
-    void TestCase_SetConfigurationProperties();
-    void TestCase_RemoveConfigurationProperties();
-    void TestCase_GetInformationProperties();
-
-    void TestCase_ClearLog();
-    void TestCase_GetLog();
-    void TestCase_GetLogEntries();
-    void TestCase_GetLogByDate();
-
-    void TestCase_EnumeratePackages();
-    void TestCase_LoadPackage();
-    void TestCase_MakePackage();
-    void TestCase_GetPackageLog();
-    void TestCase_GetPackageStatus();
-    void TestCase_DeletePackage();
-
-    //void TestCase_RegisterServicesOnServer();
-    //void TestCase_UnregisterServicesOnServer();
-
-    void TestCase_GetDocument();
-    void TestCase_SetDocument();
-
-private:
-    const static STRING PackageName;
-    const static STRING PackageName2;
-};
-
-#endif

Modified: trunk/MgDev/Server/src/UnitTesting/TestServerManager.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestServerManager.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestServerManager.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -17,30 +17,21 @@
 
 #include "MapGuideCommon.h"
 #include "ServerManager.h"
-#include "TestServerManager.h"
 #include "FoundationDefs.h"
-const STRING TEST_LOCALE = L"en";
+#include "TestServiceFactory.h"
+#include "catch.hpp"
 
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestServerManager, "TestServerManager");
-
-void TestServerManager::setUp()
+static void TestWorkerThreads()
 {
+    ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%t) Starting work\n")));
+    for (int i = 0; i < 5; i++)
+    {
+        int x = i * ACE_OS::rand();
+        ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%t) Worker %d(%d)\n"), i, x));
+    }
+    ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%t) Finished work\n")));
 }
 
-void TestServerManager::tearDown()
-{
-}
-
-void TestServerManager::TestStart()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Server Manager tests.\n")));
-}
-
-void TestServerManager::TestEnd()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nServer Manager tests completed.\n\n")));
-}
-
 ///----------------------------------------------------------------------------
 /// Test Case Description:
 ///
@@ -47,13 +38,13 @@
 /// This test case checks to see if there is a valid MgServerManager and that
 /// there is only 1 MgServerManager.
 ///----------------------------------------------------------------------------
-void TestServerManager::TestCase_ValidServerManager()
+TEST_CASE("ValidServerManager", "[ServerManager]")
 {
     MgServerManager* pMgServerManager = MgServerManager::GetInstance();
-    CPPUNIT_ASSERT(pMgServerManager != NULL);
+    REQUIRE(pMgServerManager != nullptr);
 
     MgServerManager* pMgServerManager2 = MgServerManager::GetInstance();
-    CPPUNIT_ASSERT(pMgServerManager == pMgServerManager2);
+    REQUIRE(pMgServerManager == pMgServerManager2);
 }
 
 ///----------------------------------------------------------------------------
@@ -61,12 +52,12 @@
 ///
 /// This test case checks the default message locale.
 ///----------------------------------------------------------------------------
-void TestServerManager::TestCase_GetDefaultMessageLocale()
+TEST_CASE("GetDefaultMessageLocale", "[ServerManager]")
 {
     MgServerManager* pMgServerManager = MgServerManager::GetInstance();
     CREFSTRING locale = pMgServerManager->GetDefaultMessageLocale();
 
-    CPPUNIT_ASSERT(wcscmp(locale.c_str(), TEST_LOCALE.c_str()) == 0);
+    REQUIRE(wcscmp(locale.c_str(), TestServiceFactory::TEST_LOCALE.c_str()) == 0);
 }
 
 ///----------------------------------------------------------------------------
@@ -74,13 +65,13 @@
 ///
 /// This test case tries to get the admin port.
 ///----------------------------------------------------------------------------
-void TestServerManager::TestCase_GetAdminPort()
+TEST_CASE("GetAdminPort", "[ServerManager]")
 {
     MgServerManager* pMgServerManager = MgServerManager::GetInstance();
     INT32 port = pMgServerManager->GetAdminPort();
 
     // One may have/need to use a port number different than 2800 for testings.
-    CPPUNIT_ASSERT(port == 2800 || port > 0);
+    REQUIRE((port == 2800 || port > 0));
 }
 
 ///----------------------------------------------------------------------------
@@ -88,13 +79,13 @@
 ///
 /// This test case tries to get the client port.
 ///----------------------------------------------------------------------------
-void TestServerManager::TestCase_GetClientPort()
+TEST_CASE("GetClientPort", "[ServerManager]")
 {
     MgServerManager* pMgServerManager = MgServerManager::GetInstance();
     INT32 port = pMgServerManager->GetClientPort();
 
     // One may have/need to use a port number different than 2801 for testings.
-    CPPUNIT_ASSERT(port == 2801 || port > 0);
+    REQUIRE((port == 2801 || port > 0));
 }
 
 ///----------------------------------------------------------------------------
@@ -102,13 +93,13 @@
 ///
 /// This test case tries to get the site port.
 ///----------------------------------------------------------------------------
-void TestServerManager::TestCase_GetSitePort()
+TEST_CASE("GetSitePort", "[ServerManager]")
 {
     MgServerManager* pMgServerManager = MgServerManager::GetInstance();
     INT32 port = pMgServerManager->GetSitePort();
 
     // One may have/need to use a port number different than 2802 for testings.
-    CPPUNIT_ASSERT(port == 2802 || port > 0);
+    REQUIRE((port == 2802 || port > 0));
 }
 
 ///----------------------------------------------------------------------------
@@ -116,12 +107,12 @@
 ///
 /// This test case tries to get the admin threads.
 ///----------------------------------------------------------------------------
-void TestServerManager::TestCase_GetAdminThreads()
+TEST_CASE("GetAdminThreads", "[ServerManager]")
 {
     MgServerManager* pMgServerManager = MgServerManager::GetInstance();
     INT32 threads = pMgServerManager->GetAdminThreads();
 
-    CPPUNIT_ASSERT(threads >= 5);
+    REQUIRE(threads >= 5);
 }
 
 ///----------------------------------------------------------------------------
@@ -129,12 +120,12 @@
 ///
 /// This test case tries to get the client threads.
 ///----------------------------------------------------------------------------
-void TestServerManager::TestCase_GetClientThreads()
+TEST_CASE("GetClientThreads", "[ServerManager]")
 {
     MgServerManager* pMgServerManager = MgServerManager::GetInstance();
     INT32 threads = pMgServerManager->GetClientThreads();
 
-    CPPUNIT_ASSERT(threads >= 10);
+    REQUIRE(threads >= 10);
 }
 
 ///----------------------------------------------------------------------------
@@ -142,12 +133,12 @@
 ///
 /// This test case tries to get the site threads.
 ///----------------------------------------------------------------------------
-void TestServerManager::TestCase_GetSiteThreads()
+TEST_CASE("GetSiteThreads", "[ServerManager]")
 {
     MgServerManager* pMgServerManager = MgServerManager::GetInstance();
     INT32 threads = pMgServerManager->GetSiteThreads();
 
-    CPPUNIT_ASSERT(threads >= 5);
+    REQUIRE(threads >= 5);
 }
 
 ///----------------------------------------------------------------------------
@@ -155,7 +146,7 @@
 ///
 /// This test case validates the worker threads.
 ///----------------------------------------------------------------------------
-void TestServerManager::TestCase_ValidateWorkerThreads()
+TEST_CASE("ValidateWorkerThreads", "[ServerManager]")
 {
     try
     {
@@ -162,7 +153,7 @@
         MgServerManager* pMgServerManager = MgServerManager::GetInstance();
 
         ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\n(%t) Starting worker thread.\n")));
-        pMgServerManager->StartWorkerThread(&TestServerManager::TestWorkerThreads);
+        pMgServerManager->StartWorkerThread(&TestWorkerThreads);
 
         // Do something else while worker thread is busy
         for(int i=0;i<5;i++)
@@ -175,23 +166,12 @@
     }
     catch(MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
         throw;
     }
-}
-
-void TestServerManager::TestWorkerThreads()
-{
-    ACE_DEBUG ((LM_DEBUG, ACE_TEXT("(%t) Starting work\n")));
-    for(int i=0;i<5;i++)
-    {
-        int x = i * ACE_OS::rand();
-        ACE_DEBUG ((LM_DEBUG, ACE_TEXT("(%t) Worker %d(%d)\n"), i, x));
-    }
-    ACE_DEBUG ((LM_DEBUG, ACE_TEXT("(%t) Finished work\n")));
-}
+}
\ No newline at end of file

Deleted: trunk/MgDev/Server/src/UnitTesting/TestServerManager.h
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestServerManager.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestServerManager.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,61 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _TESTSERVERMANAGER_H
-#define _TESTSERVERMANAGER_H
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestServerManager : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestServerManager);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_ValidServerManager);
-    CPPUNIT_TEST(TestCase_GetDefaultMessageLocale);
-    CPPUNIT_TEST(TestCase_GetAdminPort);
-    CPPUNIT_TEST(TestCase_GetClientPort);
-    CPPUNIT_TEST(TestCase_GetSitePort);
-    CPPUNIT_TEST(TestCase_GetAdminThreads);
-    CPPUNIT_TEST(TestCase_GetClientThreads);
-    CPPUNIT_TEST(TestCase_GetSiteThreads);
-    CPPUNIT_TEST(TestCase_ValidateWorkerThreads);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    void TestCase_ValidServerManager();
-    void TestCase_GetDefaultMessageLocale();
-    void TestCase_GetAdminPort();
-    void TestCase_GetClientPort();
-    void TestCase_GetSitePort();
-    void TestCase_GetAdminThreads();
-    void TestCase_GetClientThreads();
-    void TestCase_GetSiteThreads();
-    void TestCase_ValidateWorkerThreads();
-
-private:
-    static void TestWorkerThreads();
-};
-
-#endif // _TESTSERVERMANAGER_H

Copied: trunk/MgDev/Server/src/UnitTesting/TestServiceFactory.cpp (from rev 9676, sandbox/jng/catch2/Server/src/UnitTesting/TestServiceFactory.cpp)
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestServiceFactory.cpp	                        (rev 0)
+++ trunk/MgDev/Server/src/UnitTesting/TestServiceFactory.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -0,0 +1,2212 @@
+//
+//  Copyright (C) 2004-2020 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "TestServiceFactory.h"
+#include "FdoConnectionManager.h"
+
+#define CATCH_CONFIG_EXTERNAL_INTERFACES
+#include "catch.hpp"
+
+const STRING TestServiceFactory::TEST_LOCALE = L"en";
+
+std::set<std::string> TestServiceFactory::sm_suitesToRun;
+
+bool TestServiceFactory::IsRunningSuite(const std::string& suite)
+{
+    return sm_suitesToRun.find(suite) != sm_suitesToRun.end();
+}
+
+void TestServiceFactory::GetCatch2Tags(std::string& testOrTags)
+{
+    bool bFirst = true;
+    for (auto const& item : sm_suitesToRun)
+    {
+        if (bFirst)
+        {
+            bFirst = false;
+        }
+        else
+        {
+            testOrTags += ",";
+        }
+        testOrTags += item;
+    }
+}
+
+void TestServiceFactory::AddSuiteToRun(const std::string& suite)
+{
+    sm_suitesToRun.insert(suite);
+}
+
+MgSiteConnection* TestServiceFactory::CreateSiteConnection(MgServerSiteService* svcSite)
+{
+    STRING session;
+    Ptr<MgUserInformation> userInfo = CreateSession(svcSite, session, L"Administrator", L"admin");
+    userInfo->SetMgSessionId(session);
+
+    // Set the current MgUserInformation
+    MgUserInformation::SetCurrentUserInfo(userInfo);
+
+    Ptr<MgSiteConnection> m_siteConnection = new MgSiteConnection();
+    m_siteConnection->Open(userInfo);
+    return m_siteConnection.Detach();
+}
+
+MgSiteConnection* TestServiceFactory::CreateSiteConnection(MgServerSiteService* svcSite, CREFSTRING session)
+{
+    Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
+    userInfo->SetLocale(TestServiceFactory::TEST_LOCALE);
+
+    // Set the current MgUserInformation
+    // This must be done before calling CreateSession()
+    MgUserInformation::SetCurrentUserInfo(userInfo);
+
+    userInfo->SetMgSessionId(session);
+
+    // Set the current MgUserInformation
+    MgUserInformation::SetCurrentUserInfo(userInfo);
+
+    Ptr<MgSiteConnection> m_siteConnection = new MgSiteConnection();
+    m_siteConnection->Open(userInfo);
+    return m_siteConnection.Detach();
+}
+
+MgUserInformation* TestServiceFactory::CreateSession(MgServerSiteService* svcSite, REFSTRING session, CREFSTRING userName, CREFSTRING password)
+{
+    Ptr<MgUserInformation> userInfo = new MgUserInformation(userName, password);
+    userInfo->SetLocale(TestServiceFactory::TEST_LOCALE);
+
+    // Set the current MgUserInformation
+    // This must be done before calling CreateSession()
+    MgUserInformation::SetCurrentUserInfo(userInfo);
+
+    session = svcSite->CreateSession();
+    return userInfo.Detach();
+}
+
+MgServerSiteService* TestServiceFactory::CreateSiteService()
+{
+    // Initialize service objects.
+    MgServiceManager* serviceManager = MgServiceManager::GetInstance();
+
+    return dynamic_cast<MgServerSiteService*>(
+        serviceManager->RequestService(MgServiceType::SiteService));
+}
+
+MgResourceService* TestServiceFactory::CreateResourceService()
+{
+    // Initialize service objects.
+    MgServiceManager* serviceManager = MgServiceManager::GetInstance();
+
+    return dynamic_cast<MgResourceService*>(
+        serviceManager->RequestService(MgServiceType::ResourceService));
+}
+
+MgDrawingService* TestServiceFactory::CreateDrawingService()
+{
+    // Initialize service objects.
+    MgServiceManager* serviceManager = MgServiceManager::GetInstance();
+
+    return dynamic_cast<MgDrawingService*>(
+        serviceManager->RequestService(MgServiceType::DrawingService));
+}
+
+MgKmlService* TestServiceFactory::CreateKmlService()
+{
+    // Initialize service objects.
+    MgServiceManager* serviceManager = MgServiceManager::GetInstance();
+
+    return dynamic_cast<MgKmlService*>(
+        serviceManager->RequestService(MgServiceType::KmlService));
+}
+
+MgMappingService* TestServiceFactory::CreateMappingService()
+{
+    // Initialize service objects.
+    MgServiceManager* serviceManager = MgServiceManager::GetInstance();
+
+    return dynamic_cast<MgMappingService*>(
+        serviceManager->RequestService(MgServiceType::MappingService));
+}
+
+MgProfilingService* TestServiceFactory::CreateProfilingService()
+{
+    // Initialize service objects.
+    MgServiceManager* serviceManager = MgServiceManager::GetInstance();
+
+    return dynamic_cast<MgProfilingService*>(
+        serviceManager->RequestService(MgServiceType::ProfilingService));
+}
+
+MgRenderingService* TestServiceFactory::CreateRenderingService()
+{
+    // Initialize service objects.
+    MgServiceManager* serviceManager = MgServiceManager::GetInstance();
+
+    return dynamic_cast<MgRenderingService*>(
+        serviceManager->RequestService(MgServiceType::RenderingService));
+}
+
+MgTileService* TestServiceFactory::CreateTileService()
+{
+    // Initialize service objects.
+    MgServiceManager* serviceManager = MgServiceManager::GetInstance();
+
+    return dynamic_cast<MgTileService*>(
+        serviceManager->RequestService(MgServiceType::TileService));
+}
+
+struct TestDataSetup : Catch::TestEventListenerBase
+{
+    using TestEventListenerBase::TestEventListenerBase; // inherit constructor
+
+   // Get rid of Wweak-tables
+    ~TestDataSetup();
+
+    void testCaseStarting(Catch::TestCaseInfo const& _testInfo) override {
+        printf(">>> Starting test case: %s\n", _testInfo.name.c_str());
+    }
+
+    // The whole test run starting
+    void testRunStarting(Catch::TestRunInfo const& testRunInfo) override {
+
+        Ptr<MgResourceService> svcResource = TestServiceFactory::CreateResourceService();
+
+        // Initialize a site connection.
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+
+        Ptr<MgCoordinateSystemFactory> csFactory = new MgCoordinateSystemFactory();
+        Ptr<MgCoordinateSystemCatalog> csCatalog = csFactory->GetCatalog();
+        STRING dictPath = csCatalog->GetDictionaryDir();
+        ACE_DEBUG((LM_INFO, ACE_TEXT("\nCoordinate System Dictionary Path is: %W\n"), dictPath.c_str()));
+
+#ifdef _WIN32
+        //If the FDO we're using has a full providers.xml and we haven't met the dependencies
+        //of some providers (eg. OCI.dll for King.Oracle), then it's going to show a message box
+        //in our face about this that has to be manually dismissed. Not something you want to have 
+        //happen when trying to run tests in an automated fashion. This test suite only covers the
+        //SDF, SHP and SQLite providers so having such message boxes show up is intrusive.
+        //
+        //This call will suppress such message boxes when loading dlls with unmet depdendencies. It's
+        //okay to do this here because mgserver.exe would not be running as a service or long-running process
+        //when running its test suite, so this will only take effect for the duration of the test run
+        SetErrorMode(SEM_FAILCRITICALERRORS);
+#endif
+
+#ifdef _DEBUG
+        MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
+        if (pFdoConnectionManager)
+        {
+            pFdoConnectionManager->ShowCache();
+        }
+#endif
+
+        printf("*******************************************\n");
+        printf("******* Setting up test environment *******\n");
+        printf("*******************************************\n");
+
+        // TestMisc setup
+        if (TestServiceFactory::IsRunningSuite("[Misc]"))
+        {
+            printf("Setting up data for suite: Misc\n");
+            //Reusing Mapping Service test data
+            try
+            {
+                //set user info
+                Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
+                userInfo->SetLocale(TestServiceFactory::TEST_LOCALE);
+                MgUserInformation::SetCurrentUserInfo(userInfo);
+
+                //publish the map definition
+                Ptr<MgResourceIdentifier> mapres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+                Ptr<MgByteSource> mdfsrc = new MgByteSource(L"../UnitTestFiles/UT_Sheboygan.mdf", false);
+                Ptr<MgByteReader> mdfrdr = mdfsrc->GetReader();
+                svcResource->SetResource(mapres, mdfrdr, nullptr);
+
+                Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan_833.MapDefinition");
+                Ptr<MgByteSource> mdfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Sheboygan_833.mdf", false);
+                Ptr<MgByteReader> mdfrdr2 = mdfsrc2->GetReader();
+                svcResource->SetResource(mapres2, mdfrdr2, nullptr);
+
+                //publish the layer definitions
+                Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.ldf", false);
+                Ptr<MgByteReader> ldfrdr1 = ldfsrc1->GetReader();
+                svcResource->SetResource(ldfres1, ldfrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.ldf", false);
+                Ptr<MgByteReader> ldfrdr2 = ldfsrc2->GetReader();
+                svcResource->SetResource(ldfres2, ldfrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.ldf", false);
+                Ptr<MgByteReader> ldfrdr3 = ldfsrc3->GetReader();
+                svcResource->SetResource(ldfres3, ldfrdr3, nullptr);
+
+                //publish the feature sources
+                Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
+                Ptr<MgByteSource> fssrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.fs", false);
+                Ptr<MgByteReader> fsrdr1 = fssrc1->GetReader();
+                svcResource->SetResource(fsres1, fsrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
+                Ptr<MgByteSource> fssrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.fs", false);
+                Ptr<MgByteReader> fsrdr2 = fssrc2->GetReader();
+                svcResource->SetResource(fsres2, fsrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
+                Ptr<MgByteSource> fssrc3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.fs", false);
+                Ptr<MgByteReader> fsrdr3 = fssrc3->GetReader();
+                svcResource->SetResource(fsres3, fsrdr3, nullptr);
+
+                // publish the resource data
+                Ptr<MgByteSource> dataSource1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.sdf", false);
+                Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
+                svcResource->SetResourceData(fsres1, L"UT_HydrographicPolygons.sdf", L"File", dataReader1);
+
+                Ptr<MgByteSource> dataSource2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.sdf", false);
+                Ptr<MgByteReader> dataReader2 = dataSource2->GetReader();
+                svcResource->SetResourceData(fsres2, L"UT_Parcels.sdf", L"File", dataReader2);
+
+                Ptr<MgByteSource> dataSource3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.sdf", false);
+                Ptr<MgByteReader> dataReader3 = dataSource3->GetReader();
+                svcResource->SetResourceData(fsres3, L"UT_Rail.sdf", L"File", dataReader3);
+
+                // publish the print layouts
+                Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
+                Ptr<MgByteSource> plsrc1 = new MgByteSource(L"../UnitTestFiles/UT_AllElements.pl", false);
+                Ptr<MgByteReader> plrdr1 = plsrc1->GetReader();
+                svcResource->SetResource(plres1, plrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
+                Ptr<MgByteSource> plsrc2 = new MgByteSource(L"../UnitTestFiles/UT_NoLegend.pl", false);
+                Ptr<MgByteReader> plrdr2 = plsrc2->GetReader();
+                svcResource->SetResource(plres2, plrdr2, nullptr);
+
+                // publish the symbol library
+                Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
+                Ptr<MgByteSource> slsrc1 = new MgByteSource(L"../UnitTestFiles/UT_SymbolMart.sl", false);
+                Ptr<MgByteReader> slrdr1 = slsrc1->GetReader();
+                svcResource->SetResource(slres1, slrdr1, nullptr);
+                Ptr<MgByteSource> datasrc = new MgByteSource(L"../UnitTestFiles/UT_Symbols.dwf", false);
+                Ptr<MgByteReader> datardr = datasrc->GetReader();
+                svcResource->SetResourceData(slres1, L"symbols.dwf", L"File", datardr);
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+            catch (...)
+            {
+                throw;
+            }
+        }
+
+        // TestMdfModel setup
+        if (TestServiceFactory::IsRunningSuite("[MdfModel]"))
+        {
+            printf("Setting up data for suite: MdfModel\n");
+            try
+            {
+                // set user info
+                Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
+                userInfo->SetLocale(TestServiceFactory::TEST_LOCALE);
+                MgUserInformation::SetCurrentUserInfo(userInfo);
+
+                // add symbols / layer definitions for testing MdfModel / MdfParser
+                Ptr<MgResourceIdentifier> sdres1 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestSimpleSymbol.SymbolDefinition");
+                Ptr<MgByteSource> sdsrc1 = new MgByteSource(L"../UnitTestFiles/MdfTestSimpleSymbol.sd", false);
+                Ptr<MgByteReader> sdrdr1 = sdsrc1->GetReader();
+                svcResource->SetResource(sdres1, sdrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> sdres2 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestCompoundSymbol.SymbolDefinition");
+                Ptr<MgByteSource> sdsrc2 = new MgByteSource(L"../UnitTestFiles/MdfTestCompoundSymbol.sd", false);
+                Ptr<MgByteReader> sdrdr2 = sdsrc2->GetReader();
+                svcResource->SetResource(sdres2, sdrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestTypeStyles.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc3 = new MgByteSource(L"../UnitTestFiles/MdfTestTypeStyles.ldf", false);
+                Ptr<MgByteReader> ldfrdr3 = ldfsrc3->GetReader();
+                svcResource->SetResource(ldfres3, ldfrdr3, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres4 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestDisabledBounds.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc4 = new MgByteSource(L"../UnitTestFiles/MdfTestDisabledBounds.ldf", false);
+                Ptr<MgByteReader> ldfrdr4 = ldfsrc4->GetReader();
+                svcResource->SetResource(ldfres4, ldfrdr4, nullptr);
+
+                Ptr<MgResourceIdentifier> mdfres4 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestMap.MapDefinition");
+                Ptr<MgByteSource> mdfsrc4 = new MgByteSource(L"../UnitTestFiles/MdfTestMap.mdf", false);
+                Ptr<MgByteReader> mdfrdr4 = mdfsrc4->GetReader();
+                svcResource->SetResource(mdfres4, mdfrdr4, nullptr);
+
+                Ptr<MgResourceIdentifier> tsdres5 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestTileSet.TileSetDefinition");
+                Ptr<MgByteSource> tsdsrc5 = new MgByteSource(L"../UnitTestFiles/UT_BaseMap.tsd", false);
+                Ptr<MgByteReader> tsdrdr5 = tsdsrc5->GetReader();
+                svcResource->SetResource(tsdres5, tsdrdr5, nullptr);
+
+                Ptr<MgResourceIdentifier> tsdres6 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/XYZTestTileSet.TileSetDefinition");
+                Ptr<MgByteSource> tsdsrc6 = new MgByteSource(L"../UnitTestFiles/UT_XYZ.tsd", false);
+                Ptr<MgByteReader> tsdrdr6 = tsdsrc6->GetReader();
+                svcResource->SetResource(tsdres6, tsdrdr6, nullptr);
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+            catch (...)
+            {
+                throw;
+            }
+        }
+
+        // TestGeometry setup
+        if (TestServiceFactory::IsRunningSuite("[Geometry]"))
+        {
+            printf("Setting up data for suite: Geometry\n");
+            try
+            {
+                MgResourceIdentifier resourceIdentifier1(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
+#ifdef _WIN32
+                STRING resourceContentFileName1 = L"..\\UnitTestFiles\\Sheboygan_Parcels.FeatureSource";
+                STRING dataFileName1 = L"..\\UnitTestFiles\\Sheboygan_Parcels.sdf";
+#else
+                STRING resourceContentFileName1 = L"../UnitTestFiles/Sheboygan_Parcels.FeatureSource";
+                STRING dataFileName1 = L"../UnitTestFiles/Sheboygan_Parcels.sdf";
+#endif
+
+                //Add a new resource
+                Ptr<MgByteSource> contentSource1 = new MgByteSource(resourceContentFileName1);
+                Ptr<MgByteReader> contentReader1 = contentSource1->GetReader();
+                svcResource->SetResource(&resourceIdentifier1, contentReader1, nullptr);
+
+                //Set the resource data
+                Ptr<MgByteSource> dataSource1 = new MgByteSource(dataFileName1);
+                Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
+                svcResource->SetResourceData(&resourceIdentifier1, L"Sheboygan_Parcels.sdf", L"File", dataReader1);
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+        }
+
+        // TestDrawingService setup
+        if (TestServiceFactory::IsRunningSuite("[DrawingService]"))
+        {
+            printf("Setting up data for suite: DrawingService\n");
+            try
+            {
+                MgResourceIdentifier resourceIdentifier1(L"Library://UnitTests/Drawings/SpaceShip.DrawingSource");
+
+                Ptr<MgByteSource> contentSource1 = new MgByteSource(L"../UnitTestFiles/SpaceShipDrawingSource.xml");
+                Ptr<MgByteReader> contentReader1 = contentSource1->GetReader();
+                svcResource->SetResource(&resourceIdentifier1, contentReader1, nullptr);
+
+                Ptr<MgByteSource> dataSource1 = new MgByteSource(L"../UnitTestFiles/SpaceShip.dwf");
+                Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
+                svcResource->SetResourceData(&resourceIdentifier1, L"SpaceShip.dwf", L"File", dataReader1);
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+        }
+
+        // TestKmlService setup
+        if (TestServiceFactory::IsRunningSuite("[KmlService]"))
+        {
+            printf("Setting up data for suite: KmlService\n");
+            try
+            {
+                //publish the map definition
+                Ptr<MgResourceIdentifier> mapres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+                Ptr<MgByteSource> mdfsrc = new MgByteSource(L"../UnitTestFiles/UT_Sheboygan.mdf", false);
+                Ptr<MgByteReader> mdfrdr = mdfsrc->GetReader();
+                svcResource->SetResource(mapres, mdfrdr, nullptr);
+
+                //publish the layer definitions
+                Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.ldf", false);
+                Ptr<MgByteReader> ldfrdr1 = ldfsrc1->GetReader();
+                svcResource->SetResource(ldfres1, ldfrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.ldf", false);
+                Ptr<MgByteReader> ldfrdr2 = ldfsrc2->GetReader();
+                svcResource->SetResource(ldfres2, ldfrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.ldf", false);
+                Ptr<MgByteReader> ldfrdr3 = ldfsrc3->GetReader();
+                svcResource->SetResource(ldfres3, ldfrdr3, nullptr);
+
+                //publish the feature sources
+                Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
+                Ptr<MgByteSource> fssrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.fs", false);
+                Ptr<MgByteReader> fsrdr1 = fssrc1->GetReader();
+                svcResource->SetResource(fsres1, fsrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
+                Ptr<MgByteSource> fssrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.fs", false);
+                Ptr<MgByteReader> fsrdr2 = fssrc2->GetReader();
+                svcResource->SetResource(fsres2, fsrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
+                Ptr<MgByteSource> fssrc3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.fs", false);
+                Ptr<MgByteReader> fsrdr3 = fssrc3->GetReader();
+                svcResource->SetResource(fsres3, fsrdr3, nullptr);
+
+                // publish the resource data
+                Ptr<MgByteSource> dataSource1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.sdf", false);
+                Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
+                svcResource->SetResourceData(fsres1, L"UT_HydrographicPolygons.sdf", L"File", dataReader1);
+
+                Ptr<MgByteSource> dataSource2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.sdf", false);
+                Ptr<MgByteReader> dataReader2 = dataSource2->GetReader();
+                svcResource->SetResourceData(fsres2, L"UT_Parcels.sdf", L"File", dataReader2);
+
+                Ptr<MgByteSource> dataSource3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.sdf", false);
+                Ptr<MgByteReader> dataReader3 = dataSource3->GetReader();
+                svcResource->SetResourceData(fsres3, L"UT_Rail.sdf", L"File", dataReader3);
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+            catch (...)
+            {
+                throw;
+            }
+        }
+
+        // TestMappingService setup
+        if (TestServiceFactory::IsRunningSuite("[MappingService]"))
+        {
+            printf("Setting up data for suite: MappingService\n");
+            try
+            {
+                //publish the map definition
+                Ptr<MgResourceIdentifier> mapres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+                Ptr<MgByteSource> mdfsrc = new MgByteSource(L"../UnitTestFiles/UT_Sheboygan.mdf", false);
+                Ptr<MgByteReader> mdfrdr = mdfsrc->GetReader();
+                svcResource->SetResource(mapres, mdfrdr, nullptr);
+
+                //publish the layer definitions
+                Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.ldf", false);
+                Ptr<MgByteReader> ldfrdr1 = ldfsrc1->GetReader();
+                svcResource->SetResource(ldfres1, ldfrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.ldf", false);
+                Ptr<MgByteReader> ldfrdr2 = ldfsrc2->GetReader();
+                svcResource->SetResource(ldfres2, ldfrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.ldf", false);
+                Ptr<MgByteReader> ldfrdr3 = ldfsrc3->GetReader();
+                svcResource->SetResource(ldfres3, ldfrdr3, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres4 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RotatedPointStyles.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc4 = new MgByteSource(L"../UnitTestFiles/UT_RotatedPointStyles.ldf", false);
+                Ptr<MgByteReader> ldfrdr4 = ldfsrc4->GetReader();
+                svcResource->SetResource(ldfres4, ldfrdr4, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres5 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RoadCenterLines.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc5 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.ldf", false);
+                Ptr<MgByteReader> ldfrdr5 = ldfsrc5->GetReader();
+                svcResource->SetResource(ldfres5, ldfrdr5, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres6 = new MgResourceIdentifier(L"Library://UnitTests/Layers/VotingDistricts.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc6 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.ldf", false);
+                Ptr<MgByteReader> ldfrdr6 = ldfsrc6->GetReader();
+                svcResource->SetResource(ldfres6, ldfrdr6, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres7 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTS.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc7 = new MgByteSource(L"../UnitTestFiles/UT_MultiCTS.ldf", false);
+                Ptr<MgByteReader> ldfrdr7 = ldfsrc7->GetReader();
+                svcResource->SetResource(ldfres7, ldfrdr7, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres8 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTSWithTheme.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc8 = new MgByteSource(L"../UnitTestFiles/UT_MultiCTSWithTheme.ldf", false);
+                Ptr<MgByteReader> ldfrdr8 = ldfsrc8->GetReader();
+                svcResource->SetResource(ldfres8, ldfrdr8, nullptr);
+
+                //publish the feature sources
+                Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
+                Ptr<MgByteSource> fssrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.fs", false);
+                Ptr<MgByteReader> fsrdr1 = fssrc1->GetReader();
+                svcResource->SetResource(fsres1, fsrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
+                Ptr<MgByteSource> fssrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.fs", false);
+                Ptr<MgByteReader> fsrdr2 = fssrc2->GetReader();
+                svcResource->SetResource(fsres2, fsrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
+                Ptr<MgByteSource> fssrc3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.fs", false);
+                Ptr<MgByteReader> fsrdr3 = fssrc3->GetReader();
+                svcResource->SetResource(fsres3, fsrdr3, nullptr);
+
+                // publish the resource data
+                Ptr<MgByteSource> dataSource1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.sdf", false);
+                Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
+                svcResource->SetResourceData(fsres1, L"UT_HydrographicPolygons.sdf", L"File", dataReader1);
+
+                Ptr<MgByteSource> dataSource2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.sdf", false);
+                Ptr<MgByteReader> dataReader2 = dataSource2->GetReader();
+                svcResource->SetResourceData(fsres2, L"UT_Parcels.sdf", L"File", dataReader2);
+
+                Ptr<MgByteSource> dataSource3 = new MgByteSource(L"../UnitTestFiles/UT_Rail.sdf", false);
+                Ptr<MgByteReader> dataReader3 = dataSource3->GetReader();
+                svcResource->SetResourceData(fsres3, L"UT_Rail.sdf", L"File", dataReader3);
+
+                // publish the print layouts
+                Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
+                Ptr<MgByteSource> plsrc1 = new MgByteSource(L"../UnitTestFiles/UT_AllElements.pl", false);
+                Ptr<MgByteReader> plrdr1 = plsrc1->GetReader();
+                svcResource->SetResource(plres1, plrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
+                Ptr<MgByteSource> plsrc2 = new MgByteSource(L"../UnitTestFiles/UT_NoLegend.pl", false);
+                Ptr<MgByteReader> plrdr2 = plsrc2->GetReader();
+                svcResource->SetResource(plres2, plrdr2, nullptr);
+
+                // publish the symbol library
+                Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
+                Ptr<MgByteSource> slsrc1 = new MgByteSource(L"../UnitTestFiles/UT_SymbolMart.sl", false);
+                Ptr<MgByteReader> slrdr1 = slsrc1->GetReader();
+                svcResource->SetResource(slres1, slrdr1, nullptr);
+                Ptr<MgByteSource> datasrc = new MgByteSource(L"../UnitTestFiles/UT_Symbols.dwf", false);
+                Ptr<MgByteReader> datardr = datasrc->GetReader();
+                svcResource->SetResourceData(slres1, L"symbols.dwf", L"File", datardr);
+
+                Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinkedTileSet.MapDefinition");
+                Ptr<MgByteSource> mdfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_LinkedTileSet.mdf", false);
+                Ptr<MgByteReader> mdfrdr2 = mdfsrc2->GetReader();
+                svcResource->SetResource(mapres2, mdfrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> mapres3 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinkedTileSetXYZ.MapDefinition");
+                Ptr<MgByteSource> mdfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_LinkedTileSetXYZ.mdf", false);
+                Ptr<MgByteReader> mdfrdr3 = mdfsrc3->GetReader();
+                svcResource->SetResource(mapres3, mdfrdr3, nullptr);
+
+                Ptr<MgResourceIdentifier> tilesetres1 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/Sheboygan.TileSetDefinition");
+                Ptr<MgByteSource> tsdsrc1 = new MgByteSource(L"../UnitTestFiles/UT_BaseMap.tsd", false);
+                Ptr<MgByteReader> tsdrdr1 = tsdsrc1->GetReader();
+                svcResource->SetResource(tilesetres1, tsdrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> tilesetres2 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/XYZ.TileSetDefinition");
+                Ptr<MgByteSource> tsdsrc2 = new MgByteSource(L"../UnitTestFiles/UT_XYZ.tsd", false);
+                Ptr<MgByteReader> tsdrdr2 = tsdsrc2->GetReader();
+                svcResource->SetResource(tilesetres2, tsdrdr2, nullptr);
+
+                Ptr<MgByteSource> bsPackage = new MgByteSource(L"../UnitTestFiles/PlotHole.mgp", false);
+                Ptr<MgByteReader> pkgReader = bsPackage->GetReader();
+                svcResource->ApplyResourcePackage(pkgReader);
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+            catch (...)
+            {
+                throw;
+            }
+        }
+
+        // TestRenderingService setup
+        if (TestServiceFactory::IsRunningSuite("[RenderingService]"))
+        {
+            printf("Setting up data for suite: RenderingService\n");
+            try 
+            {
+                // publish the map definition
+                Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+                Ptr<MgByteSource> mdfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_Sheboygan.mdf", false);
+                Ptr<MgByteReader> mdfrdr1 = mdfsrc1->GetReader();
+                svcResource->SetResource(mapres1, mdfrdr1, nullptr);
+
+                // publish tile set
+                Ptr<MgResourceIdentifier> tilesetres1 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/XYZ.TileSetDefinition");
+                Ptr<MgByteSource> tsdsrc1 = new MgByteSource(L"../UnitTestFiles/UT_XYZ.tsd", false);
+                Ptr<MgByteReader> tsdrdr1 = tsdsrc1->GetReader();
+                svcResource->SetResource(tilesetres1, tsdrdr1, nullptr);
+
+                // publish the layer definitions
+                Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.ldf", false);
+                Ptr<MgByteReader> ldfrdr1 = ldfsrc1->GetReader();
+                svcResource->SetResource(ldfres1, ldfrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.ldf", false);
+                Ptr<MgByteReader> ldfrdr2 = ldfsrc2->GetReader();
+                svcResource->SetResource(ldfres2, ldfrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.ldf", false);
+                Ptr<MgByteReader> ldfrdr3 = ldfsrc3->GetReader();
+                svcResource->SetResource(ldfres3, ldfrdr3, nullptr);
+
+                // publish the feature sources
+                Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
+                Ptr<MgByteSource> fssrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.fs", false);
+                Ptr<MgByteReader> fsrdr1 = fssrc1->GetReader();
+                svcResource->SetResource(fsres1, fsrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
+                Ptr<MgByteSource> fssrc2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.fs", false);
+                Ptr<MgByteReader> fsrdr2 = fssrc2->GetReader();
+                svcResource->SetResource(fsres2, fsrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
+                Ptr<MgByteSource> fssrc3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.fs", false);
+                Ptr<MgByteReader> fsrdr3 = fssrc3->GetReader();
+                svcResource->SetResource(fsres3, fsrdr3, nullptr);
+
+                // publish the resource data
+                Ptr<MgByteSource> dataSource1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.sdf", false);
+                Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
+                svcResource->SetResourceData(fsres1, L"UT_HydrographicPolygons.sdf", L"File", dataReader1);
+
+                Ptr<MgByteSource> dataSource2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.sdf", false);
+                Ptr<MgByteReader> dataReader2 = dataSource2->GetReader();
+                svcResource->SetResourceData(fsres2, L"UT_Rail.sdf", L"File", dataReader2);
+
+                Ptr<MgByteSource> dataSource3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.sdf", false);
+                Ptr<MgByteReader> dataReader3 = dataSource3->GetReader();
+                svcResource->SetResourceData(fsres3, L"UT_Parcels.sdf", L"File", dataReader3);
+
+                // publish the print layouts
+                Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
+                Ptr<MgByteSource> plsrc1 = new MgByteSource(L"../UnitTestFiles/UT_AllElements.pl", false);
+                Ptr<MgByteReader> plrdr1 = plsrc1->GetReader();
+                svcResource->SetResource(plres1, plrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
+                Ptr<MgByteSource> plsrc2 = new MgByteSource(L"../UnitTestFiles/UT_NoLegend.pl", false);
+                Ptr<MgByteReader> plrdr2 = plsrc2->GetReader();
+                svcResource->SetResource(plres2, plrdr2, nullptr);
+
+                // publish the symbol library
+                Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
+                Ptr<MgByteSource> slsrc1 = new MgByteSource(L"../UnitTestFiles/UT_SymbolMart.sl", false);
+                Ptr<MgByteReader> slrdr1 = slsrc1->GetReader();
+                svcResource->SetResource(slres1, slrdr1, nullptr);
+                Ptr<MgByteSource> datasrc = new MgByteSource(L"../UnitTestFiles/UT_Symbols.dwf", false);
+                Ptr<MgByteReader> datardr = datasrc->GetReader();
+                svcResource->SetResourceData(slres1, L"symbols.dwf", L"File", datardr);
+
+                //
+                // publish symbology stuff
+                //
+
+                // the point feature source
+                Ptr<MgResourceIdentifier> fsres4 = new MgResourceIdentifier(L"Library://UnitTests/Data/Capitals.FeatureSource");
+                Ptr<MgByteSource> fssrc4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.fs", false);
+                Ptr<MgByteReader> fsrdr4 = fssrc4->GetReader();
+                svcResource->SetResource(fsres4, fsrdr4, nullptr);
+
+                // point sdf file
+                Ptr<MgByteSource> dataSource4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.sdf", false);
+                Ptr<MgByteReader> dataReader4 = dataSource4->GetReader();
+                svcResource->SetResourceData(fsres4, L"UT_SymbologyPoints.sdf", L"File", dataReader4);
+
+                // point symbols
+                Ptr<MgResourceIdentifier> sdres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbol.SymbolDefinition");
+                Ptr<MgByteSource> sdsrc1 = new MgByteSource(L"../UnitTestFiles/symbol.sd", false);
+                Ptr<MgByteReader> sdrdr1 = sdsrc1->GetReader();
+                svcResource->SetResource(sdres1, sdrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> sdres2 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbolParam.SymbolDefinition");
+                Ptr<MgByteSource> sdsrc2 = new MgByteSource(L"../UnitTestFiles/symbolp.sd", false);
+                Ptr<MgByteReader> sdrdr2 = sdsrc2->GetReader();
+                svcResource->SetResource(sdres2, sdrdr2, nullptr);
+
+                // point ldf
+                Ptr<MgResourceIdentifier> ldfres4 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Capitals.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.ldf", false);
+                Ptr<MgByteReader> ldfrdr4 = ldfsrc4->GetReader();
+                svcResource->SetResource(ldfres4, ldfrdr4, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres5 = new MgResourceIdentifier(L"Library://UnitTests/Layers/CapitalsParam.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPointsParam.ldf", false);
+                Ptr<MgByteReader> ldfrdr5 = ldfsrc5->GetReader();
+                svcResource->SetResource(ldfres5, ldfrdr5, nullptr);
+
+                // point mdf
+                Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Capitals.MapDefinition");
+                Ptr<MgByteSource> mdfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.mdf", false);
+                Ptr<MgByteReader> mdfrdr2 = mdfsrc2->GetReader();
+                svcResource->SetResource(mapres2, mdfrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> mapres3 = new MgResourceIdentifier(L"Library://UnitTests/Maps/CapitalsParam.MapDefinition");
+                Ptr<MgByteSource> mdfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPointsParam.mdf", false);
+                Ptr<MgByteReader> mdfrdr3 = mdfsrc3->GetReader();
+                svcResource->SetResource(mapres3, mdfrdr3, nullptr);
+
+                // the line feature source
+                Ptr<MgResourceIdentifier> fsres5 = new MgResourceIdentifier(L"Library://UnitTests/Data/Lines.FeatureSource");
+                Ptr<MgByteSource> fssrc5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.fs", false);
+                Ptr<MgByteReader> fsrdr5 = fssrc5->GetReader();
+                svcResource->SetResource(fsres5, fsrdr5, nullptr);
+
+                // line sdf file
+                Ptr<MgByteSource> dataSource5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.sdf", false);
+                Ptr<MgByteReader> dataReader5 = dataSource5->GetReader();
+                svcResource->SetResourceData(fsres5, L"UT_SymbologyLines.sdf", L"File", dataReader5);
+
+                // line symbols
+                Ptr<MgResourceIdentifier> sdres3 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/LineSymbol.SymbolDefinition");
+                Ptr<MgByteSource> sdsrc3 = new MgByteSource(L"../UnitTestFiles/linesymbol.sd", false);
+                Ptr<MgByteReader> sdrdr3 = sdsrc3->GetReader();
+                svcResource->SetResource(sdres3, sdrdr3, nullptr);
+
+                Ptr<MgResourceIdentifier> sdres4 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/MTYP1500a.SymbolDefinition");
+                Ptr<MgByteSource> sdsrc4 = new MgByteSource(L"../UnitTestFiles/MTYP1500a.sd", false);
+                Ptr<MgByteReader> sdrdr4 = sdsrc4->GetReader();
+                svcResource->SetResource(sdres4, sdrdr4, nullptr);
+
+                // line ldf
+                Ptr<MgResourceIdentifier> ldfres6 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Lines.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc6 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.ldf", false);
+                Ptr<MgByteReader> ldfrdr6 = ldfsrc6->GetReader();
+                svcResource->SetResource(ldfres6, ldfrdr6, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres7 = new MgResourceIdentifier(L"Library://UnitTests/Layers/LinesCrossTick.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc7 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLinesCrossTick.ldf", false);
+                Ptr<MgByteReader> ldfrdr7 = ldfsrc7->GetReader();
+                svcResource->SetResource(ldfres7, ldfrdr7, nullptr);
+
+                // line mdf
+                Ptr<MgResourceIdentifier> mapres4 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Lines.MapDefinition");
+                Ptr<MgByteSource> mdfsrc4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.mdf", false);
+                Ptr<MgByteReader> mdfrdr4 = mdfsrc4->GetReader();
+                svcResource->SetResource(mapres4, mdfrdr4, nullptr);
+
+                Ptr<MgResourceIdentifier> mapres5 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinesCrossTick.MapDefinition");
+                Ptr<MgByteSource> mdfsrc5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLinesCrossTick.mdf", false);
+                Ptr<MgByteReader> mdfrdr5 = mdfsrc5->GetReader();
+                svcResource->SetResource(mapres5, mdfrdr5, nullptr);
+
+                // annotation ldf - this shares the point sdf
+                Ptr<MgResourceIdentifier> ldfres8 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation1.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc8 = new MgByteSource(L"../UnitTestFiles/UT_Annotation1.ldf", false);
+                Ptr<MgByteReader> ldfrdr8 = ldfsrc8->GetReader();
+                svcResource->SetResource(ldfres8, ldfrdr8, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres9 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation2.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc9 = new MgByteSource(L"../UnitTestFiles/UT_Annotation2.ldf", false);
+                Ptr<MgByteReader> ldfrdr9 = ldfsrc9->GetReader();
+                svcResource->SetResource(ldfres9, ldfrdr9, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres10 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation3.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc10 = new MgByteSource(L"../UnitTestFiles/UT_Annotation3.ldf", false);
+                Ptr<MgByteReader> ldfrdr10 = ldfsrc10->GetReader();
+                svcResource->SetResource(ldfres10, ldfrdr10, nullptr);
+
+                // annotation mdf
+                Ptr<MgResourceIdentifier> mapres8 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation1.MapDefinition");
+                Ptr<MgByteSource> mdfsrc8 = new MgByteSource(L"../UnitTestFiles/UT_Annotation1.mdf", false);
+                Ptr<MgByteReader> mdfrdr8 = mdfsrc8->GetReader();
+                svcResource->SetResource(mapres8, mdfrdr8, nullptr);
+
+                Ptr<MgResourceIdentifier> mapres9 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation2.MapDefinition");
+                Ptr<MgByteSource> mdfsrc9 = new MgByteSource(L"../UnitTestFiles/UT_Annotation2.mdf", false);
+                Ptr<MgByteReader> mdfrdr9 = mdfsrc9->GetReader();
+                svcResource->SetResource(mapres9, mdfrdr9, nullptr);
+
+                Ptr<MgResourceIdentifier> mapres10 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation3.MapDefinition");
+                Ptr<MgByteSource> mdfsrc10 = new MgByteSource(L"../UnitTestFiles/UT_Annotation3.mdf", false);
+                Ptr<MgByteReader> mdfrdr10 = mdfsrc10->GetReader();
+                svcResource->SetResource(mapres10, mdfrdr10, nullptr);
+
+                //symbology - polygons
+                Ptr<MgResourceIdentifier> mapres11 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_SymbologyPolygons.MapDefinition");
+                Ptr<MgByteSource> mdfsrc11 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPolygons.mdf", false);
+                Ptr<MgByteReader> mdfrdr11 = mdfsrc11->GetReader();
+                svcResource->SetResource(mapres11, mdfrdr11, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres11 = new MgResourceIdentifier(L"Library://UnitTests/Layers/SymbologyParcels.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc11 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyParcels.ldf", false);
+                Ptr<MgByteReader> ldfrdr11 = ldfsrc11->GetReader();
+                svcResource->SetResource(ldfres11, ldfrdr11, nullptr);
+
+                Ptr<MgResourceIdentifier> sdres5 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/AreaSymbol.SymbolDefinition");
+                Ptr<MgByteSource> sdsrc5 = new MgByteSource(L"../UnitTestFiles/areasymbol.sd", false);
+                Ptr<MgByteReader> sdrdr5 = sdsrc5->GetReader();
+                svcResource->SetResource(sdres5, sdrdr5, nullptr);
+
+                // For watermark test
+                // publish the map definition
+                Ptr<MgResourceIdentifier> mapres12 = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWithWatermark.MapDefinition");
+                Ptr<MgByteSource> mdfsrc12 = new MgByteSource(L"../UnitTestFiles/UT_SheboyganWithWatermark.mdf", false);
+                Ptr<MgByteReader> mdfrdr12 = mdfsrc12->GetReader();
+                svcResource->SetResource(mapres12, mdfrdr12, nullptr);
+
+                // publish the watermark definition
+                Ptr<MgResourceIdentifier> wdfres1 = new MgResourceIdentifier(L"Library://UnitTests/Watermarks/PoweredByMapGuide.WatermarkDefinition");
+                Ptr<MgByteSource> wdfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_PoweredByMapGuide.wdf", false);
+                Ptr<MgByteReader> wdfrdr1 = wdfsrc1->GetReader();
+                svcResource->SetResource(wdfres1, wdfrdr1, nullptr);
+
+                // ------------------------------------------------------
+                // base map source data
+                // ------------------------------------------------------
+                // publish the map definition
+                Ptr<MgResourceIdentifier> mapres13 = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
+                Ptr<MgByteSource> mdfsrc13 = new MgByteSource(L"../UnitTestFiles/UT_BaseMap.mdf", false);
+                Ptr<MgByteReader> mdfrdr13 = mdfsrc13->GetReader();
+svcResource->SetResource(mapres13, mdfrdr13, nullptr);
+
+// publish the layer definitions
+Ptr<MgResourceIdentifier> ldfres12 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RoadCenterLines.LayerDefinition");
+Ptr<MgByteSource> ldfsrc12 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.ldf", false);
+Ptr<MgByteReader> ldfrdr12 = ldfsrc12->GetReader();
+svcResource->SetResource(ldfres12, ldfrdr12, nullptr);
+
+Ptr<MgResourceIdentifier> ldfres13 = new MgResourceIdentifier(L"Library://UnitTests/Layers/VotingDistricts.LayerDefinition");
+Ptr<MgByteSource> ldfsrc13 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.ldf", false);
+Ptr<MgByteReader> ldfrdr13 = ldfsrc13->GetReader();
+svcResource->SetResource(ldfres13, ldfrdr13, nullptr);
+
+// publish the feature sources
+Ptr<MgResourceIdentifier> fsres6 = new MgResourceIdentifier(L"Library://UnitTests/Data/RoadCenterLines.FeatureSource");
+Ptr<MgByteSource> fssrc6 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.fs", false);
+Ptr<MgByteReader> fsrdr6 = fssrc6->GetReader();
+svcResource->SetResource(fsres6, fsrdr6, nullptr);
+
+Ptr<MgResourceIdentifier> fsres7 = new MgResourceIdentifier(L"Library://UnitTests/Data/VotingDistricts.FeatureSource");
+Ptr<MgByteSource> fssrc7 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.fs", false);
+Ptr<MgByteReader> fsrdr7 = fssrc7->GetReader();
+svcResource->SetResource(fsres7, fsrdr7, nullptr);
+
+// publish the resource data
+Ptr<MgByteSource> dataSource6 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.sdf", false);
+Ptr<MgByteReader> dataReader6 = dataSource6->GetReader();
+svcResource->SetResourceData(fsres6, L"UT_RoadCenterLines.sdf", L"File", dataReader6);
+
+Ptr<MgByteSource> dataSource7 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.sdf", false);
+Ptr<MgByteReader> dataReader7 = dataSource7->GetReader();
+svcResource->SetResourceData(fsres7, L"UT_VotingDistricts.sdf", L"File", dataReader7);
+
+// ---------------------------------------------------------
+// Data for exercising legend rendering
+// ---------------------------------------------------------
+Ptr<MgResourceIdentifier> ldfres14 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTS.LayerDefinition");
+Ptr<MgByteSource> ldfsrc14 = new MgByteSource(L"../UnitTestFiles/UT_MultiFTS.ldf", false);
+Ptr<MgByteReader> ldfrdr14 = ldfsrc14->GetReader();
+svcResource->SetResource(ldfres14, ldfrdr14, nullptr);
+
+Ptr<MgResourceIdentifier> ldfres15 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTS.LayerDefinition");
+Ptr<MgByteSource> ldfsrc15 = new MgByteSource(L"../UnitTestFiles/UT_MultiCTS.ldf", false);
+Ptr<MgByteReader> ldfrdr15 = ldfsrc15->GetReader();
+svcResource->SetResource(ldfres15, ldfrdr15, nullptr);
+
+Ptr<MgResourceIdentifier> ldfres16 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTSWithTheme.LayerDefinition");
+Ptr<MgByteSource> ldfsrc16 = new MgByteSource(L"../UnitTestFiles/UT_MultiFTSWithTheme.ldf", false);
+Ptr<MgByteReader> ldfrdr16 = ldfsrc16->GetReader();
+svcResource->SetResource(ldfres16, ldfrdr16, nullptr);
+
+Ptr<MgResourceIdentifier> ldfres17 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTSWithTheme.LayerDefinition");
+Ptr<MgByteSource> ldfsrc17 = new MgByteSource(L"../UnitTestFiles/UT_MultiCTSWithTheme.ldf", false);
+Ptr<MgByteReader> ldfrdr17 = ldfsrc17->GetReader();
+svcResource->SetResource(ldfres17, ldfrdr17, nullptr);
+
+Ptr<MgResourceIdentifier> ldfres18 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTSSingleCTS.LayerDefinition");
+Ptr<MgByteSource> ldfsrc18 = new MgByteSource(L"../UnitTestFiles/UT_MultiFTSSingleCTS.ldf", false);
+Ptr<MgByteReader> ldfrdr18 = ldfsrc18->GetReader();
+svcResource->SetResource(ldfres18, ldfrdr18, nullptr);
+
+Ptr<MgResourceIdentifier> ldfres19 = new MgResourceIdentifier(L"Library://UnitTests/Layers/SingleFTSMultiCTS.LayerDefinition");
+Ptr<MgByteSource> ldfsrc19 = new MgByteSource(L"../UnitTestFiles/UT_SingleFTSMultiCTS.ldf", false);
+Ptr<MgByteReader> ldfrdr19 = ldfsrc19->GetReader();
+svcResource->SetResource(ldfres19, ldfrdr19, nullptr);
+
+// Data related to stylization function tests
+Ptr<MgResourceIdentifier> ldfres20 = new MgResourceIdentifier(L"Library://UnitTests/Layers/StylizationFuncs.LayerDefinition");
+Ptr<MgByteSource> ldfsrc20 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistrictsFunctions.ldf", false);
+Ptr<MgByteReader> ldfrdr20 = ldfsrc20->GetReader();
+svcResource->SetResource(ldfres20, ldfrdr20, nullptr);
+
+Ptr<MgResourceIdentifier> mapres15 = new MgResourceIdentifier(L"Library://UnitTests/Maps/StylizationFuncs.MapDefinition");
+Ptr<MgByteSource> mdfsrc15 = new MgByteSource(L"../UnitTestFiles/UT_StylizationFuncs.mdf", false);
+Ptr<MgByteReader> mdfrdr15 = mdfsrc15->GetReader();
+svcResource->SetResource(mapres15, mdfrdr15, nullptr);
+
+// For layer watermark test
+Ptr<MgResourceIdentifier> wdfres2 = new MgResourceIdentifier(L"Library://UnitTests/Watermarks/Rail.WatermarkDefinition");
+Ptr<MgByteSource> wdfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.wdf", false);
+Ptr<MgByteReader> wdfrdr2 = wdfsrc2->GetReader();
+svcResource->SetResource(wdfres2, wdfrdr2, nullptr);
+
+Ptr<MgResourceIdentifier> ldfres21 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RailWatermark.LayerDefinition");
+Ptr<MgByteSource> ldfsrc21 = new MgByteSource(L"../UnitTestFiles/UT_Rail_Watermark.ldf", false);
+Ptr<MgByteReader> ldfrdr21 = ldfsrc21->GetReader();
+svcResource->SetResource(ldfres21, ldfrdr21, nullptr);
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+            catch (...)
+            {
+                throw;
+            }
+        }
+
+        // TestTileService setup
+        if (TestServiceFactory::IsRunningSuite("[TileService]"))
+        {
+            printf("Setting up data for suite: TileService\n");
+            try
+            {
+                // ------------------------------------------------------
+        // base map source data
+        // ------------------------------------------------------
+
+        // publish the map definition
+                Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
+                Ptr<MgByteSource> mdfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_BaseMap.mdf", false);
+                Ptr<MgByteReader> mdfrdr1 = mdfsrc1->GetReader();
+                svcResource->SetResource(mapres1, mdfrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinkedTileSet.MapDefinition");
+                Ptr<MgByteSource> mdfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_LinkedTileSet.mdf", false);
+                Ptr<MgByteReader> mdfrdr2 = mdfsrc2->GetReader();
+                svcResource->SetResource(mapres2, mdfrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> tilesetres1 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/Sheboygan.TileSetDefinition");
+                Ptr<MgByteSource> tsdsrc1 = new MgByteSource(L"../UnitTestFiles/UT_BaseMap.tsd", false);
+                Ptr<MgByteReader> tsdrdr1 = tsdsrc1->GetReader();
+                svcResource->SetResource(tilesetres1, tsdrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> tilesetres2 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/XYZ.TileSetDefinition");
+                Ptr<MgByteSource> tsdsrc2 = new MgByteSource(L"../UnitTestFiles/UT_XYZ.tsd", false);
+                Ptr<MgByteReader> tsdrdr2 = tsdsrc2->GetReader();
+                svcResource->SetResource(tilesetres2, tsdrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> tilesetres3 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/Sheboygan_Metatiled.TileSetDefinition");
+                Ptr<MgByteSource> tsdsrc3 = new MgByteSource(L"../UnitTestFiles/UT_BaseMap_Metatiled.tsd", false);
+                Ptr<MgByteReader> tsdrdr3 = tsdsrc3->GetReader();
+                svcResource->SetResource(tilesetres3, tsdrdr3, nullptr);
+
+                Ptr<MgResourceIdentifier> tilesetres4 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/XYZ_Metatiled.TileSetDefinition");
+                Ptr<MgByteSource> tsdsrc4 = new MgByteSource(L"../UnitTestFiles/UT_XYZ_Metatiled.tsd", false);
+                Ptr<MgByteReader> tsdrdr4 = tsdsrc4->GetReader();
+                svcResource->SetResource(tilesetres4, tsdrdr4, nullptr);
+
+                Ptr<MgResourceIdentifier> tilesetres5 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/Sheboygan_OrigSize.TileSetDefinition");
+                Ptr<MgByteSource> tsdsrc5 = new MgByteSource(L"../UnitTestFiles/UT_BaseMap_OrigSize.tsd", false);
+                Ptr<MgByteReader> tsdrdr5 = tsdsrc5->GetReader();
+                svcResource->SetResource(tilesetres5, tsdrdr5, nullptr);
+
+                // publish the layer definitions
+                Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RoadCenterLines.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.ldf", false);
+                Ptr<MgByteReader> ldfrdr1 = ldfsrc1->GetReader();
+                svcResource->SetResource(ldfres1, ldfrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.ldf", false);
+                Ptr<MgByteReader> ldfrdr2 = ldfsrc2->GetReader();
+                svcResource->SetResource(ldfres2, ldfrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/VotingDistricts.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.ldf", false);
+                Ptr<MgByteReader> ldfrdr3 = ldfsrc3->GetReader();
+                svcResource->SetResource(ldfres3, ldfrdr3, nullptr);
+
+                // publish the feature sources
+                Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/RoadCenterLines.FeatureSource");
+                Ptr<MgByteSource> fssrc1 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.fs", false);
+                Ptr<MgByteReader> fsrdr1 = fssrc1->GetReader();
+                svcResource->SetResource(fsres1, fsrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
+                Ptr<MgByteSource> fssrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.fs", false);
+                Ptr<MgByteReader> fsrdr2 = fssrc2->GetReader();
+                svcResource->SetResource(fsres2, fsrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/VotingDistricts.FeatureSource");
+                Ptr<MgByteSource> fssrc3 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.fs", false);
+                Ptr<MgByteReader> fsrdr3 = fssrc3->GetReader();
+                svcResource->SetResource(fsres3, fsrdr3, nullptr);
+
+                // publish the resource data
+                Ptr<MgByteSource> dataSource1 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.sdf", false);
+                Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
+                svcResource->SetResourceData(fsres1, L"UT_RoadCenterLines.sdf", L"File", dataReader1);
+
+                Ptr<MgByteSource> dataSource2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.sdf", false);
+                Ptr<MgByteReader> dataReader2 = dataSource2->GetReader();
+                svcResource->SetResourceData(fsres2, L"UT_Parcels.sdf", L"File", dataReader2);
+
+                Ptr<MgByteSource> dataSource3 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.sdf", false);
+                Ptr<MgByteReader> dataReader3 = dataSource3->GetReader();
+                svcResource->SetResourceData(fsres3, L"UT_VotingDistricts.sdf", L"File", dataReader3);
+
+                // set up temporary directory for tile images
+                MgFileUtil::CreateDirectory(L"./temp_tiles", false);
+                MgFileUtil::CreateDirectory(L"../UnitTestFiles/TileCaches", false);
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+            catch (...)
+            {
+                throw;
+            }
+        }
+
+        // TestProfilingService setup
+        if (TestServiceFactory::IsRunningSuite("[ProfilingService]"))
+        {
+            printf("Setting up data for suite: ProfilingService\n");
+            try
+            {
+                // publish the map definition
+                Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+                Ptr<MgByteSource> mdfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_Sheboygan.mdf", false);
+                Ptr<MgByteReader> mdfrdr1 = mdfsrc1->GetReader();
+                svcResource->SetResource(mapres1, mdfrdr1, nullptr);
+
+                // publish the layer definitions
+                Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.ldf", false);
+                Ptr<MgByteReader> ldfrdr1 = ldfsrc1->GetReader();
+                svcResource->SetResource(ldfres1, ldfrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.ldf", false);
+                Ptr<MgByteReader> ldfrdr2 = ldfsrc2->GetReader();
+                svcResource->SetResource(ldfres2, ldfrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.ldf", false);
+                Ptr<MgByteReader> ldfrdr3 = ldfsrc3->GetReader();
+                svcResource->SetResource(ldfres3, ldfrdr3, nullptr);
+
+                // publish the feature sources
+                Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
+                Ptr<MgByteSource> fssrc1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.fs", false);
+                Ptr<MgByteReader> fsrdr1 = fssrc1->GetReader();
+                svcResource->SetResource(fsres1, fsrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
+                Ptr<MgByteSource> fssrc2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.fs", false);
+                Ptr<MgByteReader> fsrdr2 = fssrc2->GetReader();
+                svcResource->SetResource(fsres2, fsrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
+                Ptr<MgByteSource> fssrc3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.fs", false);
+                Ptr<MgByteReader> fsrdr3 = fssrc3->GetReader();
+                svcResource->SetResource(fsres3, fsrdr3, nullptr);
+
+                // publish the resource data
+                Ptr<MgByteSource> dataSource1 = new MgByteSource(L"../UnitTestFiles/UT_HydrographicPolygons.sdf", false);
+                Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
+                svcResource->SetResourceData(fsres1, L"UT_HydrographicPolygons.sdf", L"File", dataReader1);
+
+                Ptr<MgByteSource> dataSource2 = new MgByteSource(L"../UnitTestFiles/UT_Rail.sdf", false);
+                Ptr<MgByteReader> dataReader2 = dataSource2->GetReader();
+                svcResource->SetResourceData(fsres2, L"UT_Rail.sdf", L"File", dataReader2);
+
+                Ptr<MgByteSource> dataSource3 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.sdf", false);
+                Ptr<MgByteReader> dataReader3 = dataSource3->GetReader();
+                svcResource->SetResourceData(fsres3, L"UT_Parcels.sdf", L"File", dataReader3);
+
+                // publish the print layouts
+                Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
+                Ptr<MgByteSource> plsrc1 = new MgByteSource(L"../UnitTestFiles/UT_AllElements.pl", false);
+                Ptr<MgByteReader> plrdr1 = plsrc1->GetReader();
+                svcResource->SetResource(plres1, plrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
+                Ptr<MgByteSource> plsrc2 = new MgByteSource(L"../UnitTestFiles/UT_NoLegend.pl", false);
+                Ptr<MgByteReader> plrdr2 = plsrc2->GetReader();
+                svcResource->SetResource(plres2, plrdr2, nullptr);
+
+                // publish the symbol library
+                Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
+                Ptr<MgByteSource> slsrc1 = new MgByteSource(L"../UnitTestFiles/UT_SymbolMart.sl", false);
+                Ptr<MgByteReader> slrdr1 = slsrc1->GetReader();
+                svcResource->SetResource(slres1, slrdr1, nullptr);
+                Ptr<MgByteSource> datasrc = new MgByteSource(L"../UnitTestFiles/UT_Symbols.dwf", false);
+                Ptr<MgByteReader> datardr = datasrc->GetReader();
+                svcResource->SetResourceData(slres1, L"symbols.dwf", L"File", datardr);
+
+                //
+                // publish symbology stuff
+                //
+
+                // the point feature source
+                Ptr<MgResourceIdentifier> fsres4 = new MgResourceIdentifier(L"Library://UnitTests/Data/Capitals.FeatureSource");
+                Ptr<MgByteSource> fssrc4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.fs", false);
+                Ptr<MgByteReader> fsrdr4 = fssrc4->GetReader();
+                svcResource->SetResource(fsres4, fsrdr4, nullptr);
+
+                // point sdf file
+                Ptr<MgByteSource> dataSource4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.sdf", false);
+                Ptr<MgByteReader> dataReader4 = dataSource4->GetReader();
+                svcResource->SetResourceData(fsres4, L"UT_SymbologyPoints.sdf", L"File", dataReader4);
+
+                // point symbols
+                Ptr<MgResourceIdentifier> sdres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbol.SymbolDefinition");
+                Ptr<MgByteSource> sdsrc1 = new MgByteSource(L"../UnitTestFiles/symbol.sd", false);
+                Ptr<MgByteReader> sdrdr1 = sdsrc1->GetReader();
+                svcResource->SetResource(sdres1, sdrdr1, nullptr);
+
+                Ptr<MgResourceIdentifier> sdres2 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbolParam.SymbolDefinition");
+                Ptr<MgByteSource> sdsrc2 = new MgByteSource(L"../UnitTestFiles/symbolp.sd", false);
+                Ptr<MgByteReader> sdrdr2 = sdsrc2->GetReader();
+                svcResource->SetResource(sdres2, sdrdr2, nullptr);
+
+                // point ldf
+                Ptr<MgResourceIdentifier> ldfres4 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Capitals.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.ldf", false);
+                Ptr<MgByteReader> ldfrdr4 = ldfsrc4->GetReader();
+                svcResource->SetResource(ldfres4, ldfrdr4, nullptr);
+
+                Ptr<MgResourceIdentifier> ldfres5 = new MgResourceIdentifier(L"Library://UnitTests/Layers/CapitalsParam.LayerDefinition");
+                Ptr<MgByteSource> ldfsrc5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPointsParam.ldf", false);
+                Ptr<MgByteReader> ldfrdr5 = ldfsrc5->GetReader();
+                svcResource->SetResource(ldfres5, ldfrdr5, nullptr);
+
+                // point mdf
+                Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Capitals.MapDefinition");
+                Ptr<MgByteSource> mdfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPoints.mdf", false);
+                Ptr<MgByteReader> mdfrdr2 = mdfsrc2->GetReader();
+                svcResource->SetResource(mapres2, mdfrdr2, nullptr);
+
+                Ptr<MgResourceIdentifier> mapres3 = new MgResourceIdentifier(L"Library://UnitTests/Maps/CapitalsParam.MapDefinition");
+                Ptr<MgByteSource> mdfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPointsParam.mdf", false);
+                Ptr<MgByteReader> mdfrdr3 = mdfsrc3->GetReader();
+                svcResource->SetResource(mapres3, mdfrdr3, nullptr);
+
+                // the line feature source
+                Ptr<MgResourceIdentifier> fsres5 = new MgResourceIdentifier(L"Library://UnitTests/Data/Lines.FeatureSource");
+                Ptr<MgByteSource> fssrc5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.fs", false);
+                Ptr<MgByteReader> fsrdr5 = fssrc5->GetReader();
+                svcResource->SetResource(fsres5, fsrdr5, nullptr);
+
+                // line sdf file
+                Ptr<MgByteSource> dataSource5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.sdf", false);
+                Ptr<MgByteReader> dataReader5 = dataSource5->GetReader();
+                svcResource->SetResourceData(fsres5, L"UT_SymbologyLines.sdf", L"File", dataReader5);
+
+                // line symbols
+                Ptr<MgResourceIdentifier> sdres3 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/LineSymbol.SymbolDefinition");
+                Ptr<MgByteSource> sdsrc3 = new MgByteSource(L"../UnitTestFiles/linesymbol.sd", false);
+                Ptr<MgByteReader> sdrdr3 = sdsrc3->GetReader();
+                svcResource->SetResource(sdres3, sdrdr3, nullptr);
+
+                Ptr<MgResourceIdentifier> sdres4 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/MTYP1500a.SymbolDefinition");
+Ptr<MgByteSource> sdsrc4 = new MgByteSource(L"../UnitTestFiles/MTYP1500a.sd", false);
+Ptr<MgByteReader> sdrdr4 = sdsrc4->GetReader();
+svcResource->SetResource(sdres4, sdrdr4, nullptr);
+
+// line ldf
+Ptr<MgResourceIdentifier> ldfres6 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Lines.LayerDefinition");
+Ptr<MgByteSource> ldfsrc6 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.ldf", false);
+Ptr<MgByteReader> ldfrdr6 = ldfsrc6->GetReader();
+svcResource->SetResource(ldfres6, ldfrdr6, nullptr);
+
+Ptr<MgResourceIdentifier> ldfres7 = new MgResourceIdentifier(L"Library://UnitTests/Layers/LinesCrossTick.LayerDefinition");
+Ptr<MgByteSource> ldfsrc7 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLinesCrossTick.ldf", false);
+Ptr<MgByteReader> ldfrdr7 = ldfsrc7->GetReader();
+svcResource->SetResource(ldfres7, ldfrdr7, nullptr);
+
+// line mdf
+Ptr<MgResourceIdentifier> mapres4 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Lines.MapDefinition");
+Ptr<MgByteSource> mdfsrc4 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLines.mdf", false);
+Ptr<MgByteReader> mdfrdr4 = mdfsrc4->GetReader();
+svcResource->SetResource(mapres4, mdfrdr4, nullptr);
+
+Ptr<MgResourceIdentifier> mapres5 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinesCrossTick.MapDefinition");
+Ptr<MgByteSource> mdfsrc5 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyLinesCrossTick.mdf", false);
+Ptr<MgByteReader> mdfrdr5 = mdfsrc5->GetReader();
+svcResource->SetResource(mapres5, mdfrdr5, nullptr);
+
+// annotation ldf - this shares the point sdf
+Ptr<MgResourceIdentifier> ldfres8 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation1.LayerDefinition");
+Ptr<MgByteSource> ldfsrc8 = new MgByteSource(L"../UnitTestFiles/UT_Annotation1.ldf", false);
+Ptr<MgByteReader> ldfrdr8 = ldfsrc8->GetReader();
+svcResource->SetResource(ldfres8, ldfrdr8, nullptr);
+
+Ptr<MgResourceIdentifier> ldfres9 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation2.LayerDefinition");
+Ptr<MgByteSource> ldfsrc9 = new MgByteSource(L"../UnitTestFiles/UT_Annotation2.ldf", false);
+Ptr<MgByteReader> ldfrdr9 = ldfsrc9->GetReader();
+svcResource->SetResource(ldfres9, ldfrdr9, nullptr);
+
+Ptr<MgResourceIdentifier> ldfres10 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation3.LayerDefinition");
+Ptr<MgByteSource> ldfsrc10 = new MgByteSource(L"../UnitTestFiles/UT_Annotation3.ldf", false);
+Ptr<MgByteReader> ldfrdr10 = ldfsrc10->GetReader();
+svcResource->SetResource(ldfres10, ldfrdr10, nullptr);
+
+// annotation mdf
+Ptr<MgResourceIdentifier> mapres8 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation1.MapDefinition");
+Ptr<MgByteSource> mdfsrc8 = new MgByteSource(L"../UnitTestFiles/UT_Annotation1.mdf", false);
+Ptr<MgByteReader> mdfrdr8 = mdfsrc8->GetReader();
+svcResource->SetResource(mapres8, mdfrdr8, nullptr);
+
+Ptr<MgResourceIdentifier> mapres9 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation2.MapDefinition");
+Ptr<MgByteSource> mdfsrc9 = new MgByteSource(L"../UnitTestFiles/UT_Annotation2.mdf", false);
+Ptr<MgByteReader> mdfrdr9 = mdfsrc9->GetReader();
+svcResource->SetResource(mapres9, mdfrdr9, nullptr);
+
+Ptr<MgResourceIdentifier> mapres10 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation3.MapDefinition");
+Ptr<MgByteSource> mdfsrc10 = new MgByteSource(L"../UnitTestFiles/UT_Annotation3.mdf", false);
+Ptr<MgByteReader> mdfrdr10 = mdfsrc10->GetReader();
+svcResource->SetResource(mapres10, mdfrdr10, nullptr);
+
+//symbology - polygons
+Ptr<MgResourceIdentifier> mapres11 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_SymbologyPolygons.MapDefinition");
+Ptr<MgByteSource> mdfsrc11 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyPolygons.mdf", false);
+Ptr<MgByteReader> mdfrdr11 = mdfsrc11->GetReader();
+svcResource->SetResource(mapres11, mdfrdr11, nullptr);
+
+Ptr<MgResourceIdentifier> ldfres11 = new MgResourceIdentifier(L"Library://UnitTests/Layers/SymbologyParcels.LayerDefinition");
+Ptr<MgByteSource> ldfsrc11 = new MgByteSource(L"../UnitTestFiles/UT_SymbologyParcels.ldf", false);
+Ptr<MgByteReader> ldfrdr11 = ldfsrc11->GetReader();
+svcResource->SetResource(ldfres11, ldfrdr11, nullptr);
+
+Ptr<MgResourceIdentifier> sdres5 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/AreaSymbol.SymbolDefinition");
+Ptr<MgByteSource> sdsrc5 = new MgByteSource(L"../UnitTestFiles/areasymbol.sd", false);
+Ptr<MgByteReader> sdrdr5 = sdsrc5->GetReader();
+svcResource->SetResource(sdres5, sdrdr5, nullptr);
+
+// For watermark test
+// publish the map definition
+Ptr<MgResourceIdentifier> mapres12 = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWithWatermark.MapDefinition");
+Ptr<MgByteSource> mdfsrc12 = new MgByteSource(L"../UnitTestFiles/UT_SheboyganWithWatermark.mdf", false);
+Ptr<MgByteReader> mdfrdr12 = mdfsrc12->GetReader();
+svcResource->SetResource(mapres12, mdfrdr12, nullptr);
+
+// publish the watermark definition
+Ptr<MgResourceIdentifier> wdfres1 = new MgResourceIdentifier(L"Library://UnitTests/Watermarks/PoweredByMapGuide.WatermarkDefinition");
+Ptr<MgByteSource> wdfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_PoweredByMapGuide.wdf", false);
+Ptr<MgByteReader> wdfrdr1 = wdfsrc1->GetReader();
+svcResource->SetResource(wdfres1, wdfrdr1, nullptr);
+
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+            catch (...)
+            {
+                throw;
+            }
+        }
+
+        // TestFeatureService setup
+        if (TestServiceFactory::IsRunningSuite("[FeatureService]"))
+        {
+            printf("Setting up data for suite: FeatureService\n");
+            try
+            {
+                MgResourceIdentifier resourceIdentifier1(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
+                MgResourceIdentifier resourceIdentifier2(L"Library://UnitTests/Data/Redding_Parcels.FeatureSource");
+                MgResourceIdentifier resourceIdentifier3(L"Library://UnitTests/Data/Sheboygan_BuildingOutlines.FeatureSource");
+                MgResourceIdentifier resourceIdentifier4(L"Library://UnitTests/Data/Sheboygan_VotingDistricts.FeatureSource");
+                MgResourceIdentifier resourceIdentifier5(L"Library://UnitTests/Data/TestChainedInner1ToManyJoin.FeatureSource");
+                MgResourceIdentifier resourceIdentifier6(L"Library://UnitTests/Data/Empty.FeatureSource");
+                MgResourceIdentifier resourceIdentifier7(L"Library://UnitTests/Data/SavePointTest.FeatureSource");
+                MgResourceIdentifier resourceIdentifier8(L"Library://UnitTests/Data/ParcelsJoinTestSQLite.FeatureSource");
+                MgResourceIdentifier resourceIdentifier9(L"Library://UnitTests/Data/FdoJoin.FeatureSource");
+        #ifdef _WIN32
+                STRING resourceContentFileName1 = L"..\\UnitTestFiles\\Sheboygan_Parcels.FeatureSource";
+                STRING resourceContentFileName2 = L"..\\UnitTestFiles\\Redding_Parcels.FeatureSource";
+                STRING resourceContentFileName3 = L"..\\UnitTestFiles\\Sheboygan_BuildingOutlines.FeatureSource";
+                STRING resourceContentFileName4 = L"..\\UnitTestFiles\\Sheboygan_VotingDistricts.FeatureSource";
+                STRING resourceContentFileName5 = L"..\\UnitTestFiles\\TESTChainedInner1ToManyJoin.FeatureSource";
+                STRING resourceContentFileName6 = L"..\\UnitTestFiles\\Empty.FeatureSource";
+                STRING resourceContentFileName7 = L"..\\UnitTestFiles\\SavePointTest.FeatureSource";
+                STRING resourceContentFileName8 = L"..\\UnitTestFiles\\UT_Parcels_SQLite_Join.FeatureSource";
+                STRING resourceContentFileName9 = L"..\\UnitTestFiles\\UT_FdoJoin.FeatureSource";
+                STRING dataFileName1 = L"..\\UnitTestFiles\\Sheboygan_Parcels.sdf";
+                STRING dataFileName2 = L"..\\UnitTestFiles\\Redding_Parcels.shp";
+                STRING dataFileName3 = L"..\\UnitTestFiles\\Redding_Parcels.dbf";
+                STRING dataFileName4 = L"..\\UnitTestFiles\\Redding_Parcels.shx";
+                STRING dataFileName5 = L"..\\UnitTestFiles\\Sheboygan_BuildingOutlines.sdf";
+                STRING dataFileName6 = L"..\\UnitTestFiles\\Sheboygan_VotingDistricts.sdf";
+                STRING dataFileName7 = L"..\\UnitTestFiles\\Empty.sdf";
+                STRING dataFileName8 = L"..\\UnitTestFiles\\SavePointTest.sqlite";
+                STRING dataFileName9 = L"..\\UnitTestFiles\\JoinTest.sqlite";
+                STRING dataFileName10 = L"..\\UnitTestFiles\\ParcelsJoinTest.sqlite";
+        #else
+                STRING resourceContentFileName1 = L"../UnitTestFiles/Sheboygan_Parcels.FeatureSource";
+                STRING resourceContentFileName2 = L"../UnitTestFiles/Redding_Parcels.FeatureSource";
+                STRING resourceContentFileName3 = L"../UnitTestFiles/Sheboygan_BuildingOutlines.FeatureSource";
+                STRING resourceContentFileName4 = L"../UnitTestFiles/Sheboygan_VotingDistricts.FeatureSource";
+                STRING resourceContentFileName5 = L"../UnitTestFiles/TESTChainedInner1ToManyJoin.FeatureSource";
+                STRING resourceContentFileName6 = L"../UnitTestFiles/Empty.FeatureSource";
+                STRING resourceContentFileName7 = L"../UnitTestFiles/SavePointTest.FeatureSource";
+                STRING resourceContentFileName8 = L"../UnitTestFiles/UT_Parcels_SQLite_Join.FeatureSource";
+                STRING resourceContentFileName9 = L"../UnitTestFiles/UT_FdoJoin.FeatureSource";
+                STRING dataFileName1 = L"../UnitTestFiles/Sheboygan_Parcels.sdf";
+                STRING dataFileName2 = L"../UnitTestFiles/Redding_Parcels.shp";
+                STRING dataFileName3 = L"../UnitTestFiles/Redding_Parcels.dbf";
+                STRING dataFileName4 = L"../UnitTestFiles/Redding_Parcels.shx";
+                STRING dataFileName5 = L"../UnitTestFiles/Sheboygan_BuildingOutlines.sdf";
+                STRING dataFileName6 = L"../UnitTestFiles/Sheboygan_VotingDistricts.sdf";
+                STRING dataFileName7 = L"../UnitTestFiles/Empty.sdf";
+                STRING dataFileName8 = L"../UnitTestFiles/SavePointTest.sqlite";
+                STRING dataFileName9 = L"../UnitTestFiles/JoinTest.sqlite";
+                STRING dataFileName10 = L"../UnitTestFiles/ParcelsJoinTest.sqlite";
+        #endif
+
+                //Add a new resource
+                Ptr<MgByteSource> contentSource1 = new MgByteSource(resourceContentFileName1);
+                Ptr<MgByteReader> contentReader1 = contentSource1->GetReader();
+                svcResource->SetResource(&resourceIdentifier1, contentReader1, nullptr);
+
+                Ptr<MgByteSource> contentSource2 = new MgByteSource(resourceContentFileName2);
+                Ptr<MgByteReader> contentReader2 = contentSource2->GetReader();
+                svcResource->SetResource(&resourceIdentifier2, contentReader2, nullptr);
+
+                Ptr<MgByteSource> contentSource3 = new MgByteSource(resourceContentFileName3);
+                Ptr<MgByteReader> contentReader3 = contentSource3->GetReader();
+                svcResource->SetResource(&resourceIdentifier3, contentReader3, nullptr);
+
+                Ptr<MgByteSource> contentSource4 = new MgByteSource(resourceContentFileName4);
+                Ptr<MgByteReader> contentReader4 = contentSource4->GetReader();
+                svcResource->SetResource(&resourceIdentifier4, contentReader4, nullptr);
+
+                Ptr<MgByteSource> contentSource5 = new MgByteSource(resourceContentFileName5);
+                Ptr<MgByteReader> contentReader5 = contentSource5->GetReader();
+                svcResource->SetResource(&resourceIdentifier5, contentReader5, nullptr);
+
+                Ptr<MgByteSource> contentSource6 = new MgByteSource(resourceContentFileName6);
+                Ptr<MgByteReader> contentReader6 = contentSource6->GetReader();
+                svcResource->SetResource(&resourceIdentifier6, contentReader6, nullptr);
+
+                Ptr<MgByteSource> contentSource7 = new MgByteSource(resourceContentFileName7);
+                Ptr<MgByteReader> contentReader7 = contentSource7->GetReader();
+                svcResource->SetResource(&resourceIdentifier7, contentReader7, nullptr);
+
+                Ptr<MgByteSource> contentSource8 = new MgByteSource(resourceContentFileName8);
+                Ptr<MgByteReader> contentReader8 = contentSource8->GetReader();
+                svcResource->SetResource(&resourceIdentifier8, contentReader8, nullptr);
+
+                Ptr<MgByteSource> contentSource9 = new MgByteSource(resourceContentFileName9);
+                Ptr<MgByteReader> contentReader9 = contentSource9->GetReader();
+                svcResource->SetResource(&resourceIdentifier9, contentReader9, nullptr);
+
+                //Set the resource data
+                Ptr<MgByteSource> dataSource1 = new MgByteSource(dataFileName1);
+                Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
+                svcResource->SetResourceData(&resourceIdentifier1, L"Sheboygan_Parcels.sdf", L"File", dataReader1);
+
+                Ptr<MgByteSource> dataSource2 = new MgByteSource(dataFileName2);
+                Ptr<MgByteReader> dataReader2 = dataSource2->GetReader();
+                svcResource->SetResourceData(&resourceIdentifier2, L"Redding_Parcels.shp", L"File", dataReader2);
+
+                Ptr<MgByteSource> dataSource3 = new MgByteSource(dataFileName3);
+                Ptr<MgByteReader> dataReader3 = dataSource3->GetReader();
+                svcResource->SetResourceData(&resourceIdentifier2, L"Redding_Parcels.dbf", L"File", dataReader3);
+
+                Ptr<MgByteSource> dataSource4 = new MgByteSource(dataFileName4);
+                Ptr<MgByteReader> dataReader4 = dataSource4->GetReader();
+                svcResource->SetResourceData(&resourceIdentifier2, L"Redding_Parcels.shx", L"File", dataReader4);
+
+                Ptr<MgByteSource> dataSource5 = new MgByteSource(dataFileName5);
+                Ptr<MgByteReader> dataReader5 = dataSource5->GetReader();
+                svcResource->SetResourceData(&resourceIdentifier3, L"Sheboygan_BuildingOutlines.sdf", L"File", dataReader5);
+
+                Ptr<MgByteSource> dataSource6 = new MgByteSource(dataFileName6);
+                Ptr<MgByteReader> dataReader6 = dataSource6->GetReader();
+                svcResource->SetResourceData(&resourceIdentifier4, L"Sheboygan_VotingDistricts.sdf", L"File", dataReader6);
+
+                Ptr<MgByteSource> dataSource7 = new MgByteSource(dataFileName1);
+                Ptr<MgByteReader> dataReader7 = dataSource7->GetReader();
+                svcResource->SetResourceData(&resourceIdentifier5, L"Sheboygan_Parcels.sdf", L"File", dataReader7);
+
+                Ptr<MgByteSource> dataSource8 = new MgByteSource(dataFileName7);
+                Ptr<MgByteReader> dataReader8 = dataSource8->GetReader();
+                svcResource->SetResourceData(&resourceIdentifier6, L"Empty.sdf", L"File", dataReader8);
+
+                Ptr<MgByteSource> dataSource9 = new MgByteSource(dataFileName8);
+                Ptr<MgByteReader> dataReader9 = dataSource9->GetReader();
+                svcResource->SetResourceData(&resourceIdentifier7, L"SavePointTest.sqlite", L"File", dataReader9);
+
+                Ptr<MgByteSource> dataSource10 = new MgByteSource(dataFileName9);
+                Ptr<MgByteReader> dataReader10 = dataSource10->GetReader();
+                svcResource->SetResourceData(&resourceIdentifier9, L"JoinTest.sqlite", L"File", dataReader10);
+
+                Ptr<MgByteSource> dataSource11 = new MgByteSource(dataFileName10);
+                Ptr<MgByteReader> dataReader11 = dataSource11->GetReader();
+                svcResource->SetResourceData(&resourceIdentifier8, L"ParcelsJoinTest.sqlite", L"File", dataReader11);
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+        }
+
+        // TestPerformance setup
+        if (TestServiceFactory::IsRunningSuite("[Performance]"))
+        {
+            printf("Setting up data for suite: Performance\n");
+            try 
+            {
+                MgResourceIdentifier resourceIdentifier1(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
+
+#ifdef _WIN32
+                STRING resourceContentFileName1 = L"..\\UnitTestFiles\\Sheboygan_Parcels.FeatureSource";
+                STRING dataFileName1 = L"..\\UnitTestFiles\\Sheboygan_Parcels.sdf";
+#else
+                STRING resourceContentFileName1 = L"../UnitTestFiles/Sheboygan_Parcels.FeatureSource";
+                STRING dataFileName1 = L"../UnitTestFiles/Sheboygan_Parcels.sdf";
+#endif
+
+                //Add a new resource
+                Ptr<MgByteSource> contentSource1 = new MgByteSource(resourceContentFileName1);
+                Ptr<MgByteReader> contentReader1 = contentSource1->GetReader();
+                svcResource->SetResource(&resourceIdentifier1, contentReader1, nullptr);
+
+                //Set the resource data
+                Ptr<MgByteSource> dataSource1 = new MgByteSource(dataFileName1);
+                Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
+                svcResource->SetResourceData(&resourceIdentifier1, L"Sheboygan_Parcels.sdf", L"File", dataReader1);
+
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+        }
+    }
+
+    // The whole test run ending
+    void testRunEnded(Catch::TestRunStats const& testRunStats) override {
+        Ptr<MgResourceService> svcResource = TestServiceFactory::CreateResourceService();
+
+        printf("Tearing down test data\n");
+
+        printf("***************************************\n");
+        printf("**** Tearing down test environment ****\n");
+        printf("***************************************\n");
+
+        // TestMisc teardown
+        if (TestServiceFactory::IsRunningSuite("[Misc]"))
+        {
+            printf("Tearing down data for suite: Misc\n");
+            try
+            {
+                //set user info
+                Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
+                userInfo->SetLocale(TestServiceFactory::TEST_LOCALE);
+                MgUserInformation::SetCurrentUserInfo(userInfo);
+
+                //delete the map definition
+                Ptr<MgResourceIdentifier> mapres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+                svcResource->DeleteResource(mapres);
+
+                Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan_833.MapDefinition");
+                svcResource->DeleteResource(mapres2);
+
+                //delete the layer definitions
+                Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
+                svcResource->DeleteResource(ldfres1);
+
+                Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
+                svcResource->DeleteResource(ldfres2);
+
+                Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
+                svcResource->DeleteResource(ldfres3);
+
+                //delete the feature sources
+                Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
+                svcResource->DeleteResource(fsres1);
+
+                Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
+                svcResource->DeleteResource(fsres2);
+
+                Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
+                svcResource->DeleteResource(fsres3);
+
+                // delete the print layouts
+                Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
+                svcResource->DeleteResource(plres1);
+
+                Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
+                svcResource->DeleteResource(plres2);
+
+                // delete the symbol library
+                Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
+                svcResource->DeleteResource(slres1);
+
+#ifdef _DEBUG
+                MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
+                if (pFdoConnectionManager)
+                {
+                    pFdoConnectionManager->ShowCache();
+                }
+#endif
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+            catch (...)
+            {
+                throw;
+            }
+        }
+
+        // TestMdfModel teardown
+        if (TestServiceFactory::IsRunningSuite("[MdfModel]"))
+        {
+            printf("Tearing down data for suite: MdfModel\n");
+            try
+            {
+                // set user info
+                Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
+                userInfo->SetLocale(TestServiceFactory::TEST_LOCALE);
+                MgUserInformation::SetCurrentUserInfo(userInfo);
+
+                // delete symbols / layer definitions for testing MdfModel / MdfParser
+                Ptr<MgResourceIdentifier> sdres1 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestSimpleSymbol.SymbolDefinition");
+                svcResource->DeleteResource(sdres1);
+                Ptr<MgResourceIdentifier> sdres2 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestCompoundSymbol.SymbolDefinition");
+                svcResource->DeleteResource(sdres2);
+                Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestTypeStyles.LayerDefinition");
+                svcResource->DeleteResource(ldfres3);
+                Ptr<MgResourceIdentifier> ldfres4 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestDisabledBounds.LayerDefinition");
+                svcResource->DeleteResource(ldfres4);
+                Ptr<MgResourceIdentifier> mdfres4 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestMap.MapDefinition");
+                svcResource->DeleteResource(mdfres4);
+                Ptr<MgResourceIdentifier> mdfres5 = new MgResourceIdentifier(L"Library://UnitTests/MdfModel/MdfTestTileSet.TileSetDefinition");
+                svcResource->DeleteResource(mdfres5);
+            }
+            catch (MgFileIoException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                ACE_DEBUG((LM_INFO, ACE_TEXT("\nMgFileIoException - Possible file permission error.\nError: %W\n"), message.c_str()));
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                message += e->GetStackTrace(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+            catch (...)
+            {
+                throw;
+            }
+        }
+
+        // TestGeometry teardown
+        if (TestServiceFactory::IsRunningSuite("[Geometry]"))
+        {
+            printf("Tearing down data for suite: Geometry\n");
+            try
+            {
+                Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
+                svcResource->DeleteResource(fsres1);
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+            catch (...)
+            {
+                throw;
+            }
+        }
+
+        // TestDrawingService teardown
+        if (TestServiceFactory::IsRunningSuite("[DrawingService]"))
+        {
+            printf("Tearing down data for suite: DrawingService\n");
+            try
+            {
+                MgResourceIdentifier resourceIdentifier1(L"Library://UnitTests/Drawings/SpaceShip.DrawingSource");
+
+                svcResource->DeleteResource(&resourceIdentifier1);
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+        }
+        
+        // TestKmlService teardown
+        if (TestServiceFactory::IsRunningSuite("[KmlService]"))
+        {
+            printf("Tearing down data for suite: KmlService\n");
+            try
+            {
+                //delete the map definition
+                Ptr<MgResourceIdentifier> mapres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+                svcResource->DeleteResource(mapres);
+
+                //delete the layer definitions
+                Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
+                svcResource->DeleteResource(ldfres1);
+
+                Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
+                svcResource->DeleteResource(ldfres2);
+
+                Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
+                svcResource->DeleteResource(ldfres3);
+
+                //delete the feature sources
+                Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
+                svcResource->DeleteResource(fsres1);
+
+                Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
+                svcResource->DeleteResource(fsres2);
+
+                Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
+                svcResource->DeleteResource(fsres3);
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+            catch (...)
+            {
+                throw;
+            }
+        }
+
+        // TestMappingService teardown
+        if (TestServiceFactory::IsRunningSuite("[MappingService]"))
+        {
+            printf("Tearing down data for suite: MappingService\n");
+            try
+            {
+                //delete the map definition
+                Ptr<MgResourceIdentifier> mapres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+                svcResource->DeleteResource(mapres);
+
+                //delete the layer definitions
+                Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
+                svcResource->DeleteResource(ldfres1);
+
+                Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
+                svcResource->DeleteResource(ldfres2);
+
+                Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
+                svcResource->DeleteResource(ldfres3);
+
+                Ptr<MgResourceIdentifier> ldfres4 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RotatedPointStyles.LayerDefinition");
+                svcResource->DeleteResource(ldfres4);
+
+                Ptr<MgResourceIdentifier> ldfres5 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RoadCenterLines.LayerDefinition");
+                svcResource->DeleteResource(ldfres5);
+
+                Ptr<MgResourceIdentifier> ldfres6 = new MgResourceIdentifier(L"Library://UnitTests/Layers/VotingDistricts.LayerDefinition");
+                svcResource->DeleteResource(ldfres6);
+
+                Ptr<MgResourceIdentifier> ldfres7 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTS.LayerDefinition");
+                svcResource->DeleteResource(ldfres7);
+
+                Ptr<MgResourceIdentifier> ldfres8 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTSWithTheme.LayerDefinition");
+                svcResource->DeleteResource(ldfres8);
+
+                //delete the feature sources
+                Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
+                svcResource->DeleteResource(fsres1);
+
+                Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
+                svcResource->DeleteResource(fsres2);
+
+                Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
+                svcResource->DeleteResource(fsres3);
+
+                // delete the print layouts
+                Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
+                svcResource->DeleteResource(plres1);
+
+                Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
+                svcResource->DeleteResource(plres2);
+
+                // delete the symbol library
+                Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
+                svcResource->DeleteResource(slres1);
+
+                Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinkedTileSet.MapDefinition");
+                svcResource->DeleteResource(mapres2);
+
+                Ptr<MgResourceIdentifier> mapres3 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinkedTileSetXYZ.MapDefinition");
+                svcResource->DeleteResource(mapres3);
+
+                Ptr<MgResourceIdentifier> tilesetres1 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/Sheboygan.TileSetDefinition");
+                svcResource->DeleteResource(tilesetres1);
+
+                Ptr<MgResourceIdentifier> tilesetres2 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/XYZ.TileSetDefinition");
+                svcResource->DeleteResource(tilesetres2);
+
+                Ptr<MgResourceIdentifier> plotHoleFolder = new MgResourceIdentifier(L"Library://UnitTests/PlotHole/");
+                svcResource->DeleteResource(plotHoleFolder);
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+            catch (...)
+            {
+                throw;
+            }
+        }
+
+        // TestProfilingService teardown
+        if (TestServiceFactory::IsRunningSuite("[ProfilingService]"))
+        {
+            printf("Tearing down data for suite: ProfilingService\n");
+            try 
+            {
+                // delete the map definition
+                Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+                svcResource->DeleteResource(mapres1);
+
+                // delete the layer definitions
+                Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
+                svcResource->DeleteResource(ldfres1);
+
+                Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
+                svcResource->DeleteResource(ldfres2);
+
+                Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
+                svcResource->DeleteResource(ldfres3);
+
+                // delete the feature sources
+                Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
+                svcResource->DeleteResource(fsres1);
+
+                Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
+                svcResource->DeleteResource(fsres2);
+
+                Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
+                svcResource->DeleteResource(fsres3);
+
+                // delete the print layouts
+                Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
+                svcResource->DeleteResource(plres1);
+
+                Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
+                svcResource->DeleteResource(plres2);
+
+                // delete the symbol library
+                Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
+                svcResource->DeleteResource(slres1);
+
+                // delete symbology stuff
+                Ptr<MgResourceIdentifier> fsres4 = new MgResourceIdentifier(L"Library://UnitTests/Data/Capitals.FeatureSource");
+                svcResource->DeleteResource(fsres4);
+                Ptr<MgResourceIdentifier> sdres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbol.SymbolDefinition");
+                svcResource->DeleteResource(sdres1);
+                Ptr<MgResourceIdentifier> sdres2 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbolParam.SymbolDefinition");
+                svcResource->DeleteResource(sdres2);
+                Ptr<MgResourceIdentifier> ldfres4 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Capitals.LayerDefinition");
+                svcResource->DeleteResource(ldfres4);
+                Ptr<MgResourceIdentifier> ldfres5 = new MgResourceIdentifier(L"Library://UnitTests/Layers/CapitalsParam.LayerDefinition");
+                svcResource->DeleteResource(ldfres5);
+                Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Capitals.MapDefinition");
+                svcResource->DeleteResource(mapres2);
+                Ptr<MgResourceIdentifier> mapres3 = new MgResourceIdentifier(L"Library://UnitTests/Maps/CapitalsParam.MapDefinition");
+                svcResource->DeleteResource(mapres3);
+
+                Ptr<MgResourceIdentifier> fsres5 = new MgResourceIdentifier(L"Library://UnitTests/Data/Lines.FeatureSource");
+                svcResource->DeleteResource(fsres5);
+                Ptr<MgResourceIdentifier> sdres3 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/LineSymbol.SymbolDefinition");
+                svcResource->DeleteResource(sdres3);
+                Ptr<MgResourceIdentifier> sdres4 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/MTYP1500a.SymbolDefinition");
+                svcResource->DeleteResource(sdres4);
+                Ptr<MgResourceIdentifier> ldfres6 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Lines.LayerDefinition");
+                svcResource->DeleteResource(ldfres6);
+                Ptr<MgResourceIdentifier> ldfres7 = new MgResourceIdentifier(L"Library://UnitTests/Layers/LinesCrossTick.LayerDefinition");
+                svcResource->DeleteResource(ldfres7);
+                Ptr<MgResourceIdentifier> mapres4 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Lines.MapDefinition");
+                svcResource->DeleteResource(mapres4);
+                Ptr<MgResourceIdentifier> mapres5 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinesCrossTick.MapDefinition");
+                svcResource->DeleteResource(mapres5);
+
+                Ptr<MgResourceIdentifier> ldfres8 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation1.LayerDefinition");
+                svcResource->DeleteResource(ldfres8);
+                Ptr<MgResourceIdentifier> ldfres9 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation2.LayerDefinition");
+                svcResource->DeleteResource(ldfres9);
+                Ptr<MgResourceIdentifier> ldfres10 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation3.LayerDefinition");
+                svcResource->DeleteResource(ldfres10);
+                Ptr<MgResourceIdentifier> mapres8 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation1.MapDefinition");
+                svcResource->DeleteResource(mapres8);
+                Ptr<MgResourceIdentifier> mapres9 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation2.MapDefinition");
+                svcResource->DeleteResource(mapres9);
+                Ptr<MgResourceIdentifier> mapres10 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation3.MapDefinition");
+                svcResource->DeleteResource(mapres10);
+
+                Ptr<MgResourceIdentifier> mapres11 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_SymbologyPolygons.MapDefinition");
+                svcResource->DeleteResource(mapres11);
+                Ptr<MgResourceIdentifier> ldfres11 = new MgResourceIdentifier(L"Library://UnitTests/Layers/SymbologyParcels.LayerDefinition");
+                svcResource->DeleteResource(ldfres11);
+                Ptr<MgResourceIdentifier> sdres5 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/AreaSymbol.SymbolDefinition");
+                svcResource->DeleteResource(sdres5);
+
+                Ptr<MgResourceIdentifier> mapres12 = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWithWatermark.MapDefinition");
+                svcResource->DeleteResource(mapres12);
+                Ptr<MgResourceIdentifier> wdfres1 = new MgResourceIdentifier(L"Library://UnitTests/Watermarks/PoweredByMapGuide.WatermarkDefinition");
+                svcResource->DeleteResource(wdfres1);
+            }
+            catch (MgFileIoException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                ACE_DEBUG((LM_INFO, ACE_TEXT("\nMgFileIoException - Possible file permission error.\nError: %W\n"), message.c_str()));
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                message += e->GetStackTrace(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+            catch (...)
+            {
+                throw;
+            }
+        }
+
+        // TestRenderingService teardown
+        if (TestServiceFactory::IsRunningSuite("[RenderingService]"))
+        {
+            printf("Tearing down data for suite: RenderingService\n");
+
+            // delete the map definition
+            Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+            svcResource->DeleteResource(mapres1);
+
+            // delete tile set
+            Ptr<MgResourceIdentifier> tilesetres1 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/XYZ.TileSetDefinition");
+            svcResource->DeleteResource(tilesetres1);
+
+            // delete the layer definitions
+            Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/HydrographicPolygons.LayerDefinition");
+            svcResource->DeleteResource(ldfres1);
+
+            Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Rail.LayerDefinition");
+            svcResource->DeleteResource(ldfres2);
+
+            Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
+            svcResource->DeleteResource(ldfres3);
+
+            // delete the feature sources
+            Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/HydrographicPolygons.FeatureSource");
+            svcResource->DeleteResource(fsres1);
+
+            Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Rail.FeatureSource");
+            svcResource->DeleteResource(fsres2);
+
+            Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
+            svcResource->DeleteResource(fsres3);
+
+            // delete the print layouts
+            Ptr<MgResourceIdentifier> plres1 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/AllElements.PrintLayout");
+            svcResource->DeleteResource(plres1);
+
+            Ptr<MgResourceIdentifier> plres2 = new MgResourceIdentifier(L"Library://UnitTests/PrintLayouts/NoLegend.PrintLayout");
+            svcResource->DeleteResource(plres2);
+
+            // delete the symbol library
+            Ptr<MgResourceIdentifier> slres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/SymbolMart.SymbolLibrary");
+            svcResource->DeleteResource(slres1);
+
+            // delete symbology stuff
+            Ptr<MgResourceIdentifier> fsres4 = new MgResourceIdentifier(L"Library://UnitTests/Data/Capitals.FeatureSource");
+            svcResource->DeleteResource(fsres4);
+            Ptr<MgResourceIdentifier> sdres1 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbol.SymbolDefinition");
+            svcResource->DeleteResource(sdres1);
+            Ptr<MgResourceIdentifier> sdres2 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/PointSymbolParam.SymbolDefinition");
+            svcResource->DeleteResource(sdres2);
+            Ptr<MgResourceIdentifier> ldfres4 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Capitals.LayerDefinition");
+            svcResource->DeleteResource(ldfres4);
+            Ptr<MgResourceIdentifier> ldfres5 = new MgResourceIdentifier(L"Library://UnitTests/Layers/CapitalsParam.LayerDefinition");
+            svcResource->DeleteResource(ldfres5);
+            Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Capitals.MapDefinition");
+            svcResource->DeleteResource(mapres2);
+            Ptr<MgResourceIdentifier> mapres3 = new MgResourceIdentifier(L"Library://UnitTests/Maps/CapitalsParam.MapDefinition");
+            svcResource->DeleteResource(mapres3);
+
+            Ptr<MgResourceIdentifier> fsres5 = new MgResourceIdentifier(L"Library://UnitTests/Data/Lines.FeatureSource");
+            svcResource->DeleteResource(fsres5);
+            Ptr<MgResourceIdentifier> sdres3 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/LineSymbol.SymbolDefinition");
+            svcResource->DeleteResource(sdres3);
+            Ptr<MgResourceIdentifier> sdres4 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/MTYP1500a.SymbolDefinition");
+            svcResource->DeleteResource(sdres4);
+            Ptr<MgResourceIdentifier> ldfres6 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Lines.LayerDefinition");
+            svcResource->DeleteResource(ldfres6);
+            Ptr<MgResourceIdentifier> ldfres7 = new MgResourceIdentifier(L"Library://UnitTests/Layers/LinesCrossTick.LayerDefinition");
+            svcResource->DeleteResource(ldfres7);
+            Ptr<MgResourceIdentifier> mapres4 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Lines.MapDefinition");
+            svcResource->DeleteResource(mapres4);
+            Ptr<MgResourceIdentifier> mapres5 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinesCrossTick.MapDefinition");
+            svcResource->DeleteResource(mapres5);
+
+            Ptr<MgResourceIdentifier> ldfres8 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation1.LayerDefinition");
+            svcResource->DeleteResource(ldfres8);
+            Ptr<MgResourceIdentifier> ldfres9 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation2.LayerDefinition");
+            svcResource->DeleteResource(ldfres9);
+            Ptr<MgResourceIdentifier> ldfres10 = new MgResourceIdentifier(L"Library://UnitTests/Layers/UT_Annotation3.LayerDefinition");
+            svcResource->DeleteResource(ldfres10);
+            Ptr<MgResourceIdentifier> mapres8 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation1.MapDefinition");
+            svcResource->DeleteResource(mapres8);
+            Ptr<MgResourceIdentifier> mapres9 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation2.MapDefinition");
+            svcResource->DeleteResource(mapres9);
+            Ptr<MgResourceIdentifier> mapres10 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_Annotation3.MapDefinition");
+            svcResource->DeleteResource(mapres10);
+
+            Ptr<MgResourceIdentifier> mapres11 = new MgResourceIdentifier(L"Library://UnitTests/Maps/UT_SymbologyPolygons.MapDefinition");
+            svcResource->DeleteResource(mapres11);
+            Ptr<MgResourceIdentifier> ldfres11 = new MgResourceIdentifier(L"Library://UnitTests/Layers/SymbologyParcels.LayerDefinition");
+            svcResource->DeleteResource(ldfres11);
+            Ptr<MgResourceIdentifier> sdres5 = new MgResourceIdentifier(L"Library://UnitTests/Symbols/AreaSymbol.SymbolDefinition");
+            svcResource->DeleteResource(sdres5);
+
+            Ptr<MgResourceIdentifier> mapres12 = new MgResourceIdentifier(L"Library://UnitTests/Maps/SheboyganWithWatermark.MapDefinition");
+            svcResource->DeleteResource(mapres12);
+            Ptr<MgResourceIdentifier> wdfres1 = new MgResourceIdentifier(L"Library://UnitTests/Watermarks/PoweredByMapGuide.WatermarkDefinition");
+            svcResource->DeleteResource(wdfres1);
+
+            Ptr<MgResourceIdentifier> mapres13 = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
+            svcResource->DeleteResource(mapres13);
+            Ptr<MgResourceIdentifier> ldfres12 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RoadCenterLines.LayerDefinition");
+            svcResource->DeleteResource(ldfres12);
+            Ptr<MgResourceIdentifier> ldfres13 = new MgResourceIdentifier(L"Library://UnitTests/Layers/VotingDistricts.LayerDefinition");
+            svcResource->DeleteResource(ldfres13);
+            Ptr<MgResourceIdentifier> fsres6 = new MgResourceIdentifier(L"Library://UnitTests/Data/RoadCenterLines.FeatureSource");
+            svcResource->DeleteResource(fsres6);
+            Ptr<MgResourceIdentifier> fsres7 = new MgResourceIdentifier(L"Library://UnitTests/Data/VotingDistricts.FeatureSource");
+            svcResource->DeleteResource(fsres7);
+
+            Ptr<MgResourceIdentifier> ldfres14 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTS.LayerDefinition");
+            svcResource->DeleteResource(ldfres14);
+            Ptr<MgResourceIdentifier> ldfres15 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTS.LayerDefinition");
+            svcResource->DeleteResource(ldfres15);
+            Ptr<MgResourceIdentifier> ldfres16 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTSWithTheme.LayerDefinition");
+            svcResource->DeleteResource(ldfres16);
+            Ptr<MgResourceIdentifier> ldfres17 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiCTSWithTheme.LayerDefinition");
+            svcResource->DeleteResource(ldfres17);
+            Ptr<MgResourceIdentifier> ldfres18 = new MgResourceIdentifier(L"Library://UnitTests/Layers/MultiFTSSingleCTS.LayerDefinition");
+            svcResource->DeleteResource(ldfres18);
+            Ptr<MgResourceIdentifier> ldfres19 = new MgResourceIdentifier(L"Library://UnitTests/Layers/SingleFTSMultiCTS.LayerDefinition");
+            svcResource->DeleteResource(ldfres19);
+
+            // Data related to stylization function tests
+            Ptr<MgResourceIdentifier> ldfres20 = new MgResourceIdentifier(L"Library://UnitTests/Layers/StylizationFuncs.LayerDefinition");
+            svcResource->DeleteResource(ldfres20);
+
+            Ptr<MgResourceIdentifier> mapres15 = new MgResourceIdentifier(L"Library://UnitTests/Maps/StylizationFuncs.MapDefinition");
+            svcResource->DeleteResource(mapres15);
+
+            // Layer watermark test
+            Ptr<MgResourceIdentifier> wdfres2 = new MgResourceIdentifier(L"Library://UnitTests/Watermarks/Rail.WatermarkDefinition");
+            svcResource->DeleteResource(wdfres2);
+            Ptr<MgResourceIdentifier> ldfres21 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RailWatermark.LayerDefinition");
+            svcResource->DeleteResource(ldfres21);
+        }
+        
+        // TestTileService teardown
+        if (TestServiceFactory::IsRunningSuite("[TileService]"))
+        {
+            printf("Tearing down data for suite: TileService\n");
+            try 
+            {
+                // ------------------------------------------------------
+                // base map source data
+                // ------------------------------------------------------
+
+                // delete the map definition
+                Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
+                svcResource->DeleteResource(mapres1);
+
+                Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinkedTileSet.MapDefinition");
+                svcResource->DeleteResource(mapres2);
+
+                Ptr<MgResourceIdentifier> tilesetres1 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/Sheboygan.TileSetDefinition");
+                svcResource->DeleteResource(tilesetres1);
+
+                Ptr<MgResourceIdentifier> tilesetres2 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/XYZ.TileSetDefinition");
+                svcResource->DeleteResource(tilesetres2);
+
+                Ptr<MgResourceIdentifier> tilesetres3 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/Sheboygan_Metatiled.TileSetDefinition");
+                svcResource->DeleteResource(tilesetres3);
+
+                Ptr<MgResourceIdentifier> tilesetres4 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/XYZ_Metatiled.TileSetDefinition");
+                svcResource->DeleteResource(tilesetres4);
+
+                Ptr<MgResourceIdentifier> tilesetres5 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/Sheboygan_OrigSize.TileSetDefinition");
+                svcResource->DeleteResource(tilesetres5);
+
+                // delete the layer definitions
+                Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RoadCenterLines.LayerDefinition");
+                svcResource->DeleteResource(ldfres1);
+
+                Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
+                svcResource->DeleteResource(ldfres2);
+
+                Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/VotingDistricts.LayerDefinition");
+                svcResource->DeleteResource(ldfres3);
+
+                // delete the feature sources
+                Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/RoadCenterLines.FeatureSource");
+                svcResource->DeleteResource(fsres1);
+
+                Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
+                svcResource->DeleteResource(fsres2);
+
+                Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/VotingDistricts.FeatureSource");
+                svcResource->DeleteResource(fsres3);
+
+                // remove temporary directory for tile images
+                MgFileUtil::DeleteDirectory(L"./temp_tiles", true, false);
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+            catch (...)
+            {
+                throw;
+            }
+        }
+
+        // TestResourceService teardown
+        if (TestServiceFactory::IsRunningSuite("[ResourceService]"))
+        {
+            printf("Tearing down data for suite: ResourceService\n");
+            try 
+            {
+                // delete the drawing source definition
+                Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/Shuttle.DrawingSource");
+                svcResource->DeleteResource(mapres1);
+            }
+            catch (MgException* e)
+            {
+                STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+                SAFE_RELEASE(e);
+                FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+            }
+            catch (...)
+            {
+                throw;
+            }
+        }
+        
+        // TestFeatureService teardown
+        if (TestServiceFactory::IsRunningSuite("[FeatureService]"))
+        {
+            printf("Tearing down data for suite: FeatureService\n");
+
+            // delete the feature sources definition
+            Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
+            svcResource->DeleteResource(fsres1);
+
+            Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Redding_Parcels.FeatureSource");
+            svcResource->DeleteResource(fsres2);
+
+            Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_BuildingOutlines.FeatureSource");
+            svcResource->DeleteResource(fsres3);
+
+            Ptr<MgResourceIdentifier> fsres4 = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_VotingDistricts.FeatureSource");
+            svcResource->DeleteResource(fsres4);
+
+            Ptr<MgResourceIdentifier> fsres5 = new MgResourceIdentifier(L"Library://UnitTests/Data/TestChainedInner1ToManyJoin.FeatureSource");
+            svcResource->DeleteResource(fsres5);
+
+            Ptr<MgResourceIdentifier> fsres6 = new MgResourceIdentifier(L"Library://UnitTests/Data/Empty.FeatureSource");
+            svcResource->DeleteResource(fsres6);
+
+            Ptr<MgResourceIdentifier> fsres7 = new MgResourceIdentifier(L"Library://UnitTests/Data/FdoJoin.FeatureSource");
+            svcResource->DeleteResource(fsres7);
+
+            Ptr<MgResourceIdentifier> fsres8 = new MgResourceIdentifier(L"Library://UnitTests/Data/ParcelsJoinTestSQLite.FeatureSource");
+            svcResource->DeleteResource(fsres8);
+
+            //May or may not have been created during the test
+            Ptr<MgResourceIdentifier> fsres9 = new MgResourceIdentifier(L"Library://UnitTests/Data/GetIdentityPropertiesTest.FeatureSource");
+            if (svcResource->ResourceExists(fsres9)) svcResource->DeleteResource(fsres9);
+
+            Ptr<MgResourceIdentifier> fsres10 = new MgResourceIdentifier(L"Library://UnitTests/Data/TestInsert.FeatureSource");
+            if (svcResource->ResourceExists(fsres10)) svcResource->DeleteResource(fsres10);
+        }
+
+        // TestPerformance teardown
+        if (TestServiceFactory::IsRunningSuite("[Performance]"))
+        {
+            printf("Tearing down data for suite: Performance\n");
+
+            // delete the feature sources definition
+            Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/Sheboygan_Parcels.FeatureSource");
+            svcResource->DeleteResource(mapres1);
+        }
+
+#ifdef _DEBUG
+        MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
+        if (pFdoConnectionManager)
+        {
+            pFdoConnectionManager->ShowCache();
+        }
+#endif
+    }
+};
+
+CATCH_REGISTER_LISTENER(TestDataSetup)
+
+// Get rid of Wweak-tables
+TestDataSetup::~TestDataSetup() {}
\ No newline at end of file

Copied: trunk/MgDev/Server/src/UnitTesting/TestServiceFactory.h (from rev 9676, sandbox/jng/catch2/Server/src/UnitTesting/TestServiceFactory.h)
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestServiceFactory.h	                        (rev 0)
+++ trunk/MgDev/Server/src/UnitTesting/TestServiceFactory.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -0,0 +1,67 @@
+//
+//  Copyright (C) 2004-2020 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _TESTSERVICEFACTORY_H
+#define _TESTSERVICEFACTORY_H
+
+#include "MapGuideCommon.h"
+#include "ServiceManager.h"
+#include "ServerResourceService.h"
+#include "ServerSiteService.h"
+#include "FoundationDefs.h"
+
+#include <string>
+#include <set>
+
+class TestServiceFactory
+{
+public:
+    static const STRING TEST_LOCALE;
+
+    static MgSiteConnection* CreateSiteConnection(MgServerSiteService* svcSite);
+
+    static MgSiteConnection* CreateSiteConnection(MgServerSiteService* svcSite, CREFSTRING session);
+
+    static MgUserInformation* CreateSession(MgServerSiteService* svcSite, REFSTRING session, CREFSTRING userName, CREFSTRING password);
+
+    static MgServerSiteService* CreateSiteService();
+
+    static MgResourceService* CreateResourceService();
+
+    static MgDrawingService* CreateDrawingService();
+
+    static MgRenderingService* CreateRenderingService();
+
+    static MgTileService* CreateTileService();
+
+    static MgKmlService* CreateKmlService();
+
+    static MgMappingService* CreateMappingService();
+
+    static MgProfilingService* CreateProfilingService();
+
+    static void AddSuiteToRun(const std::string& suite);
+
+    static void GetCatch2Tags(std::string& testOrTags);
+
+    static bool IsRunningSuite(const std::string& suite);
+
+private:
+    static std::set<std::string> sm_suitesToRun;
+};
+
+#endif

Modified: trunk/MgDev/Server/src/UnitTesting/TestServiceManager.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestServiceManager.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestServiceManager.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -17,29 +17,10 @@
 
 #include "MapGuideCommon.h"
 #include "ServiceManager.h"
-#include "TestServiceManager.h"
 #include "FoundationDefs.h"
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestServiceManager, "TestServiceManager");
 
-void TestServiceManager::setUp()
-{
-}
+#include "catch.hpp"
 
-void TestServiceManager::tearDown()
-{
-}
-
-void TestServiceManager::TestStart()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Service Manager tests.\n")));
-}
-
-void TestServiceManager::TestEnd()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nService Manager tests completed.\n\n")));
-}
-
-
 ///----------------------------------------------------------------------------
 /// Test Case Description:
 ///
@@ -46,13 +27,13 @@
 /// This test case checks to see if there is a valid MgServiceManager and that
 /// there is only 1 MgServiceManager.
 ///----------------------------------------------------------------------------
-void TestServiceManager::TestCase_ValidServiceManager()
+TEST_CASE("ValidServiceManager", "[ServiceManager]")
 {
     MgServiceManager* pMgServiceManager = MgServiceManager::GetInstance();
-    CPPUNIT_ASSERT(pMgServiceManager != NULL);
+    REQUIRE(pMgServiceManager != nullptr);
 
     MgServiceManager* pMgServiceManager2 = MgServiceManager::GetInstance();
-    CPPUNIT_ASSERT(pMgServiceManager == pMgServiceManager2);
+    REQUIRE(pMgServiceManager == pMgServiceManager2);
 }
 
 
@@ -61,7 +42,7 @@
 ///
 /// This test case tries to enable/disable services.
 ///----------------------------------------------------------------------------
-void TestServiceManager::TestCase_EnableServices()
+TEST_CASE("EnableServices", "[ServiceManager]")
 {
     MgServiceManager* pMgServiceManager = MgServiceManager::GetInstance();
     Ptr<MgPropertyCollection> pProperties = new MgPropertyCollection();
@@ -76,10 +57,10 @@
     try
     {
         Ptr<MgService> pService = pMgServiceManager->RequestService(MgServiceType::DrawingService);
-        CPPUNIT_ASSERT(pService != NULL);
+        REQUIRE(pService != nullptr);
     }
     catch(...)
     {
-        CPPUNIT_ASSERT(false);
+        REQUIRE(false);
     }
 }

Deleted: trunk/MgDev/Server/src/UnitTesting/TestServiceManager.h
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestServiceManager.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestServiceManager.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,44 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _TESTSERVICEMANAGER_H
-#define _TESTSERVICEMANAGER_H
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestServiceManager : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestServiceManager);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_ValidServiceManager);
-    CPPUNIT_TEST(TestCase_EnableServices);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    void TestCase_ValidServiceManager();
-    void TestCase_EnableServices();
-};
-
-#endif // _TESTSERVICEMANAGER_H

Modified: trunk/MgDev/Server/src/UnitTesting/TestSiteManager.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestSiteManager.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestSiteManager.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -16,8 +16,10 @@
 //
 
 #include "MapGuideCommon.h"
-#include "TestSiteManager.h"
 #include "FoundationDefs.h"
+#include "TestServiceFactory.h"
+#include "catch.hpp"
+
 const STRING TEST_SESSION_ID = L"48cb0286-0000-1000-8001-005056c00008_en_MTExLjEyMi4xMzMuMTQ0045708AE0D05";
 const STRING TEST_TARGET = L"111.122.133.144";
 const STRING TEST_SUPPORT_SERVER = L"144.133.122.111";
@@ -26,26 +28,6 @@
 const INT32 TEST_ADMIN_PORT = 3333;
 const STRING TEST_LOCALE = L"en";
 
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestSiteManager, "TestSiteManager");
-
-void TestSiteManager::setUp()
-{
-}
-
-void TestSiteManager::tearDown()
-{
-}
-
-void TestSiteManager::TestStart()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Site Manager tests.\n")));
-}
-
-void TestSiteManager::TestEnd()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nSite Manager tests completed.\n\n")));
-}
-
 ///----------------------------------------------------------------------------
 /// Test Case Description:
 ///
@@ -52,13 +34,13 @@
 /// This test case checks to see if there is a valid MgSiteManager and that
 /// there is only 1 MgSiteManager.
 ///----------------------------------------------------------------------------
-void TestSiteManager::TestCase_ValidSiteManager()
+TEST_CASE("ValidSiteManager", "[SiteManager]")
 {
     MgSiteManager* pMgSiteManager = MgSiteManager::GetInstance();
-    CPPUNIT_ASSERT(pMgSiteManager != NULL);
+    REQUIRE(pMgSiteManager != nullptr);
 
     MgSiteManager* pMgSiteManager2 = MgSiteManager::GetInstance();
-    CPPUNIT_ASSERT(pMgSiteManager == pMgSiteManager2);
+    REQUIRE(pMgSiteManager == pMgSiteManager2);
 }
 
 ///----------------------------------------------------------------------------
@@ -66,7 +48,7 @@
 ///
 /// Get the MgConnectionProperties for a site connection
 ///----------------------------------------------------------------------------
-void TestSiteManager::TestCase_GetSiteConnectionProperties()
+TEST_CASE("GetSiteConnectionProperties", "[SiteManager]")
 {
     try
     {
@@ -80,7 +62,7 @@
         Ptr<MgConnectionProperties> connProps = pSiteManager->GetConnectionProperties(userInfo, MgSiteInfo::Site, false);
 
         // Verify that we received connection properties
-        CPPUNIT_ASSERT(connProps != NULL);
+        REQUIRE(connProps.p != nullptr);
 
     }
     catch(MgException* e)
@@ -87,7 +69,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -101,7 +83,7 @@
 /// Get the MgConnectionProperties for a site connection when the user info
 /// contains a session ID
 ///----------------------------------------------------------------------------
-void TestSiteManager::TestCase_GetSiteConnectionPropertiesWithSession()
+TEST_CASE("GetSiteConnectionPropertiesWithSession", "[SiteManager]")
 {
     try
     {
@@ -118,17 +100,17 @@
         Ptr<MgConnectionProperties> connPropsAdmin = pSiteManager->GetConnectionProperties(userInfo, MgSiteInfo::Admin, true);
 
         // Verify that the connection properties match those in the session ID
-        CPPUNIT_ASSERT(connPropsSite != NULL && connPropsClient != NULL && connPropsAdmin != NULL);
-        CPPUNIT_ASSERT(connPropsSite->GetTarget() == TEST_TARGET);
-        CPPUNIT_ASSERT(connPropsSite->GetPort() == TEST_SITE_PORT);
-        CPPUNIT_ASSERT(connPropsClient->GetPort() == TEST_CLIENT_PORT);
-        CPPUNIT_ASSERT(connPropsAdmin->GetPort() == TEST_ADMIN_PORT);
+        REQUIRE((connPropsSite != nullptr && connPropsClient != nullptr && connPropsAdmin != nullptr));
+        REQUIRE(connPropsSite->GetTarget() == TEST_TARGET);
+        REQUIRE(connPropsSite->GetPort() == TEST_SITE_PORT);
+        REQUIRE(connPropsClient->GetPort() == TEST_CLIENT_PORT);
+        REQUIRE(connPropsAdmin->GetPort() == TEST_ADMIN_PORT);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -143,7 +125,7 @@
 /// contains a session ID, but that ID is not to be used to override the
 /// connection parameters
 ///----------------------------------------------------------------------------
-void TestSiteManager::TestCase_GetSiteConnectionPropertiesIgnoreSession()
+TEST_CASE("GetSiteConnectionPropertiesIgnoreSession", "[SiteManager]")
 {
     try
     {
@@ -157,14 +139,14 @@
         // Get connection properties without allowing overrides from the session ID
         Ptr<MgConnectionProperties> connPropsSite = pSiteManager->GetConnectionProperties(userInfo, MgSiteInfo::Site, false);
 
-        CPPUNIT_ASSERT(connPropsSite != NULL);
-        CPPUNIT_ASSERT(connPropsSite->GetTarget() != TEST_TARGET);
+        REQUIRE(connPropsSite.p != nullptr);
+        REQUIRE(connPropsSite->GetTarget() != TEST_TARGET);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -177,7 +159,7 @@
 ///
 /// Get a connection to a site specified in an MgSiteInfo object
 ///----------------------------------------------------------------------------
-void TestSiteManager::TestCase_GetSpecificSiteConnectionProperties()
+TEST_CASE("GetSpecificSiteConnectionProperties", "[SiteManager]")
 {
     try
     {
@@ -193,15 +175,15 @@
         // Get connection properties for the specified site
         Ptr<MgConnectionProperties> connPropsSite = pSiteManager->GetConnectionProperties(userInfo, siteInfo, MgSiteInfo::Admin);
 
-        CPPUNIT_ASSERT(connPropsSite != NULL);
-        CPPUNIT_ASSERT(connPropsSite->GetTarget() == TEST_TARGET);
-        CPPUNIT_ASSERT(connPropsSite->GetPort() == TEST_ADMIN_PORT);
+        REQUIRE(connPropsSite.p != nullptr);
+        REQUIRE(connPropsSite->GetTarget() == TEST_TARGET);
+        REQUIRE(connPropsSite->GetPort() == TEST_ADMIN_PORT);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -215,7 +197,7 @@
 /// Get a connection to a support server. The support server IP is specified
 /// in the request, but the port is the one used by the site server.
 ///----------------------------------------------------------------------------
-void TestSiteManager::TestCase_GetSupportServerConnectionProperties()
+TEST_CASE("GetSupportServerConnectionProperties", "[SiteManager]")
 {
     try
     {
@@ -233,15 +215,15 @@
         Ptr<MgConnectionProperties> connPropsSite = pSiteManager->GetSupportServerConnectionProperties(TEST_SUPPORT_SERVER, userInfo, MgSiteInfo::Site);
 
         // The port should come from the site stored in the session ID. The target should be the support server IP.
-        CPPUNIT_ASSERT(connPropsSite != NULL);
-        CPPUNIT_ASSERT(connPropsSite->GetTarget() == TEST_SUPPORT_SERVER);
-        CPPUNIT_ASSERT(connPropsSite->GetPort() == TEST_SITE_PORT);
+        REQUIRE(connPropsSite.p != nullptr);
+        REQUIRE(connPropsSite->GetTarget() == TEST_SUPPORT_SERVER);
+        REQUIRE(connPropsSite->GetPort() == TEST_SITE_PORT);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -255,7 +237,7 @@
 /// Get an MgSiteInfo object representing the connection properties for this
 /// site server
 ///----------------------------------------------------------------------------
-void TestSiteManager::TestCase_GetSiteInfo()
+TEST_CASE("GetSiteInfo", "[SiteManager]")
 {
     try
     {
@@ -266,14 +248,14 @@
         Ptr<MgSiteInfo> siteInfo = pSiteManager->GetSiteInfo(0);
 
         // Verify that we received a valid site info object
-        CPPUNIT_ASSERT(siteInfo != NULL);
-        CPPUNIT_ASSERT(siteInfo->GetTarget() != L"");
+        REQUIRE(siteInfo.p != nullptr);
+        REQUIRE(siteInfo->GetTarget() != L"");
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -287,7 +269,7 @@
 /// Get the number of site servers configured in the INI file. Should always be
 /// 1 for serverconfig.ini.
 ///----------------------------------------------------------------------------
-void TestSiteManager::TestCase_GetSiteCount()
+TEST_CASE("GetSiteCount", "[SiteManager]")
 {
     try
     {
@@ -299,13 +281,13 @@
 
         // The number of sites should always be 1 on the server.
         // It can be greater than 1 in the web tier.
-        CPPUNIT_ASSERT(numSites == 1);
+        REQUIRE(numSites == 1);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {

Deleted: trunk/MgDev/Server/src/UnitTesting/TestSiteManager.h
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestSiteManager.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestSiteManager.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,59 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _TestSiteManager_H
-#define _TestSiteManager_H
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestSiteManager : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestSiteManager);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_ValidSiteManager);
-    CPPUNIT_TEST(TestCase_GetSiteConnectionProperties);
-    CPPUNIT_TEST(TestCase_GetSiteConnectionPropertiesWithSession);
-    CPPUNIT_TEST(TestCase_GetSiteConnectionPropertiesIgnoreSession);
-    CPPUNIT_TEST(TestCase_GetSpecificSiteConnectionProperties);
-    CPPUNIT_TEST(TestCase_GetSupportServerConnectionProperties);
-    CPPUNIT_TEST(TestCase_GetSiteInfo);
-    CPPUNIT_TEST(TestCase_GetSiteCount);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    void TestCase_ValidSiteManager();
-    void TestCase_GetSiteConnectionProperties();
-    void TestCase_GetSiteConnectionPropertiesWithSession();
-    void TestCase_GetSiteConnectionPropertiesIgnoreSession();
-    void TestCase_GetSpecificSiteConnectionProperties();
-    void TestCase_GetSupportServerConnectionProperties();
-    void TestCase_GetSiteInfo();
-    void TestCase_GetSiteCount();
-
-private:
-    static void TestWorkerThreads();
-};
-
-#endif // _TestSiteManager_H

Modified: trunk/MgDev/Server/src/UnitTesting/TestSiteService.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestSiteService.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestSiteService.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -18,10 +18,10 @@
 #include "MapGuideCommon.h"
 #include "ServiceManager.h"
 #include "ServerSiteService.h"
-#include "TestSiteService.h"
-#include "CppUnitExtensions.h"
+#include "CatchHelperMacros.h"
 #include "FoundationDefs.h"
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestSiteService, "TestSiteService");
+#include "TestServiceFactory.h"
+#include "catch.hpp"
 
 const STRING adminName = L"Administrator";
 const STRING adminPass = L"admin";
@@ -44,51 +44,31 @@
 
 STRING session;
 
-
-void TestSiteService::setUp()
-{
-}
-
-void TestSiteService::tearDown()
-{
-}
-
-void TestSiteService::TestStart()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Site Service tests.\n")));
-}
-
-void TestSiteService::TestEnd()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nSite Service tests completed.\n\n")));
-}
-
-
 ///----------------------------------------------------------------------------
 /// Test Case Description:
 ///
 /// This test case adds two new users
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_AddUser()
+TEST_CASE("AddUser", "[SiteService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestSiteService.TestCase_AddUser", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestSiteService.TestCase_AddUser", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerSiteService> pService = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_AddUser", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_AddUser", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         //Try to add a user with empty strings
-        CPPUNIT_ASSERT_THROW_MG(pService->AddUser(L"", L"username", L"password", L"description"), MgInvalidArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->AddUser(userId1, L"", L"password", L"description"), MgInvalidArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->AddUser(userId1, L"username", L"", L"description"), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->AddUser(L"", L"username", L"password", L"description"), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->AddUser(userId1, L"", L"password", L"description"), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->AddUser(userId1, L"username", L"", L"description"), MgInvalidArgumentException*);
 
         //Add 2 new users
         pService->AddUser(userId1, L"TestUser1", L"TestPassword1", L"This is a test user");
@@ -95,13 +75,13 @@
         pService->AddUser(userId2, L"TestUser2", L"TestPassword2", L"This is another test user");
 
         //Try to add an already existing user id
-        CPPUNIT_ASSERT_THROW_MG(pService->AddUser(userId1, L"TestUser1", L"TestPassword1", L"This is a test user"), MgDuplicateUserException*);
+        REQUIRE_THROWS_MG(pService->AddUser(userId1, L"TestUser1", L"TestPassword1", L"This is a test user"), MgDuplicateUserException*);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -115,20 +95,20 @@
 ///
 /// This test case enumerates the users
 ///-------------------------------------------- --------------------------------
-void TestSiteService::TestCase_EnumerateUsers()
+TEST_CASE("EnumerateUsers", "[SiteService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestSiteService.TestCase_EnumerateUsers", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestSiteService.TestCase_EnumerateUsers", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerSiteService> pService = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_EnumerateUsers", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_EnumerateUsers", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgByteReader> byteReader;
@@ -136,18 +116,18 @@
         //Enumerate users not including groups
         byteReader = pService->EnumerateUsers(L"", L"", false);
         STRING mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
 
         //Enumerate users including groups
         byteReader = pService->EnumerateUsers(L"", L"", true);
         mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -161,30 +141,30 @@
 ///
 /// This test case updates one of the users added earlier
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_UpdateUser()
+TEST_CASE("UpdateUser", "[SiteService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestSiteService.TestCase_UpdateUser", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestSiteService.TestCase_UpdateUser", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerSiteService> pService = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_UpdateUser", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_UpdateUser", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         //Try to update user with empty strings
-        CPPUNIT_ASSERT_THROW_MG(pService->UpdateUser(L"", L"", L"username", L"password", L"description"), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->UpdateUser(L"", L"", L"username", L"password", L"description"), MgInvalidArgumentException*);
 
         //Try to update a user that does not exist
-        CPPUNIT_ASSERT_THROW_MG(pService->UpdateUser(L"DoesNotExist", L"", L"username", L"password", L"description"), MgUserNotFoundException*);
+        REQUIRE_THROWS_MG(pService->UpdateUser(L"DoesNotExist", L"", L"username", L"password", L"description"), MgUserNotFoundException*);
 
         //Try to change the user id to one that already exists
-        CPPUNIT_ASSERT_THROW_MG(pService->UpdateUser(userId1, userId1, L"newUsername", L"newPassword", L"newDescription"), MgDuplicateUserException*);
+        REQUIRE_THROWS_MG(pService->UpdateUser(userId1, userId1, L"newUsername", L"newPassword", L"newDescription"), MgDuplicateUserException*);
 
         //Update the user that was created earlier
         pService->UpdateUser(userId1, L"", L"newUsername", L"newPassword", L"newDescription");
@@ -193,7 +173,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -207,24 +187,24 @@
 ///
 /// This test case adds a group
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_AddGroup()
+TEST_CASE("AddGroup", "[SiteService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestSiteService.TestCase_AddGroup", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestSiteService.TestCase_AddGroup", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerSiteService> pService = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_AddGroup", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_AddGroup", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         //Try to add an empty group name
-        CPPUNIT_ASSERT_THROW_MG(pService->AddGroup(L"", L"This will throw an exception"), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->AddGroup(L"", L"This will throw an exception"), MgInvalidArgumentException*);
 
         //Add a new group
         pService->AddGroup(groupName1, L"This is a group used for testing");
@@ -231,13 +211,13 @@
         pService->AddGroup(groupName2, L"This is a second group used for testing");
 
         //Try to add the group again
-        CPPUNIT_ASSERT_THROW_MG(pService->AddGroup(groupName1, L"This is a duplicate group"), MgDuplicateGroupException*);
+        REQUIRE_THROWS_MG(pService->AddGroup(groupName1, L"This is a duplicate group"), MgDuplicateGroupException*);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -251,29 +231,29 @@
 ///
 /// This test case adds they newly created users to the newly created groups
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_GrantGroupMembershipsToUsers()
+TEST_CASE("GrantGroupMembershipToUsers", "[SiteService]")
 {
     //TODO: does not throw exceptions described in MgServerSiteService.cpp
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestSiteService.TestCase_GrantGroupMembershipsToUsers", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestSiteService.TestCase_GrantGroupMembershipsToUsers", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerSiteService> pService = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_GrantGroupMembershipsToUsers", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_GrantGroupMembershipsToUsers", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgStringCollection> groupCollection = new MgStringCollection();
         Ptr<MgStringCollection> userCollection = new MgStringCollection();
 
-        //Try to use NULL arguments
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantGroupMembershipsToUsers(NULL, userCollection), MgNullArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantGroupMembershipsToUsers(groupCollection, NULL), MgNullArgumentException*);
+        //Try to use nullptr arguments
+        REQUIRE_THROWS_MG(pService->GrantGroupMembershipsToUsers(nullptr, userCollection), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->GrantGroupMembershipsToUsers(groupCollection, nullptr), MgNullArgumentException*);
 
         //Make both new users members of first group
         groupCollection->Add(groupName1);
@@ -292,19 +272,19 @@
         groupCollection = new MgStringCollection();
         userCollection = new MgStringCollection();
         userCollection->Add(L"DoesNotExist");
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantGroupMembershipsToUsers(groupCollection, userCollection), MgUserNotFoundException*);
+        REQUIRE_THROWS_MG(pService->GrantGroupMembershipsToUsers(groupCollection, userCollection), MgUserNotFoundException*);
 
         //Try with a group that doesn't exist
         groupCollection = new MgStringCollection();
         userCollection = new MgStringCollection();
         groupCollection->Add(L"DoesNotExist");
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantGroupMembershipsToUsers(groupCollection, userCollection), MgGroupNotFoundException*);
+        REQUIRE_THROWS_MG(pService->GrantGroupMembershipsToUsers(groupCollection, userCollection), MgGroupNotFoundException*);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -318,36 +298,36 @@
 ///
 /// This test case gives the role of author to one of the newly created users
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_GrantRoleMembershipsToUsers()
+TEST_CASE("GrantRoleMembershipsToUsers", "[SiteService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestSiteService.TestCase_GrantRoleMembershipsToUsers", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestSiteService.TestCase_GrantRoleMembershipsToUsers", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerSiteService> pService = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_GrantRoleMembershipsToUsers", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_GrantRoleMembershipsToUsers", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgStringCollection> roleCollection;
         Ptr<MgStringCollection> userCollection;
 
-        //Try using NULL arguments
+        //Try using nullptr arguments
         roleCollection = new MgStringCollection();
         userCollection = new MgStringCollection();
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantRoleMembershipsToUsers(NULL, userCollection), MgNullArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantRoleMembershipsToUsers(roleCollection, NULL), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->GrantRoleMembershipsToUsers(nullptr, userCollection), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->GrantRoleMembershipsToUsers(roleCollection, nullptr), MgNullArgumentException*);
 
         //Try using with a user that does not exist
         roleCollection = new MgStringCollection();
         userCollection = new MgStringCollection();
         userCollection->Add(L"DoesNotExist");
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantRoleMembershipsToUsers(roleCollection, userCollection), MgUserNotFoundException*);
+        REQUIRE_THROWS_MG(pService->GrantRoleMembershipsToUsers(roleCollection, userCollection), MgUserNotFoundException*);
 
         //Try to give the role viewer to one of the newly created users
         roleCollection = new MgStringCollection();
@@ -354,7 +334,7 @@
         userCollection = new MgStringCollection();
         roleCollection->Add(MgRole::Viewer);
         userCollection->Add(userId1);
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantRoleMembershipsToUsers(roleCollection, userCollection), MgInvalidOperationException*);
+        REQUIRE_THROWS_MG(pService->GrantRoleMembershipsToUsers(roleCollection, userCollection), MgInvalidOperationException*);
 
         //Give the role of author to one of the newly created users
         roleCollection = new MgStringCollection();
@@ -367,7 +347,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -381,36 +361,36 @@
 ///
 /// This test case
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_GrantRoleMembershipsToGroups()
+TEST_CASE("GrantRoleMembershipsToGroups", "[SiteService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestSiteService.TestCase_GrantRoleMembershipsToGroups", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestSiteService.TestCase_GrantRoleMembershipsToGroups", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerSiteService> pService = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_GrantRoleMembershipsToGroups", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_GrantRoleMembershipsToGroups", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgStringCollection> roleCollection;
         Ptr<MgStringCollection> groupCollection;
 
-        //Try using NULL arguments
+        //Try using nullptr arguments
         roleCollection = new MgStringCollection();
         groupCollection = new MgStringCollection();
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantRoleMembershipsToGroups(NULL, groupCollection), MgNullArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantRoleMembershipsToGroups(roleCollection, NULL), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->GrantRoleMembershipsToGroups(nullptr, groupCollection), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->GrantRoleMembershipsToGroups(roleCollection, nullptr), MgNullArgumentException*);
 
         //Try using with a group that does not exist
         roleCollection = new MgStringCollection();
         groupCollection = new MgStringCollection();
         groupCollection->Add(L"DoesNotExist");
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantRoleMembershipsToGroups(roleCollection, groupCollection), MgGroupNotFoundException*);
+        REQUIRE_THROWS_MG(pService->GrantRoleMembershipsToGroups(roleCollection, groupCollection), MgGroupNotFoundException*);
 
         //Try to give the role viewer to one of the newly created groups
         roleCollection = new MgStringCollection();
@@ -417,7 +397,7 @@
         groupCollection = new MgStringCollection();
         roleCollection->Add(MgRole::Viewer);
         groupCollection->Add(groupName1);
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantRoleMembershipsToGroups(roleCollection, groupCollection), MgInvalidOperationException*);
+        REQUIRE_THROWS_MG(pService->GrantRoleMembershipsToGroups(roleCollection, groupCollection), MgInvalidOperationException*);
 
         //Give the role of administrator to one of the newly created groups
         roleCollection = new MgStringCollection();
@@ -430,7 +410,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -444,30 +424,30 @@
 ///
 /// This test case updates the groups created earlier
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_UpdateGroup()
+TEST_CASE("UpdateGroup", "[SiteService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestSiteService.TestCase_UpdateGroup", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestSiteService.TestCase_UpdateGroup", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerSiteService> pService = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_UpdateGroup", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_UpdateGroup", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         //Try to update using an empty string for group name
-        CPPUNIT_ASSERT_THROW_MG(pService->UpdateGroup(L"", L"", L""), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->UpdateGroup(L"", L"", L""), MgInvalidArgumentException*);
 
         //Try to update a group that does not exist
-        CPPUNIT_ASSERT_THROW_MG(pService->UpdateGroup(L"DoesNotExist", L"", L"description for non-existing group"), MgGroupNotFoundException*);
+        REQUIRE_THROWS_MG(pService->UpdateGroup(L"DoesNotExist", L"", L"description for non-existing group"), MgGroupNotFoundException*);
 
         //Try to change the group name to something that already exists
-        CPPUNIT_ASSERT_THROW_MG(pService->UpdateGroup(groupName1, groupName1, L"This shouldn't work since we'll have a duplicate group name"), MgDuplicateGroupException*);
+        REQUIRE_THROWS_MG(pService->UpdateGroup(groupName1, groupName1, L"This shouldn't work since we'll have a duplicate group name"), MgDuplicateGroupException*);
 
         //Update group description for first group
         pService->UpdateGroup(groupName1, L"", L"new description for this group used for testing");
@@ -479,7 +459,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -493,20 +473,20 @@
 ///
 /// This test case enumerates the current groups
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_EnumerateGroups()
+TEST_CASE("EnumerateGroups", "[SiteService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestSiteService.TestCase_EnumerateGroups", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestSiteService.TestCase_EnumerateGroups", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerSiteService> pService = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_EnumerateGroups", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_EnumerateGroups", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgByteReader> byteReader;
@@ -515,23 +495,23 @@
         //Enumerate groups that a particular user is part of
         byteReader = pService->EnumerateGroups(userId1, L"");
         mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
 
         //Enumerate groups that a particular user is part of
         byteReader = pService->EnumerateGroups(userId2, L"");
         mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
 
         //Enumerate all groups
         byteReader = pService->EnumerateGroups(L"", L"");
         mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -545,20 +525,20 @@
 ///
 /// This test case enumerates the current roles
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_EnumerateRoles()
+TEST_CASE("EnumerateRoles", "[SiteService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestSiteService.TestCase_EnumerateRoles", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestSiteService.TestCase_EnumerateRoles", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerSiteService> pService = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_EnumerateRoles", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_EnumerateRoles", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgStringCollection> roleCollection;
@@ -565,33 +545,33 @@
         INT32 collSize;
 
         //Try to enumerate roles by specifying both a user and group
-        CPPUNIT_ASSERT_THROW_MG(pService->EnumerateRoles(userId1, groupName1), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->EnumerateRoles(userId1, groupName1), MgInvalidArgumentException*);
 
         //Enumerate the roles of a user
         roleCollection = pService->EnumerateRoles(userId1, L"");
         collSize = roleCollection->GetCount();
-        CPPUNIT_ASSERT(collSize == 1);
+        REQUIRE(collSize == 1);
 
         //Enumerate the roles of a user
         roleCollection = pService->EnumerateRoles(userId2, L"");
         collSize = roleCollection->GetCount();
-        CPPUNIT_ASSERT(collSize == 0);
+        REQUIRE(collSize == 0);
 
         //Enumerate the roles of a group
         roleCollection = pService->EnumerateRoles(L"", groupName1);
         collSize = roleCollection->GetCount();
-        CPPUNIT_ASSERT(collSize == 0);
+        REQUIRE(collSize == 0);
 
         //Enumerate all roles
         roleCollection = pService->EnumerateRoles(L"", L"");
         collSize = roleCollection->GetCount();
-        CPPUNIT_ASSERT(collSize == 3);
+        REQUIRE(collSize == 3);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -605,28 +585,28 @@
 ///
 /// This test case removes users from groups
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_RevokeGroupMembershipsFromUsers()
+TEST_CASE("RevokeGroupMembershipsFromUsers", "[SiteService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestSiteService.TestCase_RevokeGroupMembershipsFromUsers", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestSiteService.TestCase_RevokeGroupMembershipsFromUsers", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerSiteService> pService = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_RevokeGroupMembershipsFromUsers", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_RevokeGroupMembershipsFromUsers", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgStringCollection> groupCollection = new MgStringCollection();
         Ptr<MgStringCollection> userCollection = new MgStringCollection();
 
-        //Try to use NULL arguments
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeGroupMembershipsFromUsers(NULL, userCollection), MgNullArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeGroupMembershipsFromUsers(groupCollection, NULL), MgNullArgumentException*);
+        //Try to use nullptr arguments
+        REQUIRE_THROWS_MG(pService->RevokeGroupMembershipsFromUsers(nullptr, userCollection), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->RevokeGroupMembershipsFromUsers(groupCollection, nullptr), MgNullArgumentException*);
 
         //Remove both new users from first group
         groupCollection->Add(groupName1);
@@ -638,19 +618,19 @@
         groupCollection = new MgStringCollection();
         userCollection = new MgStringCollection();
         userCollection->Add(L"DoesNotExist");
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeGroupMembershipsFromUsers(groupCollection, userCollection), MgUserNotFoundException*);
+        REQUIRE_THROWS_MG(pService->RevokeGroupMembershipsFromUsers(groupCollection, userCollection), MgUserNotFoundException*);
 
         //Try with a group that doesn't exist
         groupCollection = new MgStringCollection();
         userCollection = new MgStringCollection();
         groupCollection->Add(L"DoesNotExist");
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeGroupMembershipsFromUsers(groupCollection, userCollection), MgGroupNotFoundException*);
+        REQUIRE_THROWS_MG(pService->RevokeGroupMembershipsFromUsers(groupCollection, userCollection), MgGroupNotFoundException*);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -664,36 +644,36 @@
 ///
 /// This test case removes users from roles
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_RevokeRoleMembershipsFromUsers()
+TEST_CASE("RevokeRoleMembershipsFromUsers", "[SiteService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestSiteService.TestCase_RevokeRoleMembershipsFromUsers", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestSiteService.TestCase_RevokeRoleMembershipsFromUsers", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerSiteService> pService = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_RevokeRoleMembershipsFromUsers", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_RevokeRoleMembershipsFromUsers", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgStringCollection> roleCollection;
         Ptr<MgStringCollection> userCollection;
 
-        //Try using NULL arguments
+        //Try using nullptr arguments
         roleCollection = new MgStringCollection();
         userCollection = new MgStringCollection();
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeRoleMembershipsFromUsers(NULL, userCollection), MgNullArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeRoleMembershipsFromUsers(roleCollection, NULL), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->RevokeRoleMembershipsFromUsers(nullptr, userCollection), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->RevokeRoleMembershipsFromUsers(roleCollection, nullptr), MgNullArgumentException*);
 
         //Try using with a user that does not exist
         roleCollection = new MgStringCollection();
         userCollection = new MgStringCollection();
         userCollection->Add(L"DoesNotExist");
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeRoleMembershipsFromUsers(roleCollection, userCollection), MgUserNotFoundException*);
+        REQUIRE_THROWS_MG(pService->RevokeRoleMembershipsFromUsers(roleCollection, userCollection), MgUserNotFoundException*);
 
         //Try to take away the role viewer from one of the newly created users
         roleCollection = new MgStringCollection();
@@ -700,7 +680,7 @@
         userCollection = new MgStringCollection();
         roleCollection->Add(MgRole::Viewer);
         userCollection->Add(userId1);
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeRoleMembershipsFromUsers(roleCollection, userCollection), MgInvalidOperationException*);
+        REQUIRE_THROWS_MG(pService->RevokeRoleMembershipsFromUsers(roleCollection, userCollection), MgInvalidOperationException*);
 
         //Take away role of author from one of the newly created users
         roleCollection = new MgStringCollection();
@@ -713,7 +693,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -727,36 +707,36 @@
 ///
 /// This test case removes groups from roles
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_RevokeRoleMembershipsFromGroups()
+TEST_CASE("RevokeRoleMembershipsFromGroups", "[SiteService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestSiteService.TestCase_RevokeRoleMembershipsFromGroups", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestSiteService.TestCase_RevokeRoleMembershipsFromGroups", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerSiteService> pService = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_RevokeRoleMembershipsFromGroups", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_RevokeRoleMembershipsFromGroups", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgStringCollection> roleCollection;
         Ptr<MgStringCollection> groupCollection;
 
-        //Try using NULL arguments
+        //Try using nullptr arguments
         roleCollection = new MgStringCollection();
         groupCollection = new MgStringCollection();
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeRoleMembershipsFromGroups(NULL, groupCollection), MgNullArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeRoleMembershipsFromGroups(roleCollection, NULL), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->RevokeRoleMembershipsFromGroups(nullptr, groupCollection), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->RevokeRoleMembershipsFromGroups(roleCollection, nullptr), MgNullArgumentException*);
 
         //Try using with a group that does not exist
         roleCollection = new MgStringCollection();
         groupCollection = new MgStringCollection();
         groupCollection->Add(L"DoesNotExist");
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeRoleMembershipsFromGroups(roleCollection, groupCollection), MgGroupNotFoundException*);
+        REQUIRE_THROWS_MG(pService->RevokeRoleMembershipsFromGroups(roleCollection, groupCollection), MgGroupNotFoundException*);
 
         //Try to give the role viewer to one of the newly created groups
         roleCollection = new MgStringCollection();
@@ -763,7 +743,7 @@
         groupCollection = new MgStringCollection();
         roleCollection->Add(MgRole::Viewer);
         groupCollection->Add(groupName1);
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeRoleMembershipsFromGroups(roleCollection, groupCollection), MgInvalidOperationException*);
+        REQUIRE_THROWS_MG(pService->RevokeRoleMembershipsFromGroups(roleCollection, groupCollection), MgInvalidOperationException*);
 
         //Give the role of administrator to one of the newly created groups
         roleCollection = new MgStringCollection();
@@ -776,7 +756,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -790,24 +770,24 @@
 ///
 /// This test case deletes the 2 users created earlier
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_DeleteUsers()
+TEST_CASE("DeleteUsers", "[SiteService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestSiteService.TestCase_DeleteUsers", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestSiteService.TestCase_DeleteUsers", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerSiteService> pService = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_DeleteUsers", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_DeleteUsers", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
-        //Try using a NULL argument
-        CPPUNIT_ASSERT_THROW_MG(pService->DeleteUsers(NULL), MgNullArgumentException*);
+        //Try using a nullptr argument
+        REQUIRE_THROWS_MG(pService->DeleteUsers(nullptr), MgNullArgumentException*);
 
         //Delete the two users added earlier
         MgStringCollection userCollection;
@@ -816,13 +796,13 @@
         pService->DeleteUsers(&userCollection);
 
         //Try to delete again now that users shouldn't exist
-        CPPUNIT_ASSERT_THROW_MG(pService->DeleteUsers(&userCollection), MgUserNotFoundException*);
+        REQUIRE_THROWS_MG(pService->DeleteUsers(&userCollection), MgUserNotFoundException*);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -836,24 +816,24 @@
 ///
 /// This test case deletes the 2 groups created earlier
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_DeleteGroups()
+TEST_CASE("DeleteGroups", "[SiteService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestSiteService.TestCase_DeleteGroups", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestSiteService.TestCase_DeleteGroups", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerSiteService> pService = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_DeleteGroups", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_DeleteGroups", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
-        //Try to use a NULL argument
-        CPPUNIT_ASSERT_THROW_MG(pService->DeleteGroups(NULL), MgNullArgumentException*);
+        //Try to use a nullptr argument
+        REQUIRE_THROWS_MG(pService->DeleteGroups(nullptr), MgNullArgumentException*);
 
         MgStringCollection groupCollection;
         groupCollection.Add(groupName1);
@@ -863,13 +843,13 @@
         pService->DeleteGroups(&groupCollection);
 
         //Try to delete again, the groups should no longer exist
-        CPPUNIT_ASSERT_THROW_MG(pService->DeleteGroups(&groupCollection), MgGroupNotFoundException*);
+        REQUIRE_THROWS_MG(pService->DeleteGroups(&groupCollection), MgGroupNotFoundException*);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -883,26 +863,32 @@
 ///
 /// This test case adds a new server
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_AddServer()
+#ifdef _WIN32
+//FIXME: On Windows, it appears ACE is actually validating the hostname/IP given
+//so we can't put in fake hostnames/IPs for the purpose of exercising this API
+TEST_CASE("AddServer", "[Broken]")
+#else
+TEST_CASE("AddServer", "[SiteService]")
+#endif
 {
     //TODO: does not throw exceptions described in MgServerSiteService.cpp
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestSiteService.TestCase_AddServer", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestSiteService.TestCase_AddServer", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerSiteService> pService = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_AddServer", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_AddServer", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         //Try using empty string arguments
-        CPPUNIT_ASSERT_THROW_MG(pService->AddServer(L"", L"", serverAddress1), MgInvalidArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->AddServer(serverName1, L"", L""), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->AddServer(L"", L"", serverAddress1), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->AddServer(serverName1, L"", L""), MgInvalidArgumentException*);
 
         // Disable ACE's ERROR message for the server name
         #ifdef _DEBUG
@@ -923,13 +909,13 @@
         #endif
 
         //Try adding the server again
-        CPPUNIT_ASSERT_THROW_MG(pService->AddServer(serverName1, L"This is a test server", serverAddress1), MgDuplicateServerException*);
+        REQUIRE_THROWS_MG(pService->AddServer(serverName1, L"This is a test server", serverAddress1), MgDuplicateServerException*);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -943,20 +929,20 @@
 ///
 /// This test case gets the list of servers
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_EnumerateServers()
+TEST_CASE("EnumerateServers", "[SiteService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestSiteService.TestCase_EnumerateServers", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestSiteService.TestCase_EnumerateServers", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerSiteService> pService = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_EnumerateServers", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_EnumerateServers", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgByteReader> byteReader;
@@ -964,13 +950,13 @@
         //Enumerate the servers
         byteReader = pService->EnumerateServers();
         STRING mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -984,21 +970,27 @@
 ///
 /// This test case updates the description of the server that was added
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_UpdateServer()
+#ifdef _WIN32
+//FIXME: On Windows, it appears ACE is actually validating the hostname/IP given
+//so we can't put in fake hostnames/IPs for the purpose of exercising this API
+TEST_CASE("UpdateServer", "[Broken]")
+#else
+TEST_CASE("UpdateServer", "[SiteService]")
+#endif
 {
     //TODO: does not throw exceptions described in MgServerSiteService.cpp
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestSiteService.TestCase_UpdateServer", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestSiteService.TestCase_UpdateServer", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerSiteService> pService = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_UpdateServer", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_UpdateServer", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         // Disable ACE's ERROR message for the server name
@@ -1009,14 +1001,14 @@
         #endif
 
         //Try using a blank string for the name of the server
-        CPPUNIT_ASSERT_THROW_MG(pService->UpdateServer(L"", L"", L"", L""), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->UpdateServer(L"", L"", L"", L""), MgInvalidArgumentException*);
 
         //Try to update a server that doesn't exist
-        CPPUNIT_ASSERT_THROW_MG(pService->UpdateServer(L"DoesNotExist", L"", L"This server doesn't exist", L""), MgServerNotFoundException*);
+        REQUIRE_THROWS_MG(pService->UpdateServer(L"DoesNotExist", L"", L"This server doesn't exist", L""), MgServerNotFoundException*);
 
         //Try to update a server giving it aname that already exists
-        CPPUNIT_ASSERT_THROW_MG(pService->UpdateServer(serverName1, serverName2, L"The new name for the server already exists", L""), MgDuplicateServerException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->UpdateServer(serverName1, L"", L"The new name for the server already exists", serverAddress2), MgDuplicateServerException*);
+        REQUIRE_THROWS_MG(pService->UpdateServer(serverName1, serverName2, L"The new name for the server already exists", L""), MgDuplicateServerException*);
+        REQUIRE_THROWS_MG(pService->UpdateServer(serverName1, L"", L"The new name for the server already exists", serverAddress2), MgDuplicateServerException*);
 
         //Update the server description
         pService->UpdateServer(serverName1, L"", L"This is the updated description", L"");
@@ -1032,7 +1024,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1046,21 +1038,27 @@
 ///
 /// This test case removes the server that was added before
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_RemoveServer()
+#ifdef _WIN32
+//FIXME: On Windows, it appears ACE is actually validating the hostname/IP given
+//so we can't put in fake hostnames/IPs for the purpose of exercising this API
+TEST_CASE("RemoveServer", "[Broken]")
+#else
+TEST_CASE("RemoveServer", "[SiteService]")
+#endif
 {
     //TODO: does not throw exceptions described in MgServerSiteService.cpp
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestSiteService.TestCase_RemoveServer", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestSiteService.TestCase_RemoveServer", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerSiteService> pService = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_RemoveServer", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_RemoveServer", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         //Delete the servers that were added earlier
@@ -1068,13 +1066,13 @@
         pService->RemoveServer(serverName2);
 
         //Try to delete a server that doesn't exist
-        CPPUNIT_ASSERT_THROW_MG(pService->RemoveServer(L"DoesNotExist"), MgServerNotFoundException*);
+        REQUIRE_THROWS_MG(pService->RemoveServer(L"DoesNotExist"), MgServerNotFoundException*);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1088,41 +1086,41 @@
 ///
 /// This test case
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_Authenticate()
+TEST_CASE("Authenticate", "[SiteService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestSiteService.TestCase_Authenticate", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestSiteService.TestCase_Authenticate", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerSiteService> pService = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_Authenticate", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_Authenticate", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgStringCollection> roleCollection;
         Ptr<MgUserInformation> userInfo;
 
-        //Try to use a NULL argument
-        CPPUNIT_ASSERT_THROW_MG(pService->Authenticate(NULL, NULL, false), MgAuthenticationFailedException*);
+        //Try to use a nullptr argument
+        REQUIRE_THROWS_MG(pService->Authenticate(nullptr, nullptr, false), MgAuthenticationFailedException*);
 
         //Try to authenticate an anonymous user when admin role is needed
         userInfo = new MgUserInformation(anonymousName, L"");
         roleCollection = new MgStringCollection();
         roleCollection->Add(MgRole::Administrator);
-        CPPUNIT_ASSERT_THROW_MG(pService->Authenticate(userInfo, roleCollection, false), MgUnauthorizedAccessException*);
+        REQUIRE_THROWS_MG(pService->Authenticate(userInfo, roleCollection, false), MgUnauthorizedAccessException*);
 
         //Try to authenticate when an incorrect password is given
         userInfo = new MgUserInformation(adminName, L"");
-        CPPUNIT_ASSERT_THROW_MG(pService->Authenticate(userInfo, NULL, false), MgAuthenticationFailedException*);
+        REQUIRE_THROWS_MG(pService->Authenticate(userInfo, nullptr, false), MgAuthenticationFailedException*);
 
         //Authenticate an anonymous user that has appropriate access
         userInfo = new MgUserInformation(anonymousName, L"");
-        pService->Authenticate(userInfo, NULL, false);
+        pService->Authenticate(userInfo, nullptr, false);
 
         //Authenticate an anonymous user that has appropriate access
         userInfo = new MgUserInformation(anonymousName, L"");
@@ -1140,7 +1138,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1154,34 +1152,34 @@
 ///
 /// This test case creates a session
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_CreateSession()
+TEST_CASE("CreateSession", "[SiteService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestSiteService.TestCase_CreateSession", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestSiteService.TestCase_CreateSession", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerSiteService> pService = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_CreateSession", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_CreateSession", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgUserInformation> userInfo;
 
         //Sets the user information for the current thread to be anonymous
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(anonymousName, L"");
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
             session = pService->CreateSession();
-            CPPUNIT_ASSERT(!session.empty());
+            REQUIRE(!session.empty());
         }
     }
     catch(MgException* e)
@@ -1188,7 +1186,7 @@
     {
         STRING message = e->GetStackTrace(userLocale);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1202,28 +1200,28 @@
 ///
 /// This test case destroys a session
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_DestroySession()
+TEST_CASE("DestroySession", "[SiteService]")
 {
    try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestSiteService.TestCase_DestroySession", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestSiteService.TestCase_DestroySession", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerSiteService> pService = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_DestroySession", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_DestroySession", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgUserInformation> userInfo;
 
         //Sets the user information for the current thread to be administrator
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(adminName, adminPass);
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
@@ -1231,17 +1229,17 @@
             // Destroy the session that should have been created earlier in the create session test case
             pService->DestroySession(session);
 
-            CPPUNIT_ASSERT_THROW_MG(pService->DestroySession(session), MgRepositoryNotFoundException*);
+            REQUIRE_THROWS_MG(pService->DestroySession(session), MgRepositoryNotFoundException*);
         }
 
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
         userInfo = new MgUserInformation(L"", L"");
-        if (userInfo != NULL)
+        if (userInfo != nullptr)
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
-            CPPUNIT_ASSERT_THROW_MG(pService->DestroySession(session), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->DestroySession(session), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -1248,7 +1246,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1261,30 +1259,30 @@
 ///
 /// This test case get server session timeout.
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_GetSessionTimeout()
+TEST_CASE("GetSessionTimeout", "[SiteService]")
 {
     try
     {
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
+        if (serviceManager == nullptr)
         {
-            throw new MgNullReferenceException(L"TestSiteService.TestCase_GetSessionTimeout", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgNullReferenceException(L"TestSiteService.TestCase_GetSessionTimeout", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         Ptr<MgServerSiteService> pService = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
-        if (pService == 0)
+        if (pService == nullptr)
         {
-            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_GetSessionTimeout", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgServiceNotAvailableException(L"TestSiteService.TestCase_GetSessionTimeout", __LINE__, __WFILE__, nullptr, L"", nullptr);
         }
 
         INT32 timeoutValue = pService->GetSessionTimeout();
-        CPPUNIT_ASSERT(timeoutValue == 1200);
+        REQUIRE(timeoutValue == 1200);
     }
     catch(MgException* e)
     {
         STRING message = e->GetStackTrace(userLocale);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {

Deleted: trunk/MgDev/Server/src/UnitTesting/TestSiteService.h
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestSiteService.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestSiteService.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,107 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _TESTSITESERVICE_H
-#define _TESTSITESERVICE_H
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestSiteService : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestSiteService);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_EnumerateUsers);
-    CPPUNIT_TEST(TestCase_AddUser);
-    CPPUNIT_TEST(TestCase_UpdateUser);
-
-    CPPUNIT_TEST(TestCase_AddGroup);
-
-    CPPUNIT_TEST(TestCase_GrantGroupMembershipsToUsers);
-    CPPUNIT_TEST(TestCase_GrantRoleMembershipsToUsers);
-    CPPUNIT_TEST(TestCase_GrantRoleMembershipsToGroups);
-
-    CPPUNIT_TEST(TestCase_UpdateGroup);
-    CPPUNIT_TEST(TestCase_EnumerateGroups);
-    CPPUNIT_TEST(TestCase_EnumerateRoles);
-
-    CPPUNIT_TEST(TestCase_RevokeGroupMembershipsFromUsers);
-    CPPUNIT_TEST(TestCase_RevokeRoleMembershipsFromUsers);
-    CPPUNIT_TEST(TestCase_RevokeRoleMembershipsFromGroups);
-
-    CPPUNIT_TEST(TestCase_DeleteUsers);
-    CPPUNIT_TEST(TestCase_DeleteGroups);
-
-    CPPUNIT_TEST(TestCase_AddServer);
-    CPPUNIT_TEST(TestCase_EnumerateServers);
-    CPPUNIT_TEST(TestCase_UpdateServer);
-    //CPPUNIT_TEST(TestCase_RequestServer);
-
-    CPPUNIT_TEST(TestCase_RemoveServer);
-
-    CPPUNIT_TEST(TestCase_Authenticate);
-    CPPUNIT_TEST(TestCase_CreateSession);
-    CPPUNIT_TEST(TestCase_DestroySession);
-    CPPUNIT_TEST(TestCase_GetSessionTimeout);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    void TestCase_AddUser();
-    void TestCase_EnumerateUsers();
-    void TestCase_UpdateUser();
-
-    void TestCase_AddGroup();
-
-    void TestCase_GrantGroupMembershipsToUsers();
-    void TestCase_GrantRoleMembershipsToUsers();
-    void TestCase_GrantRoleMembershipsToGroups();
-
-    void TestCase_UpdateGroup();
-    void TestCase_EnumerateGroups();
-    void TestCase_EnumerateRoles();
-
-    void TestCase_RevokeGroupMembershipsFromUsers();
-    void TestCase_RevokeRoleMembershipsFromUsers();
-    void TestCase_RevokeRoleMembershipsFromGroups();
-
-    void TestCase_DeleteUsers();
-    void TestCase_DeleteGroups();
-
-    void TestCase_AddServer();
-    void TestCase_EnumerateServers();
-    void TestCase_UpdateServer();
-
-    //TODO: add these tests once these functions are implemented
-    //void TestCase_RequestServer();
-
-    void TestCase_RemoveServicesFromServer();
-    void TestCase_RemoveServer();
-
-    void TestCase_Authenticate();
-    void TestCase_CreateSession();
-    void TestCase_DestroySession();
-    void TestCase_GetSessionTimeout();
-};
-
-#endif // _TESTSITESERVICE_H

Modified: trunk/MgDev/Server/src/UnitTesting/TestTileService.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestTileService.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestTileService.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -17,13 +17,15 @@
 
 #include "SAX2Parser.h"
 #include "MapGuideCommon.h"
-#include "TestTileService.h"
-#include "../UnitTesting/CppUnitExtensions.h"
 #include "ServiceManager.h"
 #include "ServerSiteService.h"
-#include "../Common/Manager/FdoConnectionManager.h"
 #include "FoundationDefs.h"
 #include "ServerRenderingService.h"
+
+#include "CatchHelperMacros.h"
+#include "TestServiceFactory.h"
+#include "catch.hpp"
+
 #define PATH_LEN 512
 
 // determines the number of requests to make, as a factor of the number of tiles
@@ -38,255 +40,322 @@
 
 static const INT32 MG_TEST_THREADS = 4;
 
-const STRING TEST_LOCALE = L"en";
-
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestTileService, "TestTileService");
-
-
-TestTileService::TestTileService()
+////////////////////////////////////////////////////////////////
+/// Helpers
+////////////////////////////////////////////////////////////////
+static MgMap* CreateMap(MgSiteConnection* m_siteConnection, CREFSTRING mapName = L"")
 {
-    // store references to the various services we use
-    MgServiceManager* serviceMan = MgServiceManager::GetInstance();
-    assert(NULL != serviceMan);
+    // set a default name if not supplied
+    STRING name = (mapName.empty()) ? L"UnitTestBaseMap" : mapName;
 
-    m_svcResource = dynamic_cast<MgResourceService*>(serviceMan->RequestService(MgServiceType::ResourceService));
-    assert(m_svcResource != NULL);
+    // make a runtime map
+    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
+    MgMap* map = new MgMap(m_siteConnection);
+    map->Create(mdfres, name);
 
-    m_svcTile = dynamic_cast<MgTileService*>(serviceMan->RequestService(MgServiceType::TileService));
-    assert(m_svcTile != NULL);
+    // set the view
+    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.723636, 43.715015);
+    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
+    map->SetViewCenter(ptNewCenter);
+    map->SetDisplayDpi(96);
+    map->SetDisplayWidth(1024);
+    map->SetDisplayHeight(1024);
 
-    // Initialize a site connection.
-    Ptr<MgServerSiteService> svcSite = dynamic_cast<MgServerSiteService*>(
-        serviceMan->RequestService(MgServiceType::SiteService));
-    assert(svcSite != NULL);
+    // render at a scale of 1:12500
+    map->SetViewScale(12500.0);
 
-    Ptr<MgUserInformation> userInfo = new MgUserInformation(
-        L"Administrator", L"admin");
-    userInfo->SetLocale(TEST_LOCALE);
+    return map;
+}
 
-    // Set the current MgUserInformation
-    // This must be done before calling CreateSession()
-    MgUserInformation::SetCurrentUserInfo(userInfo);
+static MgMap* CreateMapLinked(MgSiteConnection* m_siteConnection, CREFSTRING mapName = L"")
+{
+    // set a default name if not supplied
+    STRING name = (mapName.empty()) ? L"UnitTestBaseMapLinked" : mapName;
 
-    STRING session = svcSite->CreateSession();
-    assert(!session.empty());
-    userInfo->SetMgSessionId(session);
+    // make a runtime map
+    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinkedTileSet.MapDefinition");
+    MgMap* map = new MgMap(m_siteConnection);
+    map->Create(mdfres, name);
 
-    // Set the current MgUserInformation
-    MgUserInformation::SetCurrentUserInfo(userInfo);
+    // set the view
+    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.723636, 43.715015);
+    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
+    map->SetViewCenter(ptNewCenter);
+    map->SetDisplayDpi(96);
+    map->SetDisplayWidth(1024);
+    map->SetDisplayHeight(1024);
 
-    m_siteConnection = new MgSiteConnection();
-    m_siteConnection->Open(userInfo);
-}
+    // render at a scale of 1:12500
+    map->SetViewScale(12500.0);
 
-
-TestTileService::~TestTileService()
-{
+    return map;
 }
 
-
-void TestTileService::setUp()
+static MgMap* CreateMapLinked2(MgSiteConnection* m_siteConnection, CREFSTRING mapName = L"", CREFSTRING ovCsWkt = L"")
 {
-}
+    // set a default name if not supplied
+    STRING name = (mapName.empty()) ? L"UnitTestBaseMapLinked" : mapName;
 
+    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinkedTileSet.MapDefinition");
+    // Parse the Map Definition and modify it so it matches its linked tile set
+    Ptr<MgResourceService> resSvc = dynamic_cast<MgResourceService*>(m_siteConnection->CreateService(MgServiceType::ResourceService));
 
-void TestTileService::tearDown()
-{
-}
+    MdfModel::MapDefinition* mdf = MgMapBase::GetMapDefinition(resSvc, mdfres);
+    MdfModel::TileSetSource* tsRef = mdf->GetTileSetSource();
 
+    Ptr<MgResourceIdentifier> tileSetId = new MgResourceIdentifier(tsRef->GetResourceId());
+    Ptr<MgByteReader> reader = resSvc->GetResourceContent(tileSetId);
+    Ptr<MgByteSink> sink = new MgByteSink(reader);
+    Ptr<MgByte> bytes = sink->ToBuffer();
 
-void TestTileService::TestStart()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Tile Service tests.\n")));
+    MdfParser::SAX2Parser parser;
+    parser.ParseString((const char*)bytes->Bytes(), bytes->GetLength());
 
-    try
+    REQUIRE(parser.GetSucceeded());
+    MdfModel::TileSetDefinition* tsd = parser.DetachTileSetDefinition();
+    // Update coordinate systems to match
+    STRING csWkt;
+    MdfModel::NameStringPairCollection* params = tsd->GetTileStoreParameters()->GetParameters();
+    for (INT32 i = 0; i < params->GetCount(); i++)
     {
-        #ifdef _DEBUG
-        MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
-        if(pFdoConnectionManager)
+        MdfModel::NameStringPair* pair = params->GetAt(i);
+        if (pair->GetName() == L"CoordinateSystem")
         {
-            pFdoConnectionManager->ShowCache();
+            csWkt = pair->GetValue();
+            mdf->SetCoordinateSystem(csWkt);
+            break;
         }
-        #endif
+    }
 
-        // set user info
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
-        MgUserInformation::SetCurrentUserInfo(userInfo);
+    if (!ovCsWkt.empty())
+    {
+        mdf->SetCoordinateSystem(ovCsWkt);
+    }
 
-        // ------------------------------------------------------
-        // base map source data
-        // ------------------------------------------------------
+    // Fix up extents too
+    mdf->SetExtents(tsd->GetExtents());
 
-        // publish the map definition
-        Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
-        Ptr<MgByteSource> mdfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_BaseMap.mdf", false);
-        Ptr<MgByteReader> mdfrdr1 = mdfsrc1->GetReader();
-        m_svcResource->SetResource(mapres1, mdfrdr1, NULL);
+    // Save back out to XML
+    MdfModel::Version ver(3, 0, 0);
+    std::string mbXml = parser.SerializeToXML(mdf, &ver);
+    Ptr<MgByteSource> source = new MgByteSource((BYTE_ARRAY_IN)mbXml.c_str(), (INT32)mbXml.length());
+    Ptr<MgByteReader> content = source->GetReader();
+    mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinkedTileSet2.MapDefinition");
+    resSvc->SetResource(mdfres, content, nullptr);
 
-        Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinkedTileSet.MapDefinition");
-        Ptr<MgByteSource> mdfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_LinkedTileSet.mdf", false);
-        Ptr<MgByteReader> mdfrdr2 = mdfsrc2->GetReader();
-        m_svcResource->SetResource(mapres2, mdfrdr2, NULL);
+    // make a runtime map from our changed map definition
+    MgMap* map = new MgMap(m_siteConnection);
+    map->Create(mdfres, name);
 
-        Ptr<MgResourceIdentifier> tilesetres1 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/Sheboygan.TileSetDefinition");
-        Ptr<MgByteSource> tsdsrc1 = new MgByteSource(L"../UnitTestFiles/UT_BaseMap.tsd", false);
-        Ptr<MgByteReader> tsdrdr1 = tsdsrc1->GetReader();
-        m_svcResource->SetResource(tilesetres1, tsdrdr1, NULL);
+    // set the view
+    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.723636, 43.715015);
+    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
+    map->SetViewCenter(ptNewCenter);
+    map->SetDisplayDpi(96);
+    map->SetDisplayWidth(1024);
+    map->SetDisplayHeight(1024);
 
-        Ptr<MgResourceIdentifier> tilesetres2 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/XYZ.TileSetDefinition");
-        Ptr<MgByteSource> tsdsrc2 = new MgByteSource(L"../UnitTestFiles/UT_XYZ.tsd", false);
-        Ptr<MgByteReader> tsdrdr2 = tsdsrc2->GetReader();
-        m_svcResource->SetResource(tilesetres2, tsdrdr2, NULL);
+    // render at a scale of 1:12500
+    map->SetViewScale(12500.0);
 
-        Ptr<MgResourceIdentifier> tilesetres3 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/Sheboygan_Metatiled.TileSetDefinition");
-        Ptr<MgByteSource> tsdsrc3 = new MgByteSource(L"../UnitTestFiles/UT_BaseMap_Metatiled.tsd", false);
-        Ptr<MgByteReader> tsdrdr3 = tsdsrc3->GetReader();
-        m_svcResource->SetResource(tilesetres3, tsdrdr3, NULL);
+    return map;
+}
 
-        Ptr<MgResourceIdentifier> tilesetres4 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/XYZ_Metatiled.TileSetDefinition");
-        Ptr<MgByteSource> tsdsrc4 = new MgByteSource(L"../UnitTestFiles/UT_XYZ_Metatiled.tsd", false);
-        Ptr<MgByteReader> tsdrdr4 = tsdsrc4->GetReader();
-        m_svcResource->SetResource(tilesetres4, tsdrdr4, NULL);
+// returns a random integer in the range 0 to n-1
+static INT32 Rand(INT32 n)
+{
+    double numer = (double)rand() + 0.5;
+    double denom = (double)RAND_MAX + 1.0;
+    return (INT32)(numer / denom * n);
+}
 
-        Ptr<MgResourceIdentifier> tilesetres5 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/Sheboygan_OrigSize.TileSetDefinition");
-        Ptr<MgByteSource> tsdsrc5 = new MgByteSource(L"../UnitTestFiles/UT_BaseMap_OrigSize.tsd", false);
-        Ptr<MgByteReader> tsdrdr5 = tsdsrc5->GetReader();
-        m_svcResource->SetResource(tilesetres5, tsdrdr5, NULL);
+// data structure which is passed to each thread
+struct TileThreadData
+{
+    INT32 threadId;
+    bool done;
+    bool saveTile;
+    Ptr<MgMap> map;
+    INT32 tileRow;
+    INT32 tileCol;
+    INT32 tileScale;
+    STRING tileSetId;
+};
 
-        // publish the layer definitions
-        Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RoadCenterLines.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc1 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.ldf", false);
-        Ptr<MgByteReader> ldfrdr1 = ldfsrc1->GetReader();
-        m_svcResource->SetResource(ldfres1, ldfrdr1, NULL);
+// the method which gets executed by the ACE worker thread
+static ACE_THR_FUNC_RETURN GetTileWorker(void* param)
+{
+    // get the data for this thread
+    TileThreadData* threadData = (TileThreadData*)param;
+    INT32 threadId = threadData->threadId;
+    INT32 tileRow  = threadData->tileRow;
+    INT32 tileCol  = threadData->tileCol;
+    bool saveTile  = threadData->saveTile;
+    Ptr<MgMap> map = threadData->map;
+    #ifdef _DEBUG
+    printf("> thread %d started, tile %d,%d\n", threadId, tileRow, tileCol);
+    #endif
 
-        Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.ldf", false);
-        Ptr<MgByteReader> ldfrdr2 = ldfsrc2->GetReader();
-        m_svcResource->SetResource(ldfres2, ldfrdr2, NULL);
+    try
+    {
+        // set user info
+        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
+        userInfo->SetLocale(TestServiceFactory::TEST_LOCALE);
+        MgUserInformation::SetCurrentUserInfo(userInfo);
 
-        Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/VotingDistricts.LayerDefinition");
-        Ptr<MgByteSource> ldfsrc3 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.ldf", false);
-        Ptr<MgByteReader> ldfrdr3 = ldfsrc3->GetReader();
-        m_svcResource->SetResource(ldfres3, ldfrdr3, NULL);
+        // get the tile service instance
+        MgServiceManager* serviceManager = MgServiceManager::GetInstance();
+        Ptr<MgTileService> svcTile = dynamic_cast<MgTileService*>(
+            serviceManager->RequestService(MgServiceType::TileService));
+        assert(svcTile != nullptr);
 
-        // publish the feature sources
-        Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/RoadCenterLines.FeatureSource");
-        Ptr<MgByteSource> fssrc1 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.fs", false);
-        Ptr<MgByteReader> fsrdr1 = fssrc1->GetReader();
-        m_svcResource->SetResource(fsres1, fsrdr1, NULL);
+        // get the tile
+        Ptr<MgByteReader> img = svcTile->GetTile(map, L"BaseLayers", tileCol, tileRow);
 
-        Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
-        Ptr<MgByteSource> fssrc2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.fs", false);
-        Ptr<MgByteReader> fsrdr2 = fssrc2->GetReader();
-        m_svcResource->SetResource(fsres2, fsrdr2, NULL);
+        // save the image to a file if necessary
+        if (saveTile)
+        {
+            wchar_t imgName[PATH_LEN] = { 0 };
+            swprintf(imgName, PATH_LEN, L"./temp_tiles/tile%d_%d.png", tileRow, tileCol);
+            (MgByteSink(img)).ToFile(imgName);
+        }
 
-        Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/VotingDistricts.FeatureSource");
-        Ptr<MgByteSource> fssrc3 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.fs", false);
-        Ptr<MgByteReader> fsrdr3 = fssrc3->GetReader();
-        m_svcResource->SetResource(fsres3, fsrdr3, NULL);
-
-        // publish the resource data
-        Ptr<MgByteSource> dataSource1 = new MgByteSource(L"../UnitTestFiles/UT_RoadCenterLines.sdf", false);
-        Ptr<MgByteReader> dataReader1 = dataSource1->GetReader();
-        m_svcResource->SetResourceData(fsres1, L"UT_RoadCenterLines.sdf", L"File", dataReader1);
-
-        Ptr<MgByteSource> dataSource2 = new MgByteSource(L"../UnitTestFiles/UT_Parcels.sdf", false);
-        Ptr<MgByteReader> dataReader2 = dataSource2->GetReader();
-        m_svcResource->SetResourceData(fsres2, L"UT_Parcels.sdf", L"File", dataReader2);
-
-        Ptr<MgByteSource> dataSource3 = new MgByteSource(L"../UnitTestFiles/UT_VotingDistricts.sdf", false);
-        Ptr<MgByteReader> dataReader3 = dataSource3->GetReader();
-        m_svcResource->SetResourceData(fsres3, L"UT_VotingDistricts.sdf", L"File", dataReader3);
-
-        // set up temporary directory for tile images
-        MgFileUtil::CreateDirectory(L"./temp_tiles", false);
-        MgFileUtil::CreateDirectory(L"../UnitTestFiles/TileCaches", false);
+        // clear the user info to prevent leaks
+        MgUserInformation::SetCurrentUserInfo(nullptr);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
         throw;
     }
+
+    #ifdef _DEBUG
+//  printf("> thread %d done\n", threadId);
+    #endif
+
+    threadData->done = true;
+    return 0;
 }
 
+// the method which gets executed by the ACE worker thread
+static ACE_THR_FUNC_RETURN GetTileLinkedWorker(void* param)
+{
+    // get the data for this thread
+    TileThreadData* threadData = (TileThreadData*)param;
+    INT32 threadId = threadData->threadId;
+    INT32 tileRow = threadData->tileRow;
+    INT32 tileCol = threadData->tileCol;
+    INT32 tileScale = threadData->tileScale;
+    bool saveTile = threadData->saveTile;
+    Ptr<MgResourceIdentifier> tsId = new MgResourceIdentifier(threadData->tileSetId);
+#ifdef _DEBUG
+    printf("> thread %d started, tile %d,%d\n", threadId, tileRow, tileCol);
+#endif
 
-void TestTileService::TestEnd()
-{
     try
     {
         // set user info
         Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
+        userInfo->SetLocale(TestServiceFactory::TEST_LOCALE);
         MgUserInformation::SetCurrentUserInfo(userInfo);
 
-        // ------------------------------------------------------
-        // base map source data
-        // ------------------------------------------------------
+        // get the tile service instance
+        MgServiceManager* serviceManager = MgServiceManager::GetInstance();
+        Ptr<MgTileService> svcTile = dynamic_cast<MgTileService*>(
+            serviceManager->RequestService(MgServiceType::TileService));
+        assert(svcTile != nullptr);
 
-        // delete the map definition
-        Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
-        m_svcResource->DeleteResource(mapres1);
+        // get the tile
+        Ptr<MgByteReader> img = svcTile->GetTile(tsId, L"BaseLayers", tileCol, tileRow, tileScale);
+        CHECKNULL((MgByteReader*)img, L"GetTileLinkedWorker");
 
-        Ptr<MgResourceIdentifier> mapres2 = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinkedTileSet.MapDefinition");
-        m_svcResource->DeleteResource(mapres2);
+        // save the image to a file if necessary
+        if (saveTile)
+        {
+            wchar_t imgName[PATH_LEN] = { 0 };
+            swprintf(imgName, PATH_LEN, L"./temp_tiles/tile%d_%d.png", tileRow, tileCol);
+            (MgByteSink(img)).ToFile(imgName);
+        }
 
-        Ptr<MgResourceIdentifier> tilesetres1 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/Sheboygan.TileSetDefinition");
-        m_svcResource->DeleteResource(tilesetres1);
+        // clear the user info to prevent leaks
+        MgUserInformation::SetCurrentUserInfo(nullptr);
+    }
+    catch (MgException* e)
+    {
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
+        SAFE_RELEASE(e);
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+    }
+    catch (...)
+    {
+        throw;
+    }
 
-        Ptr<MgResourceIdentifier> tilesetres2 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/XYZ.TileSetDefinition");
-        m_svcResource->DeleteResource(tilesetres2);
+#ifdef _DEBUG
+    //  printf("> thread %d done\n", threadId);
+#endif
 
-        Ptr<MgResourceIdentifier> tilesetres3 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/Sheboygan_Metatiled.TileSetDefinition");
-        m_svcResource->DeleteResource(tilesetres3);
+    threadData->done = true;
+    return 0;
+}
 
-        Ptr<MgResourceIdentifier> tilesetres4 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/XYZ_Metatiled.TileSetDefinition");
-        m_svcResource->DeleteResource(tilesetres4);
+// the method which gets executed by the ACE worker thread
+static ACE_THR_FUNC_RETURN SetTileWorker(void* param)
+{
+    // get the data for this thread
+    TileThreadData* threadData = (TileThreadData*)param;
+    INT32 threadId = threadData->threadId;
+    INT32 tileRow = threadData->tileRow;
+    INT32 tileCol = threadData->tileCol;
+    Ptr<MgMap> map = threadData->map;
+#ifdef _DEBUG
+    printf("> thread %d started, tile %d,%d\n", threadId, tileRow, tileCol);
+#endif
 
-        Ptr<MgResourceIdentifier> tilesetres5 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/Sheboygan_OrigSize.TileSetDefinition");
-        m_svcResource->DeleteResource(tilesetres5);
+    try
+    {
+        // set user info
+        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
+        userInfo->SetLocale(TestServiceFactory::TEST_LOCALE);
+        MgUserInformation::SetCurrentUserInfo(userInfo);
 
-        // delete the layer definitions
-        Ptr<MgResourceIdentifier> ldfres1 = new MgResourceIdentifier(L"Library://UnitTests/Layers/RoadCenterLines.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres1);
+        // get the tile service instance
+        MgServiceManager* serviceManager = MgServiceManager::GetInstance();
+        Ptr<MgTileService> svcTile = dynamic_cast<MgTileService*>(
+            serviceManager->RequestService(MgServiceType::TileService));
+        assert(svcTile != nullptr);
 
-        Ptr<MgResourceIdentifier> ldfres2 = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres2);
+        // find the finite display scale closest to the requested map scale
+        double scale = map->GetViewScale();
+        INT32 scaleIndex = map->FindNearestFiniteDisplayScaleIndex(scale);
 
-        Ptr<MgResourceIdentifier> ldfres3 = new MgResourceIdentifier(L"Library://UnitTests/Layers/VotingDistricts.LayerDefinition");
-        m_svcResource->DeleteResource(ldfres3);
+        // read the image which we saved earlier
+        wchar_t imgName[PATH_LEN] = { 0 };
+        swprintf(imgName, PATH_LEN, L"./temp_tiles/tile%d_%d.png", tileRow, tileCol);
+        Ptr<MgByteSource> bs = new MgByteSource(imgName);
+        Ptr<MgByteReader> img = bs->GetReader();
 
-        // delete the feature sources
-        Ptr<MgResourceIdentifier> fsres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/RoadCenterLines.FeatureSource");
-        m_svcResource->DeleteResource(fsres1);
+        // set the tile in the cache
+        svcTile->SetTile(img, map, scaleIndex, L"BaseLayers", tileCol, tileRow);
 
-        Ptr<MgResourceIdentifier> fsres2 = new MgResourceIdentifier(L"Library://UnitTests/Data/Parcels.FeatureSource");
-        m_svcResource->DeleteResource(fsres2);
-
-        Ptr<MgResourceIdentifier> fsres3 = new MgResourceIdentifier(L"Library://UnitTests/Data/VotingDistricts.FeatureSource");
-        m_svcResource->DeleteResource(fsres3);
-
-        // remove temporary directory for tile images
-        MgFileUtil::DeleteDirectory(L"./temp_tiles", true, false);
-
-        #ifdef _DEBUG
-        MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
-        if(pFdoConnectionManager)
-        {
-            pFdoConnectionManager->ShowCache();
-        }
-        #endif
+        // clear the user info to prevent leaks
+        MgUserInformation::SetCurrentUserInfo(nullptr);
     }
+    catch (MgFileIoException* e)
+    {
+        // we sometimes get this due to a sharing error
+        SAFE_RELEASE(e);
+    }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -293,48 +362,34 @@
         throw;
     }
 
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nTile Service tests completed.\n\n")));
+#ifdef _DEBUG
+    //  printf("> thread %d done\n", threadId);
+#endif
+
+    threadData->done = true;
+    return 0;
 }
 
-
-// data structure which is passed to each thread
-struct TileThreadData
-{
-    INT32 threadId;
-    bool done;
-    bool saveTile;
-    Ptr<MgMap> map;
-    INT32 tileRow;
-    INT32 tileCol;
-    INT32 tileScale;
-    STRING tileSetId;
-};
-
-
-////////////////////////////////////////////////////////////////
-/// GetTile methods
-////////////////////////////////////////////////////////////////
-
-
 // the method which gets executed by the ACE worker thread
-ACE_THR_FUNC_RETURN GetTileWorker(void* param)
+static ACE_THR_FUNC_RETURN GetTileXYZWorker(void* param)
 {
     // get the data for this thread
     TileThreadData* threadData = (TileThreadData*)param;
     INT32 threadId = threadData->threadId;
-    INT32 tileRow  = threadData->tileRow;
-    INT32 tileCol  = threadData->tileCol;
-    bool saveTile  = threadData->saveTile;
-    Ptr<MgMap> map = threadData->map;
-    #ifdef _DEBUG
+    INT32 tileRow = threadData->tileRow;
+    INT32 tileCol = threadData->tileCol;
+    INT32 tileScale = threadData->tileScale;
+    bool saveTile = threadData->saveTile;
+    Ptr<MgResourceIdentifier> tsId = new MgResourceIdentifier(threadData->tileSetId);
+#ifdef _DEBUG
     printf("> thread %d started, tile %d,%d\n", threadId, tileRow, tileCol);
-    #endif
+#endif
 
     try
     {
         // set user info
         Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
+        userInfo->SetLocale(TestServiceFactory::TEST_LOCALE);
         MgUserInformation::SetCurrentUserInfo(userInfo);
 
         // get the tile service instance
@@ -341,10 +396,11 @@
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
         Ptr<MgTileService> svcTile = dynamic_cast<MgTileService*>(
             serviceManager->RequestService(MgServiceType::TileService));
-        assert(svcTile != NULL);
+        assert(svcTile != nullptr);
 
         // get the tile
-        Ptr<MgByteReader> img = svcTile->GetTile(map, L"BaseLayers", tileCol, tileRow);
+        Ptr<MgByteReader> img = svcTile->GetTile(tsId, L"BaseLayers", tileCol, tileRow, tileScale);
+        CHECKNULL((MgByteReader*)img, L"GetTileXYZWorker");
 
         // save the image to a file if necessary
         if (saveTile)
@@ -355,13 +411,13 @@
         }
 
         // clear the user info to prevent leaks
-        MgUserInformation::SetCurrentUserInfo(NULL);
+        MgUserInformation::SetCurrentUserInfo(nullptr);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -368,17 +424,22 @@
         throw;
     }
 
-    #ifdef _DEBUG
-//  printf("> thread %d done\n", threadId);
-    #endif
+#ifdef _DEBUG
+    //  printf("> thread %d done\n", threadId);
+#endif
 
     threadData->done = true;
     return 0;
 }
 
+////////////////////////////////////////////////////////////////
+/// GetTile methods
+////////////////////////////////////////////////////////////////
+TEST_CASE("GetTile", "[TileService]")
+{
+    Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+    Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
 
-void TestTileService::TestCase_GetTile()
-{
     // specify the number of threads to use
     const INT32 numThreads = MG_TEST_THREADS;
     TileThreadData threadData[numThreads];
@@ -395,7 +456,7 @@
         ACE_Thread_Manager* manager = ACE_Thread_Manager::instance();
 
         // make the runtime map
-        Ptr<MgMap> map = CreateMap();
+        Ptr<MgMap> map = CreateMap(m_siteConnection);
 
         // set up the tile indices
         INT32 numTileRows = tileRowMax - tileRowMin + 1;
@@ -464,7 +525,7 @@
                         threadData[i].tileCol  = tileCols[nTile];
 
                         // spawn a new thread using a specific group id
-                        int thid = manager->spawn(ACE_THR_FUNC(GetTileWorker), &threadData[i], 0, NULL, NULL, 0, THREAD_GROUP);
+                        int thid = manager->spawn(ACE_THR_FUNC(GetTileWorker), &threadData[i], 0, nullptr, nullptr, 0, THREAD_GROUP);
                         nRequest++;
                     }
 
@@ -498,9 +559,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -508,70 +569,11 @@
     }
 }
 
-// the method which gets executed by the ACE worker thread
-ACE_THR_FUNC_RETURN GetTileLinkedWorker(void* param)
+TEST_CASE("GetTileLinked", "[TileService]")
 {
-    // get the data for this thread
-    TileThreadData* threadData = (TileThreadData*)param;
-    INT32 threadId = threadData->threadId;
-    INT32 tileRow  = threadData->tileRow;
-    INT32 tileCol  = threadData->tileCol;
-    INT32 tileScale = threadData->tileScale;
-    bool saveTile  = threadData->saveTile;
-    Ptr<MgResourceIdentifier> tsId = new MgResourceIdentifier(threadData->tileSetId);
-    #ifdef _DEBUG
-    printf("> thread %d started, tile %d,%d\n", threadId, tileRow, tileCol);
-    #endif
+    Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+    Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
 
-    try
-    {
-        // set user info
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
-        MgUserInformation::SetCurrentUserInfo(userInfo);
-
-        // get the tile service instance
-        MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        Ptr<MgTileService> svcTile = dynamic_cast<MgTileService*>(
-            serviceManager->RequestService(MgServiceType::TileService));
-        assert(svcTile != NULL);
-
-        // get the tile
-        Ptr<MgByteReader> img = svcTile->GetTile(tsId, L"BaseLayers", tileCol, tileRow, tileScale);
-        CHECKNULL((MgByteReader*)img, L"GetTileLinkedWorker");
-
-        // save the image to a file if necessary
-        if (saveTile)
-        {
-            wchar_t imgName[PATH_LEN] = { 0 };
-            swprintf(imgName, PATH_LEN, L"./temp_tiles/tile%d_%d.png", tileRow, tileCol);
-            (MgByteSink(img)).ToFile(imgName);
-        }
-
-        // clear the user info to prevent leaks
-        MgUserInformation::SetCurrentUserInfo(NULL);
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-
-    #ifdef _DEBUG
-//  printf("> thread %d done\n", threadId);
-    #endif
-
-    threadData->done = true;
-    return 0;
-}
-
-void TestTileService::TestCase_GetTileLinked()
-{
     // specify the number of threads to use
     const INT32 numThreads = MG_TEST_THREADS;
     TileThreadData threadData[numThreads];
@@ -588,7 +590,7 @@
         ACE_Thread_Manager* manager = ACE_Thread_Manager::instance();
 
         // make the runtime map
-        Ptr<MgMap> map = CreateMapLinked();
+        Ptr<MgMap> map = CreateMapLinked(m_siteConnection);
         Ptr<MgResourceIdentifier> tsId;
         Ptr<MgLayerGroupCollection> groups = map->GetLayerGroups();
         Ptr<MgLayerGroup> group = groups->GetItem(L"BaseLayers");
@@ -656,7 +658,7 @@
                         threadData[i].tileCol  = tileCols[nTile];
 
                         // spawn a new thread using a specific group id
-                        int thid = manager->spawn(ACE_THR_FUNC(GetTileLinkedWorker), &threadData[i], 0, NULL, NULL, 0, THREAD_GROUP);
+                        int thid = manager->spawn(ACE_THR_FUNC(GetTileLinkedWorker), &threadData[i], 0, nullptr, nullptr, 0, THREAD_GROUP);
                         nRequest++;
                     }
 
@@ -690,9 +692,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -703,77 +705,11 @@
 ////////////////////////////////////////////////////////////////
 /// SetTile methods
 ////////////////////////////////////////////////////////////////
-
-
-// the method which gets executed by the ACE worker thread
-ACE_THR_FUNC_RETURN SetTileWorker(void* param)
+TEST_CASE("SetTile", "[TileService]")
 {
-    // get the data for this thread
-    TileThreadData* threadData = (TileThreadData*)param;
-    INT32 threadId = threadData->threadId;
-    INT32 tileRow  = threadData->tileRow;
-    INT32 tileCol  = threadData->tileCol;
-    Ptr<MgMap> map = threadData->map;
-    #ifdef _DEBUG
-    printf("> thread %d started, tile %d,%d\n", threadId, tileRow, tileCol);
-    #endif
+    Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+    Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
 
-    try
-    {
-        // set user info
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
-        MgUserInformation::SetCurrentUserInfo(userInfo);
-
-        // get the tile service instance
-        MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        Ptr<MgTileService> svcTile = dynamic_cast<MgTileService*>(
-            serviceManager->RequestService(MgServiceType::TileService));
-        assert(svcTile != NULL);
-
-        // find the finite display scale closest to the requested map scale
-        double scale = map->GetViewScale();
-        INT32 scaleIndex = map->FindNearestFiniteDisplayScaleIndex(scale);
-
-        // read the image which we saved earlier
-        wchar_t imgName[PATH_LEN] = { 0 };
-        swprintf(imgName, PATH_LEN, L"./temp_tiles/tile%d_%d.png", tileRow, tileCol);
-        Ptr<MgByteSource> bs = new MgByteSource(imgName);
-        Ptr<MgByteReader> img = bs->GetReader();
-
-        // set the tile in the cache
-        svcTile->SetTile(img, map, scaleIndex, L"BaseLayers", tileCol, tileRow);
-
-        // clear the user info to prevent leaks
-        MgUserInformation::SetCurrentUserInfo(NULL);
-    }
-    catch (MgFileIoException* e)
-    {
-        // we sometimes get this due to a sharing error
-        SAFE_RELEASE(e);
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-
-    #ifdef _DEBUG
-//  printf("> thread %d done\n", threadId);
-    #endif
-
-    threadData->done = true;
-    return 0;
-}
-
-
-void TestTileService::TestCase_SetTile()
-{
     // specify the number of threads to use
     const INT32 numThreads = MG_TEST_THREADS;
     TileThreadData threadData[numThreads];
@@ -790,7 +726,7 @@
         ACE_Thread_Manager* manager = ACE_Thread_Manager::instance();
 
         // make the runtime map
-        Ptr<MgMap> map = CreateMap();
+        Ptr<MgMap> map = CreateMap(m_siteConnection);
 
         // set up the tile indices
         INT32 numTileRows = tileRowMax - tileRowMin + 1;
@@ -850,7 +786,7 @@
                         threadData[i].tileCol = tileCols[nRequest];
 
                         // spawn a new thread using a specific group id
-                        int thid = manager->spawn(ACE_THR_FUNC(SetTileWorker), &threadData[i], 0, NULL, NULL, 0, THREAD_GROUP);
+                        int thid = manager->spawn(ACE_THR_FUNC(SetTileWorker), &threadData[i], 0, nullptr, nullptr, 0, THREAD_GROUP);
                         nRequest++;
                     }
 
@@ -913,7 +849,7 @@
                         threadData[i].tileCol = tileCols[nTile];
 
                         // spawn a new thread using a specific group id
-                        int thid = manager->spawn(ACE_THR_FUNC(SetTileWorker), &threadData[i], 0, NULL, NULL, 0, THREAD_GROUP);
+                        int thid = manager->spawn(ACE_THR_FUNC(SetTileWorker), &threadData[i], 0, nullptr, nullptr, 0, THREAD_GROUP);
                         nRequest++;
                     }
 
@@ -947,9 +883,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -961,10 +897,11 @@
 ////////////////////////////////////////////////////////////////
 /// GetSetTile methods
 ////////////////////////////////////////////////////////////////
+TEST_CASE("GetSetTile", "[TileService]")
+{
+    Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+    Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
 
-
-void TestTileService::TestCase_GetSetTile()
-{
     // specify the number of threads to use
     const INT32 numThreads = MG_TEST_THREADS;
     TileThreadData threadData[numThreads];
@@ -981,7 +918,7 @@
         ACE_Thread_Manager* manager = ACE_Thread_Manager::instance();
 
         // make the runtime map
-        Ptr<MgMap> map = CreateMap();
+        Ptr<MgMap> map = CreateMap(m_siteConnection);
 
         // set up the tile indices
         INT32 numTileRows = tileRowMax - tileRowMin + 1;
@@ -1046,9 +983,9 @@
                         // spawn a new thread - 75% of the calls are gets, 25% are sets
                         int thid;
                         if ((double)rand() < 0.75 * (double)RAND_MAX)
-                            thid = manager->spawn(ACE_THR_FUNC(GetTileWorker), &threadData[i], 0, NULL, NULL, 0, THREAD_GROUP);
+                            thid = manager->spawn(ACE_THR_FUNC(GetTileWorker), &threadData[i], 0, nullptr, nullptr, 0, THREAD_GROUP);
                         else
-                            thid = manager->spawn(ACE_THR_FUNC(SetTileWorker), &threadData[i], 0, NULL, NULL, 0, THREAD_GROUP);
+                            thid = manager->spawn(ACE_THR_FUNC(SetTileWorker), &threadData[i], 0, nullptr, nullptr, 0, THREAD_GROUP);
                         nRequest++;
                     }
 
@@ -1082,9 +1019,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1095,21 +1032,23 @@
 ////////////////////////////////////////////////////////////////
 /// ClearCache methods
 ////////////////////////////////////////////////////////////////
-
-
-void TestTileService::TestCase_ClearCache()
+TEST_CASE("ClearCache", "[TileService]")
 {
     try
     {
-        // call the API with a NULL argument
-        CPPUNIT_ASSERT_THROW_MG(m_svcTile->ClearCache((MgMap*)NULL), MgNullArgumentException*);
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
+        Ptr<MgTileService> m_svcTile = TestServiceFactory::CreateTileService();
 
+        // call the API with a nullptr argument
+        REQUIRE_THROWS_MG(m_svcTile->ClearCache((MgMap*)nullptr), MgNullArgumentException*);
+
         // call the API with a map having a different name
-        Ptr<MgMap> map = CreateMap(L"blah");
+        Ptr<MgMap> map = CreateMap(m_siteConnection, L"blah");
         m_svcTile->ClearCache(map);
 
         // call the API with the run time map
-        map = CreateMap();
+        map = CreateMap(m_siteConnection);
         m_svcTile->ClearCache(map);
 
         // call the API again on the same map
@@ -1117,9 +1056,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1127,71 +1066,11 @@
     }
 }
 
-// the method which gets executed by the ACE worker thread
-ACE_THR_FUNC_RETURN GetTileXYZWorker(void* param)
+TEST_CASE("GetTileXYZ", "[TileService]")
 {
-    // get the data for this thread
-    TileThreadData* threadData = (TileThreadData*)param;
-    INT32 threadId = threadData->threadId;
-    INT32 tileRow  = threadData->tileRow;
-    INT32 tileCol  = threadData->tileCol;
-    INT32 tileScale = threadData->tileScale;
-    bool saveTile  = threadData->saveTile;
-    Ptr<MgResourceIdentifier> tsId = new MgResourceIdentifier(threadData->tileSetId);
-    #ifdef _DEBUG
-    printf("> thread %d started, tile %d,%d\n", threadId, tileRow, tileCol);
-    #endif
+    Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+    Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
 
-    try
-    {
-        // set user info
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
-        MgUserInformation::SetCurrentUserInfo(userInfo);
-
-        // get the tile service instance
-        MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        Ptr<MgTileService> svcTile = dynamic_cast<MgTileService*>(
-            serviceManager->RequestService(MgServiceType::TileService));
-        assert(svcTile != NULL);
-
-        // get the tile
-        Ptr<MgByteReader> img = svcTile->GetTile(tsId, L"BaseLayers", tileCol, tileRow, tileScale);
-        CHECKNULL((MgByteReader*)img, L"GetTileXYZWorker");
-
-        // save the image to a file if necessary
-        if (saveTile)
-        {
-            wchar_t imgName[PATH_LEN] = { 0 };
-            swprintf(imgName, PATH_LEN, L"./temp_tiles/tile%d_%d.png", tileRow, tileCol);
-            (MgByteSink(img)).ToFile(imgName);
-        }
-
-        // clear the user info to prevent leaks
-        MgUserInformation::SetCurrentUserInfo(NULL);
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-
-    #ifdef _DEBUG
-//  printf("> thread %d done\n", threadId);
-    #endif
-
-    threadData->done = true;
-    return 0;
-}
-
-
-void TestTileService::TestCase_GetTileXYZ()
-{
     // specify the number of threads to use
     const INT32 numThreads = MG_TEST_THREADS;
     TileThreadData threadData[numThreads];
@@ -1208,7 +1087,7 @@
         ACE_Thread_Manager* manager = ACE_Thread_Manager::instance();
 
         // make the runtime map
-        Ptr<MgMap> map = CreateMap();
+        Ptr<MgMap> map = CreateMap(m_siteConnection);
 
         // set up the tile indices
         INT32 numTileRows = tileRowMax - tileRowMin + 1;
@@ -1271,7 +1150,7 @@
                         threadData[i].tileCol  = tileCols[nTile];
 
                         // spawn a new thread using a specific group id
-                        int thid = manager->spawn(ACE_THR_FUNC(GetTileXYZWorker), &threadData[i], 0, NULL, NULL, 0, THREAD_GROUP);
+                        int thid = manager->spawn(ACE_THR_FUNC(GetTileXYZWorker), &threadData[i], 0, nullptr, nullptr, 0, THREAD_GROUP);
                         nRequest++;
                     }
 
@@ -1305,9 +1184,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1315,22 +1194,23 @@
     }
 }
 
-
-void TestTileService::TestCase_ClearCacheLinked()
+TEST_CASE("ClearCacheLinked", "[TileService]")
 {
     try
     {
-        // call the API with a NULL argument
-        CPPUNIT_ASSERT_THROW_MG(m_svcTile->ClearCache((MgResourceIdentifier*)NULL), MgNullArgumentException*);
+        Ptr<MgTileService> m_svcTile = TestServiceFactory::CreateTileService();
 
+        // call the API with a nullptr argument
+        REQUIRE_THROWS_MG(m_svcTile->ClearCache((MgResourceIdentifier*)nullptr), MgNullArgumentException*);
+
         Ptr<MgResourceIdentifier> tsId = new MgResourceIdentifier(L"Library://UnitTests/TileSets/Sheboygan.TileSetDefinition");
         m_svcTile->ClearCache(tsId);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1338,42 +1218,43 @@
     }
 }
 
-
-void TestTileService::TestCase_MgMap_Inline()
+TEST_CASE("MgMap_Inline", "[TileService]")
 {
     try
     {
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
+
         STRING mapName = L"TestCase_MgMap_Inline";
-        Ptr<MgMap> map = CreateMap(mapName);
+        Ptr<MgMap> map = CreateMap(m_siteConnection, mapName);
 
         Ptr<MgEnvelope> extents = map->GetMapExtent();
         Ptr<MgCoordinate> ll = extents->GetLowerLeftCoordinate();
         Ptr<MgCoordinate> ur = extents->GetUpperRightCoordinate();
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(-87.79786601383196, ll->GetX(), 0.00000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL( 43.686857862181,   ll->GetY(), 0.000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(-87.66452777186925, ur->GetX(), 0.00000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL( 43.8037962206133,  ur->GetY(), 0.0000000000001);
+        REQUIRE(Approx(-87.79786601383196) == ll->GetX());
+        REQUIRE(Approx(43.686857862181) == ll->GetY());
+        REQUIRE(Approx(-87.66452777186925) == ur->GetX());
+        REQUIRE(Approx(43.8037962206133) == ur->GetY());
         Ptr<MgResourceIdentifier> tsId = map->GetTileSetDefinition();
-        CPPUNIT_ASSERT(NULL == (MgResourceIdentifier*)tsId);
+        REQUIRE(nullptr == (MgResourceIdentifier*)tsId);
 
         Ptr<MgLayerGroupCollection> groups = map->GetLayerGroups();
         for (INT32 i = 0; i < groups->GetCount(); i++)
         {
             Ptr<MgLayerGroup> group = groups->GetItem(i);
-            CPPUNIT_ASSERT(MgLayerGroupType::BaseMap == group->GetLayerGroupType());
+            REQUIRE(MgLayerGroupType::BaseMap == group->GetLayerGroupType());
         }
 
         // Initialize service objects.
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        Ptr<MgServerSiteService> svcSite = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
         Ptr<MgResourceService> svcRes = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        assert(svcSite != NULL);
-        assert(svcRes != NULL);
+        assert(svcSite.p != nullptr);
+        assert(svcRes.p != nullptr);
         // Set the current MgUserInformation
         // This must be done before calling CreateSession()
         Ptr<MgUserInformation> userInfo = new MgUserInformation(
             L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
+        userInfo->SetLocale(TestServiceFactory::TEST_LOCALE);
         MgUserInformation::SetCurrentUserInfo(userInfo);
         STRING session = svcSite->CreateSession();
 
@@ -1380,7 +1261,7 @@
         Ptr<MgResourceIdentifier> mapStateId = new MgResourceIdentifier(MgRepositoryType::Session, session, L"", map->GetName(), MgResourceType::Map);
         map->Save(svcRes, mapStateId);
 
-        map = NULL;
+        map = nullptr;
 
         Ptr<MgSiteConnection> siteConn = new MgSiteConnection();
         userInfo = new MgUserInformation(session);
@@ -1392,18 +1273,18 @@
         extents = map->GetMapExtent();
         ll = extents->GetLowerLeftCoordinate();
         ur = extents->GetUpperRightCoordinate();
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(-87.79786601383196, ll->GetX(), 0.00000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL( 43.686857862181,   ll->GetY(), 0.000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(-87.66452777186925, ur->GetX(), 0.00000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL( 43.8037962206133,  ur->GetY(), 0.0000000000001);
+        REQUIRE(Approx(-87.79786601383196) == ll->GetX());
+        REQUIRE(Approx(43.686857862181) == ll->GetY());
+        REQUIRE(Approx(-87.66452777186925) == ur->GetX());
+        REQUIRE(Approx(43.8037962206133) == ur->GetY());
         tsId = map->GetTileSetDefinition();
-        CPPUNIT_ASSERT(NULL == (MgResourceIdentifier*)tsId);
+        REQUIRE(nullptr == (MgResourceIdentifier*)tsId);
 
         groups = map->GetLayerGroups();
         for (INT32 i = 0; i < groups->GetCount(); i++)
         {
             Ptr<MgLayerGroup> group = groups->GetItem(i);
-            CPPUNIT_ASSERT(MgLayerGroupType::BaseMap == group->GetLayerGroupType());
+            REQUIRE(MgLayerGroupType::BaseMap == group->GetLayerGroupType());
         }
 
         svcSite->DestroySession(session);
@@ -1410,9 +1291,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1420,43 +1301,45 @@
     }
 }
 
-void TestTileService::TestCase_MgMap_Linked()
+TEST_CASE("MgMap_Linked", "[TileService]")
 {
     try
     {
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
+
         STRING mapName = L"TestCase_MgMap_Linked";
-        Ptr<MgMap> map = CreateMapLinked(mapName);
+        Ptr<MgMap> map = CreateMapLinked(m_siteConnection, mapName);
 
         //Bounds should be that of the tile set
         Ptr<MgEnvelope> extents = map->GetMapExtent();
         Ptr<MgCoordinate> ll = extents->GetLowerLeftCoordinate();
         Ptr<MgCoordinate> ur = extents->GetUpperRightCoordinate();
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(-87.797866013831, ll->GetX(), 0.000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL( 43.686857862181, ll->GetY(), 0.000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(-87.664527771869, ur->GetX(), 0.000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL( 43.803796220613, ur->GetY(), 0.000000000001);
+        REQUIRE(Approx(-87.797866013831) == ll->GetX());
+        REQUIRE(Approx(43.686857862181) == ll->GetY());
+        REQUIRE(Approx(-87.664527771869) == ur->GetX());
+        REQUIRE(Approx(43.803796220613) == ur->GetY());
         Ptr<MgResourceIdentifier> tsId = map->GetTileSetDefinition();
-        CPPUNIT_ASSERT(NULL != (MgResourceIdentifier*)tsId);
-        CPPUNIT_ASSERT(L"Library://UnitTests/TileSets/Sheboygan.TileSetDefinition" == tsId->ToString());
+        REQUIRE(nullptr != (MgResourceIdentifier*)tsId);
+        REQUIRE(L"Library://UnitTests/TileSets/Sheboygan.TileSetDefinition" == tsId->ToString());
 
         Ptr<MgLayerGroupCollection> groups = map->GetLayerGroups();
         for (INT32 i = 0; i < groups->GetCount(); i++)
         {
             Ptr<MgLayerGroup> group = groups->GetItem(i);
-            CPPUNIT_ASSERT(MgLayerGroupType::BaseMapFromTileSet == group->GetLayerGroupType());
+            REQUIRE(MgLayerGroupType::BaseMapFromTileSet == group->GetLayerGroupType());
         }
 
         // Initialize service objects.
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        Ptr<MgServerSiteService> svcSite = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
         Ptr<MgResourceService> svcRes = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        assert(svcSite != NULL);
-        assert(svcRes != NULL);
+        assert(svcSite.p != nullptr);
+        assert(svcRes.p != nullptr);
         // Set the current MgUserInformation
         // This must be done before calling CreateSession()
         Ptr<MgUserInformation> userInfo = new MgUserInformation(
             L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
+        userInfo->SetLocale(TestServiceFactory::TEST_LOCALE);
         MgUserInformation::SetCurrentUserInfo(userInfo);
         STRING session = svcSite->CreateSession();
 
@@ -1463,7 +1346,7 @@
         Ptr<MgResourceIdentifier> mapStateId = new MgResourceIdentifier(MgRepositoryType::Session, session, L"", map->GetName(), MgResourceType::Map);
         map->Save(svcRes, mapStateId);
 
-        map = NULL;
+        map = nullptr;
 
         Ptr<MgSiteConnection> siteConn = new MgSiteConnection();
         userInfo = new MgUserInformation(session);
@@ -1475,19 +1358,19 @@
         extents = map->GetMapExtent();
         ll = extents->GetLowerLeftCoordinate();
         ur = extents->GetUpperRightCoordinate();
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(-87.797866013831, ll->GetX(), 0.000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL( 43.686857862181, ll->GetY(), 0.000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(-87.664527771869, ur->GetX(), 0.000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL( 43.803796220613, ur->GetY(), 0.000000000001);
+        REQUIRE(Approx(-87.797866013831) == ll->GetX());
+        REQUIRE(Approx(43.686857862181) == ll->GetY());
+        REQUIRE(Approx(-87.664527771869) == ur->GetX());
+        REQUIRE(Approx(43.803796220613) == ur->GetY());
         tsId = map->GetTileSetDefinition();
-        CPPUNIT_ASSERT(NULL != (MgResourceIdentifier*)tsId);
-        CPPUNIT_ASSERT(L"Library://UnitTests/TileSets/Sheboygan.TileSetDefinition" == tsId->ToString());
+        REQUIRE(nullptr != (MgResourceIdentifier*)tsId);
+        REQUIRE(L"Library://UnitTests/TileSets/Sheboygan.TileSetDefinition" == tsId->ToString());
 
         groups = map->GetLayerGroups();
         for (INT32 i = 0; i < groups->GetCount(); i++)
         {
             Ptr<MgLayerGroup> group = groups->GetItem(i);
-            CPPUNIT_ASSERT(MgLayerGroupType::BaseMapFromTileSet == group->GetLayerGroupType());
+            REQUIRE(MgLayerGroupType::BaseMapFromTileSet == group->GetLayerGroupType());
         }
 
         svcSite->DestroySession(session);
@@ -1494,9 +1377,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1504,46 +1387,48 @@
     }
 }
 
-void TestTileService::TestCase_MgMap_LinkedSameCS()
+TEST_CASE("MgMap_LinkedSameCS", "[TileService]")
 {
     try
     {
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
+
         STRING mapName = L"TestCase_MgMap_Linked";
-        Ptr<MgMap> map = CreateMapLinked2(mapName);
+        Ptr<MgMap> map = CreateMapLinked2(m_siteConnection, mapName);
 
         //Bounds should be that of the tile set
         Ptr<MgEnvelope> extents = map->GetMapExtent();
-        CPPUNIT_ASSERT(NULL != extents.p);
+        REQUIRE(nullptr != extents.p);
         Ptr<MgEnvelope> dataExtents = map->GetDataExtent();
-        CPPUNIT_ASSERT(NULL != dataExtents.p);
+        REQUIRE(nullptr != dataExtents.p);
         Ptr<MgCoordinate> ll = extents->GetLowerLeftCoordinate();
         Ptr<MgCoordinate> ur = extents->GetUpperRightCoordinate();
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(-87.797866013831, ll->GetX(), 0.000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(43.686857862181, ll->GetY(), 0.000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(-87.664527771869, ur->GetX(), 0.000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(43.803796220613, ur->GetY(), 0.000000000001);
+        REQUIRE(Approx(-87.797866013831) == ll->GetX());
+        REQUIRE(Approx(43.686857862181) == ll->GetY());
+        REQUIRE(Approx(-87.664527771869) == ur->GetX());
+        REQUIRE(Approx(43.803796220613) == ur->GetY());
         Ptr<MgResourceIdentifier> tsId = map->GetTileSetDefinition();
-        CPPUNIT_ASSERT(NULL != (MgResourceIdentifier*)tsId);
-        CPPUNIT_ASSERT(L"Library://UnitTests/TileSets/Sheboygan.TileSetDefinition" == tsId->ToString());
+        REQUIRE(nullptr != (MgResourceIdentifier*)tsId);
+        REQUIRE(L"Library://UnitTests/TileSets/Sheboygan.TileSetDefinition" == tsId->ToString());
 
         Ptr<MgLayerGroupCollection> groups = map->GetLayerGroups();
         for (INT32 i = 0; i < groups->GetCount(); i++)
         {
             Ptr<MgLayerGroup> group = groups->GetItem(i);
-            CPPUNIT_ASSERT(MgLayerGroupType::BaseMapFromTileSet == group->GetLayerGroupType());
+            REQUIRE(MgLayerGroupType::BaseMapFromTileSet == group->GetLayerGroupType());
         }
 
         // Initialize service objects.
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        Ptr<MgServerSiteService> svcSite = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
         Ptr<MgResourceService> svcRes = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        assert(svcSite != NULL);
-        assert(svcRes != NULL);
+        assert(svcSite.p != nullptr);
+        assert(svcRes.p != nullptr);
         // Set the current MgUserInformation
         // This must be done before calling CreateSession()
         Ptr<MgUserInformation> userInfo = new MgUserInformation(
             L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
+        userInfo->SetLocale(TestServiceFactory::TEST_LOCALE);
         MgUserInformation::SetCurrentUserInfo(userInfo);
         STRING session = svcSite->CreateSession();
 
@@ -1550,7 +1435,7 @@
         Ptr<MgResourceIdentifier> mapStateId = new MgResourceIdentifier(MgRepositoryType::Session, session, L"", map->GetName(), MgResourceType::Map);
         map->Save(svcRes, mapStateId);
 
-        map = NULL;
+        map = nullptr;
 
         Ptr<MgSiteConnection> siteConn = new MgSiteConnection();
         userInfo = new MgUserInformation(session);
@@ -1562,19 +1447,19 @@
         extents = map->GetMapExtent();
         ll = extents->GetLowerLeftCoordinate();
         ur = extents->GetUpperRightCoordinate();
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(-87.797866013831, ll->GetX(), 0.000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(43.686857862181, ll->GetY(), 0.000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(-87.664527771869, ur->GetX(), 0.000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(43.803796220613, ur->GetY(), 0.000000000001);
+        REQUIRE(Approx(-87.797866013831) == ll->GetX());
+        REQUIRE(Approx(43.686857862181) == ll->GetY());
+        REQUIRE(Approx(-87.664527771869) == ur->GetX());
+        REQUIRE(Approx(43.803796220613) == ur->GetY());
         tsId = map->GetTileSetDefinition();
-        CPPUNIT_ASSERT(NULL != (MgResourceIdentifier*)tsId);
-        CPPUNIT_ASSERT(L"Library://UnitTests/TileSets/Sheboygan.TileSetDefinition" == tsId->ToString());
+        REQUIRE(nullptr != (MgResourceIdentifier*)tsId);
+        REQUIRE(L"Library://UnitTests/TileSets/Sheboygan.TileSetDefinition" == tsId->ToString());
 
         groups = map->GetLayerGroups();
         for (INT32 i = 0; i < groups->GetCount(); i++)
         {
             Ptr<MgLayerGroup> group = groups->GetItem(i);
-            CPPUNIT_ASSERT(MgLayerGroupType::BaseMapFromTileSet == group->GetLayerGroupType());
+            REQUIRE(MgLayerGroupType::BaseMapFromTileSet == group->GetLayerGroupType());
         }
 
         svcSite->DestroySession(session);
@@ -1581,9 +1466,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1591,22 +1476,26 @@
     }
 }
 
-void TestTileService::TestCase_MgMapFromXYZTileSetLoose()
+TEST_CASE("MgMapFromXYZTileSetLoose", "[TileService]")
 {
     try
     {
+        Ptr<MgResourceService> m_svcResource = TestServiceFactory::CreateResourceService();
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
+
         // make a runtime map
         Ptr<MgResourceIdentifier> tsdres = new MgResourceIdentifier(L"Library://UnitTests/TileSets/XYZ.TileSetDefinition");
         MgMap* map = new MgMap(m_siteConnection);
         map->Create(m_svcResource, tsdres, L"XYZTileSet");
 
-        CPPUNIT_ASSERT(0 == map->GetFiniteDisplayScaleCount());
+        REQUIRE(0 == map->GetFiniteDisplayScaleCount());
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1614,10 +1503,13 @@
     }
 }
 
-void TestTileService::TestCase_MgMapFromTileSet()
+TEST_CASE("MgMapFromTileSet", "[TileService]")
 {
     try
     {
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
+
         STRING mapName = L"TestCase_MgMapFromTileSet";
 
         // make a runtime map
@@ -1626,38 +1518,37 @@
         map->Create(tsdres, mapName);
 
         Ptr<MgResourceIdentifier> mdfId = map->GetMapDefinition();
-        CPPUNIT_ASSERT(NULL == (MgResourceIdentifier*)mdfId);
+        REQUIRE(nullptr == (MgResourceIdentifier*)mdfId);
 
         //Bounds should be that of the tile set
         Ptr<MgEnvelope> extents = map->GetMapExtent();
         Ptr<MgCoordinate> ll = extents->GetLowerLeftCoordinate();
         Ptr<MgCoordinate> ur = extents->GetUpperRightCoordinate();
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(-87.797866013831, ll->GetX(), 0.000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL( 43.686857862181, ll->GetY(), 0.000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(-87.664527771869, ur->GetX(), 0.000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL( 43.803796220613, ur->GetY(), 0.000000000001);
+        REQUIRE(Approx(-87.797866013831) == ll->GetX());
+        REQUIRE(Approx(43.686857862181) == ll->GetY());
+        REQUIRE(Approx(-87.664527771869) == ur->GetX());
+        REQUIRE(Approx(43.803796220613) == ur->GetY());
         Ptr<MgResourceIdentifier> tsId = map->GetTileSetDefinition();
-        CPPUNIT_ASSERT(NULL != (MgResourceIdentifier*)tsId);
-        CPPUNIT_ASSERT(L"Library://UnitTests/TileSets/Sheboygan.TileSetDefinition" == tsId->ToString());
+        REQUIRE(nullptr != (MgResourceIdentifier*)tsId);
+        REQUIRE(L"Library://UnitTests/TileSets/Sheboygan.TileSetDefinition" == tsId->ToString());
 
         Ptr<MgLayerGroupCollection> groups = map->GetLayerGroups();
         for (INT32 i = 0; i < groups->GetCount(); i++)
         {
             Ptr<MgLayerGroup> group = groups->GetItem(i);
-            CPPUNIT_ASSERT(MgLayerGroupType::BaseMapFromTileSet == group->GetLayerGroupType());
+            REQUIRE(MgLayerGroupType::BaseMapFromTileSet == group->GetLayerGroupType());
         }
 
         // Initialize service objects.
         MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        Ptr<MgServerSiteService> svcSite = dynamic_cast<MgServerSiteService*>(serviceManager->RequestService(MgServiceType::SiteService));
         Ptr<MgResourceService> svcRes = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        assert(svcSite != NULL);
-        assert(svcRes != NULL);
+        assert(svcSite.p != nullptr);
+        assert(svcRes.p != nullptr);
         // Set the current MgUserInformation
         // This must be done before calling CreateSession()
         Ptr<MgUserInformation> userInfo = new MgUserInformation(
             L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
+        userInfo->SetLocale(TestServiceFactory::TEST_LOCALE);
         MgUserInformation::SetCurrentUserInfo(userInfo);
         STRING session = svcSite->CreateSession();
 
@@ -1664,7 +1555,7 @@
         Ptr<MgResourceIdentifier> mapStateId = new MgResourceIdentifier(MgRepositoryType::Session, session, L"", map->GetName(), MgResourceType::Map);
         map->Save(svcRes, mapStateId);
 
-        map = NULL;
+        map = nullptr;
 
         Ptr<MgSiteConnection> siteConn = new MgSiteConnection();
         userInfo = new MgUserInformation(session);
@@ -1676,19 +1567,19 @@
         extents = map->GetMapExtent();
         ll = extents->GetLowerLeftCoordinate();
         ur = extents->GetUpperRightCoordinate();
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(-87.797866013831, ll->GetX(), 0.000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL( 43.686857862181, ll->GetY(), 0.000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(-87.664527771869, ur->GetX(), 0.000000000001);
-        CPPUNIT_ASSERT_DOUBLES_EQUAL( 43.803796220613, ur->GetY(), 0.000000000001);
+        REQUIRE(Approx(-87.797866013831) == ll->GetX());
+        REQUIRE(Approx(43.686857862181) == ll->GetY());
+        REQUIRE(Approx(-87.664527771869) == ur->GetX());
+        REQUIRE(Approx(43.803796220613) == ur->GetY());
         tsId = map->GetTileSetDefinition();
-        CPPUNIT_ASSERT(NULL != (MgResourceIdentifier*)tsId);
-        CPPUNIT_ASSERT(L"Library://UnitTests/TileSets/Sheboygan.TileSetDefinition" == tsId->ToString());
+        REQUIRE(nullptr != (MgResourceIdentifier*)tsId);
+        REQUIRE(L"Library://UnitTests/TileSets/Sheboygan.TileSetDefinition" == tsId->ToString());
 
         groups = map->GetLayerGroups();
         for (INT32 i = 0; i < groups->GetCount(); i++)
         {
             Ptr<MgLayerGroup> group = groups->GetItem(i);
-            CPPUNIT_ASSERT(MgLayerGroupType::BaseMapFromTileSet == group->GetLayerGroupType());
+            REQUIRE(MgLayerGroupType::BaseMapFromTileSet == group->GetLayerGroupType());
         }
 
         svcSite->DestroySession(session);
@@ -1695,9 +1586,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1705,10 +1596,12 @@
     }
 }
 
-void TestTileService::TestCase_GetTileProviders()
+TEST_CASE("GetTileProviders", "[TileService]")
 {
     try
     {
+        Ptr<MgTileService> m_svcTile = TestServiceFactory::CreateTileService();
+
         Ptr<MgByteReader> content = m_svcTile->GetTileProviders();
         Ptr<MgByteSink> sink = new MgByteSink(content);
         sink->ToFile(L"../UnitTestFiles/GetTileProviders_Result.xml");
@@ -1715,9 +1608,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1725,10 +1618,14 @@
     }
 }
 
-void TestTileService::TestCase_GetMetatileSingle()
+TEST_CASE("GetMetatileSingle", "[TileService]")
 {
     try
     {
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
+        Ptr<MgTileService> m_svcTile = TestServiceFactory::CreateTileService();
+
         INT32 col = 28;
         INT32 row = 29;
         INT32 scale = 3;
@@ -1751,10 +1648,10 @@
             }
         }
 
-        Ptr<MgMap> map = CreateMapLinked(L"MetaTileBaseline");
+        Ptr<MgMap> map = CreateMapLinked(m_siteConnection, L"MetaTileBaseline");
         map->SetViewScale(3125);
         Ptr<MgRenderingService> renderSvc = dynamic_cast<MgRenderingService*>(m_siteConnection->CreateService(MgServiceType::RenderingService));
-        CPPUNIT_ASSERT(NULL != renderSvc);
+        REQUIRE(nullptr != renderSvc);
 
         MgFileUtil::CreateDirectory(L"../UnitTestFiles/GetMetatileSingle_Baseline");
 
@@ -1786,9 +1683,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1796,10 +1693,14 @@
     }
 }
 
-void TestTileService::TestCase_GetMetatileXYZSingle()
+TEST_CASE("GetMetatileXYZSingle", "[TileService]")
 {
     try
     {
+        Ptr<MgServerSiteService> svcSite = TestServiceFactory::CreateSiteService();
+        Ptr<MgSiteConnection> m_siteConnection = TestServiceFactory::CreateSiteConnection(svcSite);
+        Ptr<MgTileService> m_svcTile = TestServiceFactory::CreateTileService();
+
         INT32 x = 23892;
         INT32 y = 16798;
         INT32 z = 16;
@@ -1825,10 +1726,10 @@
         Ptr<MgCoordinateSystemFactory> csFactory = new MgCoordinateSystemFactory();
         STRING ovCsvWkt = csFactory->ConvertCoordinateSystemCodeToWkt(L"LL84");
 
-        Ptr<MgMap> map = CreateMapLinked2(L"MetaTileBaseline", ovCsvWkt);
+        Ptr<MgMap> map = CreateMapLinked2(m_siteConnection, L"MetaTileBaseline", ovCsvWkt);
         map->SetViewScale(3125);
         Ptr<MgRenderingService> renderSvc = dynamic_cast<MgRenderingService*>(m_siteConnection->CreateService(MgServiceType::RenderingService));
-        CPPUNIT_ASSERT(NULL != renderSvc);
+        REQUIRE(nullptr != renderSvc);
 
         MgFileUtil::CreateDirectory(L"../UnitTestFiles/GetMetatileSingleXYZ_Baseline");
 
@@ -1866,9 +1767,9 @@
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -1875,135 +1776,3 @@
         throw;
     }
 }
-
-////////////////////////////////////////////////////////////////
-/// Helpers
-////////////////////////////////////////////////////////////////
-
-
-MgMap* TestTileService::CreateMap(CREFSTRING mapName)
-{
-    // set a default name if not supplied
-    STRING name = (mapName.empty())? L"UnitTestBaseMap" : mapName;
-
-    // make a runtime map
-    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/BaseMap.MapDefinition");
-    MgMap* map = new MgMap(m_siteConnection);
-    map->Create(mdfres, name);
-
-    // set the view
-    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.723636, 43.715015);
-    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
-    map->SetViewCenter(ptNewCenter);
-    map->SetDisplayDpi(96);
-    map->SetDisplayWidth(1024);
-    map->SetDisplayHeight(1024);
-
-    // render at a scale of 1:12500
-    map->SetViewScale(12500.0);
-
-    return map;
-}
-
-
-MgMap* TestTileService::CreateMapLinked(CREFSTRING mapName)
-{
-    // set a default name if not supplied
-    STRING name = (mapName.empty())? L"UnitTestBaseMapLinked" : mapName;
-
-    // make a runtime map
-    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinkedTileSet.MapDefinition");
-    MgMap* map = new MgMap(m_siteConnection);
-    map->Create(mdfres, name);
-
-    // set the view
-    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.723636, 43.715015);
-    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
-    map->SetViewCenter(ptNewCenter);
-    map->SetDisplayDpi(96);
-    map->SetDisplayWidth(1024);
-    map->SetDisplayHeight(1024);
-
-    // render at a scale of 1:12500
-    map->SetViewScale(12500.0);
-
-    return map;
-}
-
-MgMap* TestTileService::CreateMapLinked2(CREFSTRING mapName, CREFSTRING ovCsWkt)
-{
-    // set a default name if not supplied
-    STRING name = (mapName.empty()) ? L"UnitTestBaseMapLinked" : mapName;
-
-    Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinkedTileSet.MapDefinition");
-    // Parse the Map Definition and modify it so it matches its linked tile set
-    Ptr<MgResourceService> resSvc = dynamic_cast<MgResourceService*>(m_siteConnection->CreateService(MgServiceType::ResourceService));
-    
-    MdfModel::MapDefinition* mdf = MgMapBase::GetMapDefinition(resSvc, mdfres);
-    MdfModel::TileSetSource* tsRef = mdf->GetTileSetSource();
-    
-    Ptr<MgResourceIdentifier> tileSetId = new MgResourceIdentifier(tsRef->GetResourceId());
-    Ptr<MgByteReader> reader = resSvc->GetResourceContent(tileSetId);
-    Ptr<MgByteSink> sink = new MgByteSink(reader);
-    Ptr<MgByte> bytes = sink->ToBuffer();
-
-    MdfParser::SAX2Parser parser;
-    parser.ParseString((const char*)bytes->Bytes(), bytes->GetLength());
-
-    CPPUNIT_ASSERT(parser.GetSucceeded());
-    MdfModel::TileSetDefinition* tsd = parser.DetachTileSetDefinition();
-    // Update coordinate systems to match
-    STRING csWkt;
-    MdfModel::NameStringPairCollection* params = tsd->GetTileStoreParameters()->GetParameters();
-    for (INT32 i = 0; i < params->GetCount(); i++)
-    {
-        MdfModel::NameStringPair* pair = params->GetAt(i);
-        if (pair->GetName() == L"CoordinateSystem")
-        {
-            csWkt = pair->GetValue();
-            mdf->SetCoordinateSystem(csWkt);
-            break;
-        }
-    }
-
-    if (!ovCsWkt.empty())
-    {
-        mdf->SetCoordinateSystem(ovCsWkt);
-    }
-
-    // Fix up extents too
-    mdf->SetExtents(tsd->GetExtents());
-
-    // Save back out to XML
-    MdfModel::Version ver(3, 0, 0);
-    std::string mbXml = parser.SerializeToXML(mdf, &ver);
-    Ptr<MgByteSource> source = new MgByteSource((BYTE_ARRAY_IN)mbXml.c_str(), (INT32)mbXml.length());
-    Ptr<MgByteReader> content = source->GetReader();
-    mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/LinkedTileSet2.MapDefinition");
-    resSvc->SetResource(mdfres, content, NULL);
-
-    // make a runtime map from our changed map definition
-    MgMap* map = new MgMap(m_siteConnection);
-    map->Create(mdfres, name);
-
-    // set the view
-    Ptr<MgCoordinate> coordNewCenter = new MgCoordinateXY(-87.723636, 43.715015);
-    Ptr<MgPoint> ptNewCenter = new MgPoint(coordNewCenter);
-    map->SetViewCenter(ptNewCenter);
-    map->SetDisplayDpi(96);
-    map->SetDisplayWidth(1024);
-    map->SetDisplayHeight(1024);
-
-    // render at a scale of 1:12500
-    map->SetViewScale(12500.0);
-
-    return map;
-}
-
-// returns a random integer in the range 0 to n-1
-INT32 TestTileService::Rand(INT32 n)
-{
-    double numer = (double)rand() + 0.5;
-    double denom = (double)RAND_MAX + 1.0;
-    return (INT32)(numer / denom * n);
-}

Deleted: trunk/MgDev/Server/src/UnitTesting/TestTileService.h
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestTileService.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestTileService.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,88 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _TESTTILESERVICE_H
-#define _TESTTILESERVICE_H
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class TestTileService : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestTileService);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-    
-    CPPUNIT_TEST(TestCase_GetMetatileSingle);
-    CPPUNIT_TEST(TestCase_GetMetatileXYZSingle);
-
-    CPPUNIT_TEST(TestCase_GetTileProviders);
-    CPPUNIT_TEST(TestCase_MgMap_Inline);
-    CPPUNIT_TEST(TestCase_MgMap_Linked);
-    CPPUNIT_TEST(TestCase_MgMap_LinkedSameCS);
-    CPPUNIT_TEST(TestCase_MgMapFromXYZTileSetLoose);
-    CPPUNIT_TEST(TestCase_MgMapFromTileSet);
-    CPPUNIT_TEST(TestCase_GetTile);
-    
-
-    CPPUNIT_TEST(TestCase_SetTile);
-    CPPUNIT_TEST(TestCase_GetSetTile);
-    CPPUNIT_TEST(TestCase_ClearCache);
-    CPPUNIT_TEST(TestCase_GetTileLinked);
-    CPPUNIT_TEST(TestCase_GetTileXYZ);
-    CPPUNIT_TEST(TestCase_ClearCacheLinked);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    TestTileService();
-    ~TestTileService();
-
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    void TestCase_GetTileProviders();
-    void TestCase_MgMap_Inline();
-    void TestCase_MgMap_Linked();
-    void TestCase_MgMap_LinkedSameCS();
-    void TestCase_MgMapFromXYZTileSetLoose();
-    void TestCase_MgMapFromTileSet();
-    void TestCase_GetTile();
-    void TestCase_SetTile();
-    void TestCase_GetSetTile();
-    void TestCase_GetTileXYZ();
-    void TestCase_ClearCache();
-    void TestCase_GetTileLinked();
-    void TestCase_ClearCacheLinked();
-
-    void TestCase_GetMetatileSingle();
-    void TestCase_GetMetatileXYZSingle();
-
-private:
-    MgMap* CreateMap(CREFSTRING mapName = L"");
-    MgMap* CreateMapLinked(CREFSTRING mapName = L"");
-    MgMap* CreateMapLinked2(CREFSTRING mapName = L"", CREFSTRING ovCsWkt = L"");
-    INT32 Rand(INT32 n);
-
-private:
-    Ptr<MgSiteConnection> m_siteConnection;
-    Ptr<MgResourceService> m_svcResource;
-    Ptr<MgTileService> m_svcTile;
-};
-
-#endif

Modified: trunk/MgDev/Server/src/UnitTesting/TestTransformMesh.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestTransformMesh.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestTransformMesh.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -16,15 +16,15 @@
 //
 
 #include "MapGuideCommon.h"
-#include "TestTransformMesh.h"
-#include "CppUnitExtensions.h"
+#include "CatchHelperMacros.h"
 
 #include "TransformMesh.h"
 #include "MgCSTrans.h"
 #include "Bounds.h"
 #include "FoundationDefs.h"
+#include "TestServiceFactory.h"
+#include "catch.hpp"
 
-
 const STRING GeographicWkt      = L"GEOGCS[\"LL84\",DATUM[\"WGS84\",SPHEROID[\"WGS84\",6378137.000,298.25722293]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.01745329251994]]";
 const STRING ProjectedWkt       = L"PROJCS[\"GA-W\",GEOGCS[\"LL27\",DATUM[\"NAD27\",SPHEROID[\"CLRK66\",6378206.400,294.97869821]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"false_easting\",500000.000],PARAMETER[\"false_northing\",0.000],PARAMETER[\"scale_factor\",0.999900000000],PARAMETER[\"central_meridian\",-84.16666666666670],PARAMETER[\"latitude_of_origin\",30.00000000000000],UNIT[\"Foot_US\",0.30480060960122]]";
 const STRING ArbitraryWkt       = L"LOCAL_CS [ \"Non-Earth (Meter)\", LOCAL_DATUM [\"Local Datum\", 0], UNIT [\"Meter\", 1.0], AXIS [\"X\", EAST], AXIS[\"Y\", NORTH]]";
@@ -36,63 +36,29 @@
 const STRING GeographicWkt_LL84 = L"GEOGCS[\"LL84\",DATUM[\"WGS84\",SPHEROID[\"WGS84\",6378137.000,298.25722293]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]]";
 const STRING ProjectedWkt_GAW   = L"PROJCS[\"GA-W\",GEOGCS[\"LL27\",DATUM[\"NAD27\",SPHEROID[\"CLRK66\",6378206.400,294.97869821]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"false_easting\",500000.000],PARAMETER[\"false_northing\",0.000],PARAMETER[\"scale_factor\",0.999900000000],PARAMETER[\"central_meridian\",-84.16666666666670],PARAMETER[\"latitude_of_origin\",30.00000000000000],UNIT[\"Foot_US\",0.30480060960122]]";
 
-
-
-const STRING TEST_LOCALE = L"en";
-
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestTransformMesh, "TestTransformMesh");
-
-void TestTransformMesh::setUp()
+static MgCoordinateSystem* CreateCoordinateSystem(const STRING wkt)
 {
+    MgCoordinateSystemFactory factory;
+    return factory.Create(wkt);
 }
 
-
-void TestTransformMesh::tearDown()
+static MgCoordinateSystem* CreateCoordinateSystemArbitrary()
 {
-}
-
-
-void TestTransformMesh::TestStart()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Transform Mesh tests.\n")));
-}
-
-
-void TestTransformMesh::TestEnd()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nTransform Mesh tests completed.\n\n")));
-}
-
-
-TestTransformMesh::TestTransformMesh()
-{
-}
-
-
-MgCoordinateSystem* TestTransformMesh::CreateCoordinateSystemArbitrary()
-{
     return CreateCoordinateSystem(ArbitraryWkt);
 }
 
-MgCoordinateSystem* TestTransformMesh::CreateCoordinateSystemGeographic()
+static MgCoordinateSystem* CreateCoordinateSystemGeographic()
 {
     return CreateCoordinateSystem(GeographicWkt);
 }
 
-
-MgCoordinateSystem* TestTransformMesh::CreateCoordinateSystemProjected()
+static MgCoordinateSystem* CreateCoordinateSystemProjected()
 {
     return CreateCoordinateSystem(ProjectedWkt);
 }
 
-MgCoordinateSystem* TestTransformMesh::CreateCoordinateSystem(const STRING wkt)
+static bool CheckTransformMeshSize(int srcWidth, int srcHeight, TransformMesh* xformMesh)
 {
-    MgCoordinateSystemFactory factory;
-    return factory.Create(wkt);
-}
-
-bool TestTransformMesh::CheckTransformMeshSize(int srcWidth, int srcHeight, TransformMesh* xformMesh)
-{
     bool result = false;
 
     if (xformMesh->GetTotalPoints() == ((int)(srcHeight / xformMesh->GetGridSizeHeight()) + 1) * ((int)(srcWidth / xformMesh->GetGridSizeWidth()) + 1)
@@ -105,24 +71,24 @@
     return result;
 }
 
-void TestTransformMesh::TestCase_TransformMesh_DefaultConstructor()
+TEST_CASE("TransformMesh_DefaultCtor", "[TransformMesh]")
 {
     try
     {
         TransformMesh xformMesh;
 
-        CPPUNIT_ASSERT(xformMesh.GetTotalPoints() == 0);
-        CPPUNIT_ASSERT(xformMesh.GetTotalVerticalPoints() == 0);
-        CPPUNIT_ASSERT(xformMesh.GetTotalHorizontalPoints() == 0);
-        CPPUNIT_ASSERT(xformMesh.IsYAxisInverted() == true);
+        REQUIRE(xformMesh.GetTotalPoints() == 0);
+        REQUIRE(xformMesh.GetTotalVerticalPoints() == 0);
+        REQUIRE(xformMesh.GetTotalHorizontalPoints() == 0);
+        REQUIRE(xformMesh.IsYAxisInverted() == true);
 
-        CPPUNIT_ASSERT(true);
+        REQUIRE(true);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -130,7 +96,7 @@
     }
 }
 
-void TestTransformMesh::TestCase_TransformMesh_LL84_to_WAG()
+TEST_CASE("TransformMesh_LL84_to_WAG", "[TransformMesh]")
 {
     try
     {
@@ -152,16 +118,16 @@
 
         TransformMesh xformMesh(gridSize, minGridSize, gridSizeOverride, srcExt, srcWidth, srcHeight, destExt, destWidth, destHeight, &xformer);
 
-        CPPUNIT_ASSERT(CheckTransformMeshSize(srcWidth, srcHeight, &xformMesh));
-        CPPUNIT_ASSERT(xformMesh.IsYAxisInverted() == true);
+        REQUIRE(CheckTransformMeshSize(srcWidth, srcHeight, &xformMesh));
+        REQUIRE(xformMesh.IsYAxisInverted() == true);
 
-        CPPUNIT_ASSERT(true);
+        REQUIRE(true);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -169,7 +135,7 @@
     }
 }
 
-void TestTransformMesh::TestCase_TransformMesh_LL84_to_LL84()
+TEST_CASE("TransformMesh_LL84_to_LL84", "[TransformMesh]")
 {
     try
     {
@@ -178,7 +144,7 @@
         Ptr<MgCoordinateSystem> dst = CreateCoordinateSystem(GeographicWkt_LL84);
 
         MgCSTrans xformer(src, dst);
-        CPPUNIT_ASSERT(xformer.GetLinearScale() == 1);
+        REQUIRE(xformer.GetLinearScale() == 1);
 
         int gridSize = 100;
         int minGridSize = 10;
@@ -192,26 +158,26 @@
 
         TransformMesh xformMesh(gridSize, minGridSize, gridSizeOverride, srcExt, srcWidth, srcHeight, srcExt, destWidth, destHeight, &xformer, false);
 
-        CPPUNIT_ASSERT(CheckTransformMeshSize(srcWidth, srcHeight, &xformMesh));
-        CPPUNIT_ASSERT(xformMesh.IsYAxisInverted() == false);
+        REQUIRE(CheckTransformMeshSize(srcWidth, srcHeight, &xformMesh));
+        REQUIRE(xformMesh.IsYAxisInverted() == false);
 
         // check to see that the source pt and dest pt are the same
-        CPPUNIT_ASSERT(xformMesh.GetMeshPoint(0).pt_src.x == xformMesh.GetMeshPoint(0).pt_dest.x);
-        CPPUNIT_ASSERT(xformMesh.GetMeshPoint(1).pt_src.x == xformMesh.GetMeshPoint(1).pt_dest.x);
-        CPPUNIT_ASSERT(xformMesh.GetMeshPoint(2).pt_src.x == xformMesh.GetMeshPoint(2).pt_dest.x);
-        CPPUNIT_ASSERT(xformMesh.GetMeshPoint(3).pt_src.x == xformMesh.GetMeshPoint(3).pt_dest.x);
-        CPPUNIT_ASSERT(xformMesh.GetMeshPoint(0).pt_src.y == xformMesh.GetMeshPoint(0).pt_dest.y);
-        CPPUNIT_ASSERT(xformMesh.GetMeshPoint(1).pt_src.y == xformMesh.GetMeshPoint(1).pt_dest.y);
-        CPPUNIT_ASSERT(xformMesh.GetMeshPoint(2).pt_src.y == xformMesh.GetMeshPoint(2).pt_dest.y);
-        CPPUNIT_ASSERT(xformMesh.GetMeshPoint(3).pt_src.y == xformMesh.GetMeshPoint(3).pt_dest.y);
+        REQUIRE(xformMesh.GetMeshPoint(0).pt_src.x == xformMesh.GetMeshPoint(0).pt_dest.x);
+        REQUIRE(xformMesh.GetMeshPoint(1).pt_src.x == xformMesh.GetMeshPoint(1).pt_dest.x);
+        REQUIRE(xformMesh.GetMeshPoint(2).pt_src.x == xformMesh.GetMeshPoint(2).pt_dest.x);
+        REQUIRE(xformMesh.GetMeshPoint(3).pt_src.x == xformMesh.GetMeshPoint(3).pt_dest.x);
+        REQUIRE(xformMesh.GetMeshPoint(0).pt_src.y == xformMesh.GetMeshPoint(0).pt_dest.y);
+        REQUIRE(xformMesh.GetMeshPoint(1).pt_src.y == xformMesh.GetMeshPoint(1).pt_dest.y);
+        REQUIRE(xformMesh.GetMeshPoint(2).pt_src.y == xformMesh.GetMeshPoint(2).pt_dest.y);
+        REQUIRE(xformMesh.GetMeshPoint(3).pt_src.y == xformMesh.GetMeshPoint(3).pt_dest.y);
 
-        CPPUNIT_ASSERT(true);
+        REQUIRE(true);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -219,7 +185,7 @@
     }
 }
 
-void TestTransformMesh::TestCase_TransformMesh_ArbXYM_to_ArbXYM()
+TEST_CASE("TransformMesh_ArbXYM_to_ArbXYM", "[TransformMesh]")
 {
     try
     {
@@ -228,7 +194,7 @@
         Ptr<MgCoordinateSystem> dst = CreateCoordinateSystem(ArbitraryWkt_Meter);
 
         MgCSTrans xformer(src, dst);
-        CPPUNIT_ASSERT(xformer.GetLinearScale() == 1);
+        REQUIRE(xformer.GetLinearScale() == 1);
 
         int gridSize = 100;
         int minGridSize = 10;
@@ -242,26 +208,26 @@
 
         TransformMesh xformMesh(gridSize, minGridSize, gridSizeOverride, srcExt, srcWidth, srcHeight, srcExt, destWidth, destHeight, &xformer, false);
 
-        CPPUNIT_ASSERT(CheckTransformMeshSize(srcWidth, srcHeight, &xformMesh));
-        CPPUNIT_ASSERT(xformMesh.IsYAxisInverted() == false);
+        REQUIRE(CheckTransformMeshSize(srcWidth, srcHeight, &xformMesh));
+        REQUIRE(xformMesh.IsYAxisInverted() == false);
 
         // check to see that the source pt and dest pt are the same
-        CPPUNIT_ASSERT(xformMesh.GetMeshPoint(0).pt_src.x == xformMesh.GetMeshPoint(0).pt_dest.x);
-        CPPUNIT_ASSERT(xformMesh.GetMeshPoint(1).pt_src.x == xformMesh.GetMeshPoint(1).pt_dest.x);
-        CPPUNIT_ASSERT(xformMesh.GetMeshPoint(2).pt_src.x == xformMesh.GetMeshPoint(2).pt_dest.x);
-        CPPUNIT_ASSERT(xformMesh.GetMeshPoint(3).pt_src.x == xformMesh.GetMeshPoint(3).pt_dest.x);
-        CPPUNIT_ASSERT(xformMesh.GetMeshPoint(0).pt_src.y == xformMesh.GetMeshPoint(0).pt_dest.y);
-        CPPUNIT_ASSERT(xformMesh.GetMeshPoint(1).pt_src.y == xformMesh.GetMeshPoint(1).pt_dest.y);
-        CPPUNIT_ASSERT(xformMesh.GetMeshPoint(2).pt_src.y == xformMesh.GetMeshPoint(2).pt_dest.y);
-        CPPUNIT_ASSERT(xformMesh.GetMeshPoint(3).pt_src.y == xformMesh.GetMeshPoint(3).pt_dest.y);
+        REQUIRE(xformMesh.GetMeshPoint(0).pt_src.x == xformMesh.GetMeshPoint(0).pt_dest.x);
+        REQUIRE(xformMesh.GetMeshPoint(1).pt_src.x == xformMesh.GetMeshPoint(1).pt_dest.x);
+        REQUIRE(xformMesh.GetMeshPoint(2).pt_src.x == xformMesh.GetMeshPoint(2).pt_dest.x);
+        REQUIRE(xformMesh.GetMeshPoint(3).pt_src.x == xformMesh.GetMeshPoint(3).pt_dest.x);
+        REQUIRE(xformMesh.GetMeshPoint(0).pt_src.y == xformMesh.GetMeshPoint(0).pt_dest.y);
+        REQUIRE(xformMesh.GetMeshPoint(1).pt_src.y == xformMesh.GetMeshPoint(1).pt_dest.y);
+        REQUIRE(xformMesh.GetMeshPoint(2).pt_src.y == xformMesh.GetMeshPoint(2).pt_dest.y);
+        REQUIRE(xformMesh.GetMeshPoint(3).pt_src.y == xformMesh.GetMeshPoint(3).pt_dest.y);
 
-        CPPUNIT_ASSERT(true);
+        REQUIRE(true);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -269,7 +235,7 @@
     }
 }
 
-void TestTransformMesh::TestCase_TransformMesh_ArbXYKM_to_ArbXYM()
+TEST_CASE("TransformMesh_ArbXYKM_to_ArbXYM", "[TransformMesh]")
 {
     try
     {
@@ -278,7 +244,7 @@
 
         MgCSTrans xformer(src, dst);
         double dLinearScale = xformer.GetLinearScale();
-        CPPUNIT_ASSERT(dLinearScale == 1000);
+        REQUIRE(dLinearScale == 1000);
 
         int gridSize = 100;
         int minGridSize = 10;
@@ -292,8 +258,8 @@
 
         TransformMesh xformMesh(gridSize, minGridSize, gridSizeOverride, srcExt, srcWidth, srcHeight, srcExt, destWidth, destHeight, &xformer, false);
 
-        CPPUNIT_ASSERT(CheckTransformMeshSize(srcWidth, srcHeight, &xformMesh));
-        CPPUNIT_ASSERT(xformMesh.IsYAxisInverted() == false);
+        REQUIRE(CheckTransformMeshSize(srcWidth, srcHeight, &xformMesh));
+        REQUIRE(xformMesh.IsYAxisInverted() == false);
 
         // pt1----pt2
         // |        |
@@ -302,26 +268,26 @@
         // pt0----pt3
 
         // pt0 should be the same
-        CPPUNIT_ASSERT(xformMesh.GetMeshPoint(0).pt_src.x == xformMesh.GetMeshPoint(0).pt_dest.x);
-        CPPUNIT_ASSERT(xformMesh.GetMeshPoint(0).pt_src.y == xformMesh.GetMeshPoint(0).pt_dest.y);
+        REQUIRE(xformMesh.GetMeshPoint(0).pt_src.x == xformMesh.GetMeshPoint(0).pt_dest.x);
+        REQUIRE(xformMesh.GetMeshPoint(0).pt_src.y == xformMesh.GetMeshPoint(0).pt_dest.y);
 
         // the pt1, pt2, pt3 should be scaled by dLinearScale (1000)
-        CPPUNIT_ASSERT(xformMesh.GetMeshPoint(1).pt_src.x == xformMesh.GetMeshPoint(1).pt_dest.x);
-        CPPUNIT_ASSERT(dLinearScale * xformMesh.GetMeshPoint(1).pt_src.y == xformMesh.GetMeshPoint(1).pt_dest.y);
+        REQUIRE(xformMesh.GetMeshPoint(1).pt_src.x == xformMesh.GetMeshPoint(1).pt_dest.x);
+        REQUIRE(dLinearScale * xformMesh.GetMeshPoint(1).pt_src.y == xformMesh.GetMeshPoint(1).pt_dest.y);
 
-        CPPUNIT_ASSERT(dLinearScale * xformMesh.GetMeshPoint(2).pt_src.x == xformMesh.GetMeshPoint(2).pt_dest.x);
-        CPPUNIT_ASSERT(xformMesh.GetMeshPoint(2).pt_src.y == xformMesh.GetMeshPoint(2).pt_dest.y);
+        REQUIRE(dLinearScale * xformMesh.GetMeshPoint(2).pt_src.x == xformMesh.GetMeshPoint(2).pt_dest.x);
+        REQUIRE(xformMesh.GetMeshPoint(2).pt_src.y == xformMesh.GetMeshPoint(2).pt_dest.y);
 
-        CPPUNIT_ASSERT(dLinearScale * xformMesh.GetMeshPoint(3).pt_src.x == xformMesh.GetMeshPoint(3).pt_dest.x);
-        CPPUNIT_ASSERT(dLinearScale * xformMesh.GetMeshPoint(3).pt_src.y == xformMesh.GetMeshPoint(3).pt_dest.y);
+        REQUIRE(dLinearScale * xformMesh.GetMeshPoint(3).pt_src.x == xformMesh.GetMeshPoint(3).pt_dest.x);
+        REQUIRE(dLinearScale * xformMesh.GetMeshPoint(3).pt_src.y == xformMesh.GetMeshPoint(3).pt_dest.y);
 
-        CPPUNIT_ASSERT(true);
+        REQUIRE(true);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {
@@ -329,7 +295,7 @@
     }
 }
 
-void TestTransformMesh::TestCase_TransformMesh_Small_Image_01()
+TEST_CASE("TransformMesh_Small_Image_01", "[TransformMesh]")
 {
     try
     {
@@ -338,7 +304,7 @@
 
         MgCSTrans xformer(src, dst);
         double dLinearScale = xformer.GetLinearScale();
-        CPPUNIT_ASSERT(dLinearScale == 1000);
+        REQUIRE(dLinearScale == 1000);
 
         int gridSize = 100;
         int minGridSize = 10;
@@ -352,8 +318,8 @@
 
         TransformMesh xformMesh(gridSize, minGridSize, gridSizeOverride, srcExt, srcWidth, srcHeight, srcExt, destWidth, destHeight, &xformer, false);
 
-        CPPUNIT_ASSERT(CheckTransformMeshSize(srcWidth, srcHeight, &xformMesh));
-        CPPUNIT_ASSERT(xformMesh.IsYAxisInverted() == false);
+        REQUIRE(CheckTransformMeshSize(srcWidth, srcHeight, &xformMesh));
+        REQUIRE(xformMesh.IsYAxisInverted() == false);
 
         // pt1----pt2
         // |        |
@@ -362,26 +328,26 @@
         // pt0----pt3
 
         // pt0 should be the same
-        CPPUNIT_ASSERT(xformMesh.GetMeshPoint(0).pt_src.x == xformMesh.GetMeshPoint(0).pt_dest.x);
-        CPPUNIT_ASSERT(xformMesh.GetMeshPoint(0).pt_src.y == xformMesh.GetMeshPoint(0).pt_dest.y);
+        REQUIRE(xformMesh.GetMeshPoint(0).pt_src.x == xformMesh.GetMeshPoint(0).pt_dest.x);
+        REQUIRE(xformMesh.GetMeshPoint(0).pt_src.y == xformMesh.GetMeshPoint(0).pt_dest.y);
 
         // the pt1, pt2, pt3 should be scaled by dLinearScale (1000)
-        CPPUNIT_ASSERT(xformMesh.GetMeshPoint(1).pt_src.x == xformMesh.GetMeshPoint(1).pt_dest.x);
-        CPPUNIT_ASSERT(dLinearScale * xformMesh.GetMeshPoint(1).pt_src.y == xformMesh.GetMeshPoint(1).pt_dest.y);
+        REQUIRE(xformMesh.GetMeshPoint(1).pt_src.x == xformMesh.GetMeshPoint(1).pt_dest.x);
+        REQUIRE(dLinearScale * xformMesh.GetMeshPoint(1).pt_src.y == xformMesh.GetMeshPoint(1).pt_dest.y);
 
-        CPPUNIT_ASSERT(dLinearScale * xformMesh.GetMeshPoint(2).pt_src.x == xformMesh.GetMeshPoint(2).pt_dest.x);
-        CPPUNIT_ASSERT(xformMesh.GetMeshPoint(2).pt_src.y == xformMesh.GetMeshPoint(2).pt_dest.y);
+        REQUIRE(dLinearScale * xformMesh.GetMeshPoint(2).pt_src.x == xformMesh.GetMeshPoint(2).pt_dest.x);
+        REQUIRE(xformMesh.GetMeshPoint(2).pt_src.y == xformMesh.GetMeshPoint(2).pt_dest.y);
 
-        CPPUNIT_ASSERT(dLinearScale * xformMesh.GetMeshPoint(3).pt_src.x == xformMesh.GetMeshPoint(3).pt_dest.x);
-        CPPUNIT_ASSERT(dLinearScale * xformMesh.GetMeshPoint(3).pt_src.y == xformMesh.GetMeshPoint(3).pt_dest.y);
+        REQUIRE(dLinearScale * xformMesh.GetMeshPoint(3).pt_src.x == xformMesh.GetMeshPoint(3).pt_dest.x);
+        REQUIRE(dLinearScale * xformMesh.GetMeshPoint(3).pt_src.y == xformMesh.GetMeshPoint(3).pt_dest.y);
 
-        CPPUNIT_ASSERT(true);
+        REQUIRE(true);
     }
     catch (MgException* e)
     {
-        STRING message = e->GetDetails(TEST_LOCALE);
+        STRING message = e->GetDetails(TestServiceFactory::TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {

Deleted: trunk/MgDev/Server/src/UnitTesting/TestTransformMesh.h
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestTransformMesh.h	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/TestTransformMesh.h	2020-07-21 09:28:07 UTC (rev 9677)
@@ -1,70 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef TESTTRANSFORMMESH_H_
-#define TESTTRANSFORMMESH_H_
-
-#include <cppunit/extensions/HelperMacros.h>
-
-#ifndef _WIN32
-//Linux: different naming for string functions
-#define stricmp strcasecmp
-#endif
-
-class TransformMesh;
-
-class TestTransformMesh : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE(TestTransformMesh);
-    CPPUNIT_TEST(TestStart); // This must be the very first unit test
-
-    CPPUNIT_TEST(TestCase_TransformMesh_DefaultConstructor);
-    CPPUNIT_TEST(TestCase_TransformMesh_LL84_to_WAG);
-    CPPUNIT_TEST(TestCase_TransformMesh_LL84_to_LL84);
-    CPPUNIT_TEST(TestCase_TransformMesh_ArbXYM_to_ArbXYM);
-    CPPUNIT_TEST(TestCase_TransformMesh_ArbXYKM_to_ArbXYM);
-    CPPUNIT_TEST(TestCase_TransformMesh_Small_Image_01);
-
-    CPPUNIT_TEST(TestEnd); // This must be the very last unit test
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    TestTransformMesh();
-
-    void setUp();
-    void tearDown();
-    void TestStart();
-    void TestEnd();
-
-    MgCoordinateSystem* CreateCoordinateSystemArbitrary();
-    MgCoordinateSystem* CreateCoordinateSystemGeographic();
-    MgCoordinateSystem* CreateCoordinateSystemProjected();
-    MgCoordinateSystem* CreateCoordinateSystem(const STRING wkt);
-
-    bool CheckTransformMeshSize(int srcWidth, int srcHeight, TransformMesh* xform);
-
-    void TestCase_TransformMesh_DefaultConstructor();
-    void TestCase_TransformMesh_LL84_to_WAG();
-    void TestCase_TransformMesh_LL84_to_LL84();
-    void TestCase_TransformMesh_ArbXYM_to_ArbXYM();
-    void TestCase_TransformMesh_ArbXYKM_to_ArbXYM();
-    void TestCase_TransformMesh_Small_Image_01();
-
-
-};
-
-#endif

Modified: trunk/MgDev/Server/src/UnitTesting/UnitTesting.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/UnitTesting.cpp	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/UnitTesting.cpp	2020-07-21 09:28:07 UTC (rev 9677)
@@ -17,89 +17,53 @@
 
 #include "MapGuideCommon.h"
 #include "UnitTesting.h"
-#include <cppunit/TestResultCollector.h>
-#include <cppunit/TextOutputter.h>
-#include <cppunit/XmlOutputter.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <cppunit/ui/text/TestRunner.h>
 #include "FoundationDefs.h"
+#include "TestServiceFactory.h"
+
+#define CATCH_CONFIG_RUNNER
+#include "catch.hpp"
+
 int Execute(CREFSTRING fileName, CREFSTRING test)
 {
-    int nResult = 0;
-    bool bRunTests = true;
-
     // Set the default user information for this test run.
     // Any specific test case may overwrite these information.
     Ptr<MgUserInformation> userInfo = new MgUserInformation(MgUser::Administrator, L"");
     MgUserInformation::SetCurrentUserInfo(userInfo);
+    bool bRunTests = true;
 
-    CppUnit::TextUi::TestRunner runner;
-
-    // Setup which tests to run
-    if(test.size() > 0)
+    Catch::Session session;
+    if (!test.empty())
     {
-        if(ACE_OS::strcasecmp(MG_WCHAR_TO_TCHAR(test), MG_WCHAR_TO_TCHAR(MgResources::ServerCmdTestDefaultTests)) == 0)
+        if (test == L"all")
         {
-            // Add all of the tests
-#ifdef _DEBUG
-            ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running all unit tests - Excluding Performance and CoordinateSystem. <<<<<\n\n")));
-#else
-            ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running all unit tests - Excluding Performance. <<<<<\n\n")));
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestCoordinateSystem").makeTest());
-#endif
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestDrawingService").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestFeatureService").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestGeometry").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestLogManager").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestMdfModel").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestKmlService").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestMappingService").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestMisc").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestRenderingService").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestResourceService").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestTileService").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestProfilingService").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestServerAdminService").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestServerManager").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestServiceManager").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestSiteService").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestSiteManager").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestTransformMesh").makeTest());
+            TestServiceFactory::AddSuiteToRun("[CoordinateSystem]");
+            TestServiceFactory::AddSuiteToRun("[DrawingService]");
+            TestServiceFactory::AddSuiteToRun("[FeatureService]");
+            TestServiceFactory::AddSuiteToRun("[Geometry]");
+            TestServiceFactory::AddSuiteToRun("[KmlService]");
+            TestServiceFactory::AddSuiteToRun("[LogManager]");
+            TestServiceFactory::AddSuiteToRun("[MappingService]");
+            TestServiceFactory::AddSuiteToRun("[MdfModel]");
+            TestServiceFactory::AddSuiteToRun("[Misc]");
+            TestServiceFactory::AddSuiteToRun("[Performance]");
+            TestServiceFactory::AddSuiteToRun("[RenderingService]");
+            TestServiceFactory::AddSuiteToRun("[ResourceService]");
+            TestServiceFactory::AddSuiteToRun("[ServerAdminService]");
+            TestServiceFactory::AddSuiteToRun("[ServerManager]");
+            TestServiceFactory::AddSuiteToRun("[ServiceManager]");
+            TestServiceFactory::AddSuiteToRun("[SiteManager]");
+            TestServiceFactory::AddSuiteToRun("[SiteService]");
+            TestServiceFactory::AddSuiteToRun("[TileService]");
+            TestServiceFactory::AddSuiteToRun("[ProfilingService]");
+            TestServiceFactory::AddSuiteToRun("[TransformMesh]");
         }
-        else if(ACE_OS::strcasecmp(MG_WCHAR_TO_TCHAR(test), ACE_TEXT("AllExceptCoordSys")) == 0)
+        else if (test == L"list")
         {
-            ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running all unit tests - Excluding Performance and CoordinateSystem. <<<<<\n\n")));
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestDrawingService").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestFeatureService").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestGeometry").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestLogManager").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestMdfModel").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestKmlService").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestMappingService").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestMisc").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestRenderingService").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestResourceService").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestTileService").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestProfilingService").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestServerAdminService").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestServerManager").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestServiceManager").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestSiteService").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestSiteManager").makeTest());
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestTransformMesh").makeTest());
-        }
-        else if(ACE_OS::strcasecmp(MG_WCHAR_TO_TCHAR(test), MG_WCHAR_TO_TCHAR(MgResources::ServerCmdTestListTests)) == 0)
-        {
             // Title
-            ACE_OS::printf("The following unit tests are available:\n\n");
+            ACE_OS::printf("The following test suites are available to run:\n\n");
 
             // Available tests
-#ifdef _DEBUG
-            ACE_OS::printf("  All - Excluding Performance and CoordinateSystem\n");
-#else
-            ACE_OS::printf("  All - Excluding Performance\n");
-#endif
-            ACE_OS::printf("  AllExceptCoordSys\n");
+            ACE_OS::printf("  all - Excluding Performance\n");
             ACE_OS::printf("  CoordinateSystem\n");
             ACE_OS::printf("  DrawingService\n");
             ACE_OS::printf("  FeatureService\n");
@@ -124,165 +88,22 @@
 
             bRunTests = false;
         }
-        else if(ACE_OS::strcasecmp(MG_WCHAR_TO_TCHAR(test), ACE_TEXT("CoordinateSystem")) == 0)
-        {
-            ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running only Coordinate System tests. <<<<<\n\n")));
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestCoordinateSystem").makeTest());
-        }
-        else if(ACE_OS::strcasecmp(MG_WCHAR_TO_TCHAR(test), ACE_TEXT("DrawingService")) == 0)
-        {
-            ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running only Drawing Service tests. <<<<<\n\n")));
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestDrawingService").makeTest());
-        }
-        else if(ACE_OS::strcasecmp(MG_WCHAR_TO_TCHAR(test), ACE_TEXT("FeatureService")) == 0)
-        {
-            ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running only Feature Service tests. <<<<<\n\n")));
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestFeatureService").makeTest());
-        }
-        else if(ACE_OS::strcasecmp(MG_WCHAR_TO_TCHAR(test), ACE_TEXT("Geometry")) == 0)
-        {
-            ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running only Geometry tests. <<<<<\n\n")));
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestGeometry").makeTest());
-        }
-        else if(ACE_OS::strcasecmp(MG_WCHAR_TO_TCHAR(test), ACE_TEXT("KmlService")) == 0)
-        {
-            ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running only Kml Service tests. <<<<<\n\n")));
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestKmlService").makeTest());
-        }
-        else if(ACE_OS::strcasecmp(MG_WCHAR_TO_TCHAR(test), ACE_TEXT("LogManager")) == 0)
-        {
-            ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running only Log Manager tests. <<<<<\n\n")));
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestLogManager").makeTest());
-        }
-        else if(ACE_OS::strcasecmp(MG_WCHAR_TO_TCHAR(test), ACE_TEXT("MappingService")) == 0)
-        {
-            ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running only Mapping Service tests. <<<<<\n\n")));
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestMappingService").makeTest());
-        }
-        else if(ACE_OS::strcasecmp(MG_WCHAR_TO_TCHAR(test), ACE_TEXT("MdfModel")) == 0)
-        {
-            ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running only MdfModel tests. <<<<<\n\n")));
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestMdfModel").makeTest());
-        }
-        else if(ACE_OS::strcasecmp(MG_WCHAR_TO_TCHAR(test), ACE_TEXT("Misc")) == 0)
-        {
-            ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running only Miscellaneous tests. <<<<<\n\n")));
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestMisc").makeTest());
-        }
-        else if(ACE_OS::strcasecmp(MG_WCHAR_TO_TCHAR(test), ACE_TEXT("Performance")) == 0)
-        {
-            ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running only Performance tests. <<<<<\n\n")));
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestPerformance").makeTest());
-        }
-        else if(ACE_OS::strcasecmp(MG_WCHAR_TO_TCHAR(test), ACE_TEXT("RenderingService")) == 0)
-        {
-            ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running only Rendering Service tests. <<<<<\n\n")));
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestRenderingService").makeTest());
-        }
-        else if(ACE_OS::strcasecmp(MG_WCHAR_TO_TCHAR(test), ACE_TEXT("ResourceService")) == 0)
-        {
-            ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running only Resource Service tests. <<<<<\n\n")));
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestResourceService").makeTest());
-        }
-        else if(ACE_OS::strcasecmp(MG_WCHAR_TO_TCHAR(test), ACE_TEXT("ServerAdminService")) == 0)
-        {
-            ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running only ServerAdmin Service tests. <<<<<\n\n")));
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestServerAdminService").makeTest());
-        }
-        else if(ACE_OS::strcasecmp(MG_WCHAR_TO_TCHAR(test), ACE_TEXT("ServerManager")) == 0)
-        {
-            ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running only Server Manager tests. <<<<<\n\n")));
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestServerManager").makeTest());
-        }
-        else if(ACE_OS::strcasecmp(MG_WCHAR_TO_TCHAR(test), ACE_TEXT("ServiceManager")) == 0)
-        {
-            ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running only Service Manager tests. <<<<<\n\n")));
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestServiceManager").makeTest());
-        }
-        else if(ACE_OS::strcasecmp(MG_WCHAR_TO_TCHAR(test), ACE_TEXT("SiteManager")) == 0)
-        {
-            ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running only Site Manager tests. <<<<<\n\n")));
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestSiteManager").makeTest());
-        }
-        else if(ACE_OS::strcasecmp(MG_WCHAR_TO_TCHAR(test), ACE_TEXT("SiteService")) == 0)
-        {
-            ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running only Site Service tests. <<<<<\n\n")));
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestSiteService").makeTest());
-        }
-        else if(ACE_OS::strcasecmp(MG_WCHAR_TO_TCHAR(test), ACE_TEXT("TileService")) == 0)
-        {
-            ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running only Tile Service tests. <<<<<\n\n")));
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestTileService").makeTest());
-        }
-        else if(ACE_OS::strcasecmp(MG_WCHAR_TO_TCHAR(test), ACE_TEXT("ProfilingService")) == 0)
-        {
-            ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running only Profiling Service tests. <<<<<\n\n")));
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestProfilingService").makeTest());
-        }
-        else if(ACE_OS::strcasecmp(MG_WCHAR_TO_TCHAR(test), ACE_TEXT("TransformMesh")) == 0)
-        {
-            ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running only Transform Mesh tests. <<<<<\n\n")));
-            runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestTransformMesh").makeTest());
-        }
         else
         {
-            // Test suite not found
-            ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Unrecognized unit test: %s <<<<<\n\n"), MG_WCHAR_TO_TCHAR(test)));
-            bRunTests = false;
+            std::string testToRun = "[";
+            testToRun += MgUtil::WideCharToMultiByte(test);
+            testToRun += "]";
+            TestServiceFactory::AddSuiteToRun(testToRun);
         }
-    }
-    else
-    {
-        // Add all of the tests
-#ifdef _DEBUG
-        ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running all unit tests - Excluding Performance and CoordinateSystem. <<<<<\n\n")));
-#else
-        ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running all unit tests - Excluding Performance. <<<<<\n\n")));
-        runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestCoordinateSystem").makeTest());
-#endif
-        runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestFeatureService").makeTest());
-        runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestGeometry").makeTest());
-        runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestLogManager").makeTest());
-        runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestMdfModel").makeTest());
-        runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestKmlService").makeTest());
-        runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestMappingService").makeTest());
-        runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestMisc").makeTest());
-        runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestRenderingService").makeTest());
-        runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestResourceService").makeTest());
-        runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestTileService").makeTest());
-        runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestProfilingService").makeTest());
-        runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestServerAdminService").makeTest());
-        runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestServerManager").makeTest());
-        runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestServiceManager").makeTest());
-        runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestSiteService").makeTest());
-        runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestSiteManager").makeTest());
-        runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestTransformMesh").makeTest());
-    }
+    } 
 
-    if(bRunTests)
+    int nResult = 0;
+    if (bRunTests)
     {
-        if (fileName.size() > 0)
-        {
-            ofstream outfile(MG_WCHAR_TO_CHAR(fileName.c_str()));
-
-            if (outfile.is_open())
-            {
-                runner.setOutputter(new CppUnit::XmlOutputter(&runner.result(), outfile, "ISO-8859-1"));
-                runner.run();
-                outfile.close();
-            }
-        }
-        else
-        {
-            runner.setOutputter(new CppUnit::TextOutputter(&runner.result(), std::cout));
-            runner.run();
-        }
-
-        nResult = runner.result().testFailuresTotal();
+        std::string testsOrTags;
+        TestServiceFactory::GetCatch2Tags(testsOrTags);
+        session.configData().testsOrTags.push_back(testsOrTags);
+        nResult = session.run();
     }
-
-    // Reset the current user information for this test run.
-    MgUserInformation::SetCurrentUserInfo(NULL);
-
     return nResult;
 }

Modified: trunk/MgDev/Server/src/UnitTesting/UnitTesting.vcxproj
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/UnitTesting.vcxproj	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/Server/src/UnitTesting/UnitTesting.vcxproj	2020-07-21 09:28:07 UTC (rev 9677)
@@ -94,7 +94,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>..\Common;..\Common\Cache;..\Common\Manager;..\Services\Feature;..\Services\Kml;..\Services\Mapping;..\Services\Rendering;..\Services\Resource;..\Services\ServerAdmin;..\Services\Site;..\Services\Tile;..\..\..\Common\Foundation;..\..\..\Common\Geometry;..\..\..\Common\PlatformBase;..\..\..\Common\MapGuideCommon;..\..\..\Common\MdfModel;..\..\..\Common\MdfParser;..\..\..\Common\Renderers;..\..\..\Common\Stylization;..\..\..\Oem\ACE\ACE_wrappers;..\..\..\Oem\CppUnit-1.9.14\include;..\..\..\Oem\dbxml\xerces-c-src\src;..\..\..\Oem\FDO\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\Common;..\Common\Cache;..\Common\Manager;..\Services\Feature;..\Services\Kml;..\Services\Mapping;..\Services\Rendering;..\Services\Resource;..\Services\ServerAdmin;..\Services\Site;..\Services\Tile;..\..\..\Common\Foundation;..\..\..\Common\Geometry;..\..\..\Common\PlatformBase;..\..\..\Common\MapGuideCommon;..\..\..\Common\MdfModel;..\..\..\Common\MdfParser;..\..\..\Common\Renderers;..\..\..\Common\Stylization;..\..\..\Oem\ACE\ACE_wrappers;..\..\..\Oem\catch2;..\..\..\Oem\dbxml\xerces-c-src\src;..\..\..\Oem\FDO\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <ExceptionHandling>Async</ExceptionHandling>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -104,9 +104,9 @@
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>ACEd.lib;cppunitd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>ACEd.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)MgUnitTestingd.dll</OutputFile>
-      <AdditionalLibraryDirectories>..\..\..\Oem\ACE\ACE_wrappers\lib\$(Configuration);..\..\..\Oem\CppUnit-1.9.14\lib\$(Configuration);..\..\..\Oem\FDO\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>..\..\..\Oem\ACE\ACE_wrappers\lib\$(Configuration);..\..\..\Oem\FDO\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <ProgramDatabaseFile>$(OutDir)MgUnitTestingd.pdb</ProgramDatabaseFile>
       <SubSystem>Windows</SubSystem>
@@ -120,7 +120,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>..\Common;..\Common\Cache;..\Common\Manager;..\Services\Feature;..\Services\Kml;..\Services\Mapping;..\Services\Rendering;..\Services\Resource;..\Services\ServerAdmin;..\Services\Site;..\Services\Tile;..\..\..\Common\Foundation;..\..\..\Common\Geometry;..\..\..\Common\PlatformBase;..\..\..\Common\MapGuideCommon;..\..\..\Common\MdfModel;..\..\..\Common\MdfParser;..\..\..\Common\Renderers;..\..\..\Common\Stylization;..\..\..\Oem\ACE\ACE_wrappers;..\..\..\Oem\CppUnit-1.9.14\include;..\..\..\Oem\dbxml\xerces-c-src\src;..\..\..\Oem\FDO\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\Common;..\Common\Cache;..\Common\Manager;..\Services\Feature;..\Services\Kml;..\Services\Mapping;..\Services\Rendering;..\Services\Resource;..\Services\ServerAdmin;..\Services\Site;..\Services\Tile;..\..\..\Common\Foundation;..\..\..\Common\Geometry;..\..\..\Common\PlatformBase;..\..\..\Common\MapGuideCommon;..\..\..\Common\MdfModel;..\..\..\Common\MdfParser;..\..\..\Common\Renderers;..\..\..\Common\Stylization;..\..\..\Oem\ACE\ACE_wrappers;..\..\..\Oem\catch2;..\..\..\Oem\dbxml\xerces-c-src\src;..\..\..\Oem\FDO\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <ExceptionHandling>Async</ExceptionHandling>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -130,9 +130,9 @@
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>ACEd.lib;cppunitd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>ACEd.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)MgUnitTestingd.dll</OutputFile>
-      <AdditionalLibraryDirectories>..\..\..\Oem\ACE\ACE_wrappers\lib64\$(Configuration);..\..\..\Oem\CppUnit-1.9.14\lib64\$(Configuration);..\..\..\Oem\FDO\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>..\..\..\Oem\ACE\ACE_wrappers\lib64\$(Configuration);..\..\..\Oem\FDO\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <ProgramDatabaseFile>$(OutDir)MgUnitTestingd.pdb</ProgramDatabaseFile>
       <SubSystem>Windows</SubSystem>
@@ -146,7 +146,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
-      <AdditionalIncludeDirectories>..\Common;..\Common\Cache;..\Common\Manager;..\Services\Feature;..\Services\Kml;..\Services\Mapping;..\Services\Rendering;..\Services\Resource;..\Services\ServerAdmin;..\Services\Site;..\Services\Tile;..\..\..\Common\Foundation;..\..\..\Common\Geometry;..\..\..\Common\PlatformBase;..\..\..\Common\MapGuideCommon;..\..\..\Common\MdfModel;..\..\..\Common\MdfParser;..\..\..\Common\Renderers;..\..\..\Common\Stylization;..\..\..\Oem\ACE\ACE_wrappers;..\..\..\Oem\CppUnit-1.9.14\include;..\..\..\Oem\dbxml\xerces-c-src\src;..\..\..\Oem\FDO\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\Common;..\Common\Cache;..\Common\Manager;..\Services\Feature;..\Services\Kml;..\Services\Mapping;..\Services\Rendering;..\Services\Resource;..\Services\ServerAdmin;..\Services\Site;..\Services\Tile;..\..\..\Common\Foundation;..\..\..\Common\Geometry;..\..\..\Common\PlatformBase;..\..\..\Common\MapGuideCommon;..\..\..\Common\MdfModel;..\..\..\Common\MdfParser;..\..\..\Common\Renderers;..\..\..\Common\Stylization;..\..\..\Oem\ACE\ACE_wrappers;..\..\..\Oem\catch2;..\..\..\Oem\dbxml\xerces-c-src\src;..\..\..\Oem\FDO\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <ExceptionHandling>Async</ExceptionHandling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -155,9 +155,9 @@
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>ACE.lib;cppunit.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>ACE.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)MgUnitTesting.dll</OutputFile>
-      <AdditionalLibraryDirectories>..\..\..\Oem\ACE\ACE_wrappers\lib\$(Configuration);..\..\..\Oem\CppUnit-1.9.14\lib\$(Configuration);..\..\..\Oem\FDO\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>..\..\..\Oem\ACE\ACE_wrappers\lib\$(Configuration);..\..\..\Oem\FDO\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <ProgramDatabaseFile>$(OutDir)MgUnitTesting.pdb</ProgramDatabaseFile>
       <SubSystem>Windows</SubSystem>
@@ -173,7 +173,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
-      <AdditionalIncludeDirectories>..\Common;..\Common\Cache;..\Common\Manager;..\Services\Feature;..\Services\Kml;..\Services\Mapping;..\Services\Rendering;..\Services\Resource;..\Services\ServerAdmin;..\Services\Site;..\Services\Tile;..\..\..\Common\Foundation;..\..\..\Common\Geometry;..\..\..\Common\PlatformBase;..\..\..\Common\MapGuideCommon;..\..\..\Common\MdfModel;..\..\..\Common\MdfParser;..\..\..\Common\Renderers;..\..\..\Common\Stylization;..\..\..\Oem\ACE\ACE_wrappers;..\..\..\Oem\CppUnit-1.9.14\include;..\..\..\Oem\dbxml\xerces-c-src\src;..\..\..\Oem\FDO\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\Common;..\Common\Cache;..\Common\Manager;..\Services\Feature;..\Services\Kml;..\Services\Mapping;..\Services\Rendering;..\Services\Resource;..\Services\ServerAdmin;..\Services\Site;..\Services\Tile;..\..\..\Common\Foundation;..\..\..\Common\Geometry;..\..\..\Common\PlatformBase;..\..\..\Common\MapGuideCommon;..\..\..\Common\MdfModel;..\..\..\Common\MdfParser;..\..\..\Common\Renderers;..\..\..\Common\Stylization;..\..\..\Oem\ACE\ACE_wrappers;..\..\..\Oem\catch2;..\..\..\Oem\dbxml\xerces-c-src\src;..\..\..\Oem\FDO\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <ExceptionHandling>Async</ExceptionHandling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -182,9 +182,9 @@
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>ACE.lib;cppunit.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>ACE.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)MgUnitTesting.dll</OutputFile>
-      <AdditionalLibraryDirectories>..\..\..\Oem\ACE\ACE_wrappers\lib64\$(Configuration);..\..\..\Oem\CppUnit-1.9.14\lib64\$(Configuration);..\..\..\Oem\FDO\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>..\..\..\Oem\ACE\ACE_wrappers\lib64\$(Configuration);..\..\..\Oem\FDO\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <ProgramDatabaseFile>$(OutDir)MgUnitTesting.pdb</ProgramDatabaseFile>
       <SubSystem>Windows</SubSystem>
@@ -198,28 +198,9 @@
     </Link>
   </ItemDefinitionGroup>
   <ItemGroup>
-    <ClInclude Include="CppUnitExtensions.h" />
-    <ClInclude Include="TestCoordinateSystem.h" />
-    <ClInclude Include="TestDrawingService.h" />
-    <ClInclude Include="TestFeatureService.h" />
-    <ClInclude Include="TestGeometry.h" />
-    <ClInclude Include="TestKmlService.h" />
-    <ClInclude Include="TestLogManager.h" />
+    <ClInclude Include="CatchHelperMacros.h" />
+    <ClInclude Include="TestServiceFactory.h" />
     <ClInclude Include="TestLogManagerThread.h" />
-    <ClInclude Include="TestMappingService.h" />
-    <ClInclude Include="TestMdfModel.h" />
-    <ClInclude Include="TestMisc.h" />
-    <ClInclude Include="TestPerformance.h" />
-    <ClInclude Include="TestProfilingService.h" />
-    <ClInclude Include="TestRenderingService.h" />
-    <ClInclude Include="TestResourceService.h" />
-    <ClInclude Include="TestServerAdminService.h" />
-    <ClInclude Include="TestServerManager.h" />
-    <ClInclude Include="TestServiceManager.h" />
-    <ClInclude Include="TestSiteManager.h" />
-    <ClInclude Include="TestSiteService.h" />
-    <ClInclude Include="TestTileService.h" />
-    <ClInclude Include="TestTransformMesh.h" />
     <ClInclude Include="UnitTesting.h" />
   </ItemGroup>
   <ItemGroup>
@@ -239,6 +220,7 @@
     <ClCompile Include="TestResourceService.cpp" />
     <ClCompile Include="TestServerAdminService.cpp" />
     <ClCompile Include="TestServerManager.cpp" />
+    <ClCompile Include="TestServiceFactory.cpp" />
     <ClCompile Include="TestServiceManager.cpp" />
     <ClCompile Include="TestSiteManager.cpp" />
     <ClCompile Include="TestSiteService.cpp" />

Modified: trunk/MgDev/cmake/modules/FindMapGuideThirdparty.cmake
===================================================================
--- trunk/MgDev/cmake/modules/FindMapGuideThirdparty.cmake	2020-07-21 09:14:23 UTC (rev 9676)
+++ trunk/MgDev/cmake/modules/FindMapGuideThirdparty.cmake	2020-07-21 09:28:07 UTC (rev 9677)
@@ -5,7 +5,6 @@
 
 if (ALL_THIRDPARTY)
     set(INTERNAL_ACE true)
-    set(INTERNAL_CPPUNIT true)
     set(INTERNAL_ZLIB true)
     set(INTERNAL_LIBPNG true)
     set(INTERNAL_JPEG true)
@@ -154,25 +153,6 @@
     find_package(PNG REQUIRED)
 endif (INTERNAL_PNG)
 
-if (INTERNAL_CPPUNIT)
-    message(STATUS "Using internal cppunit")
-    #find_package(CppUnit REQUIRED
-    #    PATHS ${MG_OEM_WORK_DIR}/cppunit
-    #          ${MG_OEM_WORK_DIR}/cppunit/.libs)
-    find_path(CPPUNIT_INCLUDE_DIR 
-        NAMES "cppunit/CompilerOutputter.h"
-        PATHS ${MG_OEM_WORK_DIR}/CppUnit/include)
-    find_library(CPPUNIT_LIBRARIES 
-        NAMES cppunit
-        PATHS ${MG_OEM_WORK_DIR}/CppUnit/src/cppunit/.libs)
-    message(STATUS "cppunit Include Dir: ${CPPUNIT_INCLUDE_DIR}")
-    message(STATUS "cppunit Library: ${CPPUNIT_LIBRARIES}")
-    FIND_PACKAGE_HANDLE_STANDARD_ARGS(cppunit DEFAULT_MSG CPPUNIT_LIBRARIES CPPUNIT_INCLUDE_DIR)
-    mark_as_advanced(CPPUNIT_INCLUDE_DIR CPPUNIT_LIBRARIES)
-else (INTERNAL_CPPUNIT)
-    find_package(CppUnit REQUIRED)
-endif (INTERNAL_CPPUNIT)
-
 if (INTERNAL_JSON)
     message(STATUS "Using internal jsoncpp")
     find_path(JsonCpp_INCLUDE_DIR 



More information about the mapguide-commits mailing list