Skip to content

Commit 4ee0e87

Browse files
Rebased
1 parent e15b359 commit 4ee0e87

File tree

6 files changed

+212
-30
lines changed

6 files changed

+212
-30
lines changed

src/Exercism.Tests.xunit.v3/Exercism.Tests.xunit.v3.csproj

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,8 @@
1010
<PropertyGroup>
1111
<PackageId>Exercism.Tests.xunit.v3</PackageId>
1212
<Version>0.1.0-beta1</Version>
13-
<Title>Exercism Testing</Title>
14-
<Description>This library adds Exercism-specific functionality related to testing solutions using xUnit v3.</Description>
15-
<Authors>Erik Schierboom</Authors>
16-
<Company>Exercism</Company>
17-
<PackageTags>Exercism;Testing</PackageTags>
18-
<PackageLicenseExpression>AGPL-3.0-or-later</PackageLicenseExpression>
19-
<PackageIcon>icon.png</PackageIcon>
20-
<RepositoryUrl>https://github.com/exercism/dotnet-tests</RepositoryUrl>
13+
<Title>Exercism Testing using xUnit v3</Title>
14+
<Description>This library adds Exercism-specific functionality related to testing solutions using xUnit v3.</Description>
2115
</PropertyGroup>
2216

2317
<ItemGroup>

src/Exercism.Tests.xunit.v3/UseCultureAttribute.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ public class UseCultureAttribute : BeforeAfterTestAttribute
1010
private readonly CultureInfo _culture;
1111
private readonly CultureInfo _uiCulture;
1212

13-
private CultureInfo _originalCulture;
14-
private CultureInfo _originalUiCulture;
13+
private CultureInfo? _originalCulture;
14+
private CultureInfo? _originalUiCulture;
1515

1616
public UseCultureAttribute()
1717
: this(CultureInfo.InvariantCulture, CultureInfo.InvariantCulture)
@@ -45,7 +45,7 @@ public override void Before(MethodInfo methodUnderTest, IXunitTest test)
4545

4646
public override void After(MethodInfo methodUnderTest, IXunitTest test)
4747
{
48-
CultureInfo.CurrentCulture = _originalCulture;
49-
CultureInfo.CurrentUICulture = _originalUiCulture;
48+
CultureInfo.CurrentCulture = _originalCulture!;
49+
CultureInfo.CurrentUICulture = _originalUiCulture!;
5050
}
5151
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"version": 1,
3+
"dependencies": {
4+
"net6.0": {
5+
"xunit.v3.extensibility.core": {
6+
"type": "Direct",
7+
"requested": "[1.1.0, )",
8+
"resolved": "1.1.0",
9+
"contentHash": "AeQbbYN001x0c+B9pqwml6jZPovHz8O/sOp7jmrjz90rUzz/QPal12SlHLKYszR44CMnW4MsDam3RYT5pkYUxw==",
10+
"dependencies": {
11+
"xunit.v3.common": "[1.1.0]"
12+
}
13+
},
14+
"Microsoft.Bcl.AsyncInterfaces": {
15+
"type": "Transitive",
16+
"resolved": "6.0.0",
17+
"contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg=="
18+
},
19+
"xunit.v3.common": {
20+
"type": "Transitive",
21+
"resolved": "1.1.0",
22+
"contentHash": "Cq55z8pC7fOkfj+3TB/YQ6OW96qWqxKiMd15CtkIl37VtV9EsiUL4B4HsR6VLJCzkk7cBiXQ1ABVIcp3TCm6HQ==",
23+
"dependencies": {
24+
"Microsoft.Bcl.AsyncInterfaces": "6.0.0"
25+
}
26+
}
27+
}
28+
}
29+
}

src/Exercism.Tests/Exercism.Tests.csproj

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,7 @@
55
<PackageId>Exercism.Tests</PackageId>
66
<Version>0.1.0-beta1</Version>
77
<Title>Exercism Testing</Title>
8-
<Description>This library adds Exercism-specific functionality related to testing solutions.</Description>
9-
<Authors>Erik Schierboom</Authors>
10-
<Company>Exercism</Company>
11-
<PackageTags>Exercism;Testing</PackageTags>
12-
<PackageLicenseExpression>AGPL-3.0-or-later</PackageLicenseExpression>
13-
<PackageIcon>icon.png</PackageIcon>
14-
<RepositoryUrl>https://github.com/exercism/dotnet-tests</RepositoryUrl>
8+
<Description>This library adds Exercism-specific functionality related to testing solutions.</Description>
159
</PropertyGroup>
1610

1711
<ItemGroup>

tests/Exercism.Tests.xunit.v3.Tests/Exercism.Tests.xunit.v3.Tests.csproj

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,7 @@
55
<Nullable>enable</Nullable>
66
<OutputType>Exe</OutputType>
77
<RootNamespace>Exercism.Tests.xunit.v3.Tests</RootNamespace>
8-
<TargetFramework>net8.0</TargetFramework>
9-
<!--
10-
To enable the Microsoft Testing Platform 'dotnet test' experience, add property:
11-
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
12-
13-
To enable the Microsoft Testing Platform native command line experience, add property:
14-
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
15-
16-
For more information on Microsoft Testing Platform support in xUnit.net, please visit:
17-
https://xunit.net/docs/getting-started/v3/microsoft-testing-platform
18-
-->
8+
<TargetFramework>net6.0</TargetFramework>
199
</PropertyGroup>
2010

2111
<ItemGroup>
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
{
2+
"version": 1,
3+
"dependencies": {
4+
"net6.0": {
5+
"Microsoft.NET.Test.Sdk": {
6+
"type": "Direct",
7+
"requested": "[17.13.0, )",
8+
"resolved": "17.13.0",
9+
"contentHash": "W19wCPizaIC9Zh47w8wWI/yxuqR7/dtABwOrc8r2jX/8mUNxM2vw4fXDh+DJTeogxV+KzKwg5jNNGQVwf3LXyA==",
10+
"dependencies": {
11+
"Microsoft.CodeCoverage": "17.13.0",
12+
"Microsoft.TestPlatform.TestHost": "17.13.0"
13+
}
14+
},
15+
"xunit.runner.visualstudio": {
16+
"type": "Direct",
17+
"requested": "[3.0.2, )",
18+
"resolved": "3.0.2",
19+
"contentHash": "oXbusR6iPq0xlqoikjdLvzh+wQDkMv9If58myz9MEzldS4nIcp442Btgs2sWbYWV+caEluMe2pQCZ0hUZgPiow=="
20+
},
21+
"xunit.v3": {
22+
"type": "Direct",
23+
"requested": "[1.1.0, )",
24+
"resolved": "1.1.0",
25+
"contentHash": "1ckSz5GVswlM9TCk5bGdHOjnYwqAWjkeqxckoHawQIA8sTeuN+RCBUypCi5A/Um0XlczRx5TjAK5W6BbN0HLcQ==",
26+
"dependencies": {
27+
"xunit.analyzers": "1.20.0",
28+
"xunit.v3.assert": "[1.1.0]",
29+
"xunit.v3.core": "[1.1.0]"
30+
}
31+
},
32+
"Microsoft.Bcl.AsyncInterfaces": {
33+
"type": "Transitive",
34+
"resolved": "6.0.0",
35+
"contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg=="
36+
},
37+
"Microsoft.CodeCoverage": {
38+
"type": "Transitive",
39+
"resolved": "17.13.0",
40+
"contentHash": "9LIUy0y+DvUmEPtbRDw6Bay3rzwqFV8P4efTrK4CZhQle3M/QwLPjISghfcolmEGAPWxuJi6m98ZEfk4VR4Lfg=="
41+
},
42+
"Microsoft.Testing.Extensions.TrxReport.Abstractions": {
43+
"type": "Transitive",
44+
"resolved": "1.5.3",
45+
"contentHash": "h34zKNpGyni66VH738mRHeXSnf3klSShUdavUWNhSfWICUUi5aXeI0LBvoX/ad93N0+9xBDU3Fyi6WfxrwKQGw==",
46+
"dependencies": {
47+
"Microsoft.Testing.Platform": "1.5.3"
48+
}
49+
},
50+
"Microsoft.Testing.Platform": {
51+
"type": "Transitive",
52+
"resolved": "1.5.3",
53+
"contentHash": "WqJydnJ99dEKtquR9HwINz104ehWJKTXbQQrydGatlLRw14bmsx0pa8+E6KUXMYXZAimN0swWlDmcJGjjW4TIg=="
54+
},
55+
"Microsoft.Testing.Platform.MSBuild": {
56+
"type": "Transitive",
57+
"resolved": "1.5.3",
58+
"contentHash": "bOtpRMSPeT5YLQo+NNY8EtdNTphAUcmALjW4ABU7P0rb6yR2XAZau3TzNieLmR3lRuwudguWzzBhgcLRXwZh0A==",
59+
"dependencies": {
60+
"Microsoft.Testing.Platform": "1.5.3"
61+
}
62+
},
63+
"Microsoft.TestPlatform.ObjectModel": {
64+
"type": "Transitive",
65+
"resolved": "17.13.0",
66+
"contentHash": "bt0E0Dx+iqW97o4A59RCmUmz/5NarJ7LRL+jXbSHod72ibL5XdNm1Ke+UO5tFhBG4VwHLcSjqq9BUSblGNWamw==",
67+
"dependencies": {
68+
"System.Reflection.Metadata": "1.6.0"
69+
}
70+
},
71+
"Microsoft.TestPlatform.TestHost": {
72+
"type": "Transitive",
73+
"resolved": "17.13.0",
74+
"contentHash": "9GGw08Dc3AXspjekdyTdZ/wYWFlxbgcF0s7BKxzVX+hzAwpifDOdxM+ceVaaJSQOwqt3jtuNlHn3XTpKUS9x9Q==",
75+
"dependencies": {
76+
"Microsoft.TestPlatform.ObjectModel": "17.13.0",
77+
"Newtonsoft.Json": "13.0.1"
78+
}
79+
},
80+
"Newtonsoft.Json": {
81+
"type": "Transitive",
82+
"resolved": "13.0.1",
83+
"contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
84+
},
85+
"System.Collections.Immutable": {
86+
"type": "Transitive",
87+
"resolved": "8.0.0",
88+
"contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==",
89+
"dependencies": {
90+
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
91+
}
92+
},
93+
"System.Memory": {
94+
"type": "Transitive",
95+
"resolved": "4.6.0",
96+
"contentHash": "OEkbBQoklHngJ8UD8ez2AERSk2g+/qpAaSWWCBFbpH727HxDq5ydVkuncBaKcKfwRqXGWx64dS6G1SUScMsitg=="
97+
},
98+
"System.Reflection.Metadata": {
99+
"type": "Transitive",
100+
"resolved": "1.6.0",
101+
"contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ=="
102+
},
103+
"System.Runtime.CompilerServices.Unsafe": {
104+
"type": "Transitive",
105+
"resolved": "6.0.0",
106+
"contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg=="
107+
},
108+
"xunit.analyzers": {
109+
"type": "Transitive",
110+
"resolved": "1.20.0",
111+
"contentHash": "HElev2E9vFbPxwKRQtpCSSzLOu8M/N9EWBCB37v7SRx6z4Lbj19FxfLEig3v9jiI6s4b0l2uena91nEsTWl9jA=="
112+
},
113+
"xunit.v3.assert": {
114+
"type": "Transitive",
115+
"resolved": "1.1.0",
116+
"contentHash": "4D+eM08ImfhA+zLbRzi8HA4qsT98zDxgaCD7vCg8yFesokKsgSsqWsAmImHFjVymGVhVS7WFGb19d6v1k9i0xQ==",
117+
"dependencies": {
118+
"System.Collections.Immutable": "8.0.0",
119+
"System.Memory": "4.6.0"
120+
}
121+
},
122+
"xunit.v3.common": {
123+
"type": "Transitive",
124+
"resolved": "1.1.0",
125+
"contentHash": "Cq55z8pC7fOkfj+3TB/YQ6OW96qWqxKiMd15CtkIl37VtV9EsiUL4B4HsR6VLJCzkk7cBiXQ1ABVIcp3TCm6HQ==",
126+
"dependencies": {
127+
"Microsoft.Bcl.AsyncInterfaces": "6.0.0"
128+
}
129+
},
130+
"xunit.v3.core": {
131+
"type": "Transitive",
132+
"resolved": "1.1.0",
133+
"contentHash": "kXP/1d3jnQ2m4skcdM3gSMmubI6P747D6KVswzeedysgFkLj2xJlfo7p7slsmtEnp8BZb8X6D92Hssd/UtVPMw==",
134+
"dependencies": {
135+
"Microsoft.Testing.Platform.MSBuild": "1.5.3",
136+
"xunit.v3.extensibility.core": "[1.1.0]",
137+
"xunit.v3.runner.inproc.console": "[1.1.0]"
138+
}
139+
},
140+
"xunit.v3.extensibility.core": {
141+
"type": "Transitive",
142+
"resolved": "1.1.0",
143+
"contentHash": "AeQbbYN001x0c+B9pqwml6jZPovHz8O/sOp7jmrjz90rUzz/QPal12SlHLKYszR44CMnW4MsDam3RYT5pkYUxw==",
144+
"dependencies": {
145+
"xunit.v3.common": "[1.1.0]"
146+
}
147+
},
148+
"xunit.v3.runner.common": {
149+
"type": "Transitive",
150+
"resolved": "1.1.0",
151+
"contentHash": "Q81J0VPuu8fpF+/1CIjThqKKUjnqh0TQrLlD0iORkF75KdsOV+iGWT8c3AVuY96kDoxXxkTf0ZvJsK6o9osc1A==",
152+
"dependencies": {
153+
"xunit.v3.common": "[1.1.0]"
154+
}
155+
},
156+
"xunit.v3.runner.inproc.console": {
157+
"type": "Transitive",
158+
"resolved": "1.1.0",
159+
"contentHash": "lX/4TwIJe9ysCd5dqLk/Doq8ieYaZGivgf95xR59wRuSV+nHzHnyhpjXfaPUp8nkncUH1rOmJ85o1KebipisXQ==",
160+
"dependencies": {
161+
"Microsoft.Testing.Extensions.TrxReport.Abstractions": "1.5.3",
162+
"Microsoft.Testing.Platform": "1.5.3",
163+
"xunit.v3.extensibility.core": "[1.1.0]",
164+
"xunit.v3.runner.common": "[1.1.0]"
165+
}
166+
},
167+
"exercism.tests.xunit.v3": {
168+
"type": "Project",
169+
"dependencies": {
170+
"xunit.v3.extensibility.core": "[1.1.0, )"
171+
}
172+
}
173+
}
174+
}
175+
}

0 commit comments

Comments
 (0)