Skip to content

Commit d19be3a

Browse files
wgnfdevlead
authored andcommitted
migrate SlnParserTests to Verify.DiffPlex and Verify.XunitV3
1 parent 0345901 commit d19be3a

File tree

18 files changed

+737
-86
lines changed

18 files changed

+737
-86
lines changed

src/Cake.Cli.Tests/VerifyConfig.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ public static class VerifyConfig
1414
[ModuleInitializer]
1515
public static void Init()
1616
{
17-
DerivePathInfo(Expectations.Initialize);
18-
VerifyDiffPlex.Initialize(OutputType.Compact);
17+
if (!VerifyDiffPlex.Initialized)
18+
{
19+
VerifyDiffPlex.Initialize(OutputType.Compact);
20+
DerivePathInfo(Expectations.Initialize);
21+
}
1922
}
2023
}

src/Cake.Common.Tests/Cake.Common.Tests.csproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<AssemblyName>Cake.Common.Tests</AssemblyName>
44
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
55
<IsCakeTestProject>true</IsCakeTestProject>
6+
<ImplicitUsings>enable</ImplicitUsings>
67
</PropertyGroup>
78
<!-- Import shared functionality -->
89
<Import Project="..\Shared.msbuild" />
@@ -17,6 +18,9 @@
1718
<!-- Global packages -->
1819
<ItemGroup>
1920
<PackageReference Include="Microsoft.NET.Test.Sdk" />
21+
<PackageReference Include="Spectre.Verify.Extensions" />
22+
<PackageReference Include="Verify.DiffPlex" />
23+
<PackageReference Include="Verify.XunitV3" />
2024
<PackageReference Include="xunit.v3" />
2125
<PackageReference Include="xunit.runner.visualstudio">
2226
<PrivateAssets>all</PrivateAssets>
@@ -48,4 +52,8 @@
4852
<Generator></Generator>
4953
</EmbeddedResource>
5054
</ItemGroup>
55+
56+
<ItemGroup>
57+
<Folder Include="Expectations\" />
58+
</ItemGroup>
5159
</Project>
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
Version: Format Version 12.00,
3+
VisualStudioVersion: 14.0.25123.0,
4+
MinimumVisualStudioVersion: 10.0.40219.1,
5+
Projects: [
6+
{
7+
Items: [
8+
{
9+
Id: Guid_1,
10+
Name: dummy,
11+
Path: /Working/src/dummy/dummy.csproj,
12+
Type: Guid_2
13+
}
14+
],
15+
Id: Guid_3,
16+
Name: src,
17+
Path: /Working/src,
18+
Type: Guid_4,
19+
Parent: null
20+
},
21+
{
22+
Items: [
23+
{
24+
Id: Guid_5,
25+
Name: dummy.Tests,
26+
Path: /Working/test/dummy.Tests/dummy.Tests.csproj,
27+
Type: Guid_2
28+
}
29+
],
30+
Id: Guid_6,
31+
Name: test,
32+
Path: /Working/test,
33+
Type: Guid_4,
34+
Parent: null
35+
},
36+
{
37+
Id: Guid_1,
38+
Name: dummy,
39+
Path: /Working/src/dummy/dummy.csproj,
40+
Type: Guid_2,
41+
Parent: {
42+
Items: [],
43+
Id: Guid_3,
44+
Name: src,
45+
Path: /Working/src,
46+
Type: Guid_4,
47+
Parent: null
48+
}
49+
},
50+
{
51+
Id: Guid_5,
52+
Name: dummy.Tests,
53+
Path: /Working/test/dummy.Tests/dummy.Tests.csproj,
54+
Type: Guid_2,
55+
Parent: {
56+
Items: [],
57+
Id: Guid_6,
58+
Name: test,
59+
Path: /Working/test,
60+
Type: Guid_4,
61+
Parent: null
62+
}
63+
},
64+
{
65+
Id: Guid_7,
66+
Name: executable,
67+
Path: /Working/executable/executable.csproj,
68+
Type: Guid_2,
69+
Parent: null
70+
}
71+
]
72+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
Version: Format Version 12.00,
3+
VisualStudioVersion: 14.0.25123.0,
4+
MinimumVisualStudioVersion: 10.0.40219.1,
5+
Projects: [
6+
{
7+
Items: [
8+
{
9+
Id: Guid_1,
10+
Name: dummy,
11+
Path: /Working/src/dummy/dummy.csproj,
12+
Type: Guid_2
13+
}
14+
],
15+
Id: Guid_3,
16+
Name: src,
17+
Path: /Working/src,
18+
Type: Guid_4,
19+
Parent: null
20+
},
21+
{
22+
Items: [
23+
{
24+
Id: Guid_5,
25+
Name: dummy.Tests,
26+
Path: /Working/test/dummy.Tests/dummy.Tests.csproj,
27+
Type: Guid_2
28+
}
29+
],
30+
Id: Guid_6,
31+
Name: test,
32+
Path: /Working/test,
33+
Type: Guid_4,
34+
Parent: null
35+
},
36+
{
37+
Id: Guid_1,
38+
Name: dummy,
39+
Path: /Working/src/dummy/dummy.csproj,
40+
Type: Guid_2,
41+
Parent: {
42+
Items: [],
43+
Id: Guid_3,
44+
Name: src,
45+
Path: /Working/src,
46+
Type: Guid_4,
47+
Parent: null
48+
}
49+
},
50+
{
51+
Id: Guid_5,
52+
Name: dummy.Tests,
53+
Path: /Working/test/dummy.Tests/dummy.Tests.csproj,
54+
Type: Guid_2,
55+
Parent: {
56+
Items: [],
57+
Id: Guid_6,
58+
Name: test,
59+
Path: /Working/test,
60+
Type: Guid_4,
61+
Parent: null
62+
}
63+
},
64+
{
65+
Id: Guid_7,
66+
Name: executable,
67+
Path: /Working/executable/executable.csproj,
68+
Type: Guid_2,
69+
Parent: null
70+
}
71+
]
72+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
Version: Format Version 12.00,
3+
VisualStudioVersion: 16.0.31702.278,
4+
MinimumVisualStudioVersion: 10.0.40219.1,
5+
Projects: [
6+
{
7+
Id: Guid_1,
8+
Name: dummy,
9+
Path: C:/project/dummy/src/dummy/dummy.csproj,
10+
Type: Guid_2,
11+
Parent: null
12+
}
13+
]
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
Version: Format Version 12.00,
3+
VisualStudioVersion: 14.0.25123.0,
4+
MinimumVisualStudioVersion: 10.0.40219.1,
5+
Projects: [
6+
{
7+
Items: [
8+
{
9+
Id: Guid_1,
10+
Name: dummy,
11+
Path: /Working/src/dummy/dummy.csproj,
12+
Type: Guid_2
13+
}
14+
],
15+
Id: Guid_3,
16+
Name: src,
17+
Path: /Working/src,
18+
Type: Guid_4,
19+
Parent: null
20+
},
21+
{
22+
Items: [
23+
{
24+
Id: Guid_5,
25+
Name: dummy.Tests,
26+
Path: /Working/test/dummy.Tests/dummy.Tests.csproj,
27+
Type: Guid_2
28+
}
29+
],
30+
Id: Guid_6,
31+
Name: test,
32+
Path: /Working/test,
33+
Type: Guid_4,
34+
Parent: null
35+
},
36+
{
37+
Id: Guid_1,
38+
Name: dummy,
39+
Path: /Working/src/dummy/dummy.csproj,
40+
Type: Guid_2,
41+
Parent: {
42+
Items: [],
43+
Id: Guid_3,
44+
Name: src,
45+
Path: /Working/src,
46+
Type: Guid_4,
47+
Parent: null
48+
}
49+
},
50+
{
51+
Id: Guid_5,
52+
Name: dummy.Tests,
53+
Path: /Working/test/dummy.Tests/dummy.Tests.csproj,
54+
Type: Guid_2,
55+
Parent: {
56+
Items: [],
57+
Id: Guid_6,
58+
Name: test,
59+
Path: /Working/test,
60+
Type: Guid_4,
61+
Parent: null
62+
}
63+
},
64+
{
65+
Id: Guid_7,
66+
Name: executable,
67+
Path: /Working/executable/executable.csproj,
68+
Type: Guid_2,
69+
Parent: null
70+
}
71+
]
72+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
Version: Format Version 12.00,
3+
VisualStudioVersion: 14.0.25123.0,
4+
MinimumVisualStudioVersion: 10.0.40219.1,
5+
Projects: [
6+
{
7+
Items: [
8+
{
9+
Id: Guid_1,
10+
Name: dummy,
11+
Path: /Working/src/dummy/dummy.csproj,
12+
Type: Guid_2
13+
}
14+
],
15+
Id: Guid_3,
16+
Name: src,
17+
Path: /Working/src,
18+
Type: Guid_4,
19+
Parent: null
20+
},
21+
{
22+
Items: [
23+
{
24+
Id: Guid_5,
25+
Name: dummy.Tests,
26+
Path: /Working/test/dummy.Tests/dummy.Tests.csproj,
27+
Type: Guid_2
28+
}
29+
],
30+
Id: Guid_6,
31+
Name: test,
32+
Path: /Working/test,
33+
Type: Guid_4,
34+
Parent: null
35+
},
36+
{
37+
Id: Guid_1,
38+
Name: dummy,
39+
Path: /Working/src/dummy/dummy.csproj,
40+
Type: Guid_2,
41+
Parent: {
42+
Items: [],
43+
Id: Guid_3,
44+
Name: src,
45+
Path: /Working/src,
46+
Type: Guid_4,
47+
Parent: null
48+
}
49+
},
50+
{
51+
Id: Guid_5,
52+
Name: dummy.Tests,
53+
Path: /Working/test/dummy.Tests/dummy.Tests.csproj,
54+
Type: Guid_2,
55+
Parent: {
56+
Items: [],
57+
Id: Guid_6,
58+
Name: test,
59+
Path: /Working/test,
60+
Type: Guid_4,
61+
Parent: null
62+
}
63+
},
64+
{
65+
Id: Guid_7,
66+
Name: executable,
67+
Path: /Working/executable/executable.csproj,
68+
Type: Guid_2,
69+
Parent: null
70+
}
71+
]
72+
}

0 commit comments

Comments
 (0)