@@ -22,15 +22,8 @@ public static void FileSystemEventArgs_ctor_NonPathPropertiesAreSetCorrectly(Wat
2222
2323 [ Theory ]
2424 [ PlatformSpecific ( TestPlatforms . Windows ) ]
25- [ InlineData ( "D:\\ " , null , "D:\\ " ) ]
26- [ InlineData ( "D:\\ " , "" , "D:\\ " ) ]
2725 [ InlineData ( "D:\\ " , "foo.txt" , "D:\\ foo.txt" ) ]
28- [ InlineData ( "E:\\ bar" , null , "E:\\ bar\\ " ) ]
29- [ InlineData ( "E:\\ bar" , "" , "E:\\ bar\\ " ) ]
3026 [ InlineData ( "E:\\ bar" , "foo.txt" , "E:\\ bar\\ foo.txt" ) ]
31- [ InlineData ( "E:\\ bar\\ " , null , "E:\\ bar\\ " ) ]
32- [ InlineData ( "E:\\ bar\\ " , "" , "E:\\ bar\\ " ) ]
33- [ InlineData ( "E:\\ bar\\ " , "foo.txt" , "E:\\ bar\\ foo.txt" ) ]
3427 public static void FileSystemEventArgs_ctor_DirectoryIsAbsolutePath_Windows ( string directory , string name , string expectedFullPath )
3528 {
3629 FileSystemEventArgs args = new FileSystemEventArgs ( WatcherChangeTypes . All , directory , name ) ;
@@ -40,16 +33,8 @@ public static void FileSystemEventArgs_ctor_DirectoryIsAbsolutePath_Windows(stri
4033
4134 [ Theory ]
4235 [ PlatformSpecific ( TestPlatforms . AnyUnix ) ]
43- [ InlineData ( "/" , null , "/" ) ]
44- [ InlineData ( "/" , "" , "/" ) ]
45- [ InlineData ( "/" , " " , "/ " ) ]
4636 [ InlineData ( "/" , "foo.txt" , "/foo.txt" ) ]
47- [ InlineData ( "/bar" , null , "/bar/" ) ]
48- [ InlineData ( "/bar" , "" , "/bar/" ) ]
4937 [ InlineData ( "/bar" , "foo.txt" , "/bar/foo.txt" ) ]
50- [ InlineData ( "/bar/" , null , "/bar/" ) ]
51- [ InlineData ( "/bar/" , "" , "/bar/" ) ]
52- [ InlineData ( "/bar/" , "foo.txt" , "/bar/foo.txt" ) ]
5338 public static void FileSystemEventArgs_ctor_DirectoryIsAbsolutePath_Unix ( string directory , string name , string expectedFullPath )
5439 {
5540 FileSystemEventArgs args = new FileSystemEventArgs ( WatcherChangeTypes . All , directory , name ) ;
@@ -59,32 +44,24 @@ public static void FileSystemEventArgs_ctor_DirectoryIsAbsolutePath_Unix(string
5944
6045 [ Theory ]
6146 [ PlatformSpecific ( TestPlatforms . Windows ) ]
62- [ InlineData ( "" , "" ) ]
63- [ InlineData ( "" , "foo.txt" ) ]
6447 [ InlineData ( "bar" , "foo.txt" ) ]
6548 [ InlineData ( "bar\\ baz" , "foo.txt" ) ]
6649 public static void FileSystemEventArgs_ctor_DirectoryIsRelativePath_Windows ( string directory , string name )
6750 {
6851 FileSystemEventArgs args = new FileSystemEventArgs ( WatcherChangeTypes . All , directory , name ) ;
6952
70- var expectedDirectory = PathInternal . EnsureTrailingSeparator ( Path . Combine ( Directory . GetCurrentDirectory ( ) , directory ) ) ;
71- Assert . Equal ( Path . Combine ( expectedDirectory , name ) , args . FullPath ) ;
53+ Assert . Equal ( Path . Combine ( Directory . GetCurrentDirectory ( ) , directory , name ) , args . FullPath ) ;
7254 }
7355
7456 [ Theory ]
7557 [ PlatformSpecific ( TestPlatforms . AnyUnix ) ]
76- [ InlineData ( "" , "" ) ]
77- [ InlineData ( "" , "foo.txt" ) ]
78- [ InlineData ( " " , " " ) ]
79- [ InlineData ( " " , "foo.txt" ) ]
8058 [ InlineData ( "bar" , "foo.txt" ) ]
8159 [ InlineData ( "bar/baz" , "foo.txt" ) ]
8260 public static void FileSystemEventArgs_ctor_DirectoryIsRelativePath_Unix ( string directory , string name )
8361 {
8462 FileSystemEventArgs args = new FileSystemEventArgs ( WatcherChangeTypes . All , directory , name ) ;
8563
86- var expectedDirectory = PathInternal . EnsureTrailingSeparator ( Path . Combine ( Directory . GetCurrentDirectory ( ) , directory ) ) ;
87- Assert . Equal ( Path . Combine ( expectedDirectory , name ) , args . FullPath ) ;
64+ Assert . Equal ( Path . Combine ( Directory . GetCurrentDirectory ( ) , directory , name ) , args . FullPath ) ;
8865 }
8966
9067 [ Theory ]
@@ -103,6 +80,7 @@ public static void FileSystemEventArgs_ctor_When_EmptyFileName_Then_FullPathRetu
10380 public static void FileSystemEventArgs_ctor_Invalid ( )
10481 {
10582 Assert . Throws < ArgumentNullException > ( ( ) => new FileSystemEventArgs ( ( WatcherChangeTypes ) 0 , null , "foo.txt" ) ) ;
83+ Assert . Throws < ArgumentException > ( ( ) => new FileSystemEventArgs ( ( WatcherChangeTypes ) 0 , "" , "foo.txt" ) ) ;
10684 }
10785 }
10886}
0 commit comments