[mapguide-commits] r9654 - sandbox/jng/catch2/Server/src/UnitTesting

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Jul 7 08:24:30 PDT 2020


Author: jng
Date: 2020-07-07 08:24:30 -0700 (Tue, 07 Jul 2020)
New Revision: 9654

Removed:
   sandbox/jng/catch2/Server/src/UnitTesting/TestGeometry.h
Modified:
   sandbox/jng/catch2/Server/src/UnitTesting/TestGeometry.cpp
   sandbox/jng/catch2/Server/src/UnitTesting/UnitTesting.vcxproj
Log:
Port TestGeometry to catch2

Modified: sandbox/jng/catch2/Server/src/UnitTesting/TestGeometry.cpp
===================================================================
--- sandbox/jng/catch2/Server/src/UnitTesting/TestGeometry.cpp	2020-07-07 14:28:14 UTC (rev 9653)
+++ sandbox/jng/catch2/Server/src/UnitTesting/TestGeometry.cpp	2020-07-07 15:24:30 UTC (rev 9654)
@@ -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()
+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);
 
@@ -151,7 +34,7 @@
 }
 
 
-MgLineString* TestGeometry::CreateLineString()
+MgLineString* CreateLineString()
 {
     MgGeometryFactory factory;
 
@@ -169,7 +52,7 @@
 }
 
 
-MgLinearRing* TestGeometry::CreateLinearRing()
+MgLinearRing* CreateLinearRing()
 {
     MgGeometryFactory factory;
 
@@ -190,7 +73,7 @@
 }
 
 
-MgPolygon* TestGeometry::CreatePolygon()
+MgPolygon* CreatePolygon()
 {
     MgGeometryFactory factory;
 
@@ -244,7 +127,7 @@
 }
 
 
-MgCurveString* TestGeometry::CreateCurveString(double offset)
+MgCurveString* CreateCurveString(double offset)
 {
     MgGeometryFactory factory;
 
@@ -279,7 +162,7 @@
 }
 
 
-MgCurveRing* TestGeometry::CreateCurveRing(double offset)
+MgCurveRing* CreateCurveRing(double offset)
 {
     // Ring is a closed entity.
     // Create and return a ring consisting of
@@ -313,7 +196,7 @@
 }
 
 
-MgCurvePolygon* TestGeometry::CreateCurvePolygon(double offset, int increment)
+MgCurvePolygon* CreateCurvePolygon(double offset, int increment = 100)
 {
     MgGeometryFactory factory;
 
@@ -332,7 +215,7 @@
 }
 
 
-MgMultiPoint* TestGeometry::CreateMultiPoint()
+MgMultiPoint* CreateMultiPoint()
 {
     MgGeometryFactory factory;
 
@@ -354,7 +237,7 @@
 }
 
 
-MgMultiLineString* TestGeometry::CreateMultiLineString()
+MgMultiLineString* CreateMultiLineString()
 {
     MgGeometryFactory factory;
 
@@ -387,7 +270,7 @@
 }
 
 
-MgMultiPolygon* TestGeometry::CreateMultiPolygon()
+MgMultiPolygon* CreateMultiPolygon()
 {
     MgGeometryFactory factory;
 
@@ -402,7 +285,7 @@
 }
 
 
-MgMultiCurveString* TestGeometry::CreateMultiCurveString()
+MgMultiCurveString* CreateMultiCurveString()
 {
     MgGeometryFactory factory;
 
@@ -419,7 +302,7 @@
 }
 
 
-MgMultiCurvePolygon* TestGeometry::CreateMultiCurvePolygon(INT32 numCurvePolys, double offset)
+MgMultiCurvePolygon* CreateMultiCurvePolygon(INT32 numCurvePolys, double offset)
 {
     MgGeometryFactory factory;
 
@@ -434,7 +317,7 @@
 }
 
 
-MgMultiGeometry* TestGeometry::CreateMultiGeometry()
+MgMultiGeometry* CreateMultiGeometry()
 {
     MgGeometryFactory factory;
 
@@ -468,7 +351,7 @@
 }
 
 
-MgCoordinateSystemMeasure* TestGeometry::CreateMeasureArbitrary()
+MgCoordinateSystemMeasure* CreateMeasureArbitrary()
 {
     MgCoordinateSystemFactory factory;
     Ptr<MgCoordinateSystem> pCoordSys = factory.Create(ArbitraryWkt);
@@ -476,7 +359,7 @@
 }
 
 
-MgCoordinateSystemMeasure* TestGeometry::CreateMeasureGeographic()
+MgCoordinateSystemMeasure* CreateMeasureGeographic()
 {
     MgCoordinateSystemFactory factory;
     Ptr<MgCoordinateSystem> pCoordSys = factory.Create(GeographicWkt);
@@ -484,7 +367,7 @@
 }
 
 
-MgCoordinateSystemMeasure* TestGeometry::CreateMeasureProjected()
+MgCoordinateSystemMeasure* CreateMeasureProjected()
 {
     MgCoordinateSystemFactory factory;
     Ptr<MgCoordinateSystem> pCoordSys = factory.Create(ProjectedWkt);
@@ -492,7 +375,7 @@
 }
 
 
-MgCoordinateSystem* TestGeometry::CreateCoordinateSystemArbitrary()
+MgCoordinateSystem* CreateCoordinateSystemArbitrary()
 {
     MgCoordinateSystemFactory factory;
     return factory.Create(ArbitraryWkt);
@@ -499,7 +382,7 @@
 }
 
 
-MgCoordinateSystem* TestGeometry::CreateCoordinateSystemGeographic()
+MgCoordinateSystem* CreateCoordinateSystemGeographic()
 {
     MgCoordinateSystemFactory factory;
     return factory.Create(GeographicWkt);
@@ -506,7 +389,7 @@
 }
 
 
-MgCoordinateSystem* TestGeometry::CreateCoordinateSystemProjected()
+MgCoordinateSystem* CreateCoordinateSystemProjected()
 {
     MgCoordinateSystemFactory factory;
     return factory.Create(ProjectedWkt);
@@ -513,7 +396,7 @@
 }
 
 
-bool TestGeometry::CheckGeometry(MgGeometry* geom, CREFSTRING wkt)
+bool CheckGeometry(MgGeometry* geom, CREFSTRING wkt)
 {
     bool success = true;
     MgWktReaderWriter readerWriter;
@@ -538,7 +421,7 @@
 }
 
 
-bool TestGeometry::CheckGeometry(CREFSTRING calculated, CREFSTRING base)
+bool CheckGeometry(CREFSTRING calculated, CREFSTRING base)
 {
     bool bResult = true;
 
@@ -577,8 +460,7 @@
     return bResult;
 }
 
-
-void TestGeometry::TestCase_Point()
+TEST_CASE("Point", "[Geometry]")
 {
     try
     {
@@ -588,13 +470,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 +483,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 +502,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_LineString()
+TEST_CASE("LineString", "[Geometry]")
 {
     try
     {
@@ -631,13 +512,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 +525,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 +544,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_Polygon()
+TEST_CASE("Polygon", "[Geometry]")
 {
     try
     {
@@ -674,13 +554,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 +567,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 +586,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_CurveString()
+TEST_CASE("CurveString", "[Geometry]")
 {
     try
     {
@@ -717,13 +596,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 +609,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 +628,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_CurveRing()
+TEST_CASE("CurveRing", "[Geometry]")
 {
     try
     {
@@ -759,14 +637,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 +652,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_CurvePolygon()
+TEST_CASE("CurvePolygon", "[Geometry]")
 {
     try
     {
@@ -787,13 +664,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 +677,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 +696,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_MultiPoint()
+TEST_CASE("MultiPoint", "[Geometry]")
 {
     try
     {
@@ -830,13 +706,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 +719,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 +738,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_MultiLineString()
+TEST_CASE("MultiLineString", "[Geometry]")
 {
     try
     {
@@ -873,13 +748,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 +761,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 +780,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_MultiPolygon()
+TEST_CASE("MultiPolygon", "[Geometry]")
 {
     try
     {
@@ -917,13 +791,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 +804,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 +823,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_MultiCurveString()
+TEST_CASE("MultiCurveString", "[Geometry]")
 {
     try
     {
@@ -962,13 +835,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 +848,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 +867,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_MultiCurvePolygon()
+TEST_CASE("MultiCurvePolygon", "[Geometry]")
 {
     try
     {
@@ -1013,13 +885,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 +898,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 +917,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_MultiGeometry()
+TEST_CASE("MultiGeometry", "[Geometry]")
 {
     try
     {
@@ -1061,13 +932,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 +945,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 +964,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_BufferNoMeasure()
+TEST_CASE("Buffer (no measure)", "[Geometry]")
 {
     try
     {
@@ -1103,18 +973,18 @@
         Ptr<MgPoint> point = CreatePoint();
         Ptr<MgGeometry> geom = point->Buffer(5.0, NULL);
         STRING found = geom->ToAwkt(false);
-        CPPUNIT_ASSERT(CheckGeometry(geom, found));
+        REQUIRE(CheckGeometry(geom, found));
 
         Ptr<MgMultiGeometry> multiGeometry = CreateMultiGeometry();
         geom = multiGeometry->Buffer(5.0, NULL);
         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 +992,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_BufferArbitrary()
+TEST_CASE("Buffer (arbitrary)", "[Geometry]")
 {
     try
     {
@@ -1133,13 +1002,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 +1016,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_BufferGeographic()
+TEST_CASE("Buffer (geographic)", "[Geometry]")
 {
     try
     {
@@ -1158,33 +1026,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 +1060,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_BufferProjected()
+TEST_CASE("Buffer (projected)", "[Geometry]")
 {
     try
     {
@@ -1203,11 +1070,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 +1082,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 +1092,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_Intersection()
+TEST_CASE("Intersection", "[Geometry]")
 {
     try
     {
@@ -1238,7 +1104,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);
@@ -1258,7 +1124,7 @@
         Ptr<MgLinearRingCollection> innerRings = NULL;
         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)";
@@ -1266,12 +1132,12 @@
         polygon = CreatePolygon();
         geom = point->Intersection(polygon);
         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)";
@@ -1278,7 +1144,7 @@
         polygon = CreatePolygon();
         geom = polygon->Intersection(lineString);
         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))";
@@ -1285,17 +1151,17 @@
         Ptr<MgCurveString> curveString = CreateCurveString(0.0);
         geom = curveString->Intersection(polygon);
         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)";
@@ -1302,7 +1168,7 @@
         Ptr<MgMultiLineString> multiLineString = CreateMultiLineString();
         geom = multiLineString->Intersection(multiPoint);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 10
         base = L"LINESTRING (0 1, 3 4, 4 5)";
@@ -1309,23 +1175,23 @@
         Ptr<MgMultiPolygon> multiPolygon = CreateMultiPolygon();
         geom = multiPolygon->Intersection(multiLineString);
         found = readerWriter.Write(geom);
-        CPPUNIT_ASSERT(CheckGeometry(found, base));
+        REQUIRE(CheckGeometry(found, base));
 
         //TEST 11
         Ptr<MgMultiCurveString> multiCurveString = CreateMultiCurveString();
         geom = multiCurveString->Intersection(multiPolygon);
-        CPPUNIT_ASSERT(geom == NULL);
+        REQUIRE(geom.p == nullptr);
 
         //TEST 12
         Ptr<MgMultiCurvePolygon> multiCurvePolygon = CreateMultiCurvePolygon(3, 0.0);
         geom = multiCurvePolygon->Intersection(curvePolygon);
-        CPPUNIT_ASSERT(geom == NULL);
+        REQUIRE(geom.p == 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 (...)
     {
@@ -1333,8 +1199,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_Boundary()
+TEST_CASE("Boundary", "[Geometry]")
 {
     try
     {
@@ -1343,7 +1208,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 +1215,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 +1222,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 +1229,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 +1236,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 +1248,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 +1255,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 +1262,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 +1282,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_ConvexHull()
+TEST_CASE("ConvexHull", "[Geometry]")
 {
     try
     {
@@ -1429,7 +1293,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 +1300,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 +1307,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 +1314,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 +1321,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 +1328,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 +1341,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 +1352,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 +1359,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 +1370,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 +1381,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 +1395,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_Difference()
+TEST_CASE("Difference", "[Geometry]")
 {
     try
     {
@@ -1546,7 +1409,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 +1416,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 +1423,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 +1430,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 +1441,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 +1448,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 +1456,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 +1465,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 +1478,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 +1488,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_SymetricDifference()
+TEST_CASE("SymetricDifference", "[Geometry]")
 {
     try
     {
@@ -1650,7 +1512,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 +1519,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 +1527,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 +1534,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 +1545,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 +1552,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 +1561,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 +1570,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 +1582,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 +1592,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_Union()
+TEST_CASE("Union", "[Geometry]")
 {
     try
     {
@@ -1745,7 +1606,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 +1613,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 +1621,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 +1628,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 +1635,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 +1642,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 +1649,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 +1658,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 +1669,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 +1681,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 +1691,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_Distance()
+TEST_CASE("Distance", "[Geometry]")
 {
     try
     {
@@ -1840,83 +1700,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 +1784,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_Transform()
+TEST_CASE("Transform", "[Geometry]")
 {
     try
     {
@@ -1941,31 +1800,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 +1832,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 +1852,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 +1860,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 +1874,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 +1885,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 +1899,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_Touches()
+TEST_CASE("Touches", "[Geometry]")
 {
     try
     {
@@ -2049,15 +1907,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 +1922,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 +1977,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 +2012,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 +2046,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 +2056,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_Envelope()
+TEST_CASE("Envelope", "[Geometry]")
 {
     try
     {
@@ -2221,9 +2078,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 +2088,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_GetArea()
+TEST_CASE("GetArea", "[Geometry]")
 {
     try
     {
@@ -2241,62 +2097,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);
@@ -2316,13 +2172,13 @@
 
         polygon = factory.CreatePolygon(linearRing, NULL);
         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 +2186,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_GetCentroid()
+TEST_CASE("GetCentroid", "[Geometry]")
 {
     try
     {
@@ -2343,7 +2198,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 +2205,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 +2212,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 +2219,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 +2236,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 +2243,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 +2250,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 +2257,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 +2269,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);
@@ -2436,13 +2291,13 @@
         polygon = factory.CreatePolygon(linearRing, NULL);
         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 +2305,7 @@
     }
 }
 
-
-void TestGeometry::TestCase_GetInteriorPoint()
+TEST_CASE("GetInteriorPoint", "[Geometry]")
 {
     try
     {
@@ -2471,9 +2325,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 +2335,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 +2389,7 @@
     }
 }
 
-void TestGeometry::TestCase_Simplify_BadParams()
+TEST_CASE("Simplify with bad params", "[Geometry]")
 {
     try
     {
@@ -2543,15 +2397,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(NULL, 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 +2413,7 @@
     }
 }
 
-void TestGeometry::TestCase_Simplify_DP()
+TEST_CASE("Simplify (Douglas Peucker)", "[Geometry]")
 {
     try
     {
@@ -2575,9 +2429,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(NULL != 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 +2439,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(NULL != 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 +2448,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(NULL != 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 +2458,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(NULL != 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);
+        REQUIRE(NULL == 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);
+        REQUIRE(NULL == 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(NULL != 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(NULL != 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 +2495,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(NULL != 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 +2506,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(NULL != 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 +2524,7 @@
     }
 }
 
-void TestGeometry::TestCase_Simplify_TP()
+TEST_CASE("Simplify (Topology Preserving)", "[Geometry]")
 {
     try
     {
@@ -2682,9 +2536,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(NULL != gOutput.p);
+        REQUIRE(gOutput->IsValid());
+        REQUIRE(gTest->Equals(gOutput));
 
         // PolygonWithSpike
         gTest = wktRw->Read(L"POLYGON (( \
@@ -2705,8 +2559,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(NULL != gOutput.p);
+        REQUIRE(gOutput->IsValid());
 
         // PolygonNoReduction
         gTest = wktRw->Read(L"POLYGON((20 220, 40 220, 60 220, 80 220, \
@@ -2716,9 +2570,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(NULL != 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 +2580,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(NULL != 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 +2590,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(NULL != 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 +2600,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(NULL != 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 +2612,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(NULL != 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(NULL != 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(NULL != gOutput.p);
+        REQUIRE(gOutput->IsValid());
+        REQUIRE(gTest->Equals(gOutput));
 
         // MultiPoint
         gTest = wktRw->Read(L"MULTIPOINT(80 200, 240 200, 240 60, \
@@ -2784,9 +2638,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(NULL != 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 +2648,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(NULL != 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 +2664,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(NULL != 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,7 +2680,11 @@
     }
 }
 
-void TestGeometry::TestCase_PreparedGeometryPerformance()
+#ifdef TEST_PREPARED_GEOMETRY_PERF
+TEST_CASE("Prepared Geometry Performance", "[Geometry]")
+#else
+void PreparedGeometryPerformance()
+#endif
 {
     try
     {
@@ -2851,7 +2709,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 +2801,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 +2821,7 @@
     }
 }
 
-void TestGeometry::TestCase_CurvePolygon_AsGeoJSON()
+TEST_CASE("CurvePolygon as GeoJSON", "[Geometry]")
 {
     try
     {
@@ -2973,13 +2831,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 +2845,7 @@
     }
 }
 
-void TestGeometry::TestCase_CurveString_AsGeoJSON()
+TEST_CASE("CurveString as GeoJSON", "[Geometry]")
 {
     try
     {
@@ -2997,13 +2855,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 +2869,7 @@
     }
 }
 
-void TestGeometry::TestCase_MultiCurvePolygon_AsGeoJSON()
+TEST_CASE("MultiCurvePolygon as GeoJSON", "[Geometry]")
 {
     try
     {
@@ -3021,13 +2879,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 +2893,7 @@
     }
 }
 
-void TestGeometry::TestCase_MultiCurveString_AsGeoJSON()
+TEST_CASE("MultiCurveString as GeoJSON", "[Geometry]")
 {
     try
     {
@@ -3045,13 +2903,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: sandbox/jng/catch2/Server/src/UnitTesting/TestGeometry.h
===================================================================
--- sandbox/jng/catch2/Server/src/UnitTesting/TestGeometry.h	2020-07-07 14:28:14 UTC (rev 9653)
+++ sandbox/jng/catch2/Server/src/UnitTesting/TestGeometry.h	2020-07-07 15:24:30 UTC (rev 9654)
@@ -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: sandbox/jng/catch2/Server/src/UnitTesting/UnitTesting.vcxproj
===================================================================
--- sandbox/jng/catch2/Server/src/UnitTesting/UnitTesting.vcxproj	2020-07-07 14:28:14 UTC (rev 9653)
+++ sandbox/jng/catch2/Server/src/UnitTesting/UnitTesting.vcxproj	2020-07-07 15:24:30 UTC (rev 9654)
@@ -198,12 +198,12 @@
     </Link>
   </ItemDefinitionGroup>
   <ItemGroup>
+    <ClInclude Include="CatchHelperMacros.h" />
     <ClInclude Include="CppUnitExtensions.h" />
     <ClInclude Include="TestServiceFactory.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="TestLogManagerThread.h" />



More information about the mapguide-commits mailing list