Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit d4d6175

Browse files
committed
All test classes have to inherit from TestBaseClass
Otherwise the IsInUnitTests flag won't be set and we'll get into trouble.
1 parent 6bd8ca0 commit d4d6175

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

src/UnitTests/GitHub.App/Caches/CredentialCacheTests.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
public class CredentialCacheTests : TestBaseClass
1010
{
11-
public class TheGetObjectMethod
11+
public class TheGetObjectMethod : TestBaseClass
1212
{
1313
[Fact]
1414
public async Task RetrievesValueWithAlternateKeys()
@@ -65,7 +65,7 @@ await Assert.ThrowsAsync<ObjectDisposedException>(
6565
}
6666
}
6767

68-
public class TheInsertObjectMethod
68+
public class TheInsertObjectMethod : TestBaseClass
6969
{
7070
[Fact]
7171
public async Task StoresCredentialForKeyAndGitKey()
@@ -110,7 +110,7 @@ await Assert.ThrowsAsync<ObjectDisposedException>(
110110
}
111111
}
112112

113-
public class TheInsertMethod
113+
public class TheInsertMethod : TestBaseClass
114114
{
115115
[Fact]
116116
public async Task ThrowsInvalidOperationException()
@@ -123,7 +123,7 @@ await Assert.ThrowsAsync<InvalidOperationException>(
123123
}
124124
}
125125

126-
public class TheGetMethod
126+
public class TheGetMethod : TestBaseClass
127127
{
128128
[Fact]
129129
public async Task RetrievesPasswordAsUnicodeBytes()
@@ -167,7 +167,7 @@ await Assert.ThrowsAsync<ObjectDisposedException>(
167167
}
168168
}
169169

170-
public class TheInvalidateMethod
170+
public class TheInvalidateMethod : TestBaseClass
171171
{
172172
[Fact]
173173
public async Task InvalidatesTheCredential()
@@ -206,7 +206,7 @@ await Assert.ThrowsAsync<ObjectDisposedException>(
206206
}
207207
}
208208

209-
public class TheInvalidateObjectMethod
209+
public class TheInvalidateObjectMethod : TestBaseClass
210210
{
211211
[Fact]
212212
public async Task InvalidatesTheCredential()
@@ -252,7 +252,7 @@ await Assert.ThrowsAsync<KeyNotFoundException>(
252252
}
253253
}
254254

255-
public class TheFlushMethod
255+
public class TheFlushMethod : TestBaseClass
256256
{
257257
[Fact]
258258
public async Task ThrowsObjectDisposedExceptionWhenDisposed()
@@ -267,7 +267,7 @@ public async Task ThrowsObjectDisposedExceptionWhenDisposed()
267267
}
268268
}
269269

270-
public class TheDisposeMethod
270+
public class TheDisposeMethod : TestBaseClass
271271
{
272272
[Fact]
273273
public void SignalsShutdown()
@@ -281,7 +281,7 @@ public void SignalsShutdown()
281281
}
282282
}
283283

284-
public class MethodsNotImplementedOnPurpose
284+
public class MethodsNotImplementedOnPurpose : TestBaseClass
285285
{
286286
[Fact]
287287
public void ThrowNotImplementedException()

src/UnitTests/GitHub.Extensions/UriExtensionTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
public class UriExtensionTests
66
{
7-
public class TheAppendMethod
7+
public class TheAppendMethod : TestBaseClass
88
{
99
[Theory]
1010
[InlineData("https://github.com/foo/bar", "graphs", "https://github.com/foo/bar/graphs")]

src/UnitTests/GitHub.Primitives/UriStringTests.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
public class UriStringTests
77
{
8-
public class TheConstructor
8+
public class TheConstructor : TestBaseClass
99
{
1010
[Theory]
1111
[InlineData("http://192.168.1.3/foo/bar.git", "192.168.1.3", "foo", "bar")]
@@ -107,7 +107,7 @@ public void EnsuresArgumentNotNull()
107107
}
108108
}
109109

110-
public class TheNameWithOwnerProperty
110+
public class TheNameWithOwnerProperty : TestBaseClass
111111
{
112112
[Theory]
113113
[InlineData("http://192.168.1.3/foo/bar.git", "foo/bar")]
@@ -125,7 +125,7 @@ public void DependsOnOwnerAndRepoNameNotBeingNull(string url, string expectedNam
125125
}
126126
}
127127

128-
public class TheCombineMethod
128+
public class TheCombineMethod : TestBaseClass
129129
{
130130
[Theory]
131131
[InlineData("http://example.com", "foo/bar", @"http://example.com/foo/bar")]
@@ -146,7 +146,7 @@ public void ComparesHostInsensitively(string uriString, string path, string expe
146146
}
147147
}
148148

149-
public class TheIsValidUriProperty
149+
public class TheIsValidUriProperty : TestBaseClass
150150
{
151151
[Theory]
152152
[InlineData("http://example.com/", true)]
@@ -159,7 +159,7 @@ public void ReturnWhetherTheUriIsParseableByUri(string uriString, bool expected)
159159
}
160160
}
161161

162-
public class TheToRepositoryUrlMethod
162+
public class TheToRepositoryUrlMethod : TestBaseClass
163163
{
164164
[Theory]
165165
[InlineData("file:///C:/dev/exp/foo", "file:///C:/dev/exp/foo")]
@@ -200,7 +200,7 @@ public void ShouldNeverThrow(string url, string expected)
200200
}
201201
}
202202

203-
public class TheAdditionOperator
203+
public class TheAdditionOperator : TestBaseClass
204204
{
205205
[Theory]
206206
[InlineData("http://example.com", "foo/bar", @"http://example.com/foo/bar")]
@@ -223,7 +223,7 @@ public void CombinesPaths(string uriString, string addition, string expected)
223223
}
224224
}
225225

226-
public class ImplicitConversionToString
226+
public class ImplicitConversionToString : TestBaseClass
227227
{
228228
[Fact]
229229
public void ConvertsBackToString()
@@ -243,7 +243,7 @@ public void ConvertsNullToNull()
243243
}
244244
}
245245

246-
public class ImplicitConversionFromString
246+
public class ImplicitConversionFromString : TestBaseClass
247247
{
248248
[Fact]
249249
public void ConvertsToCloneUri()
@@ -260,7 +260,7 @@ public void ConvertsNullToNull()
260260
}
261261
}
262262

263-
public class TheIsHypertextTransferProtocolProperty
263+
public class TheIsHypertextTransferProtocolProperty : TestBaseClass
264264
{
265265
[Theory]
266266
[InlineData("http://example.com", true)]
@@ -277,7 +277,7 @@ public void IsTrueOnlyForHttpAndHttps(string url, bool expected)
277277
}
278278
}
279279

280-
public class TheEqualsMethod
280+
public class TheEqualsMethod : TestBaseClass
281281
{
282282
[Theory]
283283
[InlineData("https://github.com/foo/bar", "https://github.com/foo/bar", true)]

src/UnitTests/GitHub.VisualStudio/TeamExplorer/Home/GraphsNavigationItemTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
public class GraphsNavigationItemTests
99
{
10-
public class TheExecuteMethod
10+
public class TheExecuteMethod : TestBaseClass
1111
{
1212
[Theory]
1313
[InlineData("https://github.com/foo/bar.git", "https://github.com/foo/bar/graphs")]

0 commit comments

Comments
 (0)