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:
Hugh Bellamy authored and Dan Moseley committed 2017-06-23 12:33:47 -07:00
1 parent 4796c098c1
commit 7cbcd5ed85
472 files changed
+1674 -1564

No files matched your search

@@ -472,7 +472,7 @@ namespace System.Text.Tests
foreach (object[] mapping in CodePageInfo())
{
Assert.Throws<NotSupportedException>(() => Encoding.GetEncoding((int)mapping[0]));
Assert.Throws<ArgumentException>(() => Encoding.GetEncoding((string)mapping[2]));
AssertExtensions.Throws<ArgumentException>("name", () => Encoding.GetEncoding((string)mapping[2]));
}
// Currently the class EncodingInfo isn't present in corefx, so this checks none of the code pages are present.
@@ -9,6 +9,9 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Release|AnyCPU'" />
<ItemGroup>
<Compile Include="EncodingCodePages.cs" />
<Compile Include="$(CommonTestPath)\System\AssertExtensions.cs">
<Link>Common\System\AssertExtensions.cs</Link>
</Compile>
<Compile Include="$(CommonTestPath)\System\PlatformDetection.cs">
<Link>CommonTest\System\PlatformDetection.cs</Link>
</Compile>