[mapguide-commits] r8221 - sandbox/jng/v30/UnitTest/WebTier/DotNet/TestMapGuideApi

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Sat Jun 14 17:33:59 PDT 2014


Author: jng
Date: 2014-06-14 17:33:59 -0700 (Sat, 14 Jun 2014)
New Revision: 8221

Modified:
   sandbox/jng/v30/UnitTest/WebTier/DotNet/TestMapGuideApi/MapGuideTestExecutorCollection.cs
Log:
Update .net test runner to not use deprecated MgMap APIs

Modified: sandbox/jng/v30/UnitTest/WebTier/DotNet/TestMapGuideApi/MapGuideTestExecutorCollection.cs
===================================================================
--- sandbox/jng/v30/UnitTest/WebTier/DotNet/TestMapGuideApi/MapGuideTestExecutorCollection.cs	2014-06-15 00:22:20 UTC (rev 8220)
+++ sandbox/jng/v30/UnitTest/WebTier/DotNet/TestMapGuideApi/MapGuideTestExecutorCollection.cs	2014-06-15 00:33:59 UTC (rev 8221)
@@ -43,7 +43,7 @@
             var admin = new MgServerAdmin();
             admin.Open(_userInfo);
             var wlCreator = new MgWebLayoutCreator(resSvc);
-            var creator = new MgMapCreator(resSvc);
+            var creator = new MgMapCreator(_conn, resSvc);
             var sessionCreator = new MgSessionCreator(_conn);
             var sessionApply = new MgApplySession(_userInfo);
             var session = new MgSession();
@@ -210,11 +210,13 @@
 
         class MgMapCreator : Operations.IMapCreator
         {
+            private MgSiteConnection _siteConn;
+            private MgMap _map;
             private MgResourceService _resSvc;
-            private MgMap _map;
 
-            public MgMapCreator(MgResourceService resSvc)
+            public MgMapCreator(MgSiteConnection siteConn, MgResourceService resSvc)
             {
+                _siteConn = siteConn;
                 _resSvc = resSvc;
             }
 
@@ -225,8 +227,8 @@
                 if (_map != null)
                     return _map;
 
-                _map = new MgMap();
-                _map.Create(_resSvc, resId, resId.GetName());
+                _map = new MgMap(_siteConn);
+                _map.Create(resId, resId.GetName());
                 return _map;
             }
 



More information about the mapguide-commits mailing list