[prev in list] [next in list] [prev in thread] [next in thread]
List: mapguide-commits
Subject: [mapguide-commits] r8271 - in sandbox/jng/convenience_apis/UnitTest/WebTier/DotNet:
From: svn_mapguide () osgeo ! org
Date: 2014-06-30 14:38:48
Message-ID: 20140630143848.42D513905EE () trac ! osgeo ! org
[Download RAW message or body]
Author: jng
Date: 2014-06-30 07:38:48 -0700 (Mon, 30 Jun 2014)
New Revision: 8271
Added:
sandbox/jng/convenience_apis/UnitTest/WebTier/DotNet/TestMapGuideApi/ExternalTests/ResourceServiceTests.cs
Modified:
sandbox/jng/convenience_apis/UnitTest/WebTier/DotNet/TestCommon/ExternalTests/ConvenienceTests.cs
sandbox/jng/convenience_apis/UnitTest/WebTier/DotNet/TestMapGuideApi/TestMapGuideApi.csproj
Log:
Add .net test for the promoted GetResourceModifiedDate API
Modified: sandbox/jng/convenience_apis/UnitTest/WebTier/DotNet/TestCommon/ExternalTests/ConvenienceTests.cs
===================================================================
--- sandbox/jng/convenience_apis/UnitTest/WebTier/DotNet/TestCommon/ExternalTests/ConvenienceTests.cs 2014-06-27 \
12:11:01 UTC (rev 8270)
+++ sandbox/jng/convenience_apis/UnitTest/WebTier/DotNet/TestCommon/ExternalTests/ConvenienceTests.cs 2014-06-30 \
14:38:48 UTC (rev 8271) @@ -7,7 +7,7 @@
namespace OSGeo.MapGuide.Test.Common.ExternalTests
{
- internal class FeatureServiceTestUtil
+ public class FeatureServiceTestUtil
{
public static string CreateTestDataStore(MgResourceIdentifier fsId, string \
provider, MgFeatureService featSvc) {
Added: sandbox/jng/convenience_apis/UnitTest/WebTier/DotNet/TestMapGuideApi/ExternalTests/ResourceServiceTests.cs
===================================================================
--- sandbox/jng/convenience_apis/UnitTest/WebTier/DotNet/TestMapGuideApi/ExternalTests/ResourceServiceTests.cs \
(rev 0)
+++ sandbox/jng/convenience_apis/UnitTest/WebTier/DotNet/TestMapGuideApi/ExternalTests/ResourceServiceTests.cs 2014-06-30 \
14:38:48 UTC (rev 8271) @@ -0,0 +1,30 @@
+using OSGeo.MapGuide.Test.Common;
+using OSGeo.MapGuide.Test.Common.ExternalTests;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace OSGeo.MapGuide.Test.Web.ExternalTests
+{
+ public class ResourceModifiedTest : IExternalTest
+ {
+ public void Execute(IPlatformFactory factory, ITestLogger logger)
+ {
+ var resSvc = \
(MgResourceService)factory.CreateService(MgServiceType.ResourceService); + \
var featSvc = (MgFeatureService)factory.CreateService(MgServiceType.FeatureService); \
+ MgResourceIdentifier fsId = new \
MgResourceIdentifier("Library://UnitTests/Data/Timestamp.FeatureSource"); + \
string className = FeatureServiceTestUtil.CreateTestDataStore(fsId, "OSGeo.SDF", \
featSvc); + MgByteReader content = resSvc.GetResourceContent(fsId);
+ MgDateTime mod1 = resSvc.GetResourceModifiedDate(fsId);
+ Thread.Sleep(1500);
+ resSvc.SetResource(fsId, content, null);
+ MgDateTime mod2 = resSvc.GetResourceModifiedDate(fsId);
+
+ Assert.IsFalse(mod1.ToString() == mod2.ToString());
+ }
+ }
+
+}
Modified: sandbox/jng/convenience_apis/UnitTest/WebTier/DotNet/TestMapGuideApi/TestMapGuideApi.csproj
===================================================================
--- sandbox/jng/convenience_apis/UnitTest/WebTier/DotNet/TestMapGuideApi/TestMapGuideApi.csproj 2014-06-27 \
12:11:01 UTC (rev 8270)
+++ sandbox/jng/convenience_apis/UnitTest/WebTier/DotNet/TestMapGuideApi/TestMapGuideApi.csproj 2014-06-30 \
14:38:48 UTC (rev 8271) @@ -80,6 +80,7 @@
<Compile Include="DrawingService\DrawingServiceOperationExecutor.cs" />
<Compile Include="DrawingService\Operations.cs" />
<Compile Include="ExternalTests\CollectionTests.cs" />
+ <Compile Include="ExternalTests\ResourceServiceTests.cs" />
<Compile Include="MapGuideTests.cs" />
<Compile Include="MappingService\MappingServiceOperationExecutor.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
_______________________________________________
mapguide-commits mailing list
mapguide-commits@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic