Commit 47cfa07
committed
fix: Refresh FileInfo & DirectoryInfo after adding to MockFileSystem
Modify the `IFileInfo` and `IDirectoryInfo` overloads of `AddFile()`,
`AddEmptyFile()`, or `AddDirectory()` in `MockFileSystem`, to call
`Refresh()` on those objects after the paths they refer to are created.1 parent 04abe02 commit 47cfa07
File tree
2 files changed
+36
-0
lines changed- src/TestableIO.System.IO.Abstractions.TestingHelpers
- tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests
2 files changed
+36
-0
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| 228 | + | |
228 | 229 | | |
229 | 230 | | |
230 | 231 | | |
| |||
234 | 235 | | |
235 | 236 | | |
236 | 237 | | |
| 238 | + | |
237 | 239 | | |
238 | 240 | | |
239 | 241 | | |
| |||
244 | 246 | | |
245 | 247 | | |
246 | 248 | | |
| 249 | + | |
247 | 250 | | |
248 | 251 | | |
249 | 252 | | |
| |||
Lines changed: 33 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
133 | 166 | | |
134 | 167 | | |
135 | 168 | | |
| |||
0 commit comments