[mapguide-commits] r7961 - in trunk/Tools/Maestro: Maestro MaestroAPITestRunner MaestroAPITests OSGeo.MapGuide.MaestroAPI.Native ProviderTemplate SDK

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon Dec 23 04:48:14 PST 2013


Author: jng
Date: 2013-12-23 04:48:14 -0800 (Mon, 23 Dec 2013)
New Revision: 7961

Added:
   trunk/Tools/Maestro/MaestroAPITestRunner/ConnectionProviders.SDK.xml
   trunk/Tools/Maestro/MaestroAPITestRunner/MaestroAPITestRunner64.csproj
Modified:
   trunk/Tools/Maestro/Maestro/Maestro_All.sln
   trunk/Tools/Maestro/MaestroAPITestRunner/MaestroAPITestRunner.csproj
   trunk/Tools/Maestro/MaestroAPITests/ConnectionTestBase.cs
   trunk/Tools/Maestro/MaestroAPITests/HttpConnectionTests.cs
   trunk/Tools/Maestro/MaestroAPITests/LocalConnectionTests.cs
   trunk/Tools/Maestro/MaestroAPITests/LocalNativeFeatureTests.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Native/LocalNativeConnection.cs
   trunk/Tools/Maestro/ProviderTemplate/Form1.Designer.cs
   trunk/Tools/Maestro/ProviderTemplate/Form1.cs
   trunk/Tools/Maestro/ProviderTemplate/readme.txt
   trunk/Tools/Maestro/SDK/
   trunk/Tools/Maestro/SDK/sdk_changelog.txt
Log:
#2138: 
 - Update the ProviderTemplate tool to support building the provider in debug mode. Remove the non-working build unit tests option. Adding the Maestro API test runner to the SDK does this already.
 - Add a 64-bit of the Maestro API test runner, to exercise the LocalNative provider if built against 64-bit MapGuide .net assemblies.
 - Fix failing LocalNative provider tests

Modified: trunk/Tools/Maestro/Maestro/Maestro_All.sln
===================================================================
--- trunk/Tools/Maestro/Maestro/Maestro_All.sln	2013-12-23 08:58:44 UTC (rev 7960)
+++ trunk/Tools/Maestro/Maestro/Maestro_All.sln	2013-12-23 12:48:14 UTC (rev 7961)
@@ -1,6 +1,8 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Express 2012 for Windows Desktop
+# Visual Studio Express 2013 for Windows Desktop
+VisualStudioVersion = 12.0.21005.1
+MinimumVisualStudioVersion = 10.0.40219.1
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core", "..\Thirdparty\SharpDevelop\ICSharpCode.Core\ICSharpCode.Core.csproj", "{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.WinForms", "..\Thirdparty\SharpDevelop\ICSharpCode.Core.WinForms\ICSharpCode.Core.WinForms.csproj", "{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}"
@@ -149,6 +151,11 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Maestro", "Maestro.csproj", "{E0C36475-2B70-4F6D-ACE0-8943167806DC}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaestroAPITestRunner64", "..\MaestroAPITestRunner\MaestroAPITestRunner64.csproj", "{AA5EF530-B95C-4C8F-BE9F-52C225613DF9}"
+	ProjectSection(ProjectDependencies) = postProject
+		{50C12B5C-387C-4007-A1D1-CB181CB474CC} = {50C12B5C-387C-4007-A1D1-CB181CB474CC}
+	EndProjectSection
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -347,6 +354,10 @@
 		{E0C36475-2B70-4F6D-ACE0-8943167806DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{E0C36475-2B70-4F6D-ACE0-8943167806DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{E0C36475-2B70-4F6D-ACE0-8943167806DC}.Release|Any CPU.Build.0 = Release|Any CPU
+		{AA5EF530-B95C-4C8F-BE9F-52C225613DF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{AA5EF530-B95C-4C8F-BE9F-52C225613DF9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{AA5EF530-B95C-4C8F-BE9F-52C225613DF9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{AA5EF530-B95C-4C8F-BE9F-52C225613DF9}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

Added: trunk/Tools/Maestro/MaestroAPITestRunner/ConnectionProviders.SDK.xml
===================================================================
--- trunk/Tools/Maestro/MaestroAPITestRunner/ConnectionProviders.SDK.xml	                        (rev 0)
+++ trunk/Tools/Maestro/MaestroAPITestRunner/ConnectionProviders.SDK.xml	2013-12-23 12:48:14 UTC (rev 7961)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<ConnectionProviderRegistry>
+    <ConnectionProvider>
+        <Name>Maestro.Http</Name>
+        <Description>Connection using the mapagent http API</Description>
+        <Assembly>OSGeo.MapGuide.MaestroAPI.Http.dll</Assembly>
+        <Type>OSGeo.MapGuide.MaestroAPI.HttpServerConnection</Type>
+    </ConnectionProvider>
+    <!--
+    <ConnectionProvider>
+        <Name>Maestro.LocalNative</Name>
+        <Description>Connection using the MapGuide Web API</Description>
+        <Assembly>OSGeo.MapGuide.MaestroAPI.Native32-2.2.0.dll</Assembly>
+        <Type>OSGeo.MapGuide.MaestroAPI.LocalNativeConnection</Type>
+    </ConnectionProvider>
+    -->
+</ConnectionProviderRegistry>

Modified: trunk/Tools/Maestro/MaestroAPITestRunner/MaestroAPITestRunner.csproj
===================================================================
--- trunk/Tools/Maestro/MaestroAPITestRunner/MaestroAPITestRunner.csproj	2013-12-23 08:58:44 UTC (rev 7960)
+++ trunk/Tools/Maestro/MaestroAPITestRunner/MaestroAPITestRunner.csproj	2013-12-23 12:48:14 UTC (rev 7961)
@@ -106,6 +106,7 @@
     </None>
   </ItemGroup>
   <ItemGroup>
+    <Content Include="ConnectionProviders.SDK.xml" />
     <Content Include="ConnectionProviders.xml">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
@@ -147,7 +148,10 @@
 echo XCOPY /S /Y /I "$(TargetDir)*.*" "$(SolutionDir)..\SDK\Test"
 XCOPY /S /Y /I "$(TargetDir)*.*" "$(SolutionDir)..\SDK\Test"
 echo Copy SDK test configuration
+echo COPY /Y "$(ProjectDir)TestMaestroAPI.LocalNative.xml" "$(SolutionDir)..\SDK\Test\TestMaestroAPI.xml"
 COPY /Y "$(ProjectDir)TestMaestroAPI.LocalNative.xml" "$(SolutionDir)..\SDK\Test\TestMaestroAPI.xml"
+echo COPY /Y "$(ProjectDir)ConnectionProviders.SDK.xml" "$(SolutionDir)..\SDK\Test\ConnectionProviders.xml"
+COPY /Y "$(ProjectDir)ConnectionProviders.SDK.xml" "$(SolutionDir)..\SDK\Test\ConnectionProviders.xml"
 ) ELSE (
 echo Copy CS-Map Dictionaries
 IF NOT EXIST "$(OutDir)Dictionaries" XCOPY /S /Y /I "$(SolutionDir)..\Maestro.AddIn.Local\Dictionaries\*.*" "$(ProjectDir)$(OutDir)Dictionaries"

Added: trunk/Tools/Maestro/MaestroAPITestRunner/MaestroAPITestRunner64.csproj
===================================================================
--- trunk/Tools/Maestro/MaestroAPITestRunner/MaestroAPITestRunner64.csproj	                        (rev 0)
+++ trunk/Tools/Maestro/MaestroAPITestRunner/MaestroAPITestRunner64.csproj	2013-12-23 12:48:14 UTC (rev 7961)
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{AA5EF530-B95C-4C8F-BE9F-52C225613DF9}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>MaestroAPITestRunner</RootNamespace>
+    <AssemblyName>MaestroAPITestRunner64</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <UpgradeBackupLocation>
+    </UpgradeBackupLocation>
+    <OldToolsVersion>3.5</OldToolsVersion>
+    <TargetFrameworkProfile>
+    </TargetFrameworkProfile>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+    <PlatformTarget>x64</PlatformTarget>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <PlatformTarget>x64</PlatformTarget>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Ciloci.Flee">
+      <HintPath>..\Thirdparty\Flee\lib\Ciloci.Flee.dll</HintPath>
+    </Reference>
+    <Reference Include="NetTopologySuite.Merged">
+      <HintPath>..\Thirdparty\NTS\NetTopologySuite.Merged.dll</HintPath>
+    </Reference>
+    <Reference Include="nunit-console-runner, Version=2.5.5.10112, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\Thirdparty\NUnit\bin\net-2.0\lib\nunit-console-runner.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\MaestroAPITests\MaestroAPITests.csproj">
+      <Project>{351D49A3-2E4A-4EC3-AFC2-D56598F44F51}</Project>
+      <Name>MaestroAPITests</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\OSGeo.MapGuide.MaestroAPI.Local\OSGeo.MapGuide.MaestroAPI.Local.csproj">
+      <Project>{3ddf6501-0148-474c-8674-7c7da49c7f02}</Project>
+      <Name>OSGeo.MapGuide.MaestroAPI.Local</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\OSGeo.MapGuide.MaestroAPI\OSGeo.MapGuide.MaestroAPI.csproj">
+      <Project>{80FA3158-8B5F-48D1-A393-0378AFE48A7E}</Project>
+      <Name>OSGeo.MapGuide.MaestroAPI</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+    <None Include="Platform.ini">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="ConnectionProviders.xml">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
+    <Content Include="TestMaestroAPI.LocalNative.xml" />
+    <Content Include="TestMaestroAPI.xml">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+      <Visible>False</Visible>
+      <ProductName>Windows Installer 3.1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PostBuildEvent>echo Performing post-build for 64-bit Test Runner in $(ConfigurationName)
+IF "$(ConfigurationName)" == "Release" (
+IF NOT EXIST "$(SolutionDir)..\SDK\Test" MKDIR "$(SolutionDir)..\SDK\Test"
+echo Copy binaries to SDK output dir
+echo XCOPY /S /Y /I "$(TargetDir)$(TargetName).*" "$(SolutionDir)..\SDK\Test"
+XCOPY /S /Y /I "$(TargetDir)$(TargetName).*" "$(SolutionDir)..\SDK\Test" )</PostBuildEvent>
+  </PropertyGroup>
+</Project>
\ No newline at end of file

Modified: trunk/Tools/Maestro/MaestroAPITests/ConnectionTestBase.cs
===================================================================
--- trunk/Tools/Maestro/MaestroAPITests/ConnectionTestBase.cs	2013-12-23 08:58:44 UTC (rev 7960)
+++ trunk/Tools/Maestro/MaestroAPITests/ConnectionTestBase.cs	2013-12-23 12:48:14 UTC (rev 7961)
@@ -57,6 +57,8 @@
             return false;
         }
 
+        protected abstract string GetTestPrefix();
+
         private void SetupTestData()
         {
             var conn = CreateTestConnection();
@@ -251,7 +253,7 @@
         public virtual void TestInsertFeatures()
         {
             var conn = CreateTestConnection();
-            var fsId = "Library://UnitTests/Data/TestInsertFeatures.FeatureSource";
+            var fsId = "Library://UnitTests/Data/Test" + GetTestPrefix() + "InsertFeatures.FeatureSource";
             ClassDefinition cls = null;
             FeatureSchema schema = null;
             CreateTestDataStore(conn, fsId, ref schema, ref cls);
@@ -310,7 +312,7 @@
         public virtual void TestUpdateFeatures()
         {
             var conn = CreateTestConnection();
-            var fsId = "Library://UnitTests/Data/TestUpdateFeatures.FeatureSource";
+            var fsId = "Library://UnitTests/Data/Test" + GetTestPrefix() + "UpdateFeatures.FeatureSource";
             ClassDefinition cls = null;
             FeatureSchema schema = null;
             PopulateTestDataStore(conn, fsId, ref schema, ref cls);
@@ -329,7 +331,7 @@
         public virtual void TestDeleteFeatures()
         {
             var conn = CreateTestConnection();
-            var fsId = "Library://UnitTests/Data/TestDeleteFeatures.FeatureSource";
+            var fsId = "Library://UnitTests/Data/Test" + GetTestPrefix() + "DeleteFeatures.FeatureSource";
             ClassDefinition cls = null;
             FeatureSchema schema = null;
             PopulateTestDataStore(conn, fsId, ref schema, ref cls);
@@ -353,7 +355,7 @@
         public virtual void TestCreateDataStore()
         {
             var conn = CreateTestConnection();
-            var fsId = "Library://UnitTests/Data/TestCreateDataStore.FeatureSource";
+            var fsId = "Library://UnitTests/Data/Test" + GetTestPrefix() + "CreateDataStore.FeatureSource";
             ClassDefinition cls = null;
             FeatureSchema schema = null;
             CreateTestDataStore(conn, fsId, ref schema, ref cls);
@@ -376,7 +378,7 @@
 
         public virtual void TestApplySchema()
         {
-            var fsId = "Library://UnitTests/Data/TestMaestroLocalApplySchema.FeatureSource";
+            var fsId = "Library://UnitTests/Data/TestMaestro" + GetTestPrefix() + "ApplySchema.FeatureSource";
             var conn = CreateTestConnection();
             if (conn.ResourceService.ResourceExists(fsId))
                 conn.ResourceService.DeleteResource(fsId);
@@ -427,7 +429,7 @@
             string bogusPass = "bar";
 
             var conn = ConnectionUtil.CreateTestHttpConnection();
-            string fsId = "Library://UnitTests/EncryptedCredentials.FeatureSource";
+            string fsId = "Library://UnitTests/" + GetTestPrefix() + "EncryptedCredentials.FeatureSource";
             var fs = ObjectFactory.CreateFeatureSource(conn, "OSGeo.SQLServerSpatial");
             fs.SetConnectionProperty("Username", "%MG_USERNAME%");
             fs.SetConnectionProperty("Password", "%MG_PASSWORD%");
@@ -445,7 +447,7 @@
             Assert.AreEqual("TRUE", result.ToUpper());
 
             //Test convenience method
-            fsId = "Library://UnitTests/EncryptedCredentials2.FeatureSource";
+            fsId = "Library://UnitTests/" + GetTestPrefix() + "EncryptedCredentials2.FeatureSource";
             fs = ObjectFactory.CreateFeatureSource(conn, "OSGeo.SQLServerSpatial");
             fs.SetConnectionProperty("Username", "%MG_USERNAME%");
             fs.SetConnectionProperty("Password", "%MG_PASSWORD%");
@@ -460,7 +462,7 @@
             Assert.AreEqual(actualUser, fs.GetEncryptedUsername());
 
             //Do not set encrypted credentials
-            fsId = "Library://UnitTests/EncryptedCredentials3.FeatureSource";
+            fsId = "Library://UnitTests/" + GetTestPrefix() + "EncryptedCredentials3.FeatureSource";
             fs = ObjectFactory.CreateFeatureSource(conn, "OSGeo.SQLServerSpatial");
             fs.SetConnectionProperty("Username", "%MG_USERNAME%");
             fs.SetConnectionProperty("Password", "%MG_PASSWORD%");
@@ -480,7 +482,7 @@
             }
 
             //Encrypt credentials, but use bogus username/password
-            fsId = "Library://UnitTests/EncryptedCredentials4.FeatureSource";
+            fsId = "Library://UnitTests/" + GetTestPrefix() + "EncryptedCredentials4.FeatureSource";
             fs = ObjectFactory.CreateFeatureSource(conn, "OSGeo.SQLServerSpatial");
             fs.SetConnectionProperty("Username", "%MG_USERNAME%");
             fs.SetConnectionProperty("Password", "%MG_PASSWORD%");

Modified: trunk/Tools/Maestro/MaestroAPITests/HttpConnectionTests.cs
===================================================================
--- trunk/Tools/Maestro/MaestroAPITests/HttpConnectionTests.cs	2013-12-23 08:58:44 UTC (rev 7960)
+++ trunk/Tools/Maestro/MaestroAPITests/HttpConnectionTests.cs	2013-12-23 12:48:14 UTC (rev 7961)
@@ -43,6 +43,11 @@
             return TestControl.IgnoreLocalNativeFeatureTests;
         }
 
+        protected override string GetTestPrefix()
+        {
+            return "Http";
+        }
+
         //[Test]
         public override void TestEncryptedFeatureSourceCredentials()
         {

Modified: trunk/Tools/Maestro/MaestroAPITests/LocalConnectionTests.cs
===================================================================
--- trunk/Tools/Maestro/MaestroAPITests/LocalConnectionTests.cs	2013-12-23 08:58:44 UTC (rev 7960)
+++ trunk/Tools/Maestro/MaestroAPITests/LocalConnectionTests.cs	2013-12-23 12:48:14 UTC (rev 7961)
@@ -47,6 +47,11 @@
             return TestControl.IgnoreLocalFeatureTests;
         }
 
+        protected override string GetTestPrefix()
+        {
+            return "Local";
+        }
+
         protected override IServerConnection CreateTestConnection()
         {
             return ConnectionUtil.CreateTestLocalConnection();

Modified: trunk/Tools/Maestro/MaestroAPITests/LocalNativeFeatureTests.cs
===================================================================
--- trunk/Tools/Maestro/MaestroAPITests/LocalNativeFeatureTests.cs	2013-12-23 08:58:44 UTC (rev 7960)
+++ trunk/Tools/Maestro/MaestroAPITests/LocalNativeFeatureTests.cs	2013-12-23 12:48:14 UTC (rev 7961)
@@ -47,6 +47,11 @@
             return TestControl.IgnoreLocalNativeFeatureTests;
         }
 
+        protected override string GetTestPrefix()
+        {
+            return "LocalNative";
+        }
+
         protected override IServerConnection CreateTestConnection()
         {
             return ConnectionUtil.CreateTestLocalNativeConnection();

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Native/LocalNativeConnection.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Native/LocalNativeConnection.cs	2013-12-23 08:58:44 UTC (rev 7960)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Native/LocalNativeConnection.cs	2013-12-23 12:48:14 UTC (rev 7961)
@@ -1160,7 +1160,7 @@
         protected override ClassDefinition GetClassDefinitionInternal(string resourceId, string schemaName, string className)
         {
             var fsvc = (MgFeatureService)this.Connection.CreateService(MgServiceType.FeatureService);
-            var cls = fsvc.GetClassDefinition(new MgResourceIdentifier(resourceId), schemaName, className);
+            var cls = fsvc.GetClassDefinition(new MgResourceIdentifier(resourceId ?? ""), schemaName ?? "", className ?? "");
             var klass = Native.Utility.ConvertClassDefinition(cls);
             var parent = new FeatureSchema(schemaName, "");
             parent.AddClass(klass);

Modified: trunk/Tools/Maestro/ProviderTemplate/Form1.Designer.cs
===================================================================
--- trunk/Tools/Maestro/ProviderTemplate/Form1.Designer.cs	2013-12-23 08:58:44 UTC (rev 7960)
+++ trunk/Tools/Maestro/ProviderTemplate/Form1.Designer.cs	2013-12-23 12:48:14 UTC (rev 7961)
@@ -32,24 +32,19 @@
             this.label2 = new System.Windows.Forms.Label();
             this.txtFxDir = new System.Windows.Forms.TextBox();
             this.label4 = new System.Windows.Forms.Label();
-            this.txtTestOutputDir = new System.Windows.Forms.TextBox();
-            this.label5 = new System.Windows.Forms.Label();
             this.btnFxDir = new System.Windows.Forms.Button();
             this.btnMgDir = new System.Windows.Forms.Button();
-            this.btnTestDir = new System.Windows.Forms.Button();
-            this.chkUnitTests = new System.Windows.Forms.CheckBox();
             this.label6 = new System.Windows.Forms.Label();
             this.label7 = new System.Windows.Forms.Label();
             this.rdPost22 = new System.Windows.Forms.RadioButton();
             this.rdPre22 = new System.Windows.Forms.RadioButton();
-            this.grpUnitTests = new System.Windows.Forms.GroupBox();
             this.groupBox2 = new System.Windows.Forms.GroupBox();
             this.txtMessages = new System.Windows.Forms.TextBox();
             this.btnBuild = new System.Windows.Forms.Button();
             this.folderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog();
             this.worker = new System.ComponentModel.BackgroundWorker();
             this.txtMgVersion = new System.Windows.Forms.TextBox();
-            this.grpUnitTests.SuspendLayout();
+            this.chkDebug = new System.Windows.Forms.CheckBox();
             this.groupBox2.SuspendLayout();
             this.SuspendLayout();
             // 
@@ -91,24 +86,6 @@
             this.label4.TabIndex = 6;
             this.label4.Text = ".net 4.0 Framework directory (csc.exe)";
             // 
-            // txtTestOutputDir
-            // 
-            this.txtTestOutputDir.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtTestOutputDir.Location = new System.Drawing.Point(15, 41);
-            this.txtTestOutputDir.Name = "txtTestOutputDir";
-            this.txtTestOutputDir.Size = new System.Drawing.Size(489, 20);
-            this.txtTestOutputDir.TabIndex = 9;
-            // 
-            // label5
-            // 
-            this.label5.AutoSize = true;
-            this.label5.Location = new System.Drawing.Point(12, 25);
-            this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(104, 13);
-            this.label5.TabIndex = 8;
-            this.label5.Text = "Test output directory";
-            // 
             // btnFxDir
             // 
             this.btnFxDir.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -131,28 +108,6 @@
             this.btnMgDir.UseVisualStyleBackColor = true;
             this.btnMgDir.Click += new System.EventHandler(this.btnMgDir_Click);
             // 
-            // btnTestDir
-            // 
-            this.btnTestDir.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnTestDir.Location = new System.Drawing.Point(510, 39);
-            this.btnTestDir.Name = "btnTestDir";
-            this.btnTestDir.Size = new System.Drawing.Size(26, 23);
-            this.btnTestDir.TabIndex = 14;
-            this.btnTestDir.Text = "...";
-            this.btnTestDir.UseVisualStyleBackColor = true;
-            this.btnTestDir.Click += new System.EventHandler(this.btnTestDir_Click);
-            // 
-            // chkUnitTests
-            // 
-            this.chkUnitTests.AutoSize = true;
-            this.chkUnitTests.Location = new System.Drawing.Point(18, 162);
-            this.chkUnitTests.Name = "chkUnitTests";
-            this.chkUnitTests.Size = new System.Drawing.Size(100, 17);
-            this.chkUnitTests.TabIndex = 15;
-            this.chkUnitTests.Text = "Build Unit Tests";
-            this.chkUnitTests.UseVisualStyleBackColor = true;
-            this.chkUnitTests.CheckedChanged += new System.EventHandler(this.chkUnitTests_CheckedChanged);
-            // 
             // label6
             // 
             this.label6.AutoSize = true;
@@ -193,28 +148,15 @@
             this.rdPre22.Text = "Pre-2.2 (MapGuideDotNetApi.dll)";
             this.rdPre22.UseVisualStyleBackColor = true;
             // 
-            // grpUnitTests
-            // 
-            this.grpUnitTests.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.grpUnitTests.Controls.Add(this.txtTestOutputDir);
-            this.grpUnitTests.Controls.Add(this.label5);
-            this.grpUnitTests.Controls.Add(this.btnTestDir);
-            this.grpUnitTests.Location = new System.Drawing.Point(12, 185);
-            this.grpUnitTests.Name = "grpUnitTests";
-            this.grpUnitTests.Size = new System.Drawing.Size(554, 77);
-            this.grpUnitTests.TabIndex = 21;
-            this.grpUnitTests.TabStop = false;
-            // 
             // groupBox2
             // 
             this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.groupBox2.Controls.Add(this.txtMessages);
-            this.groupBox2.Location = new System.Drawing.Point(12, 268);
+            this.groupBox2.Location = new System.Drawing.Point(12, 185);
             this.groupBox2.Name = "groupBox2";
-            this.groupBox2.Size = new System.Drawing.Size(554, 256);
+            this.groupBox2.Size = new System.Drawing.Size(554, 189);
             this.groupBox2.TabIndex = 22;
             this.groupBox2.TabStop = false;
             this.groupBox2.Text = "Messages";
@@ -227,13 +169,13 @@
             this.txtMessages.Name = "txtMessages";
             this.txtMessages.ReadOnly = true;
             this.txtMessages.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal;
-            this.txtMessages.Size = new System.Drawing.Size(548, 237);
+            this.txtMessages.Size = new System.Drawing.Size(548, 170);
             this.txtMessages.TabIndex = 0;
             // 
             // btnBuild
             // 
             this.btnBuild.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnBuild.Location = new System.Drawing.Point(491, 530);
+            this.btnBuild.Location = new System.Drawing.Point(491, 380);
             this.btnBuild.Name = "btnBuild";
             this.btnBuild.Size = new System.Drawing.Size(75, 23);
             this.btnBuild.TabIndex = 23;
@@ -254,16 +196,25 @@
             this.txtMgVersion.TabIndex = 24;
             this.txtMgVersion.Text = "2.4.0";
             // 
+            // chkDebug
+            // 
+            this.chkDebug.AutoSize = true;
+            this.chkDebug.Location = new System.Drawing.Point(12, 162);
+            this.chkDebug.Name = "chkDebug";
+            this.chkDebug.Size = new System.Drawing.Size(84, 17);
+            this.chkDebug.TabIndex = 25;
+            this.chkDebug.Text = "Build Debug";
+            this.chkDebug.UseVisualStyleBackColor = true;
+            // 
             // Form1
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(578, 565);
+            this.ClientSize = new System.Drawing.Size(578, 415);
+            this.Controls.Add(this.chkDebug);
             this.Controls.Add(this.txtMgVersion);
             this.Controls.Add(this.btnBuild);
             this.Controls.Add(this.groupBox2);
-            this.Controls.Add(this.grpUnitTests);
-            this.Controls.Add(this.chkUnitTests);
             this.Controls.Add(this.rdPre22);
             this.Controls.Add(this.rdPost22);
             this.Controls.Add(this.label7);
@@ -276,8 +227,6 @@
             this.Controls.Add(this.label2);
             this.Name = "Form1";
             this.Text = "Maestro LocalNative provider builder";
-            this.grpUnitTests.ResumeLayout(false);
-            this.grpUnitTests.PerformLayout();
             this.groupBox2.ResumeLayout(false);
             this.groupBox2.PerformLayout();
             this.ResumeLayout(false);
@@ -291,23 +240,19 @@
         private System.Windows.Forms.Label label2;
         private System.Windows.Forms.TextBox txtFxDir;
         private System.Windows.Forms.Label label4;
-        private System.Windows.Forms.TextBox txtTestOutputDir;
-        private System.Windows.Forms.Label label5;
         private System.Windows.Forms.Button btnFxDir;
         private System.Windows.Forms.Button btnMgDir;
-        private System.Windows.Forms.Button btnTestDir;
-        private System.Windows.Forms.CheckBox chkUnitTests;
         private System.Windows.Forms.Label label6;
         private System.Windows.Forms.Label label7;
         private System.Windows.Forms.RadioButton rdPost22;
         private System.Windows.Forms.RadioButton rdPre22;
-        private System.Windows.Forms.GroupBox grpUnitTests;
         private System.Windows.Forms.GroupBox groupBox2;
         private System.Windows.Forms.TextBox txtMessages;
         private System.Windows.Forms.Button btnBuild;
         private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog;
         private System.ComponentModel.BackgroundWorker worker;
         private System.Windows.Forms.TextBox txtMgVersion;
+        private System.Windows.Forms.CheckBox chkDebug;
     }
 }
 

Modified: trunk/Tools/Maestro/ProviderTemplate/Form1.cs
===================================================================
--- trunk/Tools/Maestro/ProviderTemplate/Form1.cs	2013-12-23 08:58:44 UTC (rev 7960)
+++ trunk/Tools/Maestro/ProviderTemplate/Form1.cs	2013-12-23 12:48:14 UTC (rev 7961)
@@ -19,12 +19,6 @@
             InitializeComponent();
         }
 
-        protected override void OnLoad(EventArgs e)
-        {
-            grpUnitTests.Enabled = chkUnitTests.Checked;
-            base.OnLoad(e);
-        }
-
         private void btnFxDir_Click(object sender, EventArgs e)
         {
             if (folderBrowserDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
@@ -37,17 +31,6 @@
                 txtMgDir.Text = folderBrowserDialog.SelectedPath;
         }
 
-        private void btnTestDir_Click(object sender, EventArgs e)
-        {
-            if (folderBrowserDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
-                txtTestOutputDir.Text = folderBrowserDialog.SelectedPath;
-        }
-
-        private void chkUnitTests_CheckedChanged(object sender, EventArgs e)
-        {
-            grpUnitTests.Enabled = chkUnitTests.Checked;
-        }
-
         private void btnBuild_Click(object sender, EventArgs e)
         {
             btnBuild.Enabled = false;
@@ -56,8 +39,7 @@
                 MgDir = txtMgDir.Text,
                 MgVersion = txtMgVersion.Text,
                 RefMapGuideDotNetApi = rdPre22.Checked,
-                BuildUnitTests = chkUnitTests.Checked,
-                TestDir = txtTestOutputDir.Text
+                DebugMode = chkDebug.Checked
             });
         }
 
@@ -76,8 +58,7 @@
             public string MgDir;
             public string MgVersion;
             public bool RefMapGuideDotNetApi;
-            public bool BuildUnitTests;
-            public string TestDir;
+            public bool DebugMode;
         }
 
         private void worker_DoWork(object sender, DoWorkEventArgs e)
@@ -178,9 +159,17 @@
             string asmName = "OSGeo.MapGuide.MaestroAPI.Native-" + ba.MgVersion + ".dll";
             AppendMessage("http://xkcd.com/303/ - " + asmName);
             var args = new List<string>();
-            args.Add("/debug+");
-            args.Add("/debug:pdbonly");
-            args.Add("/optimize+");
+            if (ba.DebugMode)
+            {
+                args.Add("/debug+");
+                args.Add("/debug:full");
+            }
+            else
+            {
+                args.Add("/debug-");
+                args.Add("/debug:pdbonly");
+                args.Add("/optimize+");
+            }
             args.Add("/target:library");
             //args.Add("/platform:x86");
             args.Add("/keyfile:\"" + keyfile + "\"");

Modified: trunk/Tools/Maestro/ProviderTemplate/readme.txt
===================================================================
--- trunk/Tools/Maestro/ProviderTemplate/readme.txt	2013-12-23 08:58:44 UTC (rev 7960)
+++ trunk/Tools/Maestro/ProviderTemplate/readme.txt	2013-12-23 12:48:14 UTC (rev 7961)
@@ -25,7 +25,6 @@
  - The MapGuide .net assemblies directory (the path to mapviewernet/bin of your MGOS/AIMS installation)
  - The MapGuide version (x.y.z). This is used to name the final provider assembly
  - Assembly type. Basically this tells us what we're referencing. Either the 5 OSGeo assemblies (2.2 and newer) or MapGuideDotNetApi.dll (2.1 and older)
- - NOT IMPLEMENTED: Enable unit tests + Unit test output directory
 
 Once you have filled in the required options, click build and wait a few moments. Assuming you extracted the Maestro SDK to C:\MaestroSDK:
 
@@ -43,7 +42,17 @@
 This is an uncommon use-case (actually more common with Maestro proper, due to its multi-connection support) since most of the time 
 your application will most likely be working against a specific version of MapGuide, but it is something to keep in mind.
 
-Building and running the Unit Tests
------------------------------------
+Testing your LocalNative provider
+---------------------------------
 
-TBD
\ No newline at end of file
+It is recommended to run the unit tests for your LocalNative provider to ensure it is functional. This SDK includes a test runner with test data
+that you can exercise your LocalNative provider with.
+
+To test your LocalNative provider, do the following:
+
+ 1. Build the LocalNative provider using this tool
+ 2. Copy the LocalNative provider and supporting binaries to the test runner directory
+ 3. Edit ConnectionProviders.xml and include your LocalNative provider
+ 4. Run MaestroAPITestRunner.exe (if you built a LocalNative provider from 64-bit assemblies, run MaestroAPITestRunner64.exe). If the test 
+    runner reports 0 test failures, your LocalNative provider has passed basic validation of our test suite. If there are any test failures, 
+    please report such issues on Trac and indicate the version of MapGuide you built your LocalNative provider from
\ No newline at end of file


Property changes on: trunk/Tools/Maestro/SDK
___________________________________________________________________
Modified: svn:ignore
   - *.cache
LocalNativeProvider
SDK.suo
addin-bin
bin

   + *.cache
LocalNativeProvider
SDK.suo
Test
addin-bin
bin


Modified: trunk/Tools/Maestro/SDK/sdk_changelog.txt
===================================================================
--- trunk/Tools/Maestro/SDK/sdk_changelog.txt	2013-12-23 08:58:44 UTC (rev 7960)
+++ trunk/Tools/Maestro/SDK/sdk_changelog.txt	2013-12-23 12:48:14 UTC (rev 7961)
@@ -1,3 +1,10 @@
+5.1
+---
+
+- Maestro API test runner and test data added to SDK
+- ProviderTemplate tool updated to support building the LocalNative provider in debug mode. Updated readme.txt with instructions on how to validate
+  your built provider with the included Maestro API test runner
+
 5.0
 ---
 



More information about the mapguide-commits mailing list