File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55using Common . Mod . Test . Shims ;
66using DryIoc . ImTools ;
77using JetBrains . Annotations ;
8+ using NSubstitute . Routing . Handlers ;
89using Vintagestory . API . Common ;
910
1011namespace Common . Mod . Test . Core ;
@@ -145,10 +146,10 @@ public void ReadConfigFile_MissingFile_Throws()
145146 var fileName = StringUtils . Random ( ) ;
146147
147148 // Act
148- string Action ( ) => _fileSystem . ReadConfigFile ( fileName ) ;
149+ var exception = Record . Exception ( ( ) => _fileSystem . ReadConfigFile ( fileName ) ) ;
149150
150151 // Assert
151- Assert . Throws < FileNotFoundException > ( Action ) ;
152+ Assert . IsType < FileNotFoundException > ( exception ) ;
152153 }
153154
154155 [ Fact ]
@@ -175,10 +176,10 @@ public void ReadDataFile_MissingFile_Throws()
175176 var fileName = StringUtils . Random ( ) ;
176177
177178 // Act
178- string Action ( ) => _fileSystem . ReadDataFile ( fileName ) ;
179+ var exception = Record . Exception ( ( ) => _fileSystem . ReadDataFile ( fileName ) ) ;
179180
180181 // Assert
181- Assert . Throws < FileNotFoundException > ( Action ) ;
182+ Assert . IsType < FileNotFoundException > ( exception ) ;
182183 }
183184
184185 [ Fact ]
You can’t perform that action at this time.
0 commit comments