mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-23 03:39:35 -10:00
Convert most Assert.Throws<ArgumentException> without param name to AssertExtensions (dotnet/corefx#21455)
* Registry * Collections * ComponentModel * Configuration * Data * Globalization * Drawing * Diagnostics * IO * Linq * Add System.Net param names in tests * Move ArgumentExceptions in System.Private.Xml to AssertExtensions * Add System.Reflection.* ArgumentException param names * Add param names for System.Runtime* ArgumentExceptions * Add ArgumentException param names to System.Security.* * Add ArgumentException param names to System.Text.* * Add param names to ArgumentExceptions in misc projects * Add System.Threading.* ArgumentException param names * Fix missing files * Fixes for unix and netfx * Fix more failures and revert a IdnaConformance tests to avoid merge conflicts with dotnet/corefx#21463 Commit migrated from https://github.com/dotnet/corefx/commit/59915687bb261efeae70565d0ca8990ac45ceb9c
This commit is contained in:
1 parent
4796c098c1
commit
7cbcd5ed85
472 files changed
+1674
-1564
No files matched your search
@@ -528,13 +528,13 @@ namespace System.IO.Tests
|
||||
|
||||
// FSW starts with String.Empty and will ignore setting this if it is already set,
|
||||
// but if you set it after some other valid string has been set it will throw.
|
||||
Assert.Throws<ArgumentException>(() => watcher.Path = String.Empty);
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => watcher.Path = String.Empty);
|
||||
// Non-existent path
|
||||
Assert.Throws<ArgumentException>(() => watcher.Path = GetTestFilePath());
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => watcher.Path = GetTestFilePath());
|
||||
// Web path
|
||||
Assert.Throws<ArgumentException>(() => watcher.Path = "http://localhost");
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => watcher.Path = "http://localhost");
|
||||
// File protocol
|
||||
Assert.Throws<ArgumentException>(() => watcher.Path = "file:///" + currentDir.Replace(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar));
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => watcher.Path = "file:///" + currentDir.Replace(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in new issue
Block a user