File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 3
3
4
4
#nullable disable
5
5
6
+ using System . IO ;
7
+ using System . Runtime . InteropServices ;
6
8
using Microsoft . AspNetCore . Razor . Test . Common ;
7
9
using Xunit ;
8
10
using Xunit . Abstractions ;
@@ -50,8 +52,19 @@ public void GetItem_RootedFilePath_BelongsToProject()
50
52
public void GetItem_RootedFilePath_DoesNotBelongToProject ( )
51
53
{
52
54
// Arrange
53
- var fileSystem = new RemoteRazorProjectFileSystem ( "C:/path/to" ) ;
54
- var documentFilePath = "C:/otherpath/to/file.cshtml" ;
55
+ RemoteRazorProjectFileSystem fileSystem ;
56
+ string documentFilePath ;
57
+
58
+ if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) )
59
+ {
60
+ fileSystem = new RemoteRazorProjectFileSystem ( @"C:\path\to" ) ;
61
+ documentFilePath = @"C:\otherpath\to\file.cshtml" ;
62
+ }
63
+ else
64
+ {
65
+ fileSystem = new RemoteRazorProjectFileSystem ( "/path/to" ) ;
66
+ documentFilePath = "/otherpath/to/file.cshtml" ;
67
+ }
55
68
56
69
// Act
57
70
var item = fileSystem . GetItem ( documentFilePath , fileKind : null ) ;
You can’t perform that action at this time.
0 commit comments