From a73a847db67b9578112547315120fa2a6f67ffc1 Mon Sep 17 00:00:00 2001 From: Jonathan Dick Date: Sat, 3 Aug 2019 21:33:40 -0400 Subject: [PATCH] Bump cake to 0.33 --- src/Cake.XCode.Tests/Cake.XCode.Tests.csproj | 15 ++++++++------ src/Cake.XCode.Tests/Fakes/FakeCakeContext.cs | 5 +++-- .../Fakes/FakeCakeDataService.cs | 20 +++++++++++++++++++ src/Cake.XCode.sln | 14 ++++++++++--- src/Cake.XCode/Cake.XCode.csproj | 6 +++--- 5 files changed, 46 insertions(+), 14 deletions(-) create mode 100644 src/Cake.XCode.Tests/Fakes/FakeCakeDataService.cs diff --git a/src/Cake.XCode.Tests/Cake.XCode.Tests.csproj b/src/Cake.XCode.Tests/Cake.XCode.Tests.csproj index 6373337..8b86a50 100644 --- a/src/Cake.XCode.Tests/Cake.XCode.Tests.csproj +++ b/src/Cake.XCode.Tests/Cake.XCode.Tests.csproj @@ -1,15 +1,18 @@ - + netcoreapp2.0 - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/src/Cake.XCode.Tests/Fakes/FakeCakeContext.cs b/src/Cake.XCode.Tests/Fakes/FakeCakeContext.cs index 62c7b15..5de3fd3 100644 --- a/src/Cake.XCode.Tests/Fakes/FakeCakeContext.cs +++ b/src/Cake.XCode.Tests/Fakes/FakeCakeContext.cs @@ -22,13 +22,14 @@ public FakeCakeContext () var globber = new Globber (fileSystem, environment); log = new FakeLog (); var args = new FakeCakeArguments (); - var processRunner = new ProcessRunner (environment, log); var registry = new WindowsRegistry (); var toolRepo = new ToolRepository(environment); var config = new Core.Configuration.CakeConfigurationProvider(fileSystem, environment).CreateConfiguration(testsDir, new Dictionary()); var toolResolutionStrategy = new ToolResolutionStrategy(fileSystem, environment, globber, config); var toolLocator = new ToolLocator(environment, toolRepo, toolResolutionStrategy); - context = new CakeContext(fileSystem, environment, globber, log, args, processRunner, registry, toolLocator); + var processRunner = new ProcessRunner(fileSystem, environment, log, toolLocator, config); + var dataService = new FakeDataService(); + context = new CakeContext(fileSystem, environment, globber, log, args, processRunner, registry, toolLocator, dataService, config); context.Environment.WorkingDirectory = testsDir; } diff --git a/src/Cake.XCode.Tests/Fakes/FakeCakeDataService.cs b/src/Cake.XCode.Tests/Fakes/FakeCakeDataService.cs new file mode 100644 index 0000000..124bcaa --- /dev/null +++ b/src/Cake.XCode.Tests/Fakes/FakeCakeDataService.cs @@ -0,0 +1,20 @@ +using Cake.Core; +using System.Collections.Generic; +using System.Linq; + +namespace Cake.XCode.Tests.Fakes +{ + public class FakeDataService : ICakeDataService + { + List values = new List(); + + public void Add(TData value) where TData : class + { + values.RemoveAll(v => v is TData); + values.Add(value); + } + + public TData Get() where TData : class + => values.FirstOrDefault(v => v is TData) as TData; + } +} diff --git a/src/Cake.XCode.sln b/src/Cake.XCode.sln index 4345a52..d94675e 100644 --- a/src/Cake.XCode.sln +++ b/src/Cake.XCode.sln @@ -1,9 +1,11 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cake.XCode", "Cake.XCode\Cake.XCode.csproj", "{0E0EA411-ADFB-4A0D-A7C3-CA32E1DB2354}" +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29123.88 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cake.XCode", "Cake.XCode\Cake.XCode.csproj", "{0E0EA411-ADFB-4A0D-A7C3-CA32E1DB2354}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cake.XCode.Tests", "Cake.XCode.Tests\Cake.XCode.Tests.csproj", "{BA489A68-848C-4B01-AA8D-3E5A094EBCD8}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cake.XCode.Tests", "Cake.XCode.Tests\Cake.XCode.Tests.csproj", "{BA489A68-848C-4B01-AA8D-3E5A094EBCD8}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -20,4 +22,10 @@ Global {BA489A68-848C-4B01-AA8D-3E5A094EBCD8}.Release|Any CPU.ActiveCfg = Release|Any CPU {BA489A68-848C-4B01-AA8D-3E5A094EBCD8}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {140FDDD1-52F3-49D7-9DAA-3603D796051F} + EndGlobalSection EndGlobal diff --git a/src/Cake.XCode/Cake.XCode.csproj b/src/Cake.XCode/Cake.XCode.csproj index a596892..efefb40 100644 --- a/src/Cake.XCode/Cake.XCode.csproj +++ b/src/Cake.XCode/Cake.XCode.csproj @@ -1,4 +1,4 @@ - + netstandard2.0 @@ -19,8 +19,8 @@ - - + +