Skip to content

Commit e99fcfc

Browse files
committed
WithNoVerify tests
1 parent a5558ae commit e99fcfc

File tree

4 files changed

+32
-20
lines changed

4 files changed

+32
-20
lines changed

docs/temp-directory.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public void Usage()
3535
// Directory and files automatically deleted here
3636
}
3737
```
38-
<sup><a href='/src/Verify.Tests/TempDirectoryTests.cs#L35-L48' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempDirectory' title='Start of snippet'>anchor</a></sup>
38+
<sup><a href='/src/Verify.Tests/TempDirectoryTests.cs#L41-L54' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempDirectory' title='Start of snippet'>anchor</a></sup>
3939
<!-- endSnippet -->
4040

4141

@@ -64,7 +64,7 @@ public void PathProperty()
6464
Assert.True(Path.IsPathRooted(path));
6565
}
6666
```
67-
<sup><a href='/src/Verify.Tests/TempDirectoryTests.cs#L232-L243' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempDirectoryPathProperty' title='Start of snippet'>anchor</a></sup>
67+
<sup><a href='/src/Verify.Tests/TempDirectoryTests.cs#L238-L249' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempDirectoryPathProperty' title='Start of snippet'>anchor</a></sup>
6868
<!-- endSnippet -->
6969

7070

@@ -93,7 +93,7 @@ public void StringConversion()
9393
Trace.WriteLine(files.Count());
9494
}
9595
```
96-
<sup><a href='/src/Verify.Tests/TempDirectoryTests.cs#L50-L65' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempDirectoryStringConversion' title='Start of snippet'>anchor</a></sup>
96+
<sup><a href='/src/Verify.Tests/TempDirectoryTests.cs#L56-L71' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempDirectoryStringConversion' title='Start of snippet'>anchor</a></sup>
9797
<!-- endSnippet -->
9898

9999

@@ -118,7 +118,7 @@ public void DirectoryInfoConversion()
118118
Trace.WriteLine(files.Count());
119119
}
120120
```
121-
<sup><a href='/src/Verify.Tests/TempDirectoryTests.cs#L67-L83' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempDirectoryDirectoryInfoConversion' title='Start of snippet'>anchor</a></sup>
121+
<sup><a href='/src/Verify.Tests/TempDirectoryTests.cs#L73-L89' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempDirectoryDirectoryInfoConversion' title='Start of snippet'>anchor</a></sup>
122122
<!-- endSnippet -->
123123

124124

@@ -142,7 +142,7 @@ public void InfoProperty()
142142
temp.Info.CreateSubdirectory("Subdirectory");
143143
}
144144
```
145-
<sup><a href='/src/Verify.Tests/TempDirectoryTests.cs#L85-L100' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempDirectoryInfoProperty' title='Start of snippet'>anchor</a></sup>
145+
<sup><a href='/src/Verify.Tests/TempDirectoryTests.cs#L91-L106' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempDirectoryInfoProperty' title='Start of snippet'>anchor</a></sup>
146146
<!-- endSnippet -->
147147

148148

@@ -158,7 +158,7 @@ public void RootDirectory() =>
158158
// Accessing the root directory for all TempDirectory instances
159159
Trace.WriteLine(TempDirectory.RootDirectory);
160160
```
161-
<sup><a href='/src/Verify.Tests/TempDirectoryTests.cs#L102-L109' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempDirectoryRootDirectory' title='Start of snippet'>anchor</a></sup>
161+
<sup><a href='/src/Verify.Tests/TempDirectoryTests.cs#L108-L115' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempDirectoryRootDirectory' title='Start of snippet'>anchor</a></sup>
162162
<!-- endSnippet -->
163163

164164

@@ -222,7 +222,7 @@ public async Task BuildPath()
222222
});
223223
}
224224
```
225-
<sup><a href='/src/Verify.Tests/TempDirectoryTests.cs#L292-L312' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempDirectoryBuildPath' title='Start of snippet'>anchor</a></sup>
225+
<sup><a href='/src/Verify.Tests/TempDirectoryTests.cs#L298-L318' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempDirectoryBuildPath' title='Start of snippet'>anchor</a></sup>
226226
<!-- endSnippet -->
227227

228228

@@ -244,7 +244,7 @@ public async Task Scrubbing()
244244
});
245245
}
246246
```
247-
<sup><a href='/src/Verify.Tests/TempDirectoryTests.cs#L314-L329' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempDirectoryScrubbing' title='Start of snippet'>anchor</a></sup>
247+
<sup><a href='/src/Verify.Tests/TempDirectoryTests.cs#L320-L335' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempDirectoryScrubbing' title='Start of snippet'>anchor</a></sup>
248248
<!-- endSnippet -->
249249

250250
Result:
@@ -289,7 +289,7 @@ public void NoUsing()
289289
Debug.WriteLine(temp);
290290
}
291291
```
292-
<sup><a href='/src/Verify.Tests/TempDirectoryTests.cs#L275-L288' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempDirectoryNoUsing' title='Start of snippet'>anchor</a></sup>
292+
<sup><a href='/src/Verify.Tests/TempDirectoryTests.cs#L281-L294' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempDirectoryNoUsing' title='Start of snippet'>anchor</a></sup>
293293
<!-- endSnippet -->
294294

295295
The directory can then be manually inspected.
@@ -313,7 +313,7 @@ public void OpenExplorerAndDebug()
313313
temp.OpenExplorerAndDebug();
314314
}
315315
```
316-
<sup><a href='/src/Verify.Tests/TempDirectoryTests.cs#L260-L273' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempDirectoryOpenExplorerAndDebug' title='Start of snippet'>anchor</a></sup>
316+
<sup><a href='/src/Verify.Tests/TempDirectoryTests.cs#L266-L279' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempDirectoryOpenExplorerAndDebug' title='Start of snippet'>anchor</a></sup>
317317
<!-- endSnippet -->
318318

319319
This method is designed to help debug tests by enabling the inspection of the contents of the temporary directory while the test is paused. It performs two actions:

docs/temp-file.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public void Usage()
3434
// file automatically deleted here
3535
}
3636
```
37-
<sup><a href='/src/Verify.Tests/TempFileTests.cs#L32-L44' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempFile' title='Start of snippet'>anchor</a></sup>
37+
<sup><a href='/src/Verify.Tests/TempFileTests.cs#L38-L50' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempFile' title='Start of snippet'>anchor</a></sup>
3838
<!-- endSnippet -->
3939

4040

@@ -62,7 +62,7 @@ public void PathProperty()
6262
Assert.True(Path.IsPathRooted(path));
6363
}
6464
```
65-
<sup><a href='/src/Verify.Tests/TempFileTests.cs#L46-L56' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempFilePathProperty' title='Start of snippet'>anchor</a></sup>
65+
<sup><a href='/src/Verify.Tests/TempFileTests.cs#L52-L62' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempFilePathProperty' title='Start of snippet'>anchor</a></sup>
6666
<!-- endSnippet -->
6767

6868

@@ -91,7 +91,7 @@ public void StringConversion()
9191
Trace.WriteLine(content);
9292
}
9393
```
94-
<sup><a href='/src/Verify.Tests/TempFileTests.cs#L327-L342' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempFileStringConversion' title='Start of snippet'>anchor</a></sup>
94+
<sup><a href='/src/Verify.Tests/TempFileTests.cs#L333-L348' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempFileStringConversion' title='Start of snippet'>anchor</a></sup>
9595
<!-- endSnippet -->
9696

9797

@@ -114,7 +114,7 @@ public void FileInfoConversion()
114114
Trace.WriteLine(directoryName);
115115
}
116116
```
117-
<sup><a href='/src/Verify.Tests/TempFileTests.cs#L344-L358' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempFileFileInfoConversion' title='Start of snippet'>anchor</a></sup>
117+
<sup><a href='/src/Verify.Tests/TempFileTests.cs#L350-L364' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempFileFileInfoConversion' title='Start of snippet'>anchor</a></sup>
118118
<!-- endSnippet -->
119119

120120

@@ -135,7 +135,7 @@ public void InfoProperty()
135135
Trace.WriteLine(directoryName);
136136
}
137137
```
138-
<sup><a href='/src/Verify.Tests/TempFileTests.cs#L360-L372' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempFileInfoProperty' title='Start of snippet'>anchor</a></sup>
138+
<sup><a href='/src/Verify.Tests/TempFileTests.cs#L366-L378' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempFileInfoProperty' title='Start of snippet'>anchor</a></sup>
139139
<!-- endSnippet -->
140140

141141

@@ -151,7 +151,7 @@ public void RootDirectory() =>
151151
// Accessing the root directory for all TempDirectory instances
152152
Trace.WriteLine(TempFile.RootDirectory);
153153
```
154-
<sup><a href='/src/Verify.Tests/TempFileTests.cs#L108-L115' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempFileRootDirectory' title='Start of snippet'>anchor</a></sup>
154+
<sup><a href='/src/Verify.Tests/TempFileTests.cs#L114-L121' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempFileRootDirectory' title='Start of snippet'>anchor</a></sup>
155155
<!-- endSnippet -->
156156

157157

@@ -186,7 +186,7 @@ public async Task VerifyFileInstance()
186186
await VerifyFile(file);
187187
}
188188
```
189-
<sup><a href='/src/Verify.Tests/TempFileTests.cs#L20-L30' title='Snippet source file'>snippet source</a> | <a href='#snippet-VerifyTempFile' title='Start of snippet'>anchor</a></sup>
189+
<sup><a href='/src/Verify.Tests/TempFileTests.cs#L26-L36' title='Snippet source file'>snippet source</a> | <a href='#snippet-VerifyTempFile' title='Start of snippet'>anchor</a></sup>
190190
<!-- endSnippet -->
191191

192192

@@ -207,7 +207,7 @@ public async Task Scrubbing()
207207
});
208208
}
209209
```
210-
<sup><a href='/src/Verify.Tests/TempFileTests.cs#L90-L104' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempFileScrubbing' title='Start of snippet'>anchor</a></sup>
210+
<sup><a href='/src/Verify.Tests/TempFileTests.cs#L96-L110' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempFileScrubbing' title='Start of snippet'>anchor</a></sup>
211211
<!-- endSnippet -->
212212

213213
Result:
@@ -251,7 +251,7 @@ public void NoUsing()
251251
Debug.WriteLine(temp);
252252
}
253253
```
254-
<sup><a href='/src/Verify.Tests/TempFileTests.cs#L73-L86' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempFileNoUsing' title='Start of snippet'>anchor</a></sup>
254+
<sup><a href='/src/Verify.Tests/TempFileTests.cs#L79-L92' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempFileNoUsing' title='Start of snippet'>anchor</a></sup>
255255
<!-- endSnippet -->
256256

257257
The file can then be manually inspected.
@@ -275,7 +275,7 @@ public void OpenExplorerAndDebug()
275275
temp.OpenExplorerAndDebug();
276276
}
277277
```
278-
<sup><a href='/src/Verify.Tests/TempFileTests.cs#L58-L71' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempFileOpenExplorerAndDebug' title='Start of snippet'>anchor</a></sup>
278+
<sup><a href='/src/Verify.Tests/TempFileTests.cs#L64-L77' title='Snippet source file'>snippet source</a> | <a href='#snippet-TempFileOpenExplorerAndDebug' title='Start of snippet'>anchor</a></sup>
279279
<!-- endSnippet -->
280280

281281
This method is designed to help debug tests by enabling the inspection of the contents of the temporary file while the test is paused. It performs two actions:

src/Verify.Tests/TempDirectoryTests.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ public async Task VerifyDirectoryInstance()
3232

3333
#endregion
3434

35+
[Fact]
36+
public void WithNoVerify()
37+
{
38+
using var directory = new TempDirectory();
39+
}
40+
3541
#region TempDirectory
3642

3743
[Fact]

src/Verify.Tests/TempFileTests.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
public class TempFileTests
22
{
3+
[Fact]
4+
public void WithNoVerify()
5+
{
6+
using var temp = new TempFile();
7+
}
8+
39
[Fact]
410
public void Constructor_CreatesFilePathInRootDirectory()
511
{

0 commit comments

Comments
 (0)