File tree 1 file changed +5
-9
lines changed
Source/Lib/Fluxor.UnitTests/DisposableCallbackTests
1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
- using System . IO ;
3
2
using Xunit ;
4
3
5
4
namespace Fluxor . UnitTests . DisposableCallbackTests ;
@@ -23,19 +22,16 @@ public void WhenCalled_ThenCallsActionPassedInConstructor()
23
22
[ Fact ]
24
23
public void WhenCalledTwice_ThenThrowsObjectDisposedExceptionWithCallerInformation ( )
25
24
{
26
- string ExpectedSubstring =
27
- @"Fluxor.UnitTests\DisposableCallbackTests\ DisposeTests.cs"" on line "
28
- . Replace ( Path . PathSeparator , '/' ) ;
25
+ var subject = new DisposableCallback (
26
+ $ " { nameof ( DisposeTests ) } . { nameof ( WhenCalledTwice_ThenThrowsObjectDisposedExceptionWithCallerInformation ) } " ,
27
+ ( ) => { } ) ;
29
28
30
- var subject = new DisposableCallback (
31
- $ "{ nameof ( DisposeTests ) } .{ nameof ( WhenCalledTwice_ThenThrowsObjectDisposedExceptionWithCallerInformation ) } ",
32
- ( ) => { } ) ;
33
29
subject . Dispose ( ) ;
34
30
var exception = Assert . Throws < ObjectDisposedException > ( ( ) => subject . Dispose ( ) ) ;
35
31
36
32
Assert . Contains (
37
- ExpectedSubstring ,
38
- exception . Message . Replace ( Path . PathSeparator , '/ ' )
33
+ @"Fluxor.UnitTests\DisposableCallbackTests\DisposeTests.cs"" on line " ,
34
+ exception . Message . Replace ( '/' , '\\ ' )
39
35
) ;
40
36
}
41
37
}
You can’t perform that action at this time.
0 commit comments