[mapguide-commits] r8465 - in trunk/Tools/Maestro: . Maestro Maestro/packages OSGeo.MapGuide.ObjectModel.Tests OSGeo.MapGuide.ObjectModel.Tests/Properties OSGeo.MapGuide.ObjectModel.Tests/Resources OSGeo.MapGuide.ObjectModels OSGeo.MapGuide.ObjectModels/FeatureSource/v1_0_0

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Dec 25 09:05:23 PST 2014


Author: jng
Date: 2014-12-25 09:05:23 -0800 (Thu, 25 Dec 2014)
New Revision: 8465

Added:
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/ApplicationDefinitionTests.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/DrawingSourceTests.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/FeatureSourceTests.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/OSGeo.MapGuide.ObjectModel.Tests.csproj
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/ObjectFactoryTests.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Properties/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Properties/AssemblyInfo.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Properties/Resources.Designer.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Properties/Resources.resx
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Resources/
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Resources/AppDef-1.0.txt
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Resources/DrawingSource_1_0_0.txt
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Resources/FeatureSource-1.0.0.txt
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/packages.config
Modified:
   trunk/Tools/Maestro/Maestro/Maestro_All.sln
   trunk/Tools/Maestro/Maestro/packages/
   trunk/Tools/Maestro/Maestro/packages/repositories.config
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Check.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/FeatureSource/v1_0_0/FeatureSourceImpl.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ObjectFactory.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceTypeRegistry.cs
Log:
#2513: Add unit tests for Object Model

Modified: trunk/Tools/Maestro/Maestro/Maestro_All.sln
===================================================================
--- trunk/Tools/Maestro/Maestro/Maestro_All.sln	2014-12-25 15:09:04 UTC (rev 8464)
+++ trunk/Tools/Maestro/Maestro/Maestro_All.sln	2014-12-25 17:05:23 UTC (rev 8465)
@@ -168,6 +168,8 @@
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Thirdparty", "Thirdparty", "{5A242739-8805-4B57-A036-29C81E899CBE}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OSGeo.MapGuide.ObjectModel.Tests", "..\OSGeo.MapGuide.ObjectModel.Tests\OSGeo.MapGuide.ObjectModel.Tests.csproj", "{D32BE7DB-D0C3-4805-A057-18312370C57E}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -568,6 +570,14 @@
 		{48C5EB23-45AE-4C4C-8FAB-635428AE8CA1}.Release|Any CPU.Build.0 = Release|Any CPU
 		{48C5EB23-45AE-4C4C-8FAB-635428AE8CA1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
 		{48C5EB23-45AE-4C4C-8FAB-635428AE8CA1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{D32BE7DB-D0C3-4805-A057-18312370C57E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{D32BE7DB-D0C3-4805-A057-18312370C57E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{D32BE7DB-D0C3-4805-A057-18312370C57E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{D32BE7DB-D0C3-4805-A057-18312370C57E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{D32BE7DB-D0C3-4805-A057-18312370C57E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{D32BE7DB-D0C3-4805-A057-18312370C57E}.Release|Any CPU.Build.0 = Release|Any CPU
+		{D32BE7DB-D0C3-4805-A057-18312370C57E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{D32BE7DB-D0C3-4805-A057-18312370C57E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -579,5 +589,6 @@
 		{50C12B5C-387C-4007-A1D1-CB181CB474CC} = {7507E52A-413B-4E0D-A1FF-7D293E462C1B}
 		{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} = {5A242739-8805-4B57-A036-29C81E899CBE}
 		{AA5EF530-B95C-4C8F-BE9F-52C225613DF9} = {7507E52A-413B-4E0D-A1FF-7D293E462C1B}
+		{D32BE7DB-D0C3-4805-A057-18312370C57E} = {7507E52A-413B-4E0D-A1FF-7D293E462C1B}
 	EndGlobalSection
 EndGlobal


Property changes on: trunk/Tools/Maestro/Maestro/packages
___________________________________________________________________
Modified: svn:ignore
   - DockPanelSuite.2.9.0.0
fleesharp.0.9.27-pre
IronPython.2.7.4
IronPython.StdLib.2.7.4
NUnit.2.6.3
SharpZipLib.0.86.0
TreeViewAdv.1.7.0.0
mapguide-api-base-x86.2.5.2.7949
mg-desktop-net40-x86.2.5.2.7949
mg-desktop-viewer-net40-x86.2.5.2.7949
RestSharp.105.0.1

   + DockPanelSuite.2.9.0.0
fleesharp.0.9.27-pre
IronPython.2.7.4
IronPython.StdLib.2.7.4
NUnit.2.6.3
SharpZipLib.0.86.0
TreeViewAdv.1.7.0.0
mapguide-api-base-x86.2.5.2.7949
mg-desktop-net40-x86.2.5.2.7949
mg-desktop-viewer-net40-x86.2.5.2.7949
RestSharp.105.0.1
Moq.4.2.1409.1722


Modified: trunk/Tools/Maestro/Maestro/packages/repositories.config
===================================================================
--- trunk/Tools/Maestro/Maestro/packages/repositories.config	2014-12-25 15:09:04 UTC (rev 8464)
+++ trunk/Tools/Maestro/Maestro/packages/repositories.config	2014-12-25 17:05:23 UTC (rev 8465)
@@ -10,9 +10,8 @@
   <repository path="..\..\MaestroAPITestRunner\packages.config" />
   <repository path="..\..\MaestroAPITests\packages.config" />
   <repository path="..\..\MpuCalc\packages.config" />
-  <repository path="..\..\OSGeo.MapGuide.MaestroAPI.Http\packages.config" />
   <repository path="..\..\OSGeo.MapGuide.MaestroAPI.Local\packages.config" />
-  <repository path="..\..\OSGeo.MapGuide.MaestroAPI.Rest\packages.config" />
   <repository path="..\..\OSGeo.MapGuide.MaestroAPI\packages.config" />
+  <repository path="..\..\OSGeo.MapGuide.ObjectModel.Tests\packages.config" />
   <repository path="..\packages.config" />
 </repositories>
\ No newline at end of file


Property changes on: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests
___________________________________________________________________
Added: svn:ignore
   + bin
obj


Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/ApplicationDefinitionTests.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/ApplicationDefinitionTests.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/ApplicationDefinitionTests.cs	2014-12-25 17:05:23 UTC (rev 8465)
@@ -0,0 +1,47 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// 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 Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using NUnit.Framework;
+using OSGeo.MapGuide.ObjectModels;
+using OSGeo.MapGuide.ObjectModels.ApplicationDefinition;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModel.Tests
+{
+    [TestFixture]
+    public class ApplicationDefinitionTests
+    {
+        [Test]
+        public void ApplicationDefinitionDeserializationWithFullContentModel()
+        {
+            IResource res = ObjectFactory.DeserializeResourceXml(Properties.Resources.AppDef_1_0_0);
+            Assert.NotNull(res);
+            Assert.AreEqual(res.ResourceType, "ApplicationDefinition");
+            Assert.AreEqual(res.ResourceVersion, new Version(1, 0, 0));
+            IApplicationDefinition appDef = res as IApplicationDefinition;
+            Assert.NotNull(appDef);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/DrawingSourceTests.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/DrawingSourceTests.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/DrawingSourceTests.cs	2014-12-25 17:05:23 UTC (rev 8465)
@@ -0,0 +1,47 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// 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 Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using NUnit.Framework;
+using OSGeo.MapGuide.ObjectModels;
+using OSGeo.MapGuide.ObjectModels.DrawingSource;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModel.Tests
+{
+    [TestFixture]
+    public class DrawingSourceTests
+    {
+        [Test]
+        public void DrawingSourceDeserializationWithFullContentModel()
+        {
+            IResource res = ObjectFactory.DeserializeResourceXml(Properties.Resources.DrawingSource_1_0_0);
+            Assert.NotNull(res);
+            Assert.AreEqual(res.ResourceType, "DrawingSource");
+            Assert.AreEqual(res.ResourceVersion, new Version(1, 0, 0));
+            IDrawingSource ds = res as IDrawingSource;
+            Assert.NotNull(ds);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/FeatureSourceTests.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/FeatureSourceTests.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/FeatureSourceTests.cs	2014-12-25 17:05:23 UTC (rev 8465)
@@ -0,0 +1,47 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// 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 Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using NUnit.Framework;
+using OSGeo.MapGuide.ObjectModels;
+using OSGeo.MapGuide.ObjectModels.FeatureSource;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModel.Tests
+{
+    [TestFixture]
+    public class FeatureSourceTests
+    {
+        [Test]
+        public void FeatureSourceDeserializationWithFullContentModel()
+        {
+            IResource res = ObjectFactory.DeserializeResourceXml(Properties.Resources.FeatureSource_1_0_0);
+            Assert.NotNull(res);
+            Assert.AreEqual(res.ResourceType, "FeatureSource");
+            Assert.AreEqual(res.ResourceVersion, new Version(1, 0, 0));
+            IFeatureSource fs = res as IFeatureSource;
+            Assert.NotNull(fs);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/OSGeo.MapGuide.ObjectModel.Tests.csproj
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/OSGeo.MapGuide.ObjectModel.Tests.csproj	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/OSGeo.MapGuide.ObjectModel.Tests.csproj	2014-12-25 17:05:23 UTC (rev 8465)
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{D32BE7DB-D0C3-4805-A057-18312370C57E}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>OSGeo.MapGuide.ObjectModel.Tests</RootNamespace>
+    <AssemblyName>OSGeo.MapGuide.ObjectModel.Tests</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\Maestro\</SolutionDir>
+    <RestorePackages>true</RestorePackages>
+    <TargetFrameworkProfile>Client</TargetFrameworkProfile>
+  </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>
+  </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>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Moq">
+      <HintPath>..\Maestro\packages\Moq.4.2.1409.1722\lib\net40\Moq.dll</HintPath>
+    </Reference>
+    <Reference Include="nunit.framework">
+      <HintPath>..\Maestro\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="ApplicationDefinitionTests.cs" />
+    <Compile Include="DrawingSourceTests.cs" />
+    <Compile Include="FeatureSourceTests.cs" />
+    <Compile Include="ObjectFactoryTests.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\AppDef-1.0.txt" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\FeatureSource-1.0.0.txt" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\DrawingSource_1_0_0.txt" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\OSGeo.MapGuide.ObjectModels\OSGeo.MapGuide.ObjectModels.csproj">
+      <Project>{48c5eb23-45ae-4c4c-8fab-635428ae8ca1}</Project>
+      <Name>OSGeo.MapGuide.ObjectModels</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
+    </PropertyGroup>
+    <Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
+  </Target>
+  <!-- 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>
+  -->
+</Project>
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/ObjectFactoryTests.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/ObjectFactoryTests.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/ObjectFactoryTests.cs	2014-12-25 17:05:23 UTC (rev 8465)
@@ -0,0 +1,610 @@
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// 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 Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#endregion Disclaimer / License
+
+using Moq;
+using NUnit.Framework;
+using OSGeo.MapGuide.ObjectModels;
+using OSGeo.MapGuide.ObjectModels.FeatureSource;
+using OSGeo.MapGuide.ObjectModels.LoadProcedure;
+using System;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.Linq;
+using System.Text;
+
+namespace OSGeo.MapGuide.ObjectModels.Tests
+{
+    [TestFixture()]
+    public class ObjectFactoryTests
+    {
+        [SetUp]
+        public void Setup()
+        {
+            ObjectFactory.Reset();
+        }
+
+        [TearDown]
+        public void Teardown()
+        {
+            ObjectFactory.Reset();
+        }
+
+        [Test()]
+        public void RegisterResourceTest()
+        {
+            var ser = new Mock<ResourceSerializer>();
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterResource(null, null));
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterResource(null, ser.Object));
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterResource(new ResourceTypeDescriptor("MyNewResourceType", "1.0.0"), null));
+            //Already exists
+            Assert.Throws<ArgumentException>(() => ObjectFactory.RegisterResource(new ResourceTypeDescriptor("FeatureSource", "1.0.0"), ser.Object));
+            Assert.DoesNotThrow(() => ObjectFactory.RegisterResource(new ResourceTypeDescriptor("MyNewResourceType", "1.0.0"), ser.Object));
+        }
+
+        [Test()]
+        public void RegisterResourceSerializerTest()
+        {
+            ResourceSerializationCallback serFunc = (res) => null;
+            ResourceDeserializationCallback deserFunc = (stream) => null;
+
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterResourceSerializer(new ResourceTypeDescriptor("FeatureSource", "1.0.0"), null, null));
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterResourceSerializer(new ResourceTypeDescriptor("FeatureSource", "1.0.0"), serFunc, null));
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterResourceSerializer(null, serFunc, null));
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterResourceSerializer(null, serFunc, deserFunc));
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterResourceSerializer(new ResourceTypeDescriptor("FeatureSource", "1.0.0"), null, deserFunc));
+            //Already exists
+            Assert.Throws<ArgumentException>(() => ObjectFactory.RegisterResourceSerializer(new ResourceTypeDescriptor("FeatureSource", "1.0.0"), serFunc, deserFunc));
+            Assert.DoesNotThrow(() => ObjectFactory.RegisterResourceSerializer(new ResourceTypeDescriptor("MyNewResourceType", "1.0.0"), serFunc, deserFunc));
+        }
+
+        [Test()]
+        public void RegisterCompoundSymbolFactoryMethodTest()
+        {
+            CompoundSymbolDefCreatorFunc func = () => null;
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterCompoundSymbolFactoryMethod(null, null));
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterCompoundSymbolFactoryMethod(new Version(1, 0, 0), null));
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterCompoundSymbolFactoryMethod(null, func));
+            //Already exists
+            Assert.Throws<ArgumentException>(() => ObjectFactory.RegisterCompoundSymbolFactoryMethod(new Version(1, 0, 0), func));
+            Assert.DoesNotThrow(() => ObjectFactory.RegisterCompoundSymbolFactoryMethod(new Version(3, 0, 0), func));
+        }
+
+        [Test()]
+        public void RegisterSimpleSymbolFactoryMethodTest()
+        {
+            SimpleSymbolDefCreatorFunc func = () => null;
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterSimpleSymbolFactoryMethod(null, null));
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterSimpleSymbolFactoryMethod(new Version(1, 0, 0), null));
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterSimpleSymbolFactoryMethod(null, func));
+            //Already exists
+            Assert.Throws<ArgumentException>(() => ObjectFactory.RegisterSimpleSymbolFactoryMethod(new Version(1, 0, 0), func));
+            Assert.DoesNotThrow(() => ObjectFactory.RegisterSimpleSymbolFactoryMethod(new Version(3, 0, 0), func));
+        }
+
+        [Test()]
+        public void RegisterLayerFactoryMethodTest()
+        {
+            LayerCreatorFunc func = (lt) => null;
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterLayerFactoryMethod(null, null));
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterLayerFactoryMethod(new Version(1, 0, 0), null));
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterLayerFactoryMethod(null, func));
+            //Already exists
+            Assert.Throws<ArgumentException>(() => ObjectFactory.RegisterLayerFactoryMethod(new Version(1, 0, 0), func));
+            Assert.DoesNotThrow(() => ObjectFactory.RegisterLayerFactoryMethod(new Version(3, 0, 0), func));
+        }
+
+        [Test()]
+        public void RegisterLoadProcedureFactoryMethodTest()
+        {
+            LoadProcCreatorFunc func = () => null;
+            foreach (LoadType lt in Enum.GetValues(typeof(LoadType)))
+            {
+                Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterLoadProcedureFactoryMethod(LoadType.Dwf, null));
+            }
+        }
+
+        [Test()]
+        public void RegisterWebLayoutFactoryMethodTest()
+        {
+            WebLayoutCreatorFunc func = (mdfId) => null;
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterWebLayoutFactoryMethod(null, null));
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterWebLayoutFactoryMethod(null, func));
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterWebLayoutFactoryMethod(new Version(1, 0, 0), null));
+            //Already exists
+            Assert.Throws<ArgumentException>(() => ObjectFactory.RegisterWebLayoutFactoryMethod(new Version(1, 0, 0), func));
+            Assert.DoesNotThrow(() => ObjectFactory.RegisterWebLayoutFactoryMethod(new Version(3, 0, 0), func));
+        }
+
+        [Test()]
+        public void RegisterMapDefinitionFactoryMethodTest()
+        {
+            MapDefinitionCreatorFunc func = () => null;
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterMapDefinitionFactoryMethod(null, null));
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterMapDefinitionFactoryMethod(null, func));
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterMapDefinitionFactoryMethod(new Version(1, 0, 0), null));
+            //Already exists
+            Assert.Throws<ArgumentException>(() => ObjectFactory.RegisterMapDefinitionFactoryMethod(new Version(1, 0, 0), func));
+            Assert.DoesNotThrow(() => ObjectFactory.RegisterMapDefinitionFactoryMethod(new Version(4, 0, 0), func));
+        }
+
+        [Test()]
+        public void RegisterWatermarkDefinitionFactoryMethodTest()
+        {
+            WatermarkCreatorFunc func = (st) => null;
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterWatermarkDefinitionFactoryMethod(null, null));
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterWatermarkDefinitionFactoryMethod(null, func));
+            Assert.Throws<ArgumentNullException>(() => ObjectFactory.RegisterWatermarkDefinitionFactoryMethod(new Version(1, 0, 0), null));
+            //Already exists
+            Assert.Throws<ArgumentException>(() => ObjectFactory.RegisterWatermarkDefinitionFactoryMethod(new Version(2, 3, 0), func));
+            Assert.DoesNotThrow(() => ObjectFactory.RegisterWatermarkDefinitionFactoryMethod(new Version(4, 0, 0), func));
+        }
+
+        [Test()]
+        public void CreateMetadataTest()
+        {
+            var meta = ObjectFactory.CreateMetadata();
+            Assert.NotNull(meta);
+            Assert.NotNull(meta.Simple);
+            Assert.AreEqual(0, meta.Simple.Property.Count);
+        }
+
+        [Test()]
+        public void CreateSecurityUserTest()
+        {
+            var user = ObjectFactory.CreateSecurityUser();
+            Assert.NotNull(user);
+            Assert.AreEqual(0, user.User.Count);
+        }
+
+        [Test()]
+        public void CreateFeatureSourceExtensionTest()
+        {
+            var ext = ObjectFactory.CreateFeatureSourceExtension("Foo", "Bar");
+            Assert.AreEqual("Bar", ext.FeatureClass);
+            Assert.AreEqual("Foo", ext.Name);
+            Assert.NotNull(ext.AttributeRelate);
+            Assert.NotNull(ext.CalculatedProperty);
+            Assert.AreEqual(0, ext.AttributeRelate.Count());
+            Assert.AreEqual(0, ext.CalculatedProperty.Count());
+        }
+
+        [Test()]
+        public void CreateCalculatedPropertyTest()
+        {
+            var calc = ObjectFactory.CreateCalculatedProperty("Foo", "Bar");
+            Assert.AreEqual("Foo", calc.Name);
+            Assert.AreEqual("Bar", calc.Expression);
+        }
+
+        [Test()]
+        public void CreateAttributeRelationTest()
+        {
+            var rel = ObjectFactory.CreateAttributeRelation();
+            Assert.AreEqual(RelateTypeEnum.LeftOuter, rel.RelateType);
+            Assert.False(rel.ForceOneToOne);
+            Assert.NotNull(rel.RelateProperty);
+            Assert.AreEqual(0, rel.RelatePropertyCount);
+        }
+
+        [Test()]
+        public void CreateEnvelopeTest()
+        {
+            Assert.Throws<ArgumentException>(() => ObjectFactory.CreateEnvelope(2, -1, 1, 1));
+            Assert.Throws<ArgumentException>(() => ObjectFactory.CreateEnvelope(-1, 2, 1, 1));
+            var env = ObjectFactory.CreateEnvelope(-1, -1, 1, 1);
+            Assert.NotNull(env);
+            Assert.AreEqual(-1, env.MinX);
+            Assert.AreEqual(-1, env.MinY);
+            Assert.AreEqual(1, env.MaxX);
+            Assert.AreEqual(1, env.MaxY);
+        }
+
+        [Test()]
+        public void CreateDefaultLayerTest()
+        {
+            var versions = new Version[]
+            {
+                new Version(1, 0, 0),
+                new Version(1, 1, 0),
+                new Version(1, 2, 0),
+                new Version(1, 3, 0),
+                new Version(2, 3, 0),
+                new Version(2, 4, 0)
+            };
+
+            foreach (var version in versions)
+            {
+                var dl = ObjectFactory.CreateDefaultLayer(LayerDefinition.LayerType.Drawing, version);
+                var gl = ObjectFactory.CreateDefaultLayer(LayerDefinition.LayerType.Raster, version);
+                var vl = ObjectFactory.CreateDefaultLayer(LayerDefinition.LayerType.Vector, version);
+
+                Assert.NotNull(dl);
+                Assert.NotNull(gl);
+                Assert.NotNull(vl);
+
+                Assert.AreEqual(version, dl.ResourceVersion);
+                Assert.AreEqual(version, gl.ResourceVersion);
+                Assert.AreEqual(version, vl.ResourceVersion);
+
+                Assert.AreEqual(LayerDefinition.LayerType.Drawing, dl.SubLayer.LayerType);
+                Assert.AreEqual(LayerDefinition.LayerType.Raster, gl.SubLayer.LayerType);
+                Assert.AreEqual(LayerDefinition.LayerType.Vector, vl.SubLayer.LayerType);
+
+                //TODO: Verify content model satisfaction when saving back to XML
+            }
+        }
+
+        [Test()]
+        public void CreateDrawingSourceTest()
+        {
+            var ds = ObjectFactory.CreateDrawingSource();
+            Assert.NotNull(ds);
+            Assert.NotNull(ds.Sheet);
+            Assert.AreEqual(0, ds.Sheet.Count());
+            Assert.IsNullOrEmpty(ds.SourceName);
+            Assert.IsNullOrEmpty(ds.CoordinateSpace);
+        }
+
+        [Test()]
+        public void CreateFeatureSourceTest()
+        {
+            var fs = ObjectFactory.CreateFeatureSource("OSGeo.SDF");
+            Assert.NotNull(fs);
+            Assert.AreEqual("OSGeo.SDF", fs.Provider);
+            Assert.False(fs.UsesAliasedDataFiles);
+            Assert.False(fs.UsesEmbeddedDataFiles);
+            var sc = fs.SupplementalSpatialContextInfo;
+            Assert.NotNull(sc);
+            Assert.AreEqual(0, sc.Count());
+            var ext = fs.Extension;
+            Assert.NotNull(ext);
+            Assert.AreEqual(0, ext.Count());
+            Assert.IsNullOrEmpty(fs.ConfigurationDocument);
+            Assert.AreEqual(0, fs.ConnectionPropertyNames.Length);
+        }
+
+        [Test()]
+        public void CreateFeatureSourceTestWithParameters()
+        {
+            var param = new NameValueCollection();
+            param["File"] = "C:\\Test.sdf";
+            param["ReadOnly"] = "TRUE";
+
+            var fs = ObjectFactory.CreateFeatureSource("OSGeo.SDF", param);
+            Assert.NotNull(fs);
+            Assert.AreEqual("OSGeo.SDF", fs.Provider);
+            Assert.False(fs.UsesAliasedDataFiles);
+            Assert.False(fs.UsesEmbeddedDataFiles);
+            var sc = fs.SupplementalSpatialContextInfo;
+            Assert.NotNull(sc);
+            Assert.AreEqual(0, sc.Count());
+            var ext = fs.Extension;
+            Assert.NotNull(ext);
+            Assert.AreEqual(0, ext.Count());
+            Assert.IsNullOrEmpty(fs.ConfigurationDocument);
+            Assert.AreEqual(2, fs.ConnectionPropertyNames.Length);
+            Assert.IsNotNullOrEmpty(fs.GetConnectionProperty("File"));
+            Assert.IsNotNullOrEmpty(fs.GetConnectionProperty("ReadOnly"));
+            var param2 = fs.GetConnectionProperties();
+            Assert.AreEqual(2, param2.Count);
+            Assert.NotNull(param2["File"]);
+            Assert.NotNull(param2["ReadOnly"]);
+        }
+
+        [Test()]
+        public void CreateWatermarkTest()
+        {
+            var versions = new Version[]
+            {
+                new Version(2, 3, 0),
+                new Version(2, 4, 0)
+            };
+
+            Assert.Throws<ArgumentException>(() => ObjectFactory.CreateWatermark(SymbolDefinition.SymbolDefinitionType.Simple, new Version(1, 0, 0)));
+            foreach (var version in versions)
+            {
+                var simpWmd = ObjectFactory.CreateWatermark(SymbolDefinition.SymbolDefinitionType.Simple, version);
+                var compWmd = ObjectFactory.CreateWatermark(SymbolDefinition.SymbolDefinitionType.Compound, version);
+                Assert.NotNull(simpWmd);
+                Assert.NotNull(compWmd);
+
+                Assert.AreEqual(version, simpWmd.ResourceVersion);
+                Assert.AreEqual(version, compWmd.ResourceVersion);
+            }
+        }
+
+        [Test()]
+        public void CreateLoadProcedureTest()
+        {
+            foreach (LoadType lt in Enum.GetValues(typeof(LoadType)))
+            {
+                if (lt == LoadType.Dwg || lt == LoadType.Raster)
+                    continue;
+
+                var lp = ObjectFactory.CreateLoadProcedure(lt);
+                Assert.NotNull(lp);
+                Assert.NotNull(lp.SubType);
+                Assert.AreEqual(0, lp.SubType.SourceFile.Count);
+            }
+        }
+
+        [Test()]
+        public void CreateLoadProcedureTestWithFileNames()
+        {
+            foreach (LoadType lt in Enum.GetValues(typeof(LoadType)))
+            {
+                if (lt == LoadType.Dwg || lt == LoadType.Raster)
+                    continue;
+
+                var files = new string[]
+                {
+                    "C:\\Temp\\Foo.bin",
+                    "C:\\Temp\\Bar.bin",
+                };
+                var lp = ObjectFactory.CreateLoadProcedure(lt, files);
+                Assert.NotNull(lp);
+                Assert.NotNull(lp.SubType);
+                Assert.AreEqual(2, lp.SubType.SourceFile.Count);
+                Assert.True(lp.SubType.SourceFile.Contains("C:\\Temp\\Foo.bin"));
+                Assert.True(lp.SubType.SourceFile.Contains("C:\\Temp\\Bar.bin"));
+            }
+        }
+
+        [Test()]
+        public void CreateMapDefinitionTestWithName()
+        {
+            var versions = new Version[]
+            {
+                new Version(1, 0, 0),
+                new Version(2, 3, 0),
+                new Version(2, 4, 0)
+            };
+            Assert.Throws<ArgumentException>(() => ObjectFactory.CreateMapDefinition(new Version(1, 2, 0), "Test"));
+            foreach (var version in versions)
+            {
+                var mdf = ObjectFactory.CreateMapDefinition(version, "Test");
+                Assert.AreEqual("Test", mdf.Name);
+                Assert.IsNullOrEmpty(mdf.CoordinateSystem);
+                Assert.Null(mdf.ExtentCalculator);
+                Assert.Null(mdf.BaseMap);
+                Assert.NotNull(mdf.MapLayer);
+                Assert.AreEqual(0, mdf.MapLayer.Count());
+                Assert.NotNull(mdf.MapLayerGroup);
+                Assert.AreEqual(0, mdf.MapLayerGroup.Count());
+            }
+        }
+
+        [Test()]
+        public void CreateMapDefinitionTestWithNameAndCoordSys()
+        {
+            var versions = new Version[]
+            {
+                new Version(1, 0, 0),
+                new Version(2, 3, 0),
+                new Version(2, 4, 0)
+            };
+            Assert.Throws<ArgumentException>(() => ObjectFactory.CreateMapDefinition(new Version(1, 2, 0), "Test", "CoordSys"));
+            foreach (var version in versions)
+            {
+                var mdf = ObjectFactory.CreateMapDefinition(version, "Test", "CoordSys");
+                Assert.AreEqual("Test", mdf.Name);
+                Assert.AreEqual("CoordSys", mdf.CoordinateSystem);
+                Assert.Null(mdf.ExtentCalculator);
+                Assert.Null(mdf.BaseMap);
+                Assert.NotNull(mdf.MapLayer);
+                Assert.AreEqual(0, mdf.MapLayer.Count());
+                Assert.NotNull(mdf.MapLayerGroup);
+                Assert.AreEqual(0, mdf.MapLayerGroup.Count());
+            }
+        }
+
+        [Test()]
+        public void CreateMapDefinitionTestWithNameAndCoordSysAndExtent()
+        {
+            var versions = new Version[]
+            {
+                new Version(1, 0, 0),
+                new Version(2, 3, 0),
+                new Version(2, 4, 0)
+            };
+            var extent = ObjectFactory.CreateEnvelope(-180, -90, 180, 90);
+            Assert.Throws<ArgumentException>(() => ObjectFactory.CreateMapDefinition(new Version(1, 2, 0), "Test", "CoordSys", extent));
+            foreach (var version in versions)
+            {
+                var mdf = ObjectFactory.CreateMapDefinition(version, "Test", "CoordSys", extent);
+                Assert.AreEqual("Test", mdf.Name);
+                Assert.AreEqual("CoordSys", mdf.CoordinateSystem);
+                Assert.AreEqual(extent.MinX, mdf.Extents.MinX);
+                Assert.AreEqual(extent.MinY, mdf.Extents.MinY);
+                Assert.AreEqual(extent.MaxX, mdf.Extents.MaxX);
+                Assert.AreEqual(extent.MaxY, mdf.Extents.MaxY);
+                Assert.Null(mdf.ExtentCalculator);
+                Assert.Null(mdf.BaseMap);
+                Assert.NotNull(mdf.MapLayer);
+                Assert.AreEqual(0, mdf.MapLayer.Count());
+                Assert.NotNull(mdf.MapLayerGroup);
+                Assert.AreEqual(0, mdf.MapLayerGroup.Count());
+            }
+        }
+
+        [Test()]
+        public void CreateSimpleLabelTest()
+        {
+            var versions = new Version[]
+            {
+                new Version(1, 0, 0),
+                new Version(1, 1, 0),
+                new Version(2, 4, 0)
+            };
+
+            Assert.Throws<ArgumentException>(() => ObjectFactory.CreateSimpleLabel(new Version(1, 2, 0), LayerDefinition.GeometryContextType.LineString));
+            Assert.Throws<ArgumentException>(() => ObjectFactory.CreateSimpleLabel(new Version(1, 2, 0), LayerDefinition.GeometryContextType.Point));
+            Assert.Throws<ArgumentException>(() => ObjectFactory.CreateSimpleLabel(new Version(1, 2, 0), LayerDefinition.GeometryContextType.Polygon));
+            Assert.Throws<ArgumentException>(() => ObjectFactory.CreateSimpleLabel(new Version(1, 2, 0), LayerDefinition.GeometryContextType.Unspecified));
+
+            foreach (var version in versions)
+            {
+                var lnLabel = ObjectFactory.CreateSimpleLabel(version, LayerDefinition.GeometryContextType.LineString);
+                var ptLabel = ObjectFactory.CreateSimpleLabel(version, LayerDefinition.GeometryContextType.Point);
+                var plLabel = ObjectFactory.CreateSimpleLabel(version, LayerDefinition.GeometryContextType.Polygon);
+
+                Assert.NotNull(lnLabel);
+                Assert.NotNull(ptLabel);
+                Assert.NotNull(plLabel);
+            }
+        }
+
+        [Test()]
+        public void CreateSimplePointTest()
+        {
+            var versions = new Version[]
+            {
+                new Version(1, 0, 0),
+                new Version(1, 1, 0),
+                new Version(2, 4, 0)
+            };
+
+            Assert.Throws<ArgumentException>(() => ObjectFactory.CreateSimplePoint(new Version(1, 2, 0)));
+
+            foreach (var version in versions)
+            {
+                var pt = ObjectFactory.CreateSimplePoint(version);
+
+                Assert.NotNull(pt);
+            }
+        }
+
+        [Test()]
+        public void CreateSimpleSolidLineTest()
+        {
+            var versions = new Version[]
+            {
+                new Version(1, 0, 0),
+                new Version(1, 1, 0),
+                new Version(2, 4, 0)
+            };
+
+            Assert.Throws<ArgumentException>(() => ObjectFactory.CreateSimpleSolidLine(new Version(1, 2, 0)));
+
+            foreach (var version in versions)
+            {
+                var pt = ObjectFactory.CreateSimpleSolidLine(version);
+
+                Assert.NotNull(pt);
+            }
+        }
+
+        [Test()]
+        public void CreateSimpleSolidFillTest()
+        {
+            var versions = new Version[]
+            {
+                new Version(1, 0, 0),
+                new Version(1, 1, 0),
+                new Version(2, 4, 0)
+            };
+
+            Assert.Throws<ArgumentException>(() => ObjectFactory.CreateSimpleSolidFill(new Version(1, 2, 0)));
+
+            foreach (var version in versions)
+            {
+                var pt = ObjectFactory.CreateSimpleSolidFill(version);
+
+                Assert.NotNull(pt);
+            }
+        }
+
+        [Test()]
+        public void CreateSimpleSymbolTest()
+        {
+            var versions = new Version[]
+            {
+                new Version(1, 0, 0),
+                new Version(1, 1, 0),
+                new Version(2, 4, 0)
+            };
+
+            Assert.Throws<ArgumentException>(() => ObjectFactory.CreateSimpleSymbol(new Version(1, 2, 0), "Foo", "Bar"));
+
+            foreach (var version in versions)
+            {
+                var simp = ObjectFactory.CreateSimpleSymbol(version, "Foo", "Bar");
+
+                Assert.NotNull(simp);
+                Assert.AreEqual("Foo", simp.Name);
+                Assert.AreEqual("Bar", simp.Description);
+            }
+        }
+
+        [Test()]
+        public void CreateCompoundSymbolTest()
+        {
+            var versions = new Version[]
+            {
+                new Version(1, 0, 0),
+                new Version(1, 1, 0),
+                new Version(2, 4, 0)
+            };
+
+            Assert.Throws<ArgumentException>(() => ObjectFactory.CreateCompoundSymbol(new Version(1, 2, 0), "Foo", "Bar"));
+
+            foreach (var version in versions)
+            {
+                var comp = ObjectFactory.CreateCompoundSymbol(version, "Foo", "Bar");
+
+                Assert.NotNull(comp);
+                Assert.AreEqual("Foo", comp.Name);
+                Assert.AreEqual("Bar", comp.Description);
+                Assert.NotNull(comp.SimpleSymbol);
+                Assert.AreEqual(0, comp.SimpleSymbol.Count());
+            }
+        }
+
+        [Test()]
+        public void CreatePrintLayoutTest()
+        {
+            var pl = ObjectFactory.CreatePrintLayout();
+            Assert.NotNull(pl);
+            Assert.NotNull(pl.PageProperties);
+            Assert.NotNull(pl.LayoutProperties);
+            Assert.NotNull(pl.CustomLogos);
+            Assert.NotNull(pl.CustomText);
+        }
+
+        [Test()]
+        public void CreatePoint2DTest()
+        {
+            var pt = ObjectFactory.CreatePoint2D(1, 2);
+            Assert.AreEqual(1, pt.X);
+            Assert.AreEqual(2, pt.Y);
+        }
+
+        [Test()]
+        public void CreatePoint3DTest()
+        {
+            var pt = ObjectFactory.CreatePoint3D(1, 2, 3);
+            Assert.AreEqual(1, pt.X);
+            Assert.AreEqual(2, pt.Y);
+            Assert.AreEqual(3, pt.Z);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Properties/AssemblyInfo.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Properties/AssemblyInfo.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Properties/AssemblyInfo.cs	2014-12-25 17:05:23 UTC (rev 8465)
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("OSGeo.MapGuide.ObjectModel.Tests")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("OSGeo.MapGuide.ObjectModel.Tests")]
+[assembly: AssemblyCopyright("Copyright ©  2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("dc3a6542-79b5-48ed-9164-2300b75083f7")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Properties/Resources.Designer.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Properties/Resources.Designer.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Properties/Resources.Designer.cs	2014-12-25 17:05:23 UTC (rev 8465)
@@ -0,0 +1,137 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.18444
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace OSGeo.MapGuide.ObjectModel.Tests.Properties {
+    using System;
+    
+    
+    /// <summary>
+    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources() {
+        }
+        
+        /// <summary>
+        ///   Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OSGeo.MapGuide.ObjectModel.Tests.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   Overrides the current thread's CurrentUICulture property for all
+        ///   resource lookups using this strongly typed resource class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?>
+        ///<ApplicationDefinition>
+        ///  <Title>Title1</Title>
+        ///  <TemplateUrl>TemplateUrl1</TemplateUrl>
+        ///  <MapSet>
+        ///    <MapGroup id="id1">
+        ///      <InitialView>
+        ///        <CenterX>1</CenterX>
+        ///        <CenterY>1</CenterY>
+        ///        <Scale>1</Scale>
+        ///      </InitialView>
+        ///      <Map>
+        ///        <Type>Type1</Type>
+        ///        <SingleTile>SingleTile1</SingleTile>
+        ///        <Extension />
+        ///      </Map>
+        ///      <Map>
+        ///        <Type>Type2</Type>
+        ///        <SingleTile>SingleTile2</SingleTile>
+        ///   [rest of string was truncated]";.
+        /// </summary>
+        internal static string AppDef_1_0_0 {
+            get {
+                return ResourceManager.GetString("AppDef_1_0_0", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?>
+        ///<DrawingSource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:noNamespaceSchemaLocation="DrawingSource-1.0.0.xsd">
+        ///  <SourceName>SourceName1</SourceName>
+        ///  <CoordinateSpace>CoordinateSpace1</CoordinateSpace>
+        ///  <Sheet>
+        ///    <Name>Name1</Name>
+        ///    <Extent>
+        ///      <MinX>1</MinX>
+        ///      <MinY>1</MinY>
+        ///      <MaxX>1</MaxX>
+        ///      <MaxY>1</MaxY>
+        ///    </Extent>
+        ///  </Sheet>
+        ///  <Sheet>
+        ///    <Name>Name2</Name>
+        ///    <E [rest of string was truncated]";.
+        /// </summary>
+        internal static string DrawingSource_1_0_0 {
+            get {
+                return ResourceManager.GetString("DrawingSource_1_0_0", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?>
+        ///<FeatureSource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:noNamespaceSchemaLocation="FeatureSource-1.0.0.xsd">
+        ///  <Provider>Provider1</Provider>
+        ///  <Parameter>
+        ///    <Name>Name1</Name>
+        ///    <Value>Value1</Value>
+        ///    <ExtendedData1>
+        ///      <any_element>anyType</any_element>
+        ///      <any_element>anyType</any_element>
+        ///      <any_element>anyType</any_element>
+        ///    </ExtendedData1>
+        ///  </Parameter>
+        ///  <Parameter>
+        /// [rest of string was truncated]";.
+        /// </summary>
+        internal static string FeatureSource_1_0_0 {
+            get {
+                return ResourceManager.GetString("FeatureSource_1_0_0", resourceCulture);
+            }
+        }
+    }
+}

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Properties/Resources.resx
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Properties/Resources.resx	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Properties/Resources.resx	2014-12-25 17:05:23 UTC (rev 8465)
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="AppDef_1_0_0" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\AppDef-1.0.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
+  </data>
+  <data name="DrawingSource_1_0_0" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\DrawingSource_1_0_0.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
+  </data>
+  <data name="FeatureSource_1_0_0" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\FeatureSource-1.0.0.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
+  </data>
+</root>
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Resources/AppDef-1.0.txt
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Resources/AppDef-1.0.txt	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Resources/AppDef-1.0.txt	2014-12-25 17:05:23 UTC (rev 8465)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ApplicationDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:noNamespaceSchemaLocation="ApplicationDefinition-1.0.0.xsd">
+  <Title>Title1</Title>
+  <TemplateUrl>TemplateUrl1</TemplateUrl>
+  <MapSet>
+    <MapGroup id="id1">
+      <InitialView>
+        <CenterX>1</CenterX>
+        <CenterY>1</CenterY>
+        <Scale>1</Scale>
+      </InitialView>
+      <Map>
+        <Type>Type1</Type>
+        <SingleTile>SingleTile1</SingleTile>
+        <Extension />
+      </Map>
+      <Map>
+        <Type>Type2</Type>
+        <SingleTile>SingleTile2</SingleTile>
+        <Extension />
+      </Map>
+      <Map>
+        <Type>Type3</Type>
+        <SingleTile>SingleTile3</SingleTile>
+        <Extension />
+      </Map>
+      <Extension />
+    </MapGroup>
+    <MapGroup id="id2">
+      <InitialView>
+        <CenterX>-1.7976931348623157E+308</CenterX>
+        <CenterY>-1.7976931348623157E+308</CenterY>
+        <Scale>-1.7976931348623157E+308</Scale>
+      </InitialView>
+      <Map>
+        <Type>Type4</Type>
+        <SingleTile>SingleTile4</SingleTile>
+        <Extension />
+      </Map>
+      <Map>
+        <Type>Type5</Type>
+        <SingleTile>SingleTile5</SingleTile>
+        <Extension />
+      </Map>
+      <Map>
+        <Type>Type6</Type>
+        <SingleTile>SingleTile6</SingleTile>
+        <Extension />
+      </Map>
+      <Extension />
+    </MapGroup>
+    <MapGroup id="id3">
+      <InitialView>
+        <CenterX>1.7976931348623157E+308</CenterX>
+        <CenterY>1.7976931348623157E+308</CenterY>
+        <Scale>1.7976931348623157E+308</Scale>
+      </InitialView>
+      <Map>
+        <Type>Type7</Type>
+        <SingleTile>SingleTile7</SingleTile>
+        <Extension />
+      </Map>
+      <Map>
+        <Type>Type8</Type>
+        <SingleTile>SingleTile8</SingleTile>
+        <Extension />
+      </Map>
+      <Map>
+        <Type>Type9</Type>
+        <SingleTile>SingleTile9</SingleTile>
+        <Extension />
+      </Map>
+      <Extension />
+    </MapGroup>
+  </MapSet>
+  <WidgetSet>
+    <Container>
+      <Name>Name1</Name>
+      <Type>Type1</Type>
+      <Position>Position1</Position>
+      <Extension />
+    </Container>
+    <Container>
+      <Name>Name2</Name>
+      <Type>Type2</Type>
+      <Position>Position2</Position>
+      <Extension />
+    </Container>
+    <Container>
+      <Name>Name3</Name>
+      <Type>Type3</Type>
+      <Position>Position3</Position>
+      <Extension />
+    </Container>
+    <MapWidget>
+      <Name>Name1</Name>
+      <Type>Type1</Type>
+      <Location>Location1</Location>
+      <Extension />
+      <MapId>MapId1</MapId>
+    </MapWidget>
+    <Widget>
+      <Name>Name1</Name>
+      <Type>Type1</Type>
+      <Location>Location1</Location>
+      <Extension />
+    </Widget>
+    <Widget>
+      <Name>Name2</Name>
+      <Type>Type2</Type>
+      <Location>Location2</Location>
+      <Extension />
+    </Widget>
+    <Widget>
+      <Name>Name3</Name>
+      <Type>Type3</Type>
+      <Location>Location3</Location>
+      <Extension />
+    </Widget>
+  </WidgetSet>
+  <WidgetSet>
+    <Container>
+      <Name>Name4</Name>
+      <Type>Type4</Type>
+      <Position>Position4</Position>
+      <Extension />
+    </Container>
+    <Container>
+      <Name>Name5</Name>
+      <Type>Type5</Type>
+      <Position>Position5</Position>
+      <Extension />
+    </Container>
+    <Container>
+      <Name>Name6</Name>
+      <Type>Type6</Type>
+      <Position>Position6</Position>
+      <Extension />
+    </Container>
+    <MapWidget>
+      <Name>Name2</Name>
+      <Type>Type2</Type>
+      <Location>Location2</Location>
+      <Extension />
+      <MapId>MapId2</MapId>
+    </MapWidget>
+    <Widget>
+      <Name>Name4</Name>
+      <Type>Type4</Type>
+      <Location>Location4</Location>
+      <Extension />
+    </Widget>
+    <Widget>
+      <Name>Name5</Name>
+      <Type>Type5</Type>
+      <Location>Location5</Location>
+      <Extension />
+    </Widget>
+    <Widget>
+      <Name>Name6</Name>
+      <Type>Type6</Type>
+      <Location>Location6</Location>
+      <Extension />
+    </Widget>
+  </WidgetSet>
+  <WidgetSet>
+    <Container>
+      <Name>Name7</Name>
+      <Type>Type7</Type>
+      <Position>Position7</Position>
+      <Extension />
+    </Container>
+    <Container>
+      <Name>Name8</Name>
+      <Type>Type8</Type>
+      <Position>Position8</Position>
+      <Extension />
+    </Container>
+    <Container>
+      <Name>Name9</Name>
+      <Type>Type9</Type>
+      <Position>Position9</Position>
+      <Extension />
+    </Container>
+    <MapWidget>
+      <Name>Name3</Name>
+      <Type>Type3</Type>
+      <Location>Location3</Location>
+      <Extension />
+      <MapId>MapId3</MapId>
+    </MapWidget>
+    <Widget>
+      <Name>Name7</Name>
+      <Type>Type7</Type>
+      <Location>Location7</Location>
+      <Extension />
+    </Widget>
+    <Widget>
+      <Name>Name8</Name>
+      <Type>Type8</Type>
+      <Location>Location8</Location>
+      <Extension />
+    </Widget>
+    <Widget>
+      <Name>Name9</Name>
+      <Type>Type9</Type>
+      <Location>Location9</Location>
+      <Extension />
+    </Widget>
+  </WidgetSet>
+  <Extension />
+</ApplicationDefinition>
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Resources/DrawingSource_1_0_0.txt
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Resources/DrawingSource_1_0_0.txt	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Resources/DrawingSource_1_0_0.txt	2014-12-25 17:05:23 UTC (rev 8465)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<DrawingSource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:noNamespaceSchemaLocation="DrawingSource-1.0.0.xsd">
+  <SourceName>SourceName1</SourceName>
+  <CoordinateSpace>CoordinateSpace1</CoordinateSpace>
+  <Sheet>
+    <Name>Name1</Name>
+    <Extent>
+      <MinX>1</MinX>
+      <MinY>1</MinY>
+      <MaxX>1</MaxX>
+      <MaxY>1</MaxY>
+    </Extent>
+  </Sheet>
+  <Sheet>
+    <Name>Name2</Name>
+    <Extent>
+      <MinX>-1.7976931348623157E+308</MinX>
+      <MinY>-1.7976931348623157E+308</MinY>
+      <MaxX>-1.7976931348623157E+308</MaxX>
+      <MaxY>-1.7976931348623157E+308</MaxY>
+    </Extent>
+  </Sheet>
+  <Sheet>
+    <Name>Name3</Name>
+    <Extent>
+      <MinX>1.7976931348623157E+308</MinX>
+      <MinY>1.7976931348623157E+308</MinY>
+      <MaxX>1.7976931348623157E+308</MaxX>
+      <MaxY>1.7976931348623157E+308</MaxY>
+    </Extent>
+  </Sheet>
+</DrawingSource>
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Resources/FeatureSource-1.0.0.txt
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Resources/FeatureSource-1.0.0.txt	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/Resources/FeatureSource-1.0.0.txt	2014-12-25 17:05:23 UTC (rev 8465)
@@ -0,0 +1,533 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FeatureSource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:noNamespaceSchemaLocation="FeatureSource-1.0.0.xsd">
+  <Provider>Provider1</Provider>
+  <Parameter>
+    <Name>Name1</Name>
+    <Value>Value1</Value>
+    <ExtendedData1>
+      <any_element>anyType</any_element>
+      <any_element>anyType</any_element>
+      <any_element>anyType</any_element>
+    </ExtendedData1>
+  </Parameter>
+  <Parameter>
+    <Name>Name2</Name>
+    <Value>Value2</Value>
+    <ExtendedData1>
+      <any_element>anyType</any_element>
+      <any_element>anyType</any_element>
+      <any_element>anyType</any_element>
+    </ExtendedData1>
+  </Parameter>
+  <Parameter>
+    <Name>Name3</Name>
+    <Value>Value3</Value>
+    <ExtendedData1>
+      <any_element>anyType</any_element>
+      <any_element>anyType</any_element>
+      <any_element>anyType</any_element>
+    </ExtendedData1>
+  </Parameter>
+  <SupplementalSpatialContextInfo>
+    <Name>Name1</Name>
+    <CoordinateSystem>CoordinateSystem1</CoordinateSystem>
+    <ExtendedData1>
+      <any_element>anyType</any_element>
+      <any_element>anyType</any_element>
+      <any_element>anyType</any_element>
+    </ExtendedData1>
+  </SupplementalSpatialContextInfo>
+  <SupplementalSpatialContextInfo>
+    <Name>Name2</Name>
+    <CoordinateSystem>CoordinateSystem2</CoordinateSystem>
+    <ExtendedData1>
+      <any_element>anyType</any_element>
+      <any_element>anyType</any_element>
+      <any_element>anyType</any_element>
+    </ExtendedData1>
+  </SupplementalSpatialContextInfo>
+  <SupplementalSpatialContextInfo>
+    <Name>Name3</Name>
+    <CoordinateSystem>CoordinateSystem3</CoordinateSystem>
+    <ExtendedData1>
+      <any_element>anyType</any_element>
+      <any_element>anyType</any_element>
+      <any_element>anyType</any_element>
+    </ExtendedData1>
+  </SupplementalSpatialContextInfo>
+  <ConfigurationDocument>ConfigurationDocument1</ConfigurationDocument>
+  <LongTransaction>LongTransaction1</LongTransaction>
+  <Extension>
+    <CalculatedProperty>
+      <Name>Name1</Name>
+      <Expression>Expression1</Expression>
+      <ExtendedData1>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+      </ExtendedData1>
+    </CalculatedProperty>
+    <CalculatedProperty>
+      <Name>Name2</Name>
+      <Expression>Expression2</Expression>
+      <ExtendedData1>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+      </ExtendedData1>
+    </CalculatedProperty>
+    <CalculatedProperty>
+      <Name>Name3</Name>
+      <Expression>Expression3</Expression>
+      <ExtendedData1>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+      </ExtendedData1>
+    </CalculatedProperty>
+    <AttributeRelate>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty1</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty1</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty2</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty2</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty3</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty3</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <AttributeClass>AttributeClass1</AttributeClass>
+      <ResourceId>ResourceId1</ResourceId>
+      <Name>Name1</Name>
+      <AttributeNameDelimiter>AttributeNameDelimiter1</AttributeNameDelimiter>
+      <RelateType>LeftOuter</RelateType>
+      <ForceOneToOne>true</ForceOneToOne>
+      <ExtendedData1>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+      </ExtendedData1>
+    </AttributeRelate>
+    <AttributeRelate>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty4</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty4</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty5</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty5</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty6</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty6</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <AttributeClass>AttributeClass2</AttributeClass>
+      <ResourceId>ResourceId2</ResourceId>
+      <Name>Name2</Name>
+      <AttributeNameDelimiter>AttributeNameDelimiter2</AttributeNameDelimiter>
+      <RelateType>RightOuter</RelateType>
+      <ForceOneToOne>false</ForceOneToOne>
+      <ExtendedData1>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+      </ExtendedData1>
+    </AttributeRelate>
+    <AttributeRelate>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty7</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty7</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty8</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty8</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty9</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty9</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <AttributeClass>AttributeClass3</AttributeClass>
+      <ResourceId>ResourceId3</ResourceId>
+      <Name>Name3</Name>
+      <AttributeNameDelimiter>AttributeNameDelimiter3</AttributeNameDelimiter>
+      <RelateType>Inner</RelateType>
+      <ForceOneToOne>true</ForceOneToOne>
+      <ExtendedData1>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+      </ExtendedData1>
+    </AttributeRelate>
+    <Name>Name1</Name>
+    <FeatureClass>FeatureClass1</FeatureClass>
+    <ExtendedData1>
+      <any_element>anyType</any_element>
+      <any_element>anyType</any_element>
+      <any_element>anyType</any_element>
+    </ExtendedData1>
+  </Extension>
+  <Extension>
+    <CalculatedProperty>
+      <Name>Name4</Name>
+      <Expression>Expression4</Expression>
+      <ExtendedData1>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+      </ExtendedData1>
+    </CalculatedProperty>
+    <CalculatedProperty>
+      <Name>Name5</Name>
+      <Expression>Expression5</Expression>
+      <ExtendedData1>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+      </ExtendedData1>
+    </CalculatedProperty>
+    <CalculatedProperty>
+      <Name>Name6</Name>
+      <Expression>Expression6</Expression>
+      <ExtendedData1>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+      </ExtendedData1>
+    </CalculatedProperty>
+    <AttributeRelate>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty10</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty10</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty11</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty11</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty12</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty12</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <AttributeClass>AttributeClass4</AttributeClass>
+      <ResourceId>ResourceId4</ResourceId>
+      <Name>Name4</Name>
+      <AttributeNameDelimiter>AttributeNameDelimiter4</AttributeNameDelimiter>
+      <RelateType>Association</RelateType>
+      <ForceOneToOne>false</ForceOneToOne>
+      <ExtendedData1>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+      </ExtendedData1>
+    </AttributeRelate>
+    <AttributeRelate>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty13</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty13</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty14</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty14</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty15</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty15</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <AttributeClass>AttributeClass5</AttributeClass>
+      <ResourceId>ResourceId5</ResourceId>
+      <Name>Name5</Name>
+      <AttributeNameDelimiter>AttributeNameDelimiter5</AttributeNameDelimiter>
+      <RelateType>LeftOuter</RelateType>
+      <ForceOneToOne>true</ForceOneToOne>
+      <ExtendedData1>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+      </ExtendedData1>
+    </AttributeRelate>
+    <AttributeRelate>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty16</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty16</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty17</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty17</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty18</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty18</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <AttributeClass>AttributeClass6</AttributeClass>
+      <ResourceId>ResourceId6</ResourceId>
+      <Name>Name6</Name>
+      <AttributeNameDelimiter>AttributeNameDelimiter6</AttributeNameDelimiter>
+      <RelateType>RightOuter</RelateType>
+      <ForceOneToOne>false</ForceOneToOne>
+      <ExtendedData1>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+      </ExtendedData1>
+    </AttributeRelate>
+    <Name>Name2</Name>
+    <FeatureClass>FeatureClass2</FeatureClass>
+    <ExtendedData1>
+      <any_element>anyType</any_element>
+      <any_element>anyType</any_element>
+      <any_element>anyType</any_element>
+    </ExtendedData1>
+  </Extension>
+  <Extension>
+    <CalculatedProperty>
+      <Name>Name7</Name>
+      <Expression>Expression7</Expression>
+      <ExtendedData1>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+      </ExtendedData1>
+    </CalculatedProperty>
+    <CalculatedProperty>
+      <Name>Name8</Name>
+      <Expression>Expression8</Expression>
+      <ExtendedData1>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+      </ExtendedData1>
+    </CalculatedProperty>
+    <CalculatedProperty>
+      <Name>Name9</Name>
+      <Expression>Expression9</Expression>
+      <ExtendedData1>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+      </ExtendedData1>
+    </CalculatedProperty>
+    <AttributeRelate>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty19</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty19</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty20</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty20</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty21</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty21</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <AttributeClass>AttributeClass7</AttributeClass>
+      <ResourceId>ResourceId7</ResourceId>
+      <Name>Name7</Name>
+      <AttributeNameDelimiter>AttributeNameDelimiter7</AttributeNameDelimiter>
+      <RelateType>Inner</RelateType>
+      <ForceOneToOne>true</ForceOneToOne>
+      <ExtendedData1>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+      </ExtendedData1>
+    </AttributeRelate>
+    <AttributeRelate>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty22</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty22</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty23</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty23</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty24</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty24</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <AttributeClass>AttributeClass8</AttributeClass>
+      <ResourceId>ResourceId8</ResourceId>
+      <Name>Name8</Name>
+      <AttributeNameDelimiter>AttributeNameDelimiter8</AttributeNameDelimiter>
+      <RelateType>Association</RelateType>
+      <ForceOneToOne>false</ForceOneToOne>
+      <ExtendedData1>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+      </ExtendedData1>
+    </AttributeRelate>
+    <AttributeRelate>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty25</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty25</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty26</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty26</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <RelateProperty>
+        <FeatureClassProperty>FeatureClassProperty27</FeatureClassProperty>
+        <AttributeClassProperty>AttributeClassProperty27</AttributeClassProperty>
+        <ExtendedData1>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+          <any_element>anyType</any_element>
+        </ExtendedData1>
+      </RelateProperty>
+      <AttributeClass>AttributeClass9</AttributeClass>
+      <ResourceId>ResourceId9</ResourceId>
+      <Name>Name9</Name>
+      <AttributeNameDelimiter>AttributeNameDelimiter9</AttributeNameDelimiter>
+      <RelateType>LeftOuter</RelateType>
+      <ForceOneToOne>true</ForceOneToOne>
+      <ExtendedData1>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+        <any_element>anyType</any_element>
+      </ExtendedData1>
+    </AttributeRelate>
+    <Name>Name3</Name>
+    <FeatureClass>FeatureClass3</FeatureClass>
+    <ExtendedData1>
+      <any_element>anyType</any_element>
+      <any_element>anyType</any_element>
+      <any_element>anyType</any_element>
+    </ExtendedData1>
+  </Extension>
+  <ExtendedData1>
+    <any_element>anyType</any_element>
+    <any_element>anyType</any_element>
+    <any_element>anyType</any_element>
+  </ExtendedData1>
+</FeatureSource>
\ No newline at end of file

Added: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/packages.config
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/packages.config	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/packages.config	2014-12-25 17:05:23 UTC (rev 8465)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="Moq" version="4.2.1409.1722" targetFramework="net40-Client" />
+  <package id="NUnit" version="2.6.3" targetFramework="net45" />
+</packages>
\ No newline at end of file

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Check.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Check.cs	2014-12-25 15:09:04 UTC (rev 8464)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Check.cs	2014-12-25 17:05:23 UTC (rev 8465)
@@ -44,6 +44,18 @@
         }
 
         /// <summary>
+        /// Check that the argument value is not null
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <param name="obj"></param>
+        /// <param name="arg"></param>
+        public static void ArgumentNotNull<T>(T obj, string arg) where T : class
+        {
+            if (obj == null)
+                throw new ArgumentNullException(arg);
+        }
+
+        /// <summary>
         /// Check that value is not null
         /// </summary>
         /// <typeparam name="T"></typeparam>

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/FeatureSource/v1_0_0/FeatureSourceImpl.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/FeatureSource/v1_0_0/FeatureSourceImpl.cs	2014-12-25 15:09:04 UTC (rev 8464)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/FeatureSource/v1_0_0/FeatureSourceImpl.cs	2014-12-25 17:05:23 UTC (rev 8465)
@@ -275,9 +275,12 @@
         {
             get
             {
-                foreach (var sc in this.SupplementalSpatialContextInfo)
+                if (this.SupplementalSpatialContextInfo != null)
                 {
-                    yield return sc;
+                    foreach (var sc in this.SupplementalSpatialContextInfo)
+                    {
+                        yield return sc;
+                    }
                 }
             }
         }
@@ -311,9 +314,12 @@
         {
             get
             {
-                foreach (var ext in this.Extension)
+                if (this.Extension != null)
                 {
-                    yield return ext;
+                    foreach (var ext in this.Extension)
+                    {
+                        yield return ext;
+                    }
                 }
             }
         }

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ObjectFactory.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ObjectFactory.cs	2014-12-25 15:09:04 UTC (rev 8464)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ObjectFactory.cs	2014-12-25 17:05:23 UTC (rev 8465)
@@ -34,6 +34,7 @@
 using System;
 using System.Collections.Generic;
 using System.Collections.Specialized;
+using System.IO;
 using System.Linq;
 using System.Text;
 using Ldf110 = OSGeo.MapGuide.ObjectModels.LayerDefinition.v1_1_0;
@@ -127,6 +128,24 @@
             _mapDefinitionFactories = new Dictionary<Version, MapDefinitionCreatorFunc>();
             _watermarkFactories = new Dictionary<Version, WatermarkCreatorFunc>();
 
+            Init();
+        }
+
+        public static void Reset()
+        {
+            _layerFactories.Clear();
+            _wlFactories.Clear();
+            _loadProcFactories.Clear();
+            _simpleSymbolFactories.Clear();
+            _compoundSymbolFactories.Clear();
+            _mapDefinitionFactories.Clear();
+            _watermarkFactories.Clear();
+            ResourceTypeRegistry.Reset();
+            Init();
+        }
+
+        private static void Init()
+        {
             _layerFactories.Add(
                 new Version(1, 0, 0),
                 new LayerCreatorFunc(OSGeo.MapGuide.ObjectModels.LayerDefinition.v1_0_0.LdfEntryPoint.CreateDefault));
@@ -283,6 +302,8 @@
         /// <param name="serializer">The serializer.</param>
         public static void RegisterResource(ResourceTypeDescriptor desc, ResourceSerializer serializer)
         {
+            Check.ArgumentNotNull(desc, "desc");
+            Check.ArgumentNotNull(serializer, "serializer");
             ResourceTypeRegistry.RegisterResource(desc, serializer);
         }
 
@@ -294,46 +315,55 @@
         /// <param name="deserializeMethod">The deserialize method.</param>
         public static void RegisterResourceSerializer(ResourceTypeDescriptor resourceType, ResourceSerializationCallback serializer, ResourceDeserializationCallback deserializer)
         {
+            Check.ArgumentNotNull(resourceType, "resourceType");
+            Check.ArgumentNotNull(serializer, "serializer");
+            Check.ArgumentNotNull(deserializer, "deserializer");
             ResourceTypeRegistry.RegisterResource(resourceType, serializer, deserializer);
         }
 
         /// <summary>
         /// Registers the compound symbol factory method
         /// </summary>
-        /// <param name="ver"></param>
+        /// <param name="version"></param>
         /// <param name="func"></param>
-        public static void RegisterCompoundSymbolFactoryMethod(Version ver, CompoundSymbolDefCreatorFunc func)
+        public static void RegisterCompoundSymbolFactoryMethod(Version version, CompoundSymbolDefCreatorFunc func)
         {
-            if (_compoundSymbolFactories.ContainsKey(ver))
-                throw new ArgumentException(Strings.FactoryMethodAlreadyRegistered + ver);
+            Check.ArgumentNotNull(version, "version");
+            Check.ArgumentNotNull(func, "func");
+            if (_compoundSymbolFactories.ContainsKey(version))
+                throw new ArgumentException(Strings.FactoryMethodAlreadyRegistered + version);
 
-            _compoundSymbolFactories[ver] = func;
+            _compoundSymbolFactories[version] = func;
         }
 
         /// <summary>
         /// Regsiters the simple symbol factory method
         /// </summary>
-        /// <param name="ver"></param>
+        /// <param name="version"></param>
         /// <param name="func"></param>
-        public static void RegisterSimpleSymbolFactoryMethod(Version ver, SimpleSymbolDefCreatorFunc func)
+        public static void RegisterSimpleSymbolFactoryMethod(Version version, SimpleSymbolDefCreatorFunc func)
         {
-            if (_simpleSymbolFactories.ContainsKey(ver))
-                throw new ArgumentException(Strings.FactoryMethodAlreadyRegistered + ver);
+            Check.ArgumentNotNull(version, "version");
+            Check.ArgumentNotNull(func, "func");
+            if (_simpleSymbolFactories.ContainsKey(version))
+                throw new ArgumentException(Strings.FactoryMethodAlreadyRegistered + version);
 
-            _simpleSymbolFactories[ver] = func;
+            _simpleSymbolFactories[version] = func;
         }
 
         /// <summary>
         /// Registers the layer factory method.
         /// </summary>
-        /// <param name="ver">The ver.</param>
+        /// <param name="version">The ver.</param>
         /// <param name="method">The method.</param>
-        public static void RegisterLayerFactoryMethod(Version ver, LayerCreatorFunc method)
+        public static void RegisterLayerFactoryMethod(Version version, LayerCreatorFunc method)
         {
-            if (_layerFactories.ContainsKey(ver))
-                throw new ArgumentException(Strings.FactoryMethodAlreadyRegistered + ver);
+            Check.ArgumentNotNull(version, "version");
+            Check.ArgumentNotNull(method, "method");
+            if (_layerFactories.ContainsKey(version))
+                throw new ArgumentException(Strings.FactoryMethodAlreadyRegistered + version);
 
-            _layerFactories[ver] = method;
+            _layerFactories[version] = method;
         }
 
         /// <summary>
@@ -343,6 +373,7 @@
         /// <param name="method">The method.</param>
         public static void RegisterLoadProcedureFactoryMethod(LoadType type, LoadProcCreatorFunc method)
         {
+            Check.ArgumentNotNull(method, "method");
             if (_loadProcFactories.ContainsKey(type))
                 throw new ArgumentException(Strings.LoadProcFactoryMethodAlreadyRegistered + type);
 
@@ -356,6 +387,8 @@
         /// <param name="method">The method.</param>
         public static void RegisterWebLayoutFactoryMethod(Version version, WebLayoutCreatorFunc method)
         {
+            Check.ArgumentNotNull(version, "version");
+            Check.ArgumentNotNull(method, "method");
             if (_wlFactories.ContainsKey(version))
                 throw new ArgumentException(Strings.FactoryMethodAlreadyRegistered + version);
 
@@ -369,6 +402,8 @@
         /// <param name="method"></param>
         public static void RegisterMapDefinitionFactoryMethod(Version version, MapDefinitionCreatorFunc method)
         {
+            Check.ArgumentNotNull(version, "version");
+            Check.ArgumentNotNull(method, "method");
             if (_mapDefinitionFactories.ContainsKey(version))
                 throw new ArgumentException(Strings.FactoryMethodAlreadyRegistered + version);
 
@@ -382,6 +417,8 @@
         /// <param name="method"></param>
         public static void RegisterWatermarkDefinitionFactoryMethod(Version version, WatermarkCreatorFunc method)
         {
+            Check.ArgumentNotNull(version, "version");
+            Check.ArgumentNotNull(method, "method");
             if (_watermarkFactories.ContainsKey(version))
                 throw new ArgumentException(Strings.FactoryMethodAlreadyRegistered + version);
 
@@ -420,11 +457,15 @@
         /// <summary>
         /// Creates the feature source extension.
         /// </summary>
+        /// <param name="name">The name of the extension</param>
+        /// <param name="featureClass">The feature class</param>
         /// <returns></returns>
-        public static IFeatureSourceExtension CreateFeatureSourceExtension()
+        public static IFeatureSourceExtension CreateFeatureSourceExtension(string name, string featureClass)
         {
             return new OSGeo.MapGuide.ObjectModels.FeatureSource.v1_0_0.FeatureSourceTypeExtension()
             {
+                Name = name,
+                FeatureClass = featureClass,
                 CalculatedProperty = new System.ComponentModel.BindingList<OSGeo.MapGuide.ObjectModels.FeatureSource.v1_0_0.CalculatedPropertyType>(),
                 AttributeRelate = new System.ComponentModel.BindingList<OSGeo.MapGuide.ObjectModels.FeatureSource.v1_0_0.AttributeRelateType>()
             };
@@ -433,10 +474,16 @@
         /// <summary>
         /// Creates the calculated property.
         /// </summary>
+        /// <param name="name">The name of the calculated property</param>
+        /// <param name="expression">The FDO Expression</param>
         /// <returns></returns>
-        public static ICalculatedProperty CreateCalculatedProperty()
+        public static ICalculatedProperty CreateCalculatedProperty(string name, string expression)
         {
-            return new OSGeo.MapGuide.ObjectModels.FeatureSource.v1_0_0.CalculatedPropertyType();
+            return new OSGeo.MapGuide.ObjectModels.FeatureSource.v1_0_0.CalculatedPropertyType()
+            {
+                Name = name,
+                Expression = expression
+            };
         }
 
         /// <summary>
@@ -612,6 +659,7 @@
                 throw new ArgumentException(Strings.UnknownMapDefinitionVersion + version.ToString());
 
             var mdf = _mapDefinitionFactories[version]();
+            mdf.Name = name;
             return mdf;
         }
 
@@ -656,6 +704,9 @@
         {
             var sym = CreateSimpleSymbol(version, "MTEXT", "Default MTEXT Symbol");
             var text = sym.CreateTextGraphics();
+
+            bool bSupportsAdvancedTypes = !(version.Major == 1 && version.Minor == 0 && version.Build == 0);
+
             text.Content = "%CONTENT%";
             text.FontName = "%FONTNAME%";
             text.Bold = "%BOLD%";
@@ -718,25 +769,25 @@
                     break;
             }
 
-            sym.DefineParameter("CONTENT", "'text'", "T&ext", "Text", "Content");
-            sym.DefineParameter("FONTNAME", "'Arial'", "&Font Name", "Font Name", "FontName");
-            sym.DefineParameter("FONTHEIGHT", "4.0", "Font &Size", "Font Size", "FontHeight");
-            sym.DefineParameter("BOLD", "false", "Bold", "Bold", "Bold");
-            sym.DefineParameter("ITALIC", "false", "Italic", "Italic", "Italic");
-            sym.DefineParameter("UNDERLINED", "false", "Underlined", "Underlined", "Underlined");
+            sym.DefineParameter("CONTENT", "'text'", "T&ext", "Text", bSupportsAdvancedTypes ? "Content" : "String");
+            sym.DefineParameter("FONTNAME", "'Arial'", "&Font Name", "Font Name", bSupportsAdvancedTypes ? "FontName" : "String");
+            sym.DefineParameter("FONTHEIGHT", "4.0", "Font &Size", "Font Size", bSupportsAdvancedTypes ? "FontHeight" : "Real");
+            sym.DefineParameter("BOLD", "false", "Bold", "Bold", bSupportsAdvancedTypes ? "Bold" : "Boolean");
+            sym.DefineParameter("ITALIC", "false", "Italic", "Italic", bSupportsAdvancedTypes ? "Italic" : "Boolean");
+            sym.DefineParameter("UNDERLINED", "false", "Underlined", "Underlined", bSupportsAdvancedTypes ? "Underlined" : "Boolean");
             if (text2 != null)
             {
-                sym.DefineParameter("OVERLINED", "false", "Overlined", "Overlined", "Overlined");
+                sym.DefineParameter("OVERLINED", "false", "Overlined", "Overlined", bSupportsAdvancedTypes ? "Overlined" : "Boolean");
             }
-            sym.DefineParameter("JUSTIFICATION", "'FromAlignment'", "Justification", "Justification", "Justification");
-            sym.DefineParameter("LINESPACING", "1.05", "Line Spacing", "Line Spacing", "LineSpacing");
-            sym.DefineParameter("GHOSTCOLOR", "", "Ghost Color", "Ghost Color", "GhostColor");
-            sym.DefineParameter("FRAMELINECOLOR", "", "Frame Line Color", "Frame Line Color", "FrameLineColor");
-            sym.DefineParameter("FRAMEFILLCOLOR", "", "Frame Fill Color", "Frame Fill Color", "FrameFillColor");
-            sym.DefineParameter("TEXTCOLOR", "0xff000000", "Text Color", "Text Color", "TextColor");
-            sym.DefineParameter("VERTICALALIGNMENT", "'Halfline'", "&Vertical Alignment", "Vertical Alignment", "VerticalAlignment");
-            sym.DefineParameter("ROTATION", "0.0", "&Rotation", "Rotation", "Angle");
-            sym.DefineParameter("HORIZONTALALIGNMENT", "'Center'", "Hori&zontal Alignment", "Horizontal Alignment", "HorizontalAlignment");
+            sym.DefineParameter("JUSTIFICATION", "'FromAlignment'", "Justification", "Justification", bSupportsAdvancedTypes ? "Justification" : "String");
+            sym.DefineParameter("LINESPACING", "1.05", "Line Spacing", "Line Spacing", bSupportsAdvancedTypes ? "LineSpacing" : "Real");
+            sym.DefineParameter("GHOSTCOLOR", "", "Ghost Color", "Ghost Color", bSupportsAdvancedTypes ? "GhostColor" : "Color");
+            sym.DefineParameter("FRAMELINECOLOR", "", "Frame Line Color", "Frame Line Color", bSupportsAdvancedTypes ? "FrameLineColor" : "Color");
+            sym.DefineParameter("FRAMEFILLCOLOR", "", "Frame Fill Color", "Frame Fill Color", bSupportsAdvancedTypes ? "FrameFillColor" : "Color");
+            sym.DefineParameter("TEXTCOLOR", "0xff000000", "Text Color", "Text Color", bSupportsAdvancedTypes ? "TextColor" : "Color");
+            sym.DefineParameter("VERTICALALIGNMENT", "'Halfline'", "&Vertical Alignment", "Vertical Alignment", bSupportsAdvancedTypes ? "VerticalAlignment" : "String");
+            sym.DefineParameter("ROTATION", "0.0", "&Rotation", "Rotation", bSupportsAdvancedTypes ? "Angle" : "Real");
+            sym.DefineParameter("HORIZONTALALIGNMENT", "'Center'", "Hori&zontal Alignment", "Horizontal Alignment", bSupportsAdvancedTypes ? "HorizontalAlignment" : "String");
             sym.DefineParameter("StyleEditorGenerated_TextPositionX_0", "0.0", "PositionX", "PositionX", "Real");
             sym.DefineParameter("StyleEditorGenerated_TextPositionY_0", "0.0", "PositionY", "PositionY", "Real");
 
@@ -752,6 +803,9 @@
         {
             var sym = CreateSimpleSymbol(version, "Square", "Default Point Symbol");
             var path = sym.CreatePathGraphics();
+
+            bool bSupportsAdvancedTypes = !(version.Major == 1 && version.Minor == 0 && version.Build == 0);
+
             path.Geometry = "M -1.0,-1.0 L 1.0,-1.0 L 1.0,1.0 L -1.0,1.0 L -1.0,-1.0";
             IPathGraphic2 path2 = path as IPathGraphic2;
             if (path2 != null)
@@ -769,10 +823,10 @@
             usage.Angle = "%ROTATION%";
             sym.PointUsage = usage;
 
-            sym.DefineParameter("FILLCOLOR", "0xffffffff", "&Fill Color", "Fill Color", "FillColor");
-            sym.DefineParameter("LINECOLOR", "0xff000000", "Line &Color", "Line Color", "LineColor");
-            sym.DefineParameter("LINEWEIGHT", "0.0", "Line &Thickness", "Line Thickness", "LineWeight");
-            sym.DefineParameter("ROTATION", "0.0", "&Rotation", "Rotation", "Angle");
+            sym.DefineParameter("FILLCOLOR", "0xffffffff", "&Fill Color", "Fill Color", bSupportsAdvancedTypes ? "FillColor" : "Color");
+            sym.DefineParameter("LINECOLOR", "0xff000000", "Line &Color", "Line Color", bSupportsAdvancedTypes ? "LineColor" : "Color");
+            sym.DefineParameter("LINEWEIGHT", "0.0", "Line &Thickness", "Line Thickness", bSupportsAdvancedTypes ? "LineWeight" : "Real");
+            sym.DefineParameter("ROTATION", "0.0", "&Rotation", "Rotation", bSupportsAdvancedTypes ? "Angle" : "Real");
             if (path2 != null)
             {
                 sym.DefineParameter("StyleEditorGenerated_ScaleX_0", "1.0", "Path ScaleX", "Path ScaleX", "Real");
@@ -792,6 +846,9 @@
         {
             var sym = CreateSimpleSymbol(version, "Solid Line", "Default Line Symbol");
             var path = sym.CreatePathGraphics();
+
+            bool bSupportsAdvancedTypes = !(version.Major == 1 && version.Minor == 0 && version.Build == 0);
+
             path.Geometry = "M 0.0,0.0 L 1.0,0.0";
             path.LineColor = "%LINECOLOR%";
             path.LineWeight = "%LINEWEIGHT%";
@@ -808,8 +865,8 @@
             lineUsage.Repeat = "1.0";
             sym.LineUsage = lineUsage;
 
-            sym.DefineParameter("LINECOLOR", "0xff000000", "Line &Color", "Line Color", "LineColor");
-            sym.DefineParameter("LINEWEIGHT", "0.0", "Line &Thickness", "Line Thickness", "LineWeight");
+            sym.DefineParameter("LINECOLOR", "0xff000000", "Line &Color", "Line Color", bSupportsAdvancedTypes ? "LineColor" : "Color");
+            sym.DefineParameter("LINEWEIGHT", "0.0", "Line &Thickness", "Line Thickness", bSupportsAdvancedTypes ? "LineWeight" : "Real");
             if (path2 != null)
             {
                 sym.DefineParameter("StyleEditorGenerated_ScaleX_0", "1.0", "Path ScaleX", "Path ScaleX", "Real");
@@ -829,6 +886,9 @@
         {
             var sym = CreateSimpleSymbol(version, "Solid Fill", "Default Area Symbol");
             var path = sym.CreatePathGraphics();
+
+            bool bSupportsAdvancedTypes = !(version.Major == 1 && version.Minor == 0 && version.Build == 0);
+
             path.Geometry = "M 0.0,0.0 h 100.0 v 100.0 h -100.0 z";
             path.FillColor = "%FILLCOLOR%";
             path.LineCap = "%StyleEditorGenerated_LineCap_0%";
@@ -845,7 +905,7 @@
             areaUsage.RepeatY = "100.0";
             sym.AreaUsage = areaUsage;
 
-            sym.DefineParameter("FILLCOLOR", "0xffbfbfbf", "&Fill Color", "Fill Color", "FillColor");
+            sym.DefineParameter("FILLCOLOR", "0xffbfbfbf", "&Fill Color", "Fill Color", bSupportsAdvancedTypes ? "FillColor" : "Color");
             if (path2 != null)
             {
                 sym.DefineParameter("StyleEditorGenerated_ScaleX_0", "1.0", "Path ScaleX", "Path ScaleX", "Real");
@@ -952,5 +1012,15 @@
         {
             return new Point3DImpl() { X = x, Y = y, Z = z };
         }
+
+        /// <summary>
+        /// Deserializes the specified XML.
+        /// </summary>
+        /// <param name="xml">The XML.</param>
+        /// <returns></returns>
+        public static IResource DeserializeResourceXml(string xml)
+        {
+            return ResourceTypeRegistry.Deserialize(xml);
+        }
     }
 }
\ No newline at end of file

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceTypeRegistry.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceTypeRegistry.cs	2014-12-25 15:09:04 UTC (rev 8464)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceTypeRegistry.cs	2014-12-25 17:05:23 UTC (rev 8465)
@@ -72,7 +72,17 @@
         static ResourceTypeRegistry()
         {
             _serializers = new Dictionary<ResourceTypeDescriptor, ResourceSerializer>();
+            Init();
+        }
 
+        internal static void Reset()
+        {
+            _serializers.Clear();
+            Init();
+        }
+
+        private static void Init()
+        {
             //ApplicationDefinition 1.0.0
             _serializers.Add(
                 ResourceTypeDescriptor.ApplicationDefinition,
@@ -204,11 +214,6 @@
             RegisterResource(desc, new ResourceSerializer() { Deserialize = deserializeMethod, Serialize = serializeMethod });
         }
 
-        internal static void Init()
-        {
-            //does nothing, it's just for kicking the static constructor into gear
-        }
-
         /// <summary>
         /// Deserializes the specified stream for the specified resource type.
         /// </summary>



More information about the mapguide-commits mailing list