@@ -23,6 +23,9 @@ public void Should_Initialize_When_Cache_Does_Not_Exist()
23
23
const string connectionsCachePath = @"c:\UserCachePath\" ;
24
24
25
25
var fileSystem = SubstituteFactory . CreateFileSystem ( ) ;
26
+
27
+ NPath . FileSystem = fileSystem ;
28
+
26
29
var credentialManager = Substitute . For < ICredentialManager > ( ) ;
27
30
28
31
var environment = SubstituteFactory . CreateEnvironment ( ) ;
@@ -61,6 +64,8 @@ public void Should_Initialize_When_Cache_Invalid()
61
64
}
62
65
} ) ;
63
66
67
+ NPath . FileSystem = fileSystem ;
68
+
64
69
var environment = SubstituteFactory . CreateEnvironment ( ) ;
65
70
environment . UserCachePath . Returns ( info => connectionsCachePath . ToNPath ( ) ) ;
66
71
environment . FileSystem . Returns ( fileSystem ) ;
@@ -101,6 +106,8 @@ public void Should_Initialize_When_Cache_Exists()
101
106
}
102
107
} ) ;
103
108
109
+ NPath . FileSystem = fileSystem ;
110
+
104
111
var environment = SubstituteFactory . CreateEnvironment ( ) ;
105
112
environment . UserCachePath . Returns ( info => connectionsCachePath . ToNPath ( ) ) ;
106
113
environment . FileSystem . Returns ( fileSystem ) ;
@@ -141,6 +148,8 @@ public void Should_Load_From_ConnectionManager()
141
148
}
142
149
} ) ;
143
150
151
+ NPath . FileSystem = fileSystem ;
152
+
144
153
var environment = SubstituteFactory . CreateEnvironment ( ) ;
145
154
environment . UserCachePath . Returns ( info => connectionsCachePath . ToNPath ( ) ) ;
146
155
environment . FileSystem . Returns ( fileSystem ) ;
@@ -199,6 +208,8 @@ public void Should_Delete_From_Cache_When_Load_Returns_Null_From_ConnectionManag
199
208
}
200
209
} ) ;
201
210
211
+ NPath . FileSystem = fileSystem ;
212
+
202
213
var environment = SubstituteFactory . CreateEnvironment ( ) ;
203
214
environment . UserCachePath . Returns ( info => connectionsCachePath . ToNPath ( ) ) ;
204
215
environment . FileSystem . Returns ( fileSystem ) ;
@@ -250,6 +261,8 @@ public void Should_Connect_Set_Credentials_Token_And_Save()
250
261
251
262
var fileSystem = SubstituteFactory . CreateFileSystem ( ) ;
252
263
264
+ NPath . FileSystem = fileSystem ;
265
+
253
266
var environment = SubstituteFactory . CreateEnvironment ( ) ;
254
267
environment . UserCachePath . Returns ( info => connectionsCachePath . ToNPath ( ) ) ;
255
268
environment . FileSystem . Returns ( fileSystem ) ;
@@ -334,6 +347,8 @@ public void Should_Connect_Set_Credentials_And_Clear()
334
347
335
348
var fileSystem = SubstituteFactory . CreateFileSystem ( ) ;
336
349
350
+ NPath . FileSystem = fileSystem ;
351
+
337
352
var environment = SubstituteFactory . CreateEnvironment ( ) ;
338
353
environment . UserCachePath . Returns ( info => connectionsCachePath . ToNPath ( ) ) ;
339
354
environment . FileSystem . Returns ( fileSystem ) ;
0 commit comments