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

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Jul 9 08:16:00 PDT 2020


Author: jng
Date: 2020-07-09 08:16:00 -0700 (Thu, 09 Jul 2020)
New Revision: 9658

Removed:
   sandbox/jng/catch2/Server/src/UnitTesting/TestProfilingService.h
   sandbox/jng/catch2/Server/src/UnitTesting/TestResourceService.h
   sandbox/jng/catch2/Server/src/UnitTesting/TestServerAdminService.h
   sandbox/jng/catch2/Server/src/UnitTesting/TestServerManager.h
   sandbox/jng/catch2/Server/src/UnitTesting/TestSiteManager.h
   sandbox/jng/catch2/Server/src/UnitTesting/TestSiteService.h
Modified:
   sandbox/jng/catch2/Server/src/UnitTesting/TestProfilingService.cpp
   sandbox/jng/catch2/Server/src/UnitTesting/TestResourceService.cpp
   sandbox/jng/catch2/Server/src/UnitTesting/TestServerAdminService.cpp
   sandbox/jng/catch2/Server/src/UnitTesting/TestServerManager.cpp
   sandbox/jng/catch2/Server/src/UnitTesting/TestSiteManager.cpp
   sandbox/jng/catch2/Server/src/UnitTesting/TestSiteService.cpp
   sandbox/jng/catch2/Server/src/UnitTesting/UnitTesting.cpp
   sandbox/jng/catch2/Server/src/UnitTesting/UnitTesting.vcxproj
Log:
Port profiling, resource, server admin, server manager, site manager and site service test suites to catch2

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

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

Modified: sandbox/jng/catch2/Server/src/UnitTesting/TestResourceService.cpp
===================================================================
--- sandbox/jng/catch2/Server/src/UnitTesting/TestResourceService.cpp	2020-07-08 11:10:16 UTC (rev 9657)
+++ sandbox/jng/catch2/Server/src/UnitTesting/TestResourceService.cpp	2020-07-09 15:16:00 UTC (rev 9658)
@@ -18,19 +18,20 @@
 #include "MapGuideCommon.h"
 #include "ServiceManager.h"
 #include "ServerResourceService.h"
-#include "TestResourceService.h"
-#include "CppUnitExtensions.h"
+#include "CatchHelperMacros.h"
 #include "SecurityCache.h"
-#include "../Common/Manager/FdoConnectionManager.h"
 #include "FoundationDefs.h"
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestResourceService, "TestResourceService");
+#include "Fdo.h"
+#include "TestServiceFactory.h"
+#include "catch.hpp"
 
+
 // define thread group for tiling tests
 #define THREAD_GROUP 65530
 
 #define TESTREQUESTS 500
 
-static const INT32 MG_TEST_THREADS = 8; // Adjust this to get failures!
+const INT32 MG_TEST_THREADS = 8; // Adjust this to get failures!
 
 const STRING adminName = L"Administrator";
 const STRING adminPass = L"admin";
@@ -67,78 +68,75 @@
 STRING packageName = L"../UnitTestFiles/Shuttle.zip";
 #endif
 
-void TestResourceService::setUp()
+// data structure which is passed to each thread
+struct ResourceThreadData
 {
-}
+    INT32 threadId;
+    INT32 command;
+    bool success;
+    bool done;
+    STRING session;
+};
 
-void TestResourceService::tearDown()
+// the method which gets executed by the ACE worker thread
+ACE_THR_FUNC_RETURN RepositoryWorker(void* param)
 {
-}
+    // get the data for this thread
+    ResourceThreadData* threadData = (ResourceThreadData*)param;
+    INT32 threadId = threadData->threadId;
+    INT32 command = threadData->command;
+    STRING session = threadData->session;
 
-void TestResourceService::TestStart()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Resource Service tests.\n")));
+    ACE_DEBUG((LM_INFO, ACE_TEXT("> thread %d started\n"), threadId));
 
     try
     {
-        #ifdef _DEBUG
-        MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
-        if(pFdoConnectionManager)
-        {
-            pFdoConnectionManager->ShowCache();
-        }
-        #endif
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-}
-
-void TestResourceService::TestEnd()
-{
-    try
-    {
-        MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        if(serviceManager == 0)
-        {
-            throw new MgNullReferenceException(L"TestResourceService.TestEnd", __LINE__, __WFILE__, NULL, L"", NULL);
-        }
-
-        Ptr<MgResourceService> pService = dynamic_cast<MgResourceService*>(serviceManager->RequestService(MgServiceType::ResourceService));
-        if (pService == 0)
-        {
-            throw new MgServiceNotAvailableException(L"TestResourceService.TestEnd", __LINE__, __WFILE__, NULL, L"", NULL);
-        }
-
         // set user info
         Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
         userInfo->SetLocale(TEST_LOCALE);
+        userInfo->SetMgSessionId(session);
         MgUserInformation::SetCurrentUserInfo(userInfo);
 
-        // delete the drawing source definition
-        Ptr<MgResourceIdentifier> mapres1 = new MgResourceIdentifier(L"Library://UnitTests/Data/Shuttle.DrawingSource");
-        pService->DeleteResource(mapres1);
+        // get the tile service instance
+        MgServiceManager* serviceManager = MgServiceManager::GetInstance();
+        Ptr<MgResourceService> svcResource = dynamic_cast<MgResourceService*>(
+            serviceManager->RequestService(MgServiceType::ResourceService));
+        assert(svcResource != NULL);
 
-        #ifdef _DEBUG
-        MgFdoConnectionManager* pFdoConnectionManager = MgFdoConnectionManager::GetInstance();
-        if(pFdoConnectionManager)
+        STRING resource = L"Session:";
+        resource += session;
+        resource += L"//UnitTests/Data/test-1.FeatureSource";
+        Ptr<MgResourceIdentifier> resId = new MgResourceIdentifier(resource);
+
+        switch (command)
         {
-            pFdoConnectionManager->ShowCache();
+        case 0:
+        {
+            //Set the resource
+            Ptr<MgByteSource> contentSource = new MgByteSource(resourceContentFileName);
+            Ptr<MgByteReader> contentReader = contentSource->GetReader();
+            svcResource->SetResource(resId, contentReader, NULL);
         }
-        #endif
+        case 1:
+        {
+            //Set the resource data
+            Ptr<MgByteSource> dataSource = new MgByteSource(dataFileName);
+            Ptr<MgByteReader> dataReader = dataSource->GetReader();
+            svcResource->SetResourceData(resId, resourceDataName, L"File", dataReader);
+        }
+        // Need to add a case that updates the session with runtime map
+        }
+
+        MgUserInformation::SetCurrentUserInfo(NULL);
+        threadData->success = true;
     }
     catch (MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
+        message += L"\n";
+        message += e->GetStackTrace(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        ACE_DEBUG((LM_INFO, ACE_TEXT("RepositoryWorker(%d) - Exception:\n%W\n"), threadId, message.c_str()));
     }
     catch (...)
     {
@@ -145,7 +143,13 @@
         throw;
     }
 
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nResource Service tests completed.\n\n")));
+    // clear the user info to prevent leaks - if an exception happens and this is not called it leaks about 500 bytes!
+    MgUserInformation::SetCurrentUserInfo(NULL);
+
+    ACE_DEBUG((LM_INFO, ACE_TEXT("> thread %d done\n"), threadId));
+
+    threadData->done = true;
+    return 0;
 }
 
 ///----------------------------------------------------------------------------
@@ -153,7 +157,7 @@
 ///
 /// This test case enumerates the repositories.
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_EnumerateRepositories()
+TEST_CASE("EnumerateRepositories", "[ResourceService]")
 {
     try
     {
@@ -180,12 +184,12 @@
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
             //Try to enumerate an invalid type of repository
-            CPPUNIT_ASSERT_THROW_MG(pService->EnumerateRepositories(L"Library"), MgInvalidRepositoryTypeException*);
+            REQUIRE_THROWS_MG(pService->EnumerateRepositories(L"Library"), MgInvalidRepositoryTypeException*);
 
             //Enumerate the Session repositories
             Ptr<MgByteReader> byteReader = pService->EnumerateRepositories(L"Session");
             STRING mimeType = byteReader->GetMimeType();
-            CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+            REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
         }
 
         //Try to enumerate repositories while not an admin
@@ -195,7 +199,7 @@
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
-            CPPUNIT_ASSERT_THROW_MG(pService->EnumerateRepositories(L"Session"), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->EnumerateRepositories(L"Session"), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -202,7 +206,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -211,7 +215,7 @@
 ///
 /// This test case creates a new repository
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_CreateRepository()
+TEST_CASE("CreateRepository", "[ResourceService]")
 {
     try
     {
@@ -238,16 +242,16 @@
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
             //Try to create a repository using a NULL identifier
-            CPPUNIT_ASSERT_THROW_MG(pService->CreateRepository(NULL, NULL, NULL), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->CreateRepository(NULL, NULL, NULL), MgNullArgumentException*);
 
             //Try to create a repository using an invalid repository identifier
-            CPPUNIT_ASSERT_THROW_MG(pService->CreateRepository(&resourceIdentifier, NULL, NULL), MgInvalidRepositoryTypeException*);
+            REQUIRE_THROWS_MG(pService->CreateRepository(&resourceIdentifier, NULL, NULL), MgInvalidRepositoryTypeException*);
 
             //Create a new repository
             pService->CreateRepository(&sessionRepositoryIdentifier, NULL, NULL);
 
             //Try to create the same repository again
-            CPPUNIT_ASSERT_THROW_MG(pService->CreateRepository(&sessionRepositoryIdentifier, NULL, NULL), MgDuplicateRepositoryException*);
+            REQUIRE_THROWS_MG(pService->CreateRepository(&sessionRepositoryIdentifier, NULL, NULL), MgDuplicateRepositoryException*);
         }
 
         //Try to create a repository while not an admin
@@ -257,7 +261,7 @@
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
-            CPPUNIT_ASSERT_THROW_MG(pService->CreateRepository(&sessionRepositoryIdentifier, NULL, NULL), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->CreateRepository(&sessionRepositoryIdentifier, NULL, NULL), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -264,7 +268,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -273,7 +277,7 @@
 ///
 /// This test case updates the repository that was created earlier
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_UpdateRepository()
+TEST_CASE("UpdateRepository", "[ResourceService]")
 {
     try
     {
@@ -303,18 +307,18 @@
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
             //Try to use a NULL argument
-            CPPUNIT_ASSERT_THROW_MG(pService->UpdateRepository(NULL, NULL, NULL), MgNullArgumentException*);
-            CPPUNIT_ASSERT_THROW_MG(pService->UpdateRepository(&sessionRepositoryIdentifier, NULL, NULL), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->UpdateRepository(NULL, NULL, NULL), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->UpdateRepository(&sessionRepositoryIdentifier, NULL, NULL), MgNullArgumentException*);
 
             //Try to update a repository that doesn't exist
             contentSource = new MgByteSource(repositoryContentFileName);
             Ptr<MgByteReader> contentReader = contentSource->GetReader();
-            CPPUNIT_ASSERT_THROW_MG(pService->UpdateRepository(&sessionRepositoryNotExist, contentReader, NULL), MgRepositoryNotFoundException*);
+            REQUIRE_THROWS_MG(pService->UpdateRepository(&sessionRepositoryNotExist, contentReader, NULL), MgRepositoryNotFoundException*);
 
             //Try to update the repository using invalid content
             string str = "asdf";
             Ptr<MgByteReader> byteReader = MgUtil::GetByteReader(str);
-            CPPUNIT_ASSERT_THROW_MG(pService->UpdateRepository(&sessionRepositoryIdentifier, byteReader, NULL), MgDbXmlException*);
+            REQUIRE_THROWS_MG(pService->UpdateRepository(&sessionRepositoryIdentifier, byteReader, NULL), MgDbXmlException*);
 
             //Try to update the repository using valid header
             headerSource = new MgByteSource(repositoryHeaderFileName);
@@ -330,7 +334,7 @@
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
             Ptr<MgByteReader> contentReader = contentSource->GetReader();
-            CPPUNIT_ASSERT_THROW_MG(pService->UpdateRepository(&sessionRepositoryIdentifier, contentReader, NULL), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->UpdateRepository(&sessionRepositoryIdentifier, contentReader, NULL), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -337,7 +341,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -346,7 +350,7 @@
 ///
 /// This test case gets the content of the repository created earlier
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_GetRepositoryContent()
+TEST_CASE("GetRepositoryContent", "[ResourceService]")
 {
     try
     {
@@ -373,15 +377,15 @@
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
             //Try to get repository content using a NULL argument
-            CPPUNIT_ASSERT_THROW_MG(pService->GetRepositoryContent(NULL), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->GetRepositoryContent(NULL), MgNullArgumentException*);
 
             //Try to get the repository contents of a repository that doesn't exist
-            CPPUNIT_ASSERT_THROW_MG(pService->GetRepositoryContent(&sessionRepositoryNotExist), MgRepositoryNotFoundException*);
+            REQUIRE_THROWS_MG(pService->GetRepositoryContent(&sessionRepositoryNotExist), MgRepositoryNotFoundException*);
 
             //Get the repository content using a valid argument
             Ptr<MgByteReader> byteReader = pService->GetRepositoryContent(&sessionRepositoryIdentifier);
             STRING mimeType = byteReader->GetMimeType();
-            CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+            REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
         }
 
         //Try to get repository content while not an admin
@@ -391,7 +395,7 @@
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
-            CPPUNIT_ASSERT_THROW_MG(pService->GetRepositoryContent(&sessionRepositoryIdentifier), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->GetRepositoryContent(&sessionRepositoryIdentifier), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -398,7 +402,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -407,7 +411,7 @@
 ///
 /// This test case gets the header of the Library:// repository
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_GetRepositoryHeader()
+TEST_CASE("GetRepositoryHeader", "[ResourceService]")
 {
     try
     {
@@ -424,10 +428,10 @@
         }
 
         //Try to get repository header using a NULL argument
-        CPPUNIT_ASSERT_THROW_MG(pService->GetRepositoryHeader(NULL), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetRepositoryHeader(NULL), MgNullArgumentException*);
 
         //Try to get repository header of a repository other than Library://
-        CPPUNIT_ASSERT_THROW_MG(pService->GetRepositoryHeader(&sessionRepositoryIdentifier), MgInvalidRepositoryTypeException*);
+        REQUIRE_THROWS_MG(pService->GetRepositoryHeader(&sessionRepositoryIdentifier), MgInvalidRepositoryTypeException*);
 
         // Set the user information for the current thread to be administrator.
         Ptr<MgUserInformation> adminUserInfo = new MgUserInformation(adminName, adminPass);
@@ -436,13 +440,13 @@
         // Get the Library repository header.
         Ptr<MgByteReader> byteReader = pService->GetRepositoryHeader(&libraryRepositoryIdentifier);
         STRING mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -451,7 +455,7 @@
 ///
 /// This test case applies a resource package
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_ApplyResourcePackage()
+TEST_CASE("ApplyResourcePackage", "[ResourceService]")
 {
     try
     {
@@ -478,7 +482,7 @@
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
             //Try using NULL argument
-            CPPUNIT_ASSERT_THROW_MG(pService->ApplyResourcePackage(NULL), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->ApplyResourcePackage(NULL), MgNullArgumentException*);
 
             Ptr<MgByteSource> byteSource = new MgByteSource(packageName);
             byteSource->SetMimeType(MgMimeType::Binary);
@@ -499,7 +503,7 @@
             byteSource->SetMimeType(MgMimeType::Binary);
             Ptr<MgByteReader> byteReader = byteSource->GetReader();
 
-            CPPUNIT_ASSERT_THROW_MG(pService->ApplyResourcePackage(byteReader), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->ApplyResourcePackage(byteReader), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -506,7 +510,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -515,7 +519,7 @@
 ///
 /// This test case deletes the repository created earlier
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_DeleteRepository()
+TEST_CASE("DeleteRepository", "[ResourceService]")
 {
     try
     {
@@ -540,7 +544,7 @@
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
-            CPPUNIT_ASSERT_THROW_MG(pService->DeleteRepository(&sessionRepositoryIdentifier), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->DeleteRepository(&sessionRepositoryIdentifier), MgUnauthorizedAccessException*);
         }
 
         //Sets the user information for the current thread to be administrator
@@ -552,10 +556,10 @@
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
             //Try to use a NULL argument
-            CPPUNIT_ASSERT_THROW_MG(pService->DeleteRepository(NULL), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->DeleteRepository(NULL), MgNullArgumentException*);
 
             //Try to delete a repository that does not exist
-            CPPUNIT_ASSERT_THROW_MG(pService->DeleteRepository(&sessionRepositoryNotExist), MgRepositoryNotFoundException*);
+            REQUIRE_THROWS_MG(pService->DeleteRepository(&sessionRepositoryNotExist), MgRepositoryNotFoundException*);
 
             //Delete the repository that was created earlier in TestCase_CreateRepository
             pService->DeleteRepository(&sessionRepositoryIdentifier);
@@ -565,7 +569,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -574,7 +578,7 @@
 ///
 /// This test case checks to see if the specified resource exists.
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_ResourceExists()
+TEST_CASE("ResourceExists", "[ResourceService]")
 {
     try
     {
@@ -603,21 +607,21 @@
 
         // Try to check a NULL resource.
         bool existed = false;
-        CPPUNIT_ASSERT_THROW_MG(service->ResourceExists(NULL), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(service->ResourceExists(NULL), MgNullArgumentException*);
 
         // Try to check a resource that exists
         existed = service->ResourceExists(&libraryRepositoryIdentifier);
-        CPPUNIT_ASSERT(existed);
+        REQUIRE(existed);
 
         // Try to check a resource that does not exist.
         existed = service->ResourceExists(&resourceNotExist);
-        CPPUNIT_ASSERT(!existed);
+        REQUIRE(!existed);
     }
     catch (MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -626,7 +630,7 @@
 ///
 /// This test case enumerates the resources in Library://
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_EnumerateResources()
+TEST_CASE("EnumerateResources", "[ResourceService]")
 {
     try
     {
@@ -643,18 +647,18 @@
         }
 
         //Try to enumerate resources using a NULL argument
-        CPPUNIT_ASSERT_THROW_MG(pService->EnumerateResources(NULL, -1, L"", true), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->EnumerateResources(NULL, -1, L"", true), MgNullArgumentException*);
 
         // Enumerate the Library resource.
         Ptr<MgByteReader> byteReader = pService->EnumerateResources(&libraryRepositoryIdentifier, -1, L"", true);
         STRING mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -664,7 +668,7 @@
 /// This test case uses the SetResource function to add and update
 /// a resource
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_SetResource()
+TEST_CASE("SetResource", "[ResourceService]")
 {
     try
     {
@@ -694,8 +698,8 @@
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
             //Try to use NULL arguments
-            CPPUNIT_ASSERT_THROW_MG(pService->SetResource(NULL, NULL, NULL), MgNullArgumentException*);
-            CPPUNIT_ASSERT_THROW_MG(pService->SetResource(&resourceIdentifier, NULL, NULL), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->SetResource(NULL, NULL, NULL), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->SetResource(&resourceIdentifier, NULL, NULL), MgNullArgumentException*);
 
             //Add a new resource
             contentSource = new MgByteSource(resourceContentFileName);
@@ -721,7 +725,7 @@
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
             Ptr<MgByteReader> contentReader = contentSource->GetReader();
-            CPPUNIT_ASSERT_THROW_MG(pService->SetResource(&resourceIdentifier2, contentReader, NULL), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->SetResource(&resourceIdentifier2, contentReader, NULL), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -728,7 +732,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -738,7 +742,7 @@
 /// This test case moves the resource that was created earlier to a new
 /// location
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_MoveResource()
+TEST_CASE("MoveResource", "[ResourceService]")
 {
     try
     {
@@ -766,12 +770,12 @@
 
 
             //Try to use NULL arguments
-            CPPUNIT_ASSERT_THROW_MG(pService->MoveResource(NULL, NULL, true, false), MgNullArgumentException*);
-            CPPUNIT_ASSERT_THROW_MG(pService->MoveResource(&resourceIdentifier, NULL, true, true), MgNullArgumentException*);
-            CPPUNIT_ASSERT_THROW_MG(pService->MoveResource(NULL, &resourceIdentifier, true, false), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->MoveResource(NULL, NULL, true, false), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->MoveResource(&resourceIdentifier, NULL, true, true), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->MoveResource(NULL, &resourceIdentifier, true, false), MgNullArgumentException*);
 
             //Try to move a resource that doesn't exist
-            CPPUNIT_ASSERT_THROW_MG(pService->MoveResource(&resourceNotExist, &resourceIdentifier2, false, true), MgResourceNotFoundException*);
+            REQUIRE_THROWS_MG(pService->MoveResource(&resourceNotExist, &resourceIdentifier2, false, true), MgResourceNotFoundException*);
 
             //Move the resource that was added earlier with cascade = true, and check referencing resource.
             pService->MoveResource(&resourceIdentifier, &resourceIdentifier2, false, true);
@@ -778,7 +782,7 @@
             Ptr<MgByteReader> byteReader = pService->GetResourceContent(&resourceIdentifier4, L"");
             STRING referenceContent = byteReader->ToString();
             STRING featureIdTag = L"<ResourceId>Library://UnitTests/Data/test-2.FeatureSource</ResourceId>";
-            CPPUNIT_ASSERT(referenceContent.find(featureIdTag) != STRING::npos);
+            REQUIRE(referenceContent.find(featureIdTag) != STRING::npos);
 
             //Move the resource again with cascade = false, and check referencing resource.
             pService->MoveResource(&resourceIdentifier2, &resourceIdentifier, false, false);
@@ -785,10 +789,10 @@
             byteReader = pService->GetResourceContent(&resourceIdentifier4, L"");
             referenceContent = byteReader->ToString();
             featureIdTag = L"<ResourceId>Library://UnitTests/Data/test-2.FeatureSource</ResourceId>";
-            CPPUNIT_ASSERT(referenceContent.find(featureIdTag) != STRING::npos);
+            REQUIRE(referenceContent.find(featureIdTag) != STRING::npos);
 
             //Try to move the resource into itself (ie. itself)
-            CPPUNIT_ASSERT_THROW_MG(pService->MoveResource(&resourceIdentifier, &resourceIdentifier, false), MgInvalidArgumentException*);
+            REQUIRE_THROWS_MG(pService->MoveResource(&resourceIdentifier, &resourceIdentifier, false), MgInvalidArgumentException*);
         }
 
 
@@ -799,7 +803,7 @@
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
-            CPPUNIT_ASSERT_THROW_MG(pService->MoveResource(&resourceIdentifier, &resourceIdentifier2, false), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->MoveResource(&resourceIdentifier, &resourceIdentifier2, false), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -806,7 +810,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -816,7 +820,7 @@
 /// This test case copies the resource that was just moved to the original
 /// location that it was moved from.
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_CopyResource()
+TEST_CASE("CopyResource", "[ResourceService]")
 {
     try
     {
@@ -843,18 +847,18 @@
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
             //Try to use NULL arguments
-            CPPUNIT_ASSERT_THROW_MG(pService->CopyResource(NULL, NULL, true), MgNullArgumentException*);
-            CPPUNIT_ASSERT_THROW_MG(pService->CopyResource(&resourceIdentifier, NULL, true), MgNullArgumentException*);
-            CPPUNIT_ASSERT_THROW_MG(pService->CopyResource(NULL, &resourceIdentifier2, true), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->CopyResource(NULL, NULL, true), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->CopyResource(&resourceIdentifier, NULL, true), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->CopyResource(NULL, &resourceIdentifier2, true), MgNullArgumentException*);
 
             //Try to use source & destination as the same thing
-            CPPUNIT_ASSERT_THROW_MG(pService->CopyResource(&resourceIdentifier2, &resourceIdentifier2, false), MgInvalidArgumentException*);
+            REQUIRE_THROWS_MG(pService->CopyResource(&resourceIdentifier2, &resourceIdentifier2, false), MgInvalidArgumentException*);
 
             //Copy the moved resource to another location
             pService->CopyResource(&resourceIdentifier, &resourceIdentifier2, false);
 
             //Try to copy a resource to one that should now exist
-            CPPUNIT_ASSERT_THROW_MG(pService->CopyResource(&resourceIdentifier2, &resourceIdentifier, false), MgDuplicateResourceException*);
+            REQUIRE_THROWS_MG(pService->CopyResource(&resourceIdentifier2, &resourceIdentifier, false), MgDuplicateResourceException*);
         }
 
         //Try to copy resource while not an admin
@@ -864,7 +868,7 @@
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
-            CPPUNIT_ASSERT_THROW_MG(pService->CopyResource(&resourceIdentifier, &resourceIdentifier2, false), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->CopyResource(&resourceIdentifier, &resourceIdentifier2, false), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -871,7 +875,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 ///----------------------------------------------------------------------------
@@ -879,7 +883,7 @@
 ///
 /// This test case gets the content of the resource
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_GetResourceContent()
+TEST_CASE("GetResourceContent", "[ResourceService]")
 {
     try
     {
@@ -903,21 +907,21 @@
         byteReader = NULL;
 
         //Try to get the content using NULL arguments
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceContent(NULL, L""), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetResourceContent(NULL, L""), MgNullArgumentException*);
 
         //Try to get the content of a resource that doesn't exist
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceContent(&resourceNotExist, L""), MgResourceNotFoundException*);
+        REQUIRE_THROWS_MG(pService->GetResourceContent(&resourceNotExist, L""), MgResourceNotFoundException*);
 
         //Get the content of the resource that was added in TestCase_SetResource
         byteReader = pService->GetResourceContent(&resourceIdentifier, L"");
         STRING mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -926,7 +930,7 @@
 ///
 /// This test case gets the contents of a collection of resources
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_GetResourceContents()
+TEST_CASE("GetResourceContents", "[ResourceService]")
 {
     try
     {
@@ -947,13 +951,13 @@
         MgUserInformation::SetCurrentUserInfo(adminUserInfo);
 
         //Try to get the contents using NULL arguments
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceContents(NULL, NULL), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetResourceContents(NULL, NULL), MgNullArgumentException*);
 
         //Try to get the content of a resource that doesn't exist
         Ptr<MgStringCollection> resourceNotExistCol = new MgStringCollection();
         resourceNotExistCol->Add(resourceNotExist.ToString());
         resourceNotExistCol->Add(resourceIdentifier.ToString());
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceContents(resourceNotExistCol, NULL), MgResourceNotFoundException*);
+        REQUIRE_THROWS_MG(pService->GetResourceContents(resourceNotExistCol, NULL), MgResourceNotFoundException*);
 
         //Get the content of the resource that was added in TestCase_SetResource
         Ptr<MgStringCollection> resourceIds = new MgStringCollection();
@@ -960,10 +964,10 @@
         resourceIds->Add(resourceIdentifier.ToString());
         resourceIds->Add(resourceIdentifier4.ToString());
         Ptr<MgStringCollection> ret = pService->GetResourceContents(resourceIds, NULL);
-        CPPUNIT_ASSERT(ret->GetCount() == 2);
+        REQUIRE(ret->GetCount() == 2);
         for(int i = 0; i < ret->GetCount(); i ++)
         {
-            CPPUNIT_ASSERT(!ret->GetItem(i).empty());
+            REQUIRE(!ret->GetItem(i).empty());
         }
     }
     catch(MgException* e)
@@ -970,7 +974,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -979,7 +983,7 @@
 ///
 /// This test case gets the header of the resource
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_GetResourceHeader()
+TEST_CASE("GetResourceHeader", "[ResourceService]")
 {
     try
     {
@@ -1003,21 +1007,21 @@
         byteReader = NULL;
 
         //Try to get the content using NULL arguments
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceHeader(NULL), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetResourceHeader(NULL), MgNullArgumentException*);
 
         //Try to get the content of a resource that doesn't exist
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceHeader(&resourceNotExist), MgResourceNotFoundException*);
+        REQUIRE_THROWS_MG(pService->GetResourceHeader(&resourceNotExist), MgResourceNotFoundException*);
 
         //Get the content of the resource that was added in TestCase_SetResource
         byteReader = pService->GetResourceHeader(&resourceIdentifier);
         STRING mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -1026,7 +1030,7 @@
 ///
 /// This test case enumerates the references of the resource
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_EnumerateReferences()
+TEST_CASE("EnumerateReferences", "[ResourceService]")
 {
     try
     {
@@ -1050,18 +1054,18 @@
         byteReader = NULL;
 
         //Try to get the content using NULL arguments
-        CPPUNIT_ASSERT_THROW_MG(pService->EnumerateReferences(NULL), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->EnumerateReferences(NULL), MgNullArgumentException*);
 
         //Get the content of the resource that was added in TestCase_SetResource
         byteReader = pService->EnumerateReferences(&resourceIdentifier);
         STRING mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -1070,7 +1074,7 @@
 ///
 /// This test case changes the owner of a resource
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_ChangeResourceOwner()
+TEST_CASE("ChangeResourceOwner", "[ResourceService]")
 {
     try
     {
@@ -1097,14 +1101,14 @@
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
             //Try to change the user using NULL arguments
-            CPPUNIT_ASSERT_THROW_MG(pService->ChangeResourceOwner(NULL, L"", false), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->ChangeResourceOwner(NULL, L"", false), MgNullArgumentException*);
 
             //Try to change the owner of a resource that doesn't exist
             //TODO: this does not throw exception, should it?
-            //CPPUNIT_ASSERT_THROW_MG(pService->ChangeResourceOwner(&resourceNotExist, adminName, false), MgResourceNotFoundException*);
+            //REQUIRE_THROWS_MG(pService->ChangeResourceOwner(&resourceNotExist, adminName, false), MgResourceNotFoundException*);
 
             //Try to change the owner of the resource created to a user that doesn't exist
-            CPPUNIT_ASSERT_THROW_MG(pService->ChangeResourceOwner(&resourceIdentifier, L"DoesNotExist", false), MgUserNotFoundException*);
+            REQUIRE_THROWS_MG(pService->ChangeResourceOwner(&resourceIdentifier, L"DoesNotExist", false), MgUserNotFoundException*);
 
             //Change the resource owner to administrator
             pService->ChangeResourceOwner(&resourceIdentifier, adminName, false);
@@ -1117,7 +1121,7 @@
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
-            CPPUNIT_ASSERT_THROW_MG(pService->ChangeResourceOwner(&resourceIdentifier, adminName, false), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->ChangeResourceOwner(&resourceIdentifier, adminName, false), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -1124,7 +1128,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -1133,7 +1137,7 @@
 ///
 /// This test case sets all decendants of the resource to inherit permissions
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_InheritPermissionsFrom()
+TEST_CASE("InheritPermissionsFrom", "[ResourceService]")
 {
     try
     {
@@ -1160,7 +1164,7 @@
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
             //Try to use a NULL argument
-            CPPUNIT_ASSERT_THROW_MG(pService->InheritPermissionsFrom(NULL), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->InheritPermissionsFrom(NULL), MgNullArgumentException*);
 
             //Set resources to inherit permissions
             pService->InheritPermissionsFrom(&libraryRepositoryIdentifier);
@@ -1173,7 +1177,7 @@
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
-            CPPUNIT_ASSERT_THROW_MG(pService->InheritPermissionsFrom(&libraryRepositoryIdentifier), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->InheritPermissionsFrom(&libraryRepositoryIdentifier), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -1180,7 +1184,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -1190,7 +1194,7 @@
 /// This test case enumerates the resource data of the resource that was
 /// added earlier
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_EnumerateResourceData()
+TEST_CASE("EnumerateResourceData", "[ResourceService]")
 {
     try
     {
@@ -1214,21 +1218,21 @@
         byteReader = NULL;
 
         //Try enumerating using a NULL argument
-        CPPUNIT_ASSERT_THROW_MG(pService->EnumerateResourceData(NULL), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->EnumerateResourceData(NULL), MgNullArgumentException*);
 
         //Try enumerating using a resource that doesn't exist
-        CPPUNIT_ASSERT_THROW_MG(pService->EnumerateResourceData(&resourceNotExist), MgResourceNotFoundException*);
+        REQUIRE_THROWS_MG(pService->EnumerateResourceData(&resourceNotExist), MgResourceNotFoundException*);
 
         //Enumerate the resource data of the resource added earlier
         byteReader = pService->EnumerateResourceData(&resourceIdentifier);
         STRING mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -1237,7 +1241,7 @@
 ///
 /// This test case sets the data of a resource
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_SetResourceData()
+TEST_CASE("SetResourceData", "[ResourceService]")
 {
     try
     {
@@ -1267,12 +1271,12 @@
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
             //Try using a NULL identifier
-            CPPUNIT_ASSERT_THROW_MG(pService->SetResourceData(NULL, L"", L"", NULL), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->SetResourceData(NULL, L"", L"", NULL), MgNullArgumentException*);
 
             //Try to name the resource data with a 0 character string
             dataSource = new MgByteSource(dataFileName);
             Ptr<MgByteReader> dataReader = dataSource->GetReader();
-            CPPUNIT_ASSERT_THROW_MG(pService->SetResourceData(&resourceIdentifier, L"", L"File", dataReader), MgInvalidArgumentException*);
+            REQUIRE_THROWS_MG(pService->SetResourceData(&resourceIdentifier, L"", L"File", dataReader), MgInvalidArgumentException*);
 
             //Set the resource data
             dataSource = new MgByteSource(dataFileName);
@@ -1289,7 +1293,7 @@
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
             Ptr<MgByteReader> dataReader = dataSource->GetReader();
-            CPPUNIT_ASSERT_THROW_MG(pService->SetResourceData(&resourceIdentifier, resourceDataName, L"File", dataReader), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->SetResourceData(&resourceIdentifier, resourceDataName, L"File", dataReader), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -1296,7 +1300,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -1305,7 +1309,7 @@
 ///
 /// This test case renames a resource's data
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_RenameResourceData()
+TEST_CASE("RenameResourceData", "[ResourceService]")
 {
     try
     {
@@ -1332,16 +1336,16 @@
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
             //Try using a null argument for the idenfier
-            CPPUNIT_ASSERT_THROW_MG(pService->RenameResourceData(NULL, resourceDataName, resourceDataName2, true), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->RenameResourceData(NULL, resourceDataName, resourceDataName2, true), MgNullArgumentException*);
 
             //Try using a resource identifier that doesn't exist
-            CPPUNIT_ASSERT_THROW_MG(pService->RenameResourceData(&resourceNotExist, resourceDataName, resourceDataName2, true), MgResourceNotFoundException*);
+            REQUIRE_THROWS_MG(pService->RenameResourceData(&resourceNotExist, resourceDataName, resourceDataName2, true), MgResourceNotFoundException*);
 
             //Try to use a resource data name that doesn't exist
-            CPPUNIT_ASSERT_THROW_MG(pService->RenameResourceData(&resourceIdentifier, L"DoesNotExist", resourceDataName2, true), MgResourceDataNotFoundException*);
+            REQUIRE_THROWS_MG(pService->RenameResourceData(&resourceIdentifier, L"DoesNotExist", resourceDataName2, true), MgResourceDataNotFoundException*);
 
             //Try to name the resource data with a 0 character string
-            CPPUNIT_ASSERT_THROW_MG(pService->RenameResourceData(&resourceIdentifier, resourceDataName, L"", true), MgInvalidArgumentException*);
+            REQUIRE_THROWS_MG(pService->RenameResourceData(&resourceIdentifier, resourceDataName, L"", true), MgInvalidArgumentException*);
 
             //Try to do a valid rename
             pService->RenameResourceData(&resourceIdentifier, resourceDataName, resourceDataName2, false);
@@ -1355,7 +1359,7 @@
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
-            CPPUNIT_ASSERT_THROW_MG(pService->RenameResourceData(&resourceIdentifier, resourceDataName, resourceDataName2, false), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->RenameResourceData(&resourceIdentifier, resourceDataName, resourceDataName2, false), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -1362,7 +1366,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -1371,7 +1375,7 @@
 ///
 /// This test case retrieves the data of the resource
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_GetResourceData()
+TEST_CASE("GetResourceData", "[ResourceService]")
 {
     try
     {
@@ -1395,16 +1399,16 @@
         byteReader = NULL;
 
         //Try to get resource data using a NULL identifier
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceData(NULL, resourceDataName, L""), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetResourceData(NULL, resourceDataName, L""), MgNullArgumentException*);
 
         //Try to get resource data using an empty data name string
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceData(&resourceIdentifier, L"", L""), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->GetResourceData(&resourceIdentifier, L"", L""), MgInvalidArgumentException*);
 
         //Try to get the resource data of a resource that does not exist
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceData(&resourceNotExist, resourceDataName, L""), MgResourceNotFoundException*);
+        REQUIRE_THROWS_MG(pService->GetResourceData(&resourceNotExist, resourceDataName, L""), MgResourceNotFoundException*);
 
         //Try to get the resource data of a data name that doesn't exist
-        CPPUNIT_ASSERT_THROW_MG(pService->GetResourceData(&resourceIdentifier, L"DoesNotExist", L""), MgResourceDataNotFoundException*);
+        REQUIRE_THROWS_MG(pService->GetResourceData(&resourceIdentifier, L"DoesNotExist", L""), MgResourceDataNotFoundException*);
 
         //Get resource data using valid arguments
         byteReader = pService->GetResourceData(&resourceIdentifier, resourceDataName, L"");
@@ -1413,7 +1417,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -1422,7 +1426,7 @@
 ///
 /// This test case deletes the data of the resource
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_DeleteResourceData()
+TEST_CASE("DeleteResourceData", "[ResourceService]")
 {
     try
     {
@@ -1449,13 +1453,13 @@
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
             //Try using a NULL resource identifier
-            CPPUNIT_ASSERT_THROW_MG(pService->DeleteResourceData(NULL, resourceDataName), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->DeleteResourceData(NULL, resourceDataName), MgNullArgumentException*);
 
             //Try using an empty string for the resource data name
-            CPPUNIT_ASSERT_THROW_MG(pService->DeleteResourceData(&resourceIdentifier, L""), MgInvalidArgumentException*);
+            REQUIRE_THROWS_MG(pService->DeleteResourceData(&resourceIdentifier, L""), MgInvalidArgumentException*);
 
             //Try deleting data that does not exist
-            CPPUNIT_ASSERT_THROW_MG(pService->DeleteResourceData(&resourceIdentifier, L"DoesNotExist"), MgResourceDataNotFoundException*);
+            REQUIRE_THROWS_MG(pService->DeleteResourceData(&resourceIdentifier, L"DoesNotExist"), MgResourceDataNotFoundException*);
 
             //Delete the resource data that was set earlier
             pService->DeleteResourceData(&resourceIdentifier, resourceDataName);
@@ -1468,7 +1472,7 @@
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
-            CPPUNIT_ASSERT_THROW_MG(pService->DeleteResourceData(&resourceIdentifier, resourceDataName2), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->DeleteResourceData(&resourceIdentifier, resourceDataName2), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -1475,7 +1479,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
@@ -1485,7 +1489,7 @@
 /// This test case deletes the resources that were added and copied in the
 /// earlier tests
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_DeleteResource()
+TEST_CASE("DeleteResource", "[ResourceService]")
 {
     try
     {
@@ -1518,7 +1522,7 @@
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
             //Try to use a NULL argument
-            CPPUNIT_ASSERT_THROW_MG(pService->DeleteResource(NULL), MgNullArgumentException*);
+            REQUIRE_THROWS_MG(pService->DeleteResource(NULL), MgNullArgumentException*);
 
             //Try to delete a resource that doesn't exist. We allow doing this for performance reason.
             pService->DeleteResource(&resourceNotExist);
@@ -1536,7 +1540,7 @@
         {
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
-            CPPUNIT_ASSERT_THROW_MG(pService->DeleteResource(&resourceIdentifier), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->DeleteResource(&resourceIdentifier), MgUnauthorizedAccessException*);
         }
 
         // Try to delete resource after FDO exception
@@ -1578,7 +1582,7 @@
 
             Ptr<MgDataReader> reader = pFeatureService->SelectAggregate(resource, className, options);
             bool bResult = reader->ReadNext();
-            CPPUNIT_ASSERT(bResult);
+            REQUIRE(bResult);
 
             reader->Close();
             reader = NULL; // Holds on to the file, so must release resources!
@@ -1591,12 +1595,12 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(FdoException* e)
     {
         FDO_SAFE_RELEASE(e);
-        CPPUNIT_FAIL("FdoException occurred");
+        FAIL("FdoException occurred");
     }
     catch(...)
     {
@@ -1609,7 +1613,7 @@
 ///
 /// This test case enumerates the unmanaged data
 ///----------------------------------------------------------------------------
-void TestResourceService::TestCase_EnumerateUnmanagedData()
+TEST_CASE("EnumerateUnmanagedData", "[ResourceService]")
 {
     try
     {
@@ -1628,107 +1632,23 @@
         // Try to enumerate mappings
         Ptr<MgByteReader> byteReader0 = pService->EnumerateUnmanagedData(L"", false, L"FOLDERS", L"");
         STRING mimeType0 = byteReader0->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType0.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType0.c_str(), MgMimeType::Xml.c_str()) == 0);
 
         // Enumerate all unmanaged data files
         Ptr<MgByteReader> byteReader1 = pService->EnumerateUnmanagedData(L"", true, L"FILES", L"");
         STRING mimeType1 = byteReader1->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType1.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType1.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
 }
 
-// data structure which is passed to each thread
-struct ResourceThreadData
+TEST_CASE("RepositoryBusy", "[ResourceService]")
 {
-    INT32 threadId;
-    INT32 command;
-    bool success;
-    bool done;
-    STRING session;
-};
-
-// the method which gets executed by the ACE worker thread
-ACE_THR_FUNC_RETURN RepositoryWorker(void* param)
-{
-    // get the data for this thread
-    ResourceThreadData* threadData = (ResourceThreadData*)param;
-    INT32 threadId = threadData->threadId;
-    INT32 command = threadData->command;
-    STRING session = threadData->session;
-
-    ACE_DEBUG((LM_INFO, ACE_TEXT("> thread %d started\n"), threadId));
-
-    try
-    {
-        // set user info
-        Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
-        userInfo->SetLocale(TEST_LOCALE);
-        userInfo->SetMgSessionId(session);
-        MgUserInformation::SetCurrentUserInfo(userInfo);
-
-        // get the tile service instance
-        MgServiceManager* serviceManager = MgServiceManager::GetInstance();
-        Ptr<MgResourceService> svcResource = dynamic_cast<MgResourceService*>(
-            serviceManager->RequestService(MgServiceType::ResourceService));
-        assert(svcResource != NULL);
-
-        STRING resource = L"Session:";
-        resource += session;
-        resource += L"//UnitTests/Data/test-1.FeatureSource";
-        Ptr<MgResourceIdentifier> resId = new MgResourceIdentifier(resource);
-
-        switch (command)
-        {
-        case 0:
-            {
-            //Set the resource
-            Ptr<MgByteSource> contentSource = new MgByteSource(resourceContentFileName);
-            Ptr<MgByteReader> contentReader = contentSource->GetReader();
-            svcResource->SetResource(resId, contentReader, NULL);
-            }
-        case 1:
-            {
-            //Set the resource data
-            Ptr<MgByteSource> dataSource = new MgByteSource(dataFileName);
-            Ptr<MgByteReader> dataReader = dataSource->GetReader();
-            svcResource->SetResourceData(resId, resourceDataName, L"File", dataReader);
-            }
-            // Need to add a case that updates the session with runtime map
-        }
-
-        MgUserInformation::SetCurrentUserInfo(NULL);
-        threadData->success = true;
-    }
-    catch (MgException* e)
-    {
-        STRING message = e->GetDetails(TEST_LOCALE);
-        message += L"\n";
-        message += e->GetStackTrace(TEST_LOCALE);
-        SAFE_RELEASE(e);
-        ACE_DEBUG((LM_INFO, ACE_TEXT("RepositoryWorker(%d) - Exception:\n%W\n"), threadId, message.c_str()));
-    }
-    catch (...)
-    {
-        throw;
-    }
-
-    // clear the user info to prevent leaks - if an exception happens and this is not called it leaks about 500 bytes!
-    MgUserInformation::SetCurrentUserInfo(NULL);
-
-    ACE_DEBUG((LM_INFO, ACE_TEXT("> thread %d done\n"), threadId));
-
-    threadData->done = true;
-    return 0;
-}
-
-void TestResourceService::TestCase_RepositoryBusy()
-{
     // specify the number of threads to use
     const INT32 numThreads = MG_TEST_THREADS;
     ResourceThreadData threadData[numThreads];
@@ -1838,7 +1758,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch (...)
     {

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

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

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

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

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

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

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

Modified: sandbox/jng/catch2/Server/src/UnitTesting/TestSiteService.cpp
===================================================================
--- sandbox/jng/catch2/Server/src/UnitTesting/TestSiteService.cpp	2020-07-08 11:10:16 UTC (rev 9657)
+++ sandbox/jng/catch2/Server/src/UnitTesting/TestSiteService.cpp	2020-07-09 15:16:00 UTC (rev 9658)
@@ -18,10 +18,10 @@
 #include "MapGuideCommon.h"
 #include "ServiceManager.h"
 #include "ServerSiteService.h"
-#include "TestSiteService.h"
-#include "CppUnitExtensions.h"
+#include "CatchHelperMacros.h"
 #include "FoundationDefs.h"
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestSiteService, "TestSiteService");
+#include "TestServiceFactory.h"
+#include "catch.hpp"
 
 const STRING adminName = L"Administrator";
 const STRING adminPass = L"admin";
@@ -44,32 +44,12 @@
 
 STRING session;
 
-
-void TestSiteService::setUp()
-{
-}
-
-void TestSiteService::tearDown()
-{
-}
-
-void TestSiteService::TestStart()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nRunning Site Service tests.\n")));
-}
-
-void TestSiteService::TestEnd()
-{
-    ACE_DEBUG((LM_INFO, ACE_TEXT("\nSite Service tests completed.\n\n")));
-}
-
-
 ///----------------------------------------------------------------------------
 /// Test Case Description:
 ///
 /// This test case adds two new users
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_AddUser()
+TEST_CASE("AddUser", "[SiteService]")
 {
     try
     {
@@ -86,9 +66,9 @@
         }
 
         //Try to add a user with empty strings
-        CPPUNIT_ASSERT_THROW_MG(pService->AddUser(L"", L"username", L"password", L"description"), MgInvalidArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->AddUser(userId1, L"", L"password", L"description"), MgInvalidArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->AddUser(userId1, L"username", L"", L"description"), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->AddUser(L"", L"username", L"password", L"description"), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->AddUser(userId1, L"", L"password", L"description"), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->AddUser(userId1, L"username", L"", L"description"), MgInvalidArgumentException*);
 
         //Add 2 new users
         pService->AddUser(userId1, L"TestUser1", L"TestPassword1", L"This is a test user");
@@ -95,13 +75,13 @@
         pService->AddUser(userId2, L"TestUser2", L"TestPassword2", L"This is another test user");
 
         //Try to add an already existing user id
-        CPPUNIT_ASSERT_THROW_MG(pService->AddUser(userId1, L"TestUser1", L"TestPassword1", L"This is a test user"), MgDuplicateUserException*);
+        REQUIRE_THROWS_MG(pService->AddUser(userId1, L"TestUser1", L"TestPassword1", L"This is a test user"), MgDuplicateUserException*);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -115,7 +95,7 @@
 ///
 /// This test case enumerates the users
 ///-------------------------------------------- --------------------------------
-void TestSiteService::TestCase_EnumerateUsers()
+TEST_CASE("EnumerateUsers", "[SiteService]")
 {
     try
     {
@@ -136,18 +116,18 @@
         //Enumerate users not including groups
         byteReader = pService->EnumerateUsers(L"", L"", false);
         STRING mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
 
         //Enumerate users including groups
         byteReader = pService->EnumerateUsers(L"", L"", true);
         mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -161,7 +141,7 @@
 ///
 /// This test case updates one of the users added earlier
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_UpdateUser()
+TEST_CASE("UpdateUser", "[SiteService]")
 {
     try
     {
@@ -178,13 +158,13 @@
         }
 
         //Try to update user with empty strings
-        CPPUNIT_ASSERT_THROW_MG(pService->UpdateUser(L"", L"", L"username", L"password", L"description"), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->UpdateUser(L"", L"", L"username", L"password", L"description"), MgInvalidArgumentException*);
 
         //Try to update a user that does not exist
-        CPPUNIT_ASSERT_THROW_MG(pService->UpdateUser(L"DoesNotExist", L"", L"username", L"password", L"description"), MgUserNotFoundException*);
+        REQUIRE_THROWS_MG(pService->UpdateUser(L"DoesNotExist", L"", L"username", L"password", L"description"), MgUserNotFoundException*);
 
         //Try to change the user id to one that already exists
-        CPPUNIT_ASSERT_THROW_MG(pService->UpdateUser(userId1, userId1, L"newUsername", L"newPassword", L"newDescription"), MgDuplicateUserException*);
+        REQUIRE_THROWS_MG(pService->UpdateUser(userId1, userId1, L"newUsername", L"newPassword", L"newDescription"), MgDuplicateUserException*);
 
         //Update the user that was created earlier
         pService->UpdateUser(userId1, L"", L"newUsername", L"newPassword", L"newDescription");
@@ -193,7 +173,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -207,7 +187,7 @@
 ///
 /// This test case adds a group
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_AddGroup()
+TEST_CASE("AddGroup", "[SiteService]")
 {
     try
     {
@@ -224,7 +204,7 @@
         }
 
         //Try to add an empty group name
-        CPPUNIT_ASSERT_THROW_MG(pService->AddGroup(L"", L"This will throw an exception"), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->AddGroup(L"", L"This will throw an exception"), MgInvalidArgumentException*);
 
         //Add a new group
         pService->AddGroup(groupName1, L"This is a group used for testing");
@@ -231,13 +211,13 @@
         pService->AddGroup(groupName2, L"This is a second group used for testing");
 
         //Try to add the group again
-        CPPUNIT_ASSERT_THROW_MG(pService->AddGroup(groupName1, L"This is a duplicate group"), MgDuplicateGroupException*);
+        REQUIRE_THROWS_MG(pService->AddGroup(groupName1, L"This is a duplicate group"), MgDuplicateGroupException*);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -251,7 +231,7 @@
 ///
 /// This test case adds they newly created users to the newly created groups
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_GrantGroupMembershipsToUsers()
+TEST_CASE("GrantGroupMembershipToUsers", "[SiteService]")
 {
     //TODO: does not throw exceptions described in MgServerSiteService.cpp
     try
@@ -272,8 +252,8 @@
         Ptr<MgStringCollection> userCollection = new MgStringCollection();
 
         //Try to use NULL arguments
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantGroupMembershipsToUsers(NULL, userCollection), MgNullArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantGroupMembershipsToUsers(groupCollection, NULL), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->GrantGroupMembershipsToUsers(NULL, userCollection), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->GrantGroupMembershipsToUsers(groupCollection, NULL), MgNullArgumentException*);
 
         //Make both new users members of first group
         groupCollection->Add(groupName1);
@@ -292,19 +272,19 @@
         groupCollection = new MgStringCollection();
         userCollection = new MgStringCollection();
         userCollection->Add(L"DoesNotExist");
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantGroupMembershipsToUsers(groupCollection, userCollection), MgUserNotFoundException*);
+        REQUIRE_THROWS_MG(pService->GrantGroupMembershipsToUsers(groupCollection, userCollection), MgUserNotFoundException*);
 
         //Try with a group that doesn't exist
         groupCollection = new MgStringCollection();
         userCollection = new MgStringCollection();
         groupCollection->Add(L"DoesNotExist");
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantGroupMembershipsToUsers(groupCollection, userCollection), MgGroupNotFoundException*);
+        REQUIRE_THROWS_MG(pService->GrantGroupMembershipsToUsers(groupCollection, userCollection), MgGroupNotFoundException*);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -318,7 +298,7 @@
 ///
 /// This test case gives the role of author to one of the newly created users
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_GrantRoleMembershipsToUsers()
+TEST_CASE("GrantRoleMembershipsToUsers", "[SiteService]")
 {
     try
     {
@@ -340,14 +320,14 @@
         //Try using NULL arguments
         roleCollection = new MgStringCollection();
         userCollection = new MgStringCollection();
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantRoleMembershipsToUsers(NULL, userCollection), MgNullArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantRoleMembershipsToUsers(roleCollection, NULL), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->GrantRoleMembershipsToUsers(NULL, userCollection), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->GrantRoleMembershipsToUsers(roleCollection, NULL), MgNullArgumentException*);
 
         //Try using with a user that does not exist
         roleCollection = new MgStringCollection();
         userCollection = new MgStringCollection();
         userCollection->Add(L"DoesNotExist");
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantRoleMembershipsToUsers(roleCollection, userCollection), MgUserNotFoundException*);
+        REQUIRE_THROWS_MG(pService->GrantRoleMembershipsToUsers(roleCollection, userCollection), MgUserNotFoundException*);
 
         //Try to give the role viewer to one of the newly created users
         roleCollection = new MgStringCollection();
@@ -354,7 +334,7 @@
         userCollection = new MgStringCollection();
         roleCollection->Add(MgRole::Viewer);
         userCollection->Add(userId1);
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantRoleMembershipsToUsers(roleCollection, userCollection), MgInvalidOperationException*);
+        REQUIRE_THROWS_MG(pService->GrantRoleMembershipsToUsers(roleCollection, userCollection), MgInvalidOperationException*);
 
         //Give the role of author to one of the newly created users
         roleCollection = new MgStringCollection();
@@ -367,7 +347,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -381,7 +361,7 @@
 ///
 /// This test case
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_GrantRoleMembershipsToGroups()
+TEST_CASE("GrantRoleMembershipsToGroups", "[SiteService]")
 {
     try
     {
@@ -403,14 +383,14 @@
         //Try using NULL arguments
         roleCollection = new MgStringCollection();
         groupCollection = new MgStringCollection();
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantRoleMembershipsToGroups(NULL, groupCollection), MgNullArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantRoleMembershipsToGroups(roleCollection, NULL), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->GrantRoleMembershipsToGroups(NULL, groupCollection), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->GrantRoleMembershipsToGroups(roleCollection, NULL), MgNullArgumentException*);
 
         //Try using with a group that does not exist
         roleCollection = new MgStringCollection();
         groupCollection = new MgStringCollection();
         groupCollection->Add(L"DoesNotExist");
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantRoleMembershipsToGroups(roleCollection, groupCollection), MgGroupNotFoundException*);
+        REQUIRE_THROWS_MG(pService->GrantRoleMembershipsToGroups(roleCollection, groupCollection), MgGroupNotFoundException*);
 
         //Try to give the role viewer to one of the newly created groups
         roleCollection = new MgStringCollection();
@@ -417,7 +397,7 @@
         groupCollection = new MgStringCollection();
         roleCollection->Add(MgRole::Viewer);
         groupCollection->Add(groupName1);
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantRoleMembershipsToGroups(roleCollection, groupCollection), MgInvalidOperationException*);
+        REQUIRE_THROWS_MG(pService->GrantRoleMembershipsToGroups(roleCollection, groupCollection), MgInvalidOperationException*);
 
         //Give the role of administrator to one of the newly created groups
         roleCollection = new MgStringCollection();
@@ -430,7 +410,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -444,7 +424,7 @@
 ///
 /// This test case updates the groups created earlier
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_UpdateGroup()
+TEST_CASE("UpdateGroup", "[SiteService]")
 {
     try
     {
@@ -461,13 +441,13 @@
         }
 
         //Try to update using an empty string for group name
-        CPPUNIT_ASSERT_THROW_MG(pService->UpdateGroup(L"", L"", L""), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->UpdateGroup(L"", L"", L""), MgInvalidArgumentException*);
 
         //Try to update a group that does not exist
-        CPPUNIT_ASSERT_THROW_MG(pService->UpdateGroup(L"DoesNotExist", L"", L"description for non-existing group"), MgGroupNotFoundException*);
+        REQUIRE_THROWS_MG(pService->UpdateGroup(L"DoesNotExist", L"", L"description for non-existing group"), MgGroupNotFoundException*);
 
         //Try to change the group name to something that already exists
-        CPPUNIT_ASSERT_THROW_MG(pService->UpdateGroup(groupName1, groupName1, L"This shouldn't work since we'll have a duplicate group name"), MgDuplicateGroupException*);
+        REQUIRE_THROWS_MG(pService->UpdateGroup(groupName1, groupName1, L"This shouldn't work since we'll have a duplicate group name"), MgDuplicateGroupException*);
 
         //Update group description for first group
         pService->UpdateGroup(groupName1, L"", L"new description for this group used for testing");
@@ -479,7 +459,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -493,7 +473,7 @@
 ///
 /// This test case enumerates the current groups
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_EnumerateGroups()
+TEST_CASE("EnumerateGroups", "[SiteService]")
 {
     try
     {
@@ -515,23 +495,23 @@
         //Enumerate groups that a particular user is part of
         byteReader = pService->EnumerateGroups(userId1, L"");
         mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
 
         //Enumerate groups that a particular user is part of
         byteReader = pService->EnumerateGroups(userId2, L"");
         mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
 
         //Enumerate all groups
         byteReader = pService->EnumerateGroups(L"", L"");
         mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -545,7 +525,7 @@
 ///
 /// This test case enumerates the current roles
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_EnumerateRoles()
+TEST_CASE("EnumerateRoles", "[SiteService]")
 {
     try
     {
@@ -565,33 +545,33 @@
         INT32 collSize;
 
         //Try to enumerate roles by specifying both a user and group
-        CPPUNIT_ASSERT_THROW_MG(pService->EnumerateRoles(userId1, groupName1), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->EnumerateRoles(userId1, groupName1), MgInvalidArgumentException*);
 
         //Enumerate the roles of a user
         roleCollection = pService->EnumerateRoles(userId1, L"");
         collSize = roleCollection->GetCount();
-        CPPUNIT_ASSERT(collSize == 1);
+        REQUIRE(collSize == 1);
 
         //Enumerate the roles of a user
         roleCollection = pService->EnumerateRoles(userId2, L"");
         collSize = roleCollection->GetCount();
-        CPPUNIT_ASSERT(collSize == 0);
+        REQUIRE(collSize == 0);
 
         //Enumerate the roles of a group
         roleCollection = pService->EnumerateRoles(L"", groupName1);
         collSize = roleCollection->GetCount();
-        CPPUNIT_ASSERT(collSize == 0);
+        REQUIRE(collSize == 0);
 
         //Enumerate all roles
         roleCollection = pService->EnumerateRoles(L"", L"");
         collSize = roleCollection->GetCount();
-        CPPUNIT_ASSERT(collSize == 3);
+        REQUIRE(collSize == 3);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -605,7 +585,7 @@
 ///
 /// This test case removes users from groups
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_RevokeGroupMembershipsFromUsers()
+TEST_CASE("RevokeGroupMembershipsFromUsers", "[SiteService]")
 {
     try
     {
@@ -625,8 +605,8 @@
         Ptr<MgStringCollection> userCollection = new MgStringCollection();
 
         //Try to use NULL arguments
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeGroupMembershipsFromUsers(NULL, userCollection), MgNullArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeGroupMembershipsFromUsers(groupCollection, NULL), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->RevokeGroupMembershipsFromUsers(NULL, userCollection), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->RevokeGroupMembershipsFromUsers(groupCollection, NULL), MgNullArgumentException*);
 
         //Remove both new users from first group
         groupCollection->Add(groupName1);
@@ -638,19 +618,19 @@
         groupCollection = new MgStringCollection();
         userCollection = new MgStringCollection();
         userCollection->Add(L"DoesNotExist");
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeGroupMembershipsFromUsers(groupCollection, userCollection), MgUserNotFoundException*);
+        REQUIRE_THROWS_MG(pService->RevokeGroupMembershipsFromUsers(groupCollection, userCollection), MgUserNotFoundException*);
 
         //Try with a group that doesn't exist
         groupCollection = new MgStringCollection();
         userCollection = new MgStringCollection();
         groupCollection->Add(L"DoesNotExist");
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeGroupMembershipsFromUsers(groupCollection, userCollection), MgGroupNotFoundException*);
+        REQUIRE_THROWS_MG(pService->RevokeGroupMembershipsFromUsers(groupCollection, userCollection), MgGroupNotFoundException*);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -664,7 +644,7 @@
 ///
 /// This test case removes users from roles
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_RevokeRoleMembershipsFromUsers()
+TEST_CASE("RevokeRoleMembershipsFromUsers", "[SiteService]")
 {
     try
     {
@@ -686,14 +666,14 @@
         //Try using NULL arguments
         roleCollection = new MgStringCollection();
         userCollection = new MgStringCollection();
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeRoleMembershipsFromUsers(NULL, userCollection), MgNullArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeRoleMembershipsFromUsers(roleCollection, NULL), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->RevokeRoleMembershipsFromUsers(NULL, userCollection), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->RevokeRoleMembershipsFromUsers(roleCollection, NULL), MgNullArgumentException*);
 
         //Try using with a user that does not exist
         roleCollection = new MgStringCollection();
         userCollection = new MgStringCollection();
         userCollection->Add(L"DoesNotExist");
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeRoleMembershipsFromUsers(roleCollection, userCollection), MgUserNotFoundException*);
+        REQUIRE_THROWS_MG(pService->RevokeRoleMembershipsFromUsers(roleCollection, userCollection), MgUserNotFoundException*);
 
         //Try to take away the role viewer from one of the newly created users
         roleCollection = new MgStringCollection();
@@ -700,7 +680,7 @@
         userCollection = new MgStringCollection();
         roleCollection->Add(MgRole::Viewer);
         userCollection->Add(userId1);
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeRoleMembershipsFromUsers(roleCollection, userCollection), MgInvalidOperationException*);
+        REQUIRE_THROWS_MG(pService->RevokeRoleMembershipsFromUsers(roleCollection, userCollection), MgInvalidOperationException*);
 
         //Take away role of author from one of the newly created users
         roleCollection = new MgStringCollection();
@@ -713,7 +693,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -727,7 +707,7 @@
 ///
 /// This test case removes groups from roles
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_RevokeRoleMembershipsFromGroups()
+TEST_CASE("RevokeRoleMembershipsFromGroups", "[SiteService]")
 {
     try
     {
@@ -749,14 +729,14 @@
         //Try using NULL arguments
         roleCollection = new MgStringCollection();
         groupCollection = new MgStringCollection();
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeRoleMembershipsFromGroups(NULL, groupCollection), MgNullArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeRoleMembershipsFromGroups(roleCollection, NULL), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->RevokeRoleMembershipsFromGroups(NULL, groupCollection), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->RevokeRoleMembershipsFromGroups(roleCollection, NULL), MgNullArgumentException*);
 
         //Try using with a group that does not exist
         roleCollection = new MgStringCollection();
         groupCollection = new MgStringCollection();
         groupCollection->Add(L"DoesNotExist");
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeRoleMembershipsFromGroups(roleCollection, groupCollection), MgGroupNotFoundException*);
+        REQUIRE_THROWS_MG(pService->RevokeRoleMembershipsFromGroups(roleCollection, groupCollection), MgGroupNotFoundException*);
 
         //Try to give the role viewer to one of the newly created groups
         roleCollection = new MgStringCollection();
@@ -763,7 +743,7 @@
         groupCollection = new MgStringCollection();
         roleCollection->Add(MgRole::Viewer);
         groupCollection->Add(groupName1);
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeRoleMembershipsFromGroups(roleCollection, groupCollection), MgInvalidOperationException*);
+        REQUIRE_THROWS_MG(pService->RevokeRoleMembershipsFromGroups(roleCollection, groupCollection), MgInvalidOperationException*);
 
         //Give the role of administrator to one of the newly created groups
         roleCollection = new MgStringCollection();
@@ -776,7 +756,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -790,7 +770,7 @@
 ///
 /// This test case deletes the 2 users created earlier
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_DeleteUsers()
+TEST_CASE("DeleteUsers", "[SiteService]")
 {
     try
     {
@@ -807,7 +787,7 @@
         }
 
         //Try using a NULL argument
-        CPPUNIT_ASSERT_THROW_MG(pService->DeleteUsers(NULL), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->DeleteUsers(NULL), MgNullArgumentException*);
 
         //Delete the two users added earlier
         MgStringCollection userCollection;
@@ -816,13 +796,13 @@
         pService->DeleteUsers(&userCollection);
 
         //Try to delete again now that users shouldn't exist
-        CPPUNIT_ASSERT_THROW_MG(pService->DeleteUsers(&userCollection), MgUserNotFoundException*);
+        REQUIRE_THROWS_MG(pService->DeleteUsers(&userCollection), MgUserNotFoundException*);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -836,7 +816,7 @@
 ///
 /// This test case deletes the 2 groups created earlier
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_DeleteGroups()
+TEST_CASE("DeleteGroups", "[SiteService]")
 {
     try
     {
@@ -853,7 +833,7 @@
         }
 
         //Try to use a NULL argument
-        CPPUNIT_ASSERT_THROW_MG(pService->DeleteGroups(NULL), MgNullArgumentException*);
+        REQUIRE_THROWS_MG(pService->DeleteGroups(NULL), MgNullArgumentException*);
 
         MgStringCollection groupCollection;
         groupCollection.Add(groupName1);
@@ -863,13 +843,13 @@
         pService->DeleteGroups(&groupCollection);
 
         //Try to delete again, the groups should no longer exist
-        CPPUNIT_ASSERT_THROW_MG(pService->DeleteGroups(&groupCollection), MgGroupNotFoundException*);
+        REQUIRE_THROWS_MG(pService->DeleteGroups(&groupCollection), MgGroupNotFoundException*);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -883,7 +863,7 @@
 ///
 /// This test case adds a new server
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_AddServer()
+TEST_CASE("AddServer", "[SiteService]")
 {
     //TODO: does not throw exceptions described in MgServerSiteService.cpp
     try
@@ -901,8 +881,8 @@
         }
 
         //Try using empty string arguments
-        CPPUNIT_ASSERT_THROW_MG(pService->AddServer(L"", L"", serverAddress1), MgInvalidArgumentException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->AddServer(serverName1, L"", L""), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->AddServer(L"", L"", serverAddress1), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->AddServer(serverName1, L"", L""), MgInvalidArgumentException*);
 
         // Disable ACE's ERROR message for the server name
         #ifdef _DEBUG
@@ -923,13 +903,13 @@
         #endif
 
         //Try adding the server again
-        CPPUNIT_ASSERT_THROW_MG(pService->AddServer(serverName1, L"This is a test server", serverAddress1), MgDuplicateServerException*);
+        REQUIRE_THROWS_MG(pService->AddServer(serverName1, L"This is a test server", serverAddress1), MgDuplicateServerException*);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -943,7 +923,7 @@
 ///
 /// This test case gets the list of servers
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_EnumerateServers()
+TEST_CASE("EnumerateServers", "[SiteService]")
 {
     try
     {
@@ -964,13 +944,13 @@
         //Enumerate the servers
         byteReader = pService->EnumerateServers();
         STRING mimeType = byteReader->GetMimeType();
-        CPPUNIT_ASSERT(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
+        REQUIRE(wcscmp(mimeType.c_str(), MgMimeType::Xml.c_str()) == 0);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -984,7 +964,7 @@
 ///
 /// This test case updates the description of the server that was added
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_UpdateServer()
+TEST_CASE("UpdateServer", "[SiteService]")
 {
     //TODO: does not throw exceptions described in MgServerSiteService.cpp
     try
@@ -1009,14 +989,14 @@
         #endif
 
         //Try using a blank string for the name of the server
-        CPPUNIT_ASSERT_THROW_MG(pService->UpdateServer(L"", L"", L"", L""), MgInvalidArgumentException*);
+        REQUIRE_THROWS_MG(pService->UpdateServer(L"", L"", L"", L""), MgInvalidArgumentException*);
 
         //Try to update a server that doesn't exist
-        CPPUNIT_ASSERT_THROW_MG(pService->UpdateServer(L"DoesNotExist", L"", L"This server doesn't exist", L""), MgServerNotFoundException*);
+        REQUIRE_THROWS_MG(pService->UpdateServer(L"DoesNotExist", L"", L"This server doesn't exist", L""), MgServerNotFoundException*);
 
         //Try to update a server giving it aname that already exists
-        CPPUNIT_ASSERT_THROW_MG(pService->UpdateServer(serverName1, serverName2, L"The new name for the server already exists", L""), MgDuplicateServerException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->UpdateServer(serverName1, L"", L"The new name for the server already exists", serverAddress2), MgDuplicateServerException*);
+        REQUIRE_THROWS_MG(pService->UpdateServer(serverName1, serverName2, L"The new name for the server already exists", L""), MgDuplicateServerException*);
+        REQUIRE_THROWS_MG(pService->UpdateServer(serverName1, L"", L"The new name for the server already exists", serverAddress2), MgDuplicateServerException*);
 
         //Update the server description
         pService->UpdateServer(serverName1, L"", L"This is the updated description", L"");
@@ -1032,7 +1012,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1046,7 +1026,7 @@
 ///
 /// This test case removes the server that was added before
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_RemoveServer()
+TEST_CASE("RemoveServer", "[SiteService]")
 {
     //TODO: does not throw exceptions described in MgServerSiteService.cpp
     try
@@ -1068,13 +1048,13 @@
         pService->RemoveServer(serverName2);
 
         //Try to delete a server that doesn't exist
-        CPPUNIT_ASSERT_THROW_MG(pService->RemoveServer(L"DoesNotExist"), MgServerNotFoundException*);
+        REQUIRE_THROWS_MG(pService->RemoveServer(L"DoesNotExist"), MgServerNotFoundException*);
     }
     catch(MgException* e)
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1088,7 +1068,7 @@
 ///
 /// This test case
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_Authenticate()
+TEST_CASE("Authenticate", "[SiteService]")
 {
     try
     {
@@ -1108,17 +1088,17 @@
         Ptr<MgUserInformation> userInfo;
 
         //Try to use a NULL argument
-        CPPUNIT_ASSERT_THROW_MG(pService->Authenticate(NULL, NULL, false), MgAuthenticationFailedException*);
+        REQUIRE_THROWS_MG(pService->Authenticate(NULL, NULL, false), MgAuthenticationFailedException*);
 
         //Try to authenticate an anonymous user when admin role is needed
         userInfo = new MgUserInformation(anonymousName, L"");
         roleCollection = new MgStringCollection();
         roleCollection->Add(MgRole::Administrator);
-        CPPUNIT_ASSERT_THROW_MG(pService->Authenticate(userInfo, roleCollection, false), MgUnauthorizedAccessException*);
+        REQUIRE_THROWS_MG(pService->Authenticate(userInfo, roleCollection, false), MgUnauthorizedAccessException*);
 
         //Try to authenticate when an incorrect password is given
         userInfo = new MgUserInformation(adminName, L"");
-        CPPUNIT_ASSERT_THROW_MG(pService->Authenticate(userInfo, NULL, false), MgAuthenticationFailedException*);
+        REQUIRE_THROWS_MG(pService->Authenticate(userInfo, NULL, false), MgAuthenticationFailedException*);
 
         //Authenticate an anonymous user that has appropriate access
         userInfo = new MgUserInformation(anonymousName, L"");
@@ -1140,7 +1120,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1154,7 +1134,7 @@
 ///
 /// This test case creates a session
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_CreateSession()
+TEST_CASE("CreateSession", "[SiteService]")
 {
     try
     {
@@ -1181,7 +1161,7 @@
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
             session = pService->CreateSession();
-            CPPUNIT_ASSERT(!session.empty());
+            REQUIRE(!session.empty());
         }
     }
     catch(MgException* e)
@@ -1188,7 +1168,7 @@
     {
         STRING message = e->GetStackTrace(userLocale);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1202,7 +1182,7 @@
 ///
 /// This test case destroys a session
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_DestroySession()
+TEST_CASE("DestroySession", "[SiteService]")
 {
    try
     {
@@ -1231,7 +1211,7 @@
             // Destroy the session that should have been created earlier in the create session test case
             pService->DestroySession(session);
 
-            CPPUNIT_ASSERT_THROW_MG(pService->DestroySession(session), MgRepositoryNotFoundException*);
+            REQUIRE_THROWS_MG(pService->DestroySession(session), MgRepositoryNotFoundException*);
         }
 
         MgUserInformation::SetCurrentUserInfo(NULL);
@@ -1241,7 +1221,7 @@
             userInfo->SetLocale(userLocale);
             MgUserInformation::SetCurrentUserInfo(userInfo);
 
-            CPPUNIT_ASSERT_THROW_MG(pService->DestroySession(session), MgUnauthorizedAccessException*);
+            REQUIRE_THROWS_MG(pService->DestroySession(session), MgUnauthorizedAccessException*);
         }
     }
     catch(MgException* e)
@@ -1248,7 +1228,7 @@
     {
         STRING message = e->GetDetails(TEST_LOCALE);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {
@@ -1261,7 +1241,7 @@
 ///
 /// This test case get server session timeout.
 ///----------------------------------------------------------------------------
-void TestSiteService::TestCase_GetSessionTimeout()
+TEST_CASE("GetSessionTimeout", "[SiteService]")
 {
     try
     {
@@ -1278,13 +1258,13 @@
         }
 
         INT32 timeoutValue = pService->GetSessionTimeout();
-        CPPUNIT_ASSERT(timeoutValue == 1200);
+        REQUIRE(timeoutValue == 1200);
     }
     catch(MgException* e)
     {
         STRING message = e->GetStackTrace(userLocale);
         SAFE_RELEASE(e);
-        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+        FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
     catch(...)
     {

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

Modified: sandbox/jng/catch2/Server/src/UnitTesting/UnitTesting.cpp
===================================================================
--- sandbox/jng/catch2/Server/src/UnitTesting/UnitTesting.cpp	2020-07-08 11:10:16 UTC (rev 9657)
+++ sandbox/jng/catch2/Server/src/UnitTesting/UnitTesting.cpp	2020-07-09 15:16:00 UTC (rev 9658)
@@ -35,7 +35,7 @@
     MgUserInformation::SetCurrentUserInfo(userInfo);
 
     Catch::Session session;
-    if (!test.empty())
+    if (!test.empty() && test != L"all")
     {
         std::string testToRun = "[";
         testToRun += MgUtil::WideCharToMultiByte(test);

Modified: sandbox/jng/catch2/Server/src/UnitTesting/UnitTesting.vcxproj
===================================================================
--- sandbox/jng/catch2/Server/src/UnitTesting/UnitTesting.vcxproj	2020-07-08 11:10:16 UTC (rev 9657)
+++ sandbox/jng/catch2/Server/src/UnitTesting/UnitTesting.vcxproj	2020-07-09 15:16:00 UTC (rev 9658)
@@ -205,14 +205,8 @@
     <ClInclude Include="TestFeatureService.h" />
     <ClInclude Include="TestLogManagerThread.h" />
     <ClInclude Include="TestPerformance.h" />
-    <ClInclude Include="TestProfilingService.h" />
     <ClInclude Include="TestRenderingService.h" />
-    <ClInclude Include="TestResourceService.h" />
-    <ClInclude Include="TestServerAdminService.h" />
-    <ClInclude Include="TestServerManager.h" />
     <ClInclude Include="TestServiceManager.h" />
-    <ClInclude Include="TestSiteManager.h" />
-    <ClInclude Include="TestSiteService.h" />
     <ClInclude Include="TestTileService.h" />
     <ClInclude Include="UnitTesting.h" />
   </ItemGroup>



More information about the mapguide-commits mailing list