Skip to content

Commit

Permalink
Merge pull request #202 from sergeyshushlyapin/feature/sc9
Browse files Browse the repository at this point in the history
Upgrade to Sitecore 9
  • Loading branch information
sshushliapin authored Oct 25, 2018
2 parents 6e2e8a7 + 5768d44 commit 19bb844
Show file tree
Hide file tree
Showing 98 changed files with 3,694 additions and 3,912 deletions.
Binary file modified .nuget/nuget.exe
Binary file not shown.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
2.0.0-alpha1
2.0.0-beta1
* [NEW] #202: Upgrade to Sitecore 9

2.0.0-alpha1
* [NEW] #199: Updated references to AutoFixture and xUnit (thanks to [@Tchami](https://github.com/Tchami))

1.7.3
Expand Down
5 changes: 4 additions & 1 deletion Sitecore.FakeDb.ruleset
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Sitecore FakeDb" Description="Sitecore FakeDb rules." ToolsVersion="14.0">
<RuleSet Name="Sitecore FakeDb" Description="Sitecore FakeDb rules." ToolsVersion="15.0">
<IncludeAll Action="Warning" />
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
<Rule Id="CS0618" Action="Error" />
<Rule Id="CS1591" Action="None" />
</Rules>
<Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp" RuleNamespace="Microsoft.CodeAnalysis.CSharp">
<Rule Id="CS0105" Action="Error" />
</Rules>
</RuleSet>
8 changes: 6 additions & 2 deletions Sitecore.FakeDb.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.28010.2016
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sitecore.FakeDb", "src\Sitecore.FakeDb\Sitecore.FakeDb.csproj", "{B1B3C599-9284-4653-9F22-FD0F726984BB}"
EndProject
Expand All @@ -22,6 +22,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{61B65D79
deploy.bat = deploy.bat
LICENSE = LICENSE
README.md = README.md
Sitecore.FakeDb.ruleset = Sitecore.FakeDb.ruleset
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sitecore.FakeDb.AutoFixture", "src\Sitecore.FakeDb.AutoFixture\Sitecore.FakeDb.AutoFixture.csproj", "{E1503D66-F2EB-4EC0-829E-F29447DBF92A}"
Expand Down Expand Up @@ -126,4 +127,7 @@ Global
{3017ED04-3340-4971-8B4C-7A00E4B5D435} = {61B65D79-BB0C-4A89-A410-E5C90A646ED6}
{CA6AB0BD-0585-403D-91A1-90FAF3190388} = {5A777D0E-BC4F-4CAD-AE83-F95BC7A0788C}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {984EE745-FDA3-417D-9610-A29E36BDAE80}
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion build.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
%WINDIR%/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe Build.msbuild /p:Configuration=Release /t:Versions /p:NoWarn=1591
"%PROGRAMFILES(X86)%\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe" Build.msbuild /p:Configuration=Release /t:Versions /p:NoWarn=1591 /p:RunCodeAnalysis=true;CodeAnalysisRuleSet=..\..\Sitecore.FakeDb.ruleset /fileLogger
5 changes: 2 additions & 3 deletions build.msbuild
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

<ItemGroup>
<Versions Include="$(SupportedSitecoreVersions)" />
<Versions452 Include="$(SupportedSitecoreVersions452)" />
<References Include="packages\Lucene.Net.3.0.3\lib\NET40\Lucene.Net.dll" />
<References Include="packages\Sitecore.Abstractions.$(Version)\lib\$(TargetFrameworkFolder)\Sitecore.Abstractions.dll" Condition="'$(Version)' != '7.2.160123'" />
<References Include="packages\Sitecore.Buckets.$(Version)\lib\$(TargetFrameworkFolder)\Sitecore.Buckets.dll" />
<References Include="packages\Sitecore.ContentSearch.$(Version)\lib\$(TargetFrameworkFolder)\Sitecore.ContentSearch.dll" />
<References Include="packages\Sitecore.ContentSearch.Data.$(Version)\lib\$(TargetFrameworkFolder)\Sitecore.ContentSearch.Data.dll" />
<References Include="packages\Sitecore.ContentSearch.Linq.$(Version)\lib\$(TargetFrameworkFolder)\Sitecore.ContentSearch.Linq.dll" />
<References Include="packages\Sitecore.Kernel.$(Version)\lib\$(TargetFrameworkFolder)\Sitecore.Kernel.dll" />
<References Include="packages\Sitecore.Logging.$(Version)\lib\$(TargetFrameworkFolder)\Sitecore.Logging.dll" />
Expand Down Expand Up @@ -105,8 +105,7 @@
</Target>

<Target Name="Versions">
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="Packages" Properties="Version=%(Versions452.Identity);TargetFrameworkVersion=v4.5.2;TargetFrameworkFolder=NET452;PatchDatabase=true" />
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="Packages" Properties="Version=%(Versions.Identity);TargetFrameworkFolder=NET45" />
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="Packages" Properties="Version=%(Versions.Identity);TargetFrameworkFolder=NET462" />
</Target>

<Target Name="Deploy" DependsOnTargets="Versions">
Expand Down
2 changes: 1 addition & 1 deletion deploy.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ setlocal
:PROMPT
SET /P AREYOUSURE=Are you sure you want to publish the NuGet packages (Y/[N])?
IF /I "%AREYOUSURE%" NEQ "Y" GOTO END
%WINDIR%/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe Build.msbuild /p:Configuration=Release /t:Deploy /p:NoWarn=1591
"%PROGRAMFILES(X86)%\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe" Build.msbuild /p:Configuration=Release /t:Deploy /p:NoWarn=1591 /p:RunCodeAnalysis=true;CodeAnalysisRuleSet=..\..\Sitecore.FakeDb.ruleset /fileLogger
:END
endlocal
4 changes: 2 additions & 2 deletions src/AssemblyVersionInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Reflection;

[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.0.0-alpha1")]
[assembly: AssemblyInformationalVersion("2.0.0-alpha1")]
[assembly: AssemblyFileVersion("2.0.0.0")]
[assembly: AssemblyInformationalVersion("2.0.0-beta1")]
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Sitecore.FakeDb.AutoFixture</RootNamespace>
<AssemblyName>Sitecore.FakeDb.AutoFixture</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand All @@ -22,7 +22,8 @@
<DefineConstants>DEBUG;TRACE;$(VSDebugSitecoreVersion)</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\Sitecore.FakeDb.AutoFixture.XML</DocumentationFile>
<DocumentationFile>bin\Debug\Sitecore.FakeDb.AutoFixture.xml</DocumentationFile>
<NoWarn>CS1591</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand Down Expand Up @@ -91,7 +92,9 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
9 changes: 4 additions & 5 deletions src/Sitecore.FakeDb.AutoFixture/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>

<packages>
<package id="AutoFixture" version="4.0.0" targetFramework="net452" />
<package id="Fare" version="2.1.1" targetFramework="net452" />
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AutoFixture" version="4.0.0" targetFramework="net452" />
<package id="Fare" version="2.1.1" targetFramework="net452" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Sitecore.FakeDb.NSubstitute</RootNamespace>
<AssemblyName>Sitecore.FakeDb.NSubstitute</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down Expand Up @@ -65,7 +65,9 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
11 changes: 5 additions & 6 deletions src/Sitecore.FakeDb.NSubstitute/packages.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>

<packages>
<package id="Castle.Core" version="4.2.0" targetFramework="net452" />
<package id="NSubstitute" version="3.1.0" targetFramework="net452" />
<package id="System.Threading.Tasks.Extensions" version="4.3.0" targetFramework="net452" />
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Castle.Core" version="4.2.0" targetFramework="net452" />
<package id="NSubstitute" version="3.1.0" targetFramework="net452" requireReinstallation="true" />
<package id="System.Threading.Tasks.Extensions" version="4.3.0" targetFramework="net452" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Sitecore.FakeDb.Serialization</RootNamespace>
<AssemblyName>Sitecore.FakeDb.Serialization</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand All @@ -22,7 +22,8 @@
<DefineConstants>DEBUG;TRACE;$(VSDebugSitecoreVersion)</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\Sitecore.FakeDb.Serialization.XML</DocumentationFile>
<DocumentationFile>bin\Debug\Sitecore.FakeDb.Serialization.xml</DocumentationFile>
<NoWarn>CS1591</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand Down
56 changes: 28 additions & 28 deletions src/Sitecore.FakeDb/Configuration/ClientDataStoreStub.cs
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
namespace Sitecore.FakeDb.Configuration
{
using System;
using Sitecore.Configuration;

public class ClientDataStoreStub : ClientDataStore
{
public ClientDataStoreStub()
: base(new TimeSpan(), false)
{
}

protected override void CompactData()
{
}

protected override string LoadData(string key)
{
return null;
}

protected override void SaveData(string key, string data)
{
}

protected override void RemoveData(string key)
{
}
}
}
using System;
using Sitecore.Configuration;

public class ClientDataStoreStub : ClientDataStore
{
public ClientDataStoreStub()
: base(new TimeSpan(), new EventQueueStub(), new EventManagerStub())
{
}

protected override void CompactData()
{
}

protected override string LoadData(string key)
{
return null;
}

protected override void SaveData(string key, string data)
{
}

protected override void RemoveData(string key)
{
}
}
}
63 changes: 63 additions & 0 deletions src/Sitecore.FakeDb/Configuration/EventManagerStub.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
namespace Sitecore.FakeDb.Configuration
{
using System;
using Sitecore.Abstractions;
using Sitecore.Eventing;

internal class EventManagerStub : BaseEventManager
{
public override bool Enabled => false;

[Obsolete]
public override void QueueEvent<TEvent>(TEvent @event)
{
}

[Obsolete]
public override void QueueEvent<TEvent>(TEvent @event, bool addToGlobalQueue, bool addToLocalQueue)
{
}

public override void RaiseEvent<TEvent>(TEvent @event)
{
}

[Obsolete]
public override void RaiseQueuedEvents()
{
}

[Obsolete]
public override void RemoveQueuedEvents(EventQueueQuery query)
{
}

public override void Initialize()
{
}

public override SubscriptionId Subscribe<TEvent>(Action<TEvent> eventHandler)
{
return null;
}

public override SubscriptionId Subscribe<TEvent>(Action<TEvent, EventContext> eventHandler)
{
return null;
}

public override SubscriptionId Subscribe<TEvent>(Action<TEvent> eventHandler, Predicate<TEvent> filter)
{
return null;
}

public override SubscriptionId Subscribe<TEvent>(Action<TEvent, EventContext> eventHandler, Func<TEvent, EventContext, bool> filter)
{
return null;
}

public override void Unsubscribe(SubscriptionId subscriptionId)
{
}
}
}
69 changes: 69 additions & 0 deletions src/Sitecore.FakeDb/Configuration/EventQueueStub.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
namespace Sitecore.FakeDb.Configuration
{
using System;
using System.Collections.Generic;
using System.Linq;
using Sitecore.Eventing;

internal class EventQueueStub : IEventQueue
{
public string Name { get; }

public bool ListenToRemoteEvents { get; set; }


public void Cleanup(uint daysToKeep)
{
}

public void Cleanup(TimeSpan intervalToKeep)
{
}

public object DeserializeEvent(QueuedEvent queuedEvent)
{
return null;
}

public QueuedEvent GetLastEvent()
{
return null;
}

public long GetQueuedEventCount()
{
return 0;
}

public IEnumerable<QueuedEvent> GetQueuedEvents()
{
return Enumerable.Empty<QueuedEvent>();
}

public IEnumerable<QueuedEvent> GetQueuedEvents(string targetInstanceName)
{
return Enumerable.Empty<QueuedEvent>();
}

public IEnumerable<QueuedEvent> GetQueuedEvents(EventQueueQuery query)
{
return Enumerable.Empty<QueuedEvent>();
}

public void ProcessEvents(Action<object, Type> handler)
{
}

public void QueueEvent<TEvent>(TEvent @event)
{
}

public void QueueEvent<TEvent>(TEvent @event, bool addToGlobalQueue, bool addToLocalQueue)
{
}

public void RemoveQueuedEvents(EventQueueQuery query)
{
}
}
}
Loading

0 comments on commit 19bb844

Please sign in to comment.