Skip to content

Commit eb7e69e

Browse files
committed
Merge pull request #769 from JakeGinnivan/CleanupTestDependencies
Cleanup test dependencies
2 parents 3149d96 + f259e8c commit eb7e69e

13 files changed

+32
-102
lines changed

src/GitVersionCore.Tests/ApprovalTestsConfig.cs

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/GitVersionCore.Tests/ConfigProviderTests.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System.Linq;
44
using System.Reflection;
55
using System.Runtime.CompilerServices;
6-
using ApprovalTests;
76
using GitVersion;
87
using GitVersion.Helpers;
98
using NUnit.Framework;
@@ -123,7 +122,7 @@ public void CanWriteOutEffectiveConfiguration()
123122
{
124123
var config = ConfigurationProvider.GetEffectiveConfigAsString(repoPath, fileSystem);
125124

126-
Approvals.Verify(config);
125+
config.ShouldMatchApproved();
127126
}
128127

129128
[Test]

src/GitVersionCore.Tests/GitVersionCore.Tests.csproj

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,6 @@
3737
<DebugSymbols>true</DebugSymbols>
3838
</PropertyGroup>
3939
<ItemGroup>
40-
<Reference Include="ApprovalTests, Version=3.0.0.0, Culture=neutral, PublicKeyToken=11bd7d124fc62e0f, processorArchitecture=MSIL">
41-
<SpecificVersion>False</SpecificVersion>
42-
<HintPath>..\packages\ApprovalTests.3.0.8\lib\net40\ApprovalTests.dll</HintPath>
43-
</Reference>
44-
<Reference Include="ApprovalUtilities, Version=3.0.0.0, Culture=neutral, PublicKeyToken=11bd7d124fc62e0f, processorArchitecture=MSIL">
45-
<SpecificVersion>False</SpecificVersion>
46-
<HintPath>..\packages\ApprovalUtilities.3.0.8\lib\net45\ApprovalUtilities.dll</HintPath>
47-
</Reference>
48-
<Reference Include="ApprovalUtilities.Net45">
49-
<HintPath>..\packages\ApprovalUtilities.3.0.8\lib\net45\ApprovalUtilities.Net45.dll</HintPath>
50-
</Reference>
5140
<Reference Include="FluentDateTime, Version=1.12.0.0, Culture=neutral, PublicKeyToken=6ccbc613702e6c71, processorArchitecture=MSIL">
5241
<HintPath>..\packages\FluentDateTime.1.12.0\Lib\NET35\FluentDateTime.dll</HintPath>
5342
<Private>True</Private>
@@ -56,22 +45,6 @@
5645
<HintPath>..\packages\LibGit2Sharp.0.21.0.176\lib\net40\LibGit2Sharp.dll</HintPath>
5746
<Private>True</Private>
5847
</Reference>
59-
<Reference Include="Mono.Cecil, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
60-
<HintPath>..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.dll</HintPath>
61-
<Private>True</Private>
62-
</Reference>
63-
<Reference Include="Mono.Cecil.Mdb, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
64-
<HintPath>..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.Mdb.dll</HintPath>
65-
<Private>True</Private>
66-
</Reference>
67-
<Reference Include="Mono.Cecil.Pdb, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
68-
<HintPath>..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.Pdb.dll</HintPath>
69-
<Private>True</Private>
70-
</Reference>
71-
<Reference Include="Mono.Cecil.Rocks, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
72-
<HintPath>..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.Rocks.dll</HintPath>
73-
<Private>True</Private>
74-
</Reference>
7548
<Reference Include="NSubstitute, Version=1.9.2.0, Culture=neutral, PublicKeyToken=92dd2e9066daa5ca, processorArchitecture=MSIL">
7649
<HintPath>..\packages\NSubstitute.1.9.2.0\lib\net45\NSubstitute.dll</HintPath>
7750
<Private>True</Private>
@@ -96,8 +69,8 @@
9669
<HintPath>..\packages\NUnitTestAdapter.2.0.0\lib\NUnit.VisualStudio.TestAdapter.dll</HintPath>
9770
<Private>True</Private>
9871
</Reference>
99-
<Reference Include="Shouldly, Version=2.5.0.0, Culture=neutral, PublicKeyToken=6042cbcb05cbc941, processorArchitecture=MSIL">
100-
<HintPath>..\packages\Shouldly.2.5.0\lib\net40\Shouldly.dll</HintPath>
72+
<Reference Include="Shouldly, Version=2.7.0.0, Culture=neutral, PublicKeyToken=6042cbcb05cbc941, processorArchitecture=MSIL">
73+
<HintPath>..\packages\Shouldly.2.7.0-beta0002\lib\net40\Shouldly.dll</HintPath>
10174
<Private>True</Private>
10275
</Reference>
10376
<Reference Include="System" />
@@ -107,8 +80,8 @@
10780
<Reference Include="System.Data.DataSetExtensions" />
10881
<Reference Include="System.Data" />
10982
<Reference Include="System.Xml" />
110-
<Reference Include="TestStack.ConventionTests, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
111-
<HintPath>..\packages\TestStack.ConventionTests.2.2.1\lib\net40\TestStack.ConventionTests.dll</HintPath>
83+
<Reference Include="TestStack.ConventionTests, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
84+
<HintPath>..\packages\TestStack.ConventionTests.3.0.0-beta0002\lib\net40\TestStack.ConventionTests.dll</HintPath>
11285
<Private>True</Private>
11386
</Reference>
11487
<Reference Include="YamlDotNet, Version=3.6.0.0, Culture=neutral, processorArchitecture=MSIL">
@@ -170,7 +143,6 @@
170143
<Compile Include="Helpers\GitTestExtensions.cs" />
171144
<Compile Include="Helpers\PathHelper.cs" />
172145
<Compile Include="IntegrationTests\MasterScenarios.cs" />
173-
<Compile Include="ApprovalTestsConfig.cs" />
174146
<Compile Include="Fixtures\RepositoryFixtureBase.cs" />
175147
<Compile Include="SemanticVersionTests.cs" />
176148
<Compile Include="TestableVersionVariables.cs" />

src/GitVersionCore.Tests/Init/InitScenarios.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
namespace GitVersionCore.Tests.Init
22
{
3-
using ApprovalTests;
43
using GitVersion;
54
using GitVersion.Configuration.Init;
65
using GitVersion.Configuration.Init.Wizard;
76
using NUnit.Framework;
7+
using Shouldly;
88
using TestStack.ConventionTests;
99
using TestStack.ConventionTests.ConventionData;
1010

@@ -18,7 +18,7 @@ public void CanSetNextVersion()
1818
var testConsole = new TestConsole("3", "2.0.0", "0");
1919
ConfigurationProvider.Init("c:\\proj", testFileSystem, testConsole);
2020

21-
Approvals.Verify(testFileSystem.ReadAllText("c:\\proj\\GitVersionConfig.yaml"));
21+
testFileSystem.ReadAllText("c:\\proj\\GitVersionConfig.yaml").ShouldMatchApproved();
2222
}
2323

2424
[Test]

src/GitVersionCore.Tests/JsonVersionBuilderTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using System;
2-
using ApprovalTests;
32
using GitVersion;
43
using GitVersionCore.Tests;
54
using NUnit.Framework;
5+
using Shouldly;
66

77
[TestFixture]
88
public class JsonVersionBuilderTests
@@ -23,6 +23,6 @@ public void Json()
2323

2424
var variables = VariableProvider.GetVariablesFor(semanticVersion, config, false);
2525
var json = JsonOutputFormatter.ToJson(variables);
26-
Approvals.Verify(json);
26+
json.ShouldMatchApproved();
2727
}
2828
}

src/GitVersionCore.Tests/VariableProviderTests.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using System;
2-
using ApprovalTests;
32
using GitVersion;
43
using GitVersionCore.Tests;
54
using NUnit.Framework;
5+
using Shouldly;
66

77
[TestFixture]
88
public class VariableProviderTests
@@ -27,7 +27,7 @@ public void ProvidesVariablesInContinuousDeliveryModeForPreRelease()
2727

2828
var vars = VariableProvider.GetVariablesFor(semVer, config, false);
2929

30-
Approvals.Verify(JsonOutputFormatter.ToJson(vars));
30+
JsonOutputFormatter.ToJson(vars).ShouldMatchApproved();
3131
}
3232

3333
[Test]
@@ -50,7 +50,7 @@ public void ProvidesVariablesInContinuousDeliveryModeForPreReleaseWithPadding()
5050

5151
var vars = VariableProvider.GetVariablesFor(semVer, config, false);
5252

53-
Approvals.Verify(JsonOutputFormatter.ToJson(vars));
53+
JsonOutputFormatter.ToJson(vars).ShouldMatchApproved();
5454
}
5555

5656
[Test]
@@ -72,7 +72,7 @@ public void ProvidesVariablesInContinuousDeploymentModeForPreRelease()
7272

7373
var vars = VariableProvider.GetVariablesFor(semVer, config, false);
7474

75-
Approvals.Verify(JsonOutputFormatter.ToJson(vars));
75+
JsonOutputFormatter.ToJson(vars).ShouldMatchApproved();
7676
}
7777

7878
[Test]
@@ -93,7 +93,7 @@ public void ProvidesVariablesInContinuousDeliveryModeForStable()
9393

9494
var vars = VariableProvider.GetVariablesFor(semVer, config, false);
9595

96-
Approvals.Verify(JsonOutputFormatter.ToJson(vars));
96+
JsonOutputFormatter.ToJson(vars).ShouldMatchApproved();
9797
}
9898

9999
[Test]
@@ -114,7 +114,7 @@ public void ProvidesVariablesInContinuousDeploymentModeForStable()
114114

115115
var vars = VariableProvider.GetVariablesFor(semVer, config, false);
116116

117-
Approvals.Verify(JsonOutputFormatter.ToJson(vars));
117+
JsonOutputFormatter.ToJson(vars).ShouldMatchApproved();
118118
}
119119

120120
[Test]
@@ -138,6 +138,6 @@ public void ProvidesVariablesInContinuousDeploymentModeForStableWhenCurrentCommi
138138

139139
var vars = VariableProvider.GetVariablesFor(semVer, config, true);
140140

141-
Approvals.Verify(JsonOutputFormatter.ToJson(vars));
141+
JsonOutputFormatter.ToJson(vars).ShouldMatchApproved();
142142
}
143143
}
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="ApprovalTests" version="3.0.8" targetFramework="net45" />
4-
<package id="ApprovalUtilities" version="3.0.8" targetFramework="net45" />
53
<package id="FluentDateTime" version="1.12.0" targetFramework="net45" />
64
<package id="Fody" version="1.29.3" targetFramework="net45" developmentDependency="true" />
75
<package id="LibGit2Sharp" version="0.21.0.176" targetFramework="net45" />
86
<package id="ModuleInit.Fody" version="1.5.8.0" targetFramework="net45" developmentDependency="true" />
9-
<package id="Mono.Cecil" version="0.9.6.1" targetFramework="net45" />
107
<package id="NSubstitute" version="1.9.2.0" targetFramework="net45" />
118
<package id="NUnit" version="2.6.4" targetFramework="net45" />
129
<package id="NUnitTestAdapter" version="2.0.0" targetFramework="net45" />
13-
<package id="Shouldly" version="2.5.0" targetFramework="net45" />
14-
<package id="TestStack.ConventionTests" version="2.2.1" targetFramework="net45" />
10+
<package id="Shouldly" version="2.7.0-beta0002" targetFramework="net45" />
11+
<package id="TestStack.ConventionTests" version="3.0.0-beta0002" targetFramework="net45" />
1512
<package id="YamlDotNet" version="3.6.1" targetFramework="net45" />
1613
</packages>

src/GitVersionExe.Tests/GitVersionExe.Tests.csproj

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,13 @@
3434
<DebugSymbols>true</DebugSymbols>
3535
</PropertyGroup>
3636
<ItemGroup>
37-
<Reference Include="ApprovalTests, Version=3.0.0.0, Culture=neutral, PublicKeyToken=11bd7d124fc62e0f, processorArchitecture=MSIL">
38-
<SpecificVersion>False</SpecificVersion>
39-
<HintPath>..\packages\ApprovalTests.3.0.8\lib\net40\ApprovalTests.dll</HintPath>
40-
</Reference>
41-
<Reference Include="ApprovalUtilities, Version=3.0.0.0, Culture=neutral, PublicKeyToken=11bd7d124fc62e0f, processorArchitecture=MSIL">
42-
<SpecificVersion>False</SpecificVersion>
43-
<HintPath>..\packages\ApprovalUtilities.3.0.8\lib\net45\ApprovalUtilities.dll</HintPath>
44-
</Reference>
45-
<Reference Include="ApprovalUtilities.Net45">
46-
<HintPath>..\packages\ApprovalUtilities.3.0.8\lib\net45\ApprovalUtilities.Net45.dll</HintPath>
47-
</Reference>
4837
<Reference Include="LibGit2Sharp, Version=0.21.0.176, Culture=neutral, processorArchitecture=MSIL">
4938
<HintPath>..\packages\LibGit2Sharp.0.21.0.176\lib\net40\LibGit2Sharp.dll</HintPath>
5039
<Private>True</Private>
5140
</Reference>
52-
<Reference Include="NSubstitute, Version=1.8.2.0, Culture=neutral, PublicKeyToken=92dd2e9066daa5ca, processorArchitecture=MSIL">
53-
<HintPath>..\packages\NSubstitute.1.8.2.0\lib\net45\NSubstitute.dll</HintPath>
54-
<Private>True</Private>
41+
<Reference Include="NSubstitute, Version=1.9.2.0, Culture=neutral, PublicKeyToken=92dd2e9066daa5ca, processorArchitecture=MSIL">
42+
<SpecificVersion>False</SpecificVersion>
43+
<HintPath>..\packages\NSubstitute.1.9.2.0\lib\net45\NSubstitute.dll</HintPath>
5544
</Reference>
5645
<Reference Include="nunit.core, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
5746
<HintPath>..\packages\NUnitTestAdapter.2.0.0\lib\nunit.core.dll</HintPath>
@@ -73,8 +62,8 @@
7362
<HintPath>..\packages\NUnitTestAdapter.2.0.0\lib\NUnit.VisualStudio.TestAdapter.dll</HintPath>
7463
<Private>True</Private>
7564
</Reference>
76-
<Reference Include="Shouldly, Version=2.5.0.0, Culture=neutral, PublicKeyToken=6042cbcb05cbc941, processorArchitecture=MSIL">
77-
<HintPath>..\packages\Shouldly.2.5.0\lib\net40\Shouldly.dll</HintPath>
65+
<Reference Include="Shouldly, Version=2.7.0.0, Culture=neutral, PublicKeyToken=6042cbcb05cbc941, processorArchitecture=MSIL">
66+
<HintPath>..\packages\Shouldly.2.7.0-beta0002\lib\net40\Shouldly.dll</HintPath>
7867
<Private>True</Private>
7968
</Reference>
8069
<Reference Include="System" />
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="ApprovalTests" version="3.0.8" targetFramework="net45" />
4-
<package id="ApprovalUtilities" version="3.0.8" targetFramework="net45" />
53
<package id="LibGit2Sharp" version="0.21.0.176" targetFramework="net45" />
6-
<package id="NSubstitute" version="1.8.2.0" targetFramework="net45" />
4+
<package id="NSubstitute" version="1.9.2.0" targetFramework="net45" />
75
<package id="NUnit" version="2.6.4" targetFramework="net45" />
86
<package id="NUnitTestAdapter" version="2.0.0" targetFramework="net45" />
9-
<package id="Shouldly" version="2.5.0" targetFramework="net45" />
7+
<package id="Shouldly" version="2.7.0-beta0002" targetFramework="net45" />
108
</packages>

src/GitVersionTask.Tests/ApprovalTestsConfig.cs

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)