Skip to content
This repository was archived by the owner on Oct 26, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
163e7d3
Updated for release 2.0.2 with support for Sitecore XP 9.0 Update 2
lacarl Mar 28, 2019
ce7bbf2
Removed unused app_start
lacarl Mar 28, 2019
2ddc786
Update to Sitecore XP 9.1
lacarl Mar 28, 2019
4032f68
Upgraded to Sitecore 9.2
lacarl Jan 30, 2020
5bc0a4c
Sitecore 9.3
lacarl Jan 30, 2020
266c6b5
Updated version numbers to 2.2
lacarl Jan 30, 2020
a5ae0f3
Removed reference to C# 4.6
lacarl Feb 4, 2020
7500b3f
Merge pull request #1 from DeloitteDigitalAPAC/develop
hollywoodinvegas Feb 4, 2020
1fe7b4c
reverse merge from develop
lacarl Feb 4, 2020
7b43120
Reverse merge from develop
lacarl Feb 4, 2020
cb78788
Converted from Package Config to Package References to clean up nuget
lacarl Mar 27, 2020
ec78dc0
Added the date in lieu of a build number to the nuget spec for reference
lacarl Mar 27, 2020
c660f2e
Switch to PackageReference for Nuget
Apr 7, 2020
5acfbfb
Tidy up the nuspec to require 9.3 and .NET 4.8
Apr 7, 2020
c57a4b2
Remove deprecated elements from .nuspec
Apr 7, 2020
9f36cda
remove output from migration
lacarl Apr 7, 2020
59a1f2e
Merge branch 'feature/Sitecore_92_22' into feature/Sitecore_93_23
lacarl Apr 7, 2020
ec8acbf
Remove obsolete EnterpriseLibrary References and assembly mappings
Apr 7, 2020
48fce1c
Fixed nuget references
Apr 7, 2020
29d0b77
removed dependency for Sitecore.Mvc
Apr 7, 2020
1f3471e
Issue with package structure
lacarl Apr 7, 2020
23ce441
Changed references to PageEditor with ExperienceEditor
Apr 11, 2020
8393dad
Changed tags
Apr 11, 2020
0e2a1cd
removed migration files
lacarl Apr 11, 2020
afbde79
one last reference to PageEditor
lacarl Apr 11, 2020
4734e76
Added ParentID to the ItemID mapping type
lacarl Jun 11, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Build/DeloitteDigital.Atlas.NuGet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<NuGetPackageOutputPath>..\..\BuildOutputs</NuGetPackageOutputPath>
</PropertyGroup>
<Target Name="BuildNuGetPackage">
<Message Text="Copying Atlas asselmbly..." Importance="high" />
<Message Text="Copying Atlas assembly..." Importance="high" />
<ItemGroup>
<Dlls Include="$(OutputPath)\DeloitteDigital.Atlas.dll" />
</ItemGroup>
Expand Down
12 changes: 8 additions & 4 deletions Build/DeloitteDigital.Atlas.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>DeloitteDigital.Atlas</id>
<version>1.1.0</version>
<version>2.3.20200611</version>
<authors>Deloitte Digital</authors>
<owners>Deloitte Digital</owners>
<licenseUrl>https://github.com/DeloitteDigitalAPAC/Atlas/blob/master/LICENSE</licenseUrl>
<license type="file">license\license.txt</license>
<projectUrl>https://github.com/DeloitteDigitalAPAC/Atlas/</projectUrl>
<iconUrl>https://raw.githubusercontent.com/DeloitteDigitalAPAC/Atlas/master/lib/logos/dd-logo-square.png</iconUrl>
<icon>images\dd-logo-square.png</icon>
<iconUrl>https://raw.githubusercontent.com/DeloitteDigitalAPAC/Atlas/master/lib/logos/dd-logo-square.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Atlas is the Deloitte Digital Framework for Sitecore Development</description>
<tags>sitecore deloitte atlas</tags>
<releaseNotes>Upgraded to Sitecore 9.3 and .NETFramework4.8</releaseNotes>
<tags>sitecore deloitte experience accelerator atlas</tags>
</metadata>
<files>
<file src="..\BuildOutputs\DeloitteDigital.Atlas.dll" target="lib" />
<file src="license.txt" target="license" />
<file src="dd-logo-square.png" target="images" />
</files>
</package>
9 changes: 7 additions & 2 deletions DeloitteDigital.Atlas.sln
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
# Visual Studio Version 16
VisualStudioVersion = 16.0.29920.165
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeloitteDigital.Atlas", "src\DeloitteDigital.Atlas\DeloitteDigital.Atlas.csproj", "{601B96BD-D95F-4281-9A1B-7D99374DD869}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{170EAE52-10FD-4349-931B-6B48480DAF4E}"
ProjectSection(SolutionItems) = preProject
Build\dd-logo-square.png = Build\dd-logo-square.png
Build\DeloitteDigital.Atlas.NuGet.xml = Build\DeloitteDigital.Atlas.NuGet.xml
Build\DeloitteDigital.Atlas.nuspec = Build\DeloitteDigital.Atlas.nuspec
Build\license.txt = Build\license.txt
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeloitteDigital.Atlas.Tests", "src\DeloitteDigital.Atlas.Tests\DeloitteDigital.Atlas.Tests.csproj", "{DC86FB1E-21B9-4D4B-8E61-40CEB8967F83}"
Expand All @@ -31,4 +33,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C4120DCF-283D-4C71-A165-A67041EBB723}
EndGlobalSection
EndGlobal
Binary file modified Tools/nuget.exe
Binary file not shown.
167 changes: 28 additions & 139 deletions src/DeloitteDigital.Atlas.Tests/DeloitteDigital.Atlas.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DeloitteDigital.Atlas.Tests</RootNamespace>
<AssemblyName>DeloitteDigital.Atlas.Tests</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
Expand All @@ -35,147 +35,13 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="HtmlAgilityPack, Version=1.4.6.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
<HintPath>..\..\packages\HtmlAgilityPack.1.4.6\lib\Net45\HtmlAgilityPack.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<HintPath>..\..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Lucene.Net, Version=3.0.3.0, Culture=neutral, PublicKeyToken=85089178b9ac3181, processorArchitecture=MSIL">
<HintPath>..\..\packages\Lucene.Net.3.0.3\lib\NET40\Lucene.Net.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Extensions.DependencyInjection, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Extensions.DependencyInjection.1.0.0\lib\netstandard1.1\Microsoft.Extensions.DependencyInjection.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.1.0.0\lib\netstandard1.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sitecore.Abstractions, Version=10.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Sitecore.Abstractions.8.2.160729\lib\NET452\Sitecore.Abstractions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sitecore.Analytics, Version=10.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Sitecore.Analytics.8.2.160729\lib\NET452\Sitecore.Analytics.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sitecore.Analytics.Core, Version=10.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Sitecore.Analytics.Core.8.2.160729\lib\NET452\Sitecore.Analytics.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sitecore.Analytics.DataAccess, Version=10.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Sitecore.Analytics.DataAccess.8.2.160729\lib\NET452\Sitecore.Analytics.DataAccess.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sitecore.Analytics.Model, Version=10.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Sitecore.Analytics.Model.8.2.160729\lib\NET452\Sitecore.Analytics.Model.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sitecore.Analytics.Processing, Version=10.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Sitecore.Analytics.Processing.8.2.160729\lib\NET452\Sitecore.Analytics.Processing.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sitecore.FakeDb, Version=1.3.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Sitecore.FakeDb.1.3.1\lib\net45\Sitecore.FakeDb.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sitecore.FakeDb.Serialization, Version=1.3.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Sitecore.FakeDb.Serialization.1.3.1\lib\net45\Sitecore.FakeDb.Serialization.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sitecore.Kernel, Version=10.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Sitecore.Kernel.8.2.160729\lib\NET452\Sitecore.Kernel.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sitecore.Logging, Version=10.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Sitecore.Logging.8.2.160729\lib\NET452\Sitecore.Logging.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sitecore.Logging.Client, Version=10.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Sitecore.Logging.Client.8.2.160729\lib\NET452\Sitecore.Logging.Client.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sitecore.Marketing, Version=10.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Sitecore.Marketing.8.2.160729\lib\NET452\Sitecore.Marketing.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sitecore.Marketing.Core, Version=10.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Sitecore.Marketing.Core.8.2.160729\lib\NET452\Sitecore.Marketing.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sitecore.Marketing.Taxonomy, Version=10.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Sitecore.Marketing.Taxonomy.8.2.160729\lib\NET452\Sitecore.Marketing.Taxonomy.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sitecore.Nexus, Version=1.0.4415.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Sitecore.Nexus.8.2.160729\lib\NET452\Sitecore.Nexus.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sitecore.NVelocity, Version=7.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Sitecore.NVelocity.8.2.160729\lib\NET452\Sitecore.NVelocity.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sitecore.Xdb.Configuration, Version=10.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Sitecore.Xdb.Configuration.8.2.160729\lib\NET452\Sitecore.Xdb.Configuration.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sitecore.Zip, Version=10.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Sitecore.Zip.8.2.160729\lib\NET452\Sitecore.Zip.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<Choose>
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework">
<Private>False</Private>
</Reference>
</ItemGroup>
</Otherwise>
<Otherwise />
</Choose>
<ItemGroup>
<Compile Include="FakeDB\DeserialisationTests.cs" />
Expand All @@ -188,17 +54,40 @@
<Compile Include="SitecoreMappingTests.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config">
<Content Include="app.config">
<SubType>Designer</SubType>
</None>
<None Include="packages.config" />
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DeloitteDigital.Atlas\DeloitteDigital.Atlas.csproj">
<Project>{601b96bd-d95f-4281-9a1b-7d99374dd869}</Project>
<Name>DeloitteDigital.Atlas</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Shouldly">
<Version>3.0.2</Version>
</PackageReference>
<PackageReference Include="Sitecore.ContentSearch">
<Version>9.3.0</Version>
</PackageReference>
<PackageReference Include="Sitecore.FakeDb.Serialization">
<Version>3.0.0-alpha1</Version>
</PackageReference>
<PackageReference Include="Sitecore.Kernel">
<Version>9.3.0</Version>
</PackageReference>
<PackageReference Include="Sitecore.Nexus">
<Version>9.3.0</Version>
</PackageReference>
<PackageReference Include="xunit">
<Version>2.4.1</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
<ItemGroup>
Expand Down
14 changes: 7 additions & 7 deletions src/DeloitteDigital.Atlas.Tests/FakeDB/DeserialisationTests.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Shouldly;
using Xunit;

namespace DeloitteDigital.Atlas.Tests.FakeDB
{
[TestClass]
public class DeserialisationTests
{
[TestMethod]
[Fact]
public void DeserialisationShouldReturnSitecoreItem()
{
using (var db = new DspFakeDb())
{
var home = db.GetHomeItem();

// ensure the de-serialisation worked
Assert.IsNotNull(home);
Assert.AreEqual("Home", home.Name);
Assert.AreEqual("Sitecore Experience Platform", home.Fields["Title"].ToString());
// ensure the de-serialisation worked
home.ShouldNotBeNull();
home.Name.ShouldBe("Home");
home.Fields["Title"].ToString().ShouldBe("Sitecore Experience Platform");
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/DeloitteDigital.Atlas.Tests/ItemExtensionsTests.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
using DeloitteDigital.Atlas.Extensions;
using DeloitteDigital.Atlas.Tests.FakeDB;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Shouldly;
using Xunit;

namespace DeloitteDigital.Atlas.Tests
{
[TestClass]
public class ItemExtensionsTests
{
[TestMethod]
[Fact]
public void GetFieldsValueShouldReturnCorrectValue()
{
using (var db = new DspFakeDb())
{
var home = db.GetHomeItem();

Assert.IsTrue(home.GetFieldValue("Title").Equals("Sitecore Experience Platform"));
home.GetFieldValue("Title").ShouldBe("Sitecore Experience Platform");
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/DeloitteDigital.Atlas.Tests/Mapping/FieldMappingTests.cs
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
using DeloitteDigital.Atlas.Caching;
using DeloitteDigital.Atlas.Mapping;
using DeloitteDigital.Atlas.Tests.FakeDB;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Shouldly;
using Xunit;

namespace DeloitteDigital.Atlas.Tests.Mapping
{
[TestClass]
public class FieldMappingTests
{
[TestMethod]
[Fact]
public void FieldMappingShouldMapTitle()
{
using (var db = new DspFakeDb())
{
var mapper = new ItemMapper(new WebCache());
var sampleItem = mapper.Map<SampleItem>(db.GetHomeItem());

Assert.IsNotNull(sampleItem);
Assert.AreEqual("Sitecore Experience Platform", sampleItem.Title);
sampleItem.ShouldNotBeNull();
sampleItem.Title.ShouldBe("Sitecore Experience Platform");
}

}
Expand Down
21 changes: 11 additions & 10 deletions src/DeloitteDigital.Atlas.Tests/Mapping/ItemPropertyMappingTests.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
using DeloitteDigital.Atlas.Caching;
using DeloitteDigital.Atlas.Mapping;
using DeloitteDigital.Atlas.Tests.FakeDB;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Sitecore.Data;
using Shouldly;
using Xunit;

namespace DeloitteDigital.Atlas.Tests.Mapping
{
[TestClass]
public class ItemPropertyMappingTests
{
[TestMethod]
[Fact]
public void ItemPropertyMappingShouldMapItemProperties()
{
using (var db = new DspFakeDb())
Expand All @@ -18,13 +18,14 @@ public void ItemPropertyMappingShouldMapItemProperties()
var sampleItem = mapper.Map<SampleItem>(db.GetHomeItem());

// assert item property mappings
Assert.IsNotNull(sampleItem);
Assert.AreEqual(new ID("{110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}"), sampleItem.ItemId);
Assert.AreEqual("Home", sampleItem.ItemName);
Assert.AreEqual("/sitecore/content/Home", sampleItem.ItemPath);
Assert.AreEqual("/en/sitecore/content/Home.aspx", sampleItem.ItemUrl);
Assert.AreEqual(new ID("{76036F5E-CBCE-46D1-AF0A-4143F9B557AA}"), sampleItem.TemplateId);
Assert.AreEqual("Sample Item", sampleItem.TemplateName);
sampleItem.ShouldNotBeNull();
sampleItem.ItemId.ShouldBe(new ID("{110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}"));
sampleItem.ItemName.ShouldBe("Home");
sampleItem.ItemPath.ShouldBe("/sitecore/content/Home");
sampleItem.ItemUrl.ShouldBe("/en/sitecore/content/Home");
sampleItem.TemplateId.ShouldBe(new ID("{76036F5E-CBCE-46D1-AF0A-4143F9B557AA}"));
sampleItem.TemplateName.ShouldBe("Sample Item");
sampleItem.ParentId.ShouldBe(new ID("{0DE95AE4-41AB-4D01-9EB0-67441B7C2450}"));
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/DeloitteDigital.Atlas.Tests/Mapping/SampleItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ class SampleItem
[ItemPropertyMap(ItemPropertyMappingType.TemplateName)]
public string TemplateName { get; set; }

[ItemPropertyMap(ItemPropertyMappingType.ParentId)]
public ID ParentId { get; set; }

[FieldMap]
public string Title { get; set; }

Expand Down
Loading