Enable xunit1024 (#34512)
authorAlex Villarreal <alex@alexvy86.com>
Wed, 8 Apr 2020 10:58:54 +0000 (05:58 -0500)
committerGitHub <noreply@github.com>
Wed, 8 Apr 2020 10:58:54 +0000 (06:58 -0400)
* Enable analyzer rule xUnit1024

* Remove redundant test in System.Text.Json

The very next method is a Theory with inline data that tests this
exact scenario.

* Rename test methods in System.Text.Json

* Rename test methods in System.ComponentModel.Annotations

* Private methods -> local functions in System.Text.Json

* Rename test methods in System.Collections.Immutable

For RemoveNonExistingTest, just moved the logic from the single-use
helper into the method with the Fact attribute.

* Rename test methods in System.Globalization

* Rename test methods in System.Runtime.Extensions

In Math.cs, removed Round_Decimal_Digits Fact which manually tested
cases included in the MemberData of a Theory with the same name.

* Rename test methods in System.Private.Uri

* Rename test methods in System.Runtime.WindowsRuntime.UI.Xaml

* Rename test methods in System.Security.Cryptography.X509Certificates

* Rename test methods in System.Reflection

* Remove redundant test in System.IO.FileSystem.Watcher

Theory EndInit_ResumesPausedEnableRaisingEvents alredy tests
the same scenario as the removed Fact of the same name.

* Rename test methods in System.IO.FileSystem.Watcher

* Rename test methods in System.Composition.Runtime

* Rename test methods in System.Drawing.Primitives

* Rename test methods in System.Reflection.Emit

* Rename test methods in System.Text.RegularExpressions

* Private methods -> local functions in System.Threading.Tasks.Parallel

* Rename test methods in System.Threading.Tasks.Parallel

* Rename test methods in System.Threading.Tasks

* Simplify tests in System.Threading

* Rename test methods in System.Threading

* Rename test methods in Microsoft.VisualBasic.Core

* Rename test methods in System.DirectoryServices.AccountManagement

* Private methods -> local functions in System.Text.Encoding

* Rename test methods in System.Text.Encoding

* Rename test methods in System.Security.Cryptography.Primitives

* Rename test methods in System.Runtime.Numeric

* Rename test methods in System.CodeDom.Tests

* Rename test methods in System.Reflection.Emit.ILGeneration

* Rename test methods in System.Composition.AttributedModel

* Rename test methods in System.Data.DataSetExtensions

* Rename test methods in System.Runtime

* Rename test methods in System.Runtime.InteropServices

* Remove redundant test in System.ServiceModel.Syndication

* Rename test methods in System.ServiceModel.Syndication

* Rename test methods in System.Data.Common

* Rename test methods in System.Security.Cryptography.Xml

* Private methods -> local functions in System.Security.Cryptography.Xml

* Simplify tests in System.Security.Cryptography.ProtectedData

* Replace private methods with local functions...

In System.Security.Cryptography.Algorithms

* Rename test methods in System.Security.Cryptography.Algorithms

* Simplify tests code in System.Collections.Concurrent

* Rename test methods in System.Drawing.Common

* Rename test methods in System.Data.OleDb

* Rename test methods in System.ComponentModel.TypeConverter

* Rename test methods in System.Web.HttpUtility

* Rename test methods in System.Linq

* Private method -> local function in System.Linq

* Rename test methods in System.Memory

* Rename test methods in System.IO.IsolatedStorage

* Rename test methods in System.DirectoryServices.Protocols

* Rename test methods in System.Globalization.Extensions

* Private methods -> local functions in System.Globalization.Extensions

* Rename test methods in System.IO.Compression

* Rename test methods in System.Security.Cryptography.Encoding

* Rename test methods in Microsoft.Win32.Registry

* Rename test methods in System.IO.UnmanagedMemoryStream

* Rename test methods in System.Collections

* Rename test methods in System.Collections.Specialized

* Rename test methods in System.Private.Xml

* Rename test methods in System.IO.FileSystem

* Rename test methods in System.Diagnostics.StackTrace

* Rename test methods in System.Diagnostics

* Improve some test method renames

* Minor nit fixing

* More improvements to test method names

198 files changed:
eng/CodeAnalysis.ruleset
src/libraries/Common/tests/System/IO/Compression/CompressionStreamUnitTestBase.cs
src/libraries/Common/tests/Tests/System/StringTests.cs
src/libraries/Microsoft.VisualBasic.Core/tests/ConversionTests.cs
src/libraries/Microsoft.VisualBasic.Core/tests/DateAndTimeTests.cs
src/libraries/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/ComClassAttributeTests.cs
src/libraries/Microsoft.VisualBasic.Core/tests/StringTypeTests.cs
src/libraries/Microsoft.VisualBasic.Core/tests/StringsTests.cs
src/libraries/Microsoft.Win32.Registry/tests/RegistryKey/RegistryKey_DeleteSubKeyTree_str.cs
src/libraries/System.CodeDom/tests/System/CodeDom/CodeMethodInvokeExpressionTests.cs
src/libraries/System.CodeDom/tests/System/CodeDom/CodeMethodReferenceExpressionTests.cs
src/libraries/System.CodeDom/tests/System/CodeDom/CodeObjectCreateExpressionTests.cs
src/libraries/System.Collections.Concurrent/tests/ConcurrentDictionary/ConcurrentDictionaryTests.cs
src/libraries/System.Collections.Concurrent/tests/IntRangePartitionerTests.cs
src/libraries/System.Collections.Concurrent/tests/LongRangePartitionerTests.cs
src/libraries/System.Collections.Concurrent/tests/RangePartitionerNegativeTests.cs
src/libraries/System.Collections.Immutable/tests/ImmutableArrayTest.cs
src/libraries/System.Collections.Immutable/tests/ImmutableSetTest.cs
src/libraries/System.Collections.Specialized/tests/NameObjectCollectionBase/NameObjectCollectionBase.KeysTests.cs
src/libraries/System.Collections/tests/Generic/Comparers/EqualityComparer.Tests.cs
src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/FilterUIHintAttributeTests.cs
src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/UIHintAttributeTests.cs
src/libraries/System.ComponentModel.TypeConverter/tests/Design/DesignerTransactionTests.cs
src/libraries/System.ComponentModel.TypeConverter/tests/Design/Serialization/DesignerSerializerAttributeTests.cs
src/libraries/System.ComponentModel.TypeConverter/tests/Design/Serialization/RootDesignerSerializerAttributeTests.cs
src/libraries/System.ComponentModel.TypeConverter/tests/EnumConverterTest.cs
src/libraries/System.ComponentModel.TypeConverter/tests/MultilineStringConverterTests.cs
src/libraries/System.ComponentModel.TypeConverter/tests/NullableConverterTests.cs
src/libraries/System.ComponentModel.TypeConverter/tests/TypeDescriptionProviderTests.cs
src/libraries/System.ComponentModel.TypeConverter/tests/TypeListConverterTests.cs
src/libraries/System.ComponentModel.TypeConverter/tests/UriTypeConverterTests.cs
src/libraries/System.ComponentModel.TypeConverter/tests/VersionConverterTests.cs
src/libraries/System.Composition.AttributedModel/tests/ExportAttributeTests.cs
src/libraries/System.Composition.Runtime/tests/System/Composition/Hosting/Core/CompositionContractTests.cs
src/libraries/System.Data.Common/tests/System/Data/DataColumnCollectionTest.cs
src/libraries/System.Data.Common/tests/System/Data/DataRelationCollectionTest.cs
src/libraries/System.Data.Common/tests/System/Data/DataRelationTest2.cs
src/libraries/System.Data.Common/tests/System/Data/DataRowCollectionTest.cs
src/libraries/System.Data.Common/tests/System/Data/DataRowTest2.cs
src/libraries/System.Data.Common/tests/System/Data/DataRowViewTest2.cs
src/libraries/System.Data.Common/tests/System/Data/DataTableCollectionTest.cs
src/libraries/System.Data.Common/tests/System/Data/DataTableTest.cs
src/libraries/System.Data.Common/tests/System/Data/DataTableTest2.cs
src/libraries/System.Data.Common/tests/System/Data/ForeignKeyConstraintTest2.cs
src/libraries/System.Data.Common/tests/System/Data/SqlTypes/SqlBooleanTest.cs
src/libraries/System.Data.Common/tests/System/Data/SqlTypes/SqlInt32Test.cs
src/libraries/System.Data.Common/tests/System/Data/UniqueConstraintTest2.cs
src/libraries/System.Data.DataSetExtensions/tests/Mono/DataRowComparerTest.cs
src/libraries/System.Data.OleDb/tests/OleDbCommandBuilderTests.cs
src/libraries/System.Diagnostics.Process/tests/ProcessTests.Unix.cs
src/libraries/System.Diagnostics.StackTrace/tests/StackTraceTests.cs
src/libraries/System.DirectoryServices.AccountManagement/tests/PrincipalContextTests.cs
src/libraries/System.DirectoryServices.Protocols/tests/LdapConnectionTests.cs
src/libraries/System.DirectoryServices.Protocols/tests/QuotaControlTests.cs
src/libraries/System.DirectoryServices.Protocols/tests/SortKeyTests.cs
src/libraries/System.Drawing.Common/tests/IconTests.cs
src/libraries/System.Drawing.Common/tests/Imaging/MetafileTests.cs
src/libraries/System.Drawing.Common/tests/mono/System.Drawing/GraphicsTests.cs
src/libraries/System.Drawing.Primitives/tests/ColorTests.cs
src/libraries/System.Globalization.Extensions/tests/GetStringComparerTests.cs
src/libraries/System.Globalization.Extensions/tests/IdnMapping/IdnMappingGetAsciiTests.cs
src/libraries/System.Globalization.Extensions/tests/IdnMapping/IdnMappingGetUnicodeTests.cs
src/libraries/System.Globalization.Extensions/tests/IdnMapping/IdnMappingIdnaConformanceTests.cs
src/libraries/System.Globalization/tests/CompareInfo/CompareInfoTests.Compare.cs
src/libraries/System.Globalization/tests/CompareInfo/CompareInfoTests.cs
src/libraries/System.Globalization/tests/CultureInfo/CultureInfoEquals.cs
src/libraries/System.Globalization/tests/CultureInfo/CultureInfoGetHashCode.cs
src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoAbbreviatedMonthGenitiveNames.cs
src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoAbbreviatedMonthNames.cs
src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoMonthGenitiveNames.cs
src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoMonthNames.cs
src/libraries/System.Globalization/tests/NumberFormatInfo/NumberFormatInfoCurrencyNegativePattern.cs
src/libraries/System.Globalization/tests/System/Globalization/CharUnicodeInfoTests.cs
src/libraries/System.Globalization/tests/System/Globalization/RegionInfoTests.cs
src/libraries/System.Globalization/tests/System/Globalization/StringInfoTests.cs
src/libraries/System.Globalization/tests/System/Globalization/TextInfoTests.cs
src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.File.Move.cs
src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.cs
src/libraries/System.IO.FileSystem/tests/File/Copy.cs
src/libraries/System.IO.FileSystem/tests/FileStream/WriteAsync.cs
src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/DirectoryExistsTests.cs
src/libraries/System.IO.UnmanagedMemoryStream/tests/UmsReadWrite.cs
src/libraries/System.Linq/tests/AnyTests.cs
src/libraries/System.Linq/tests/ConcatTests.cs
src/libraries/System.Linq/tests/FirstOrDefaultTests.cs
src/libraries/System.Linq/tests/FirstTests.cs
src/libraries/System.Memory/tests/ArrayBufferWriter/ArrayBufferWriterTests.T.cs
src/libraries/System.Memory/tests/MemoryMarshal/AsMemory.cs
src/libraries/System.Private.Uri/tests/FunctionalTests/EscapeUnescapeIriTests.cs
src/libraries/System.Private.Uri/tests/FunctionalTests/UriBuilderTests.cs
src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.Internal.cs
src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.RuntimeOnly.cs
src/libraries/System.Reflection.Emit.ILGeneration/tests/SignatureHelper/SignatureHelperEquals.cs
src/libraries/System.Reflection.Emit/tests/AssemblyBuilderTests.cs
src/libraries/System.Reflection.Emit/tests/MethodBuilder/MethodBuilderEquals.cs
src/libraries/System.Reflection.Emit/tests/MethodBuilder/MethodBuilderGetHashCode.cs
src/libraries/System.Reflection.Emit/tests/TypeBuilder/TypeBuilderToString.cs
src/libraries/System.Reflection/tests/AssemblyNameTests.cs
src/libraries/System.Reflection/tests/AssemblyTests.cs
src/libraries/System.Reflection/tests/ConstructorInfoTests.cs
src/libraries/System.Reflection/tests/EventInfoTests.cs
src/libraries/System.Reflection/tests/FieldInfoTests.cs
src/libraries/System.Reflection/tests/GetTypeTests.cs
src/libraries/System.Reflection/tests/MethodInfoTests.cs
src/libraries/System.Reflection/tests/ModuleTests.cs
src/libraries/System.Reflection/tests/PropertyInfoTests.cs
src/libraries/System.Runtime.Extensions/tests/System/Environment.GetEnvironmentVariable.cs
src/libraries/System.Runtime.Extensions/tests/System/IO/PathTestsBase.cs
src/libraries/System.Runtime.Extensions/tests/System/IO/PathTests_Unix.cs
src/libraries/System.Runtime.Extensions/tests/System/IO/PathTests_Windows.cs
src/libraries/System.Runtime.Extensions/tests/System/Math.cs
src/libraries/System.Runtime.Extensions/tests/System/MathF.cs
src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetObjectForNativeVariantTests.cs
src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/SafeBufferTests.cs
src/libraries/System.Runtime.Numerics/tests/BigInteger/BigIntegerToStringTests.cs
src/libraries/System.Runtime.Numerics/tests/BigInteger/ToByteArray.cs
src/libraries/System.Runtime.Numerics/tests/ComplexTests.cs
src/libraries/System.Runtime.WindowsRuntime.UI.Xaml/tests/Windows/UI/Xaml/DurationTests.cs
src/libraries/System.Runtime.WindowsRuntime.UI.Xaml/tests/Windows/UI/Xaml/ThicknessTests.cs
src/libraries/System.Runtime/tests/System/ArraySegmentTests.cs
src/libraries/System.Runtime/tests/System/ArrayTests.cs
src/libraries/System.Runtime/tests/System/AttributeTests.cs
src/libraries/System.Runtime/tests/System/ByteTests.cs
src/libraries/System.Runtime/tests/System/CharTests.cs
src/libraries/System.Runtime/tests/System/ComponentModel/DefaultValueAttributeTests.cs
src/libraries/System.Runtime/tests/System/ComponentModel/EditorBrowsableAttributeTests.cs
src/libraries/System.Runtime/tests/System/DateTimeOffsetTests.cs
src/libraries/System.Runtime/tests/System/DecimalTests.cs
src/libraries/System.Runtime/tests/System/DoubleTests.cs
src/libraries/System.Runtime/tests/System/EnumTests.cs
src/libraries/System.Runtime/tests/System/GuidTests.cs
src/libraries/System.Runtime/tests/System/Int16Tests.cs
src/libraries/System.Runtime/tests/System/Int32Tests.cs
src/libraries/System.Runtime/tests/System/Int64Tests.cs
src/libraries/System.Runtime/tests/System/IntPtrTests.cs
src/libraries/System.Runtime/tests/System/MulticastDelegateTests.cs
src/libraries/System.Runtime/tests/System/ObjectTests.cs
src/libraries/System.Runtime/tests/System/SByteTests.cs
src/libraries/System.Runtime/tests/System/SingleTests.cs
src/libraries/System.Runtime/tests/System/StringTests.cs
src/libraries/System.Runtime/tests/System/Text/RuneTests.cs
src/libraries/System.Runtime/tests/System/Text/StringBuilderTests.cs
src/libraries/System.Runtime/tests/System/TimeSpanTests.cs
src/libraries/System.Runtime/tests/System/TimeZoneInfoTests.cs
src/libraries/System.Runtime/tests/System/UInt16Tests.cs
src/libraries/System.Runtime/tests/System/UInt32Tests.cs
src/libraries/System.Runtime/tests/System/UInt64Tests.cs
src/libraries/System.Runtime/tests/System/UIntPtrTests.cs
src/libraries/System.Runtime/tests/System/Uri.MethodsTests.cs
src/libraries/System.Security.Cryptography.Algorithms/tests/DSASignatureFormatterTests.cs
src/libraries/System.Security.Cryptography.Algorithms/tests/RSASignatureFormatterTests.cs
src/libraries/System.Security.Cryptography.Algorithms/tests/RandomNumberGeneratorTests.cs
src/libraries/System.Security.Cryptography.Algorithms/tests/RijndaelTests.cs
src/libraries/System.Security.Cryptography.Encoding/tests/Asn1/Reader/ReadBMPString.cs
src/libraries/System.Security.Cryptography.Encoding/tests/Asn1/Reader/ReadBitString.cs
src/libraries/System.Security.Cryptography.Encoding/tests/Asn1/Reader/ReadIA5String.cs
src/libraries/System.Security.Cryptography.Encoding/tests/Asn1/Reader/ReadOctetString.cs
src/libraries/System.Security.Cryptography.Encoding/tests/Asn1/Reader/ReadUTF8String.cs
src/libraries/System.Security.Cryptography.Encoding/tests/Asn1/Writer/WriteBMPString.cs
src/libraries/System.Security.Cryptography.Encoding/tests/Asn1/Writer/WriteCharacterString.cs
src/libraries/System.Security.Cryptography.Encoding/tests/Asn1/Writer/WriteIA5String.cs
src/libraries/System.Security.Cryptography.Encoding/tests/Asn1/Writer/WriteUtf8String.cs
src/libraries/System.Security.Cryptography.Primitives/tests/SimpleHashAlgorithmTest.cs
src/libraries/System.Security.Cryptography.ProtectedData/tests/ProtectedDataTests.cs
src/libraries/System.Security.Cryptography.X509Certificates/tests/LoadFromFileTests.cs
src/libraries/System.Security.Cryptography.Xml/tests/Samples/EncryptingDecryptingAsymmetric.cs
src/libraries/System.Security.Cryptography.Xml/tests/SignedXmlTest.cs
src/libraries/System.ServiceModel.Syndication/tests/System/ServiceModel/Syndication/SyndicationFeedTests.cs
src/libraries/System.ServiceModel.Syndication/tests/System/ServiceModel/Syndication/SyndicationItemTests.cs
src/libraries/System.ServiceModel.Syndication/tests/System/ServiceModel/Syndication/WorkspaceTests.cs
src/libraries/System.Text.Encoding/tests/ASCIIEncoding/ASCIIEncodingTests.cs
src/libraries/System.Text.Encoding/tests/Encoder/EncoderGetBytes2.cs
src/libraries/System.Text.Encoding/tests/Encoding/Encoding.cs
src/libraries/System.Text.Encoding/tests/Encoding/EncodingConvertTests.cs
src/libraries/System.Text.Encoding/tests/Fallback/DecoderExceptionFallbackTests.cs
src/libraries/System.Text.Encoding/tests/Fallback/DecoderReplacementFallbackTests.cs
src/libraries/System.Text.Encoding/tests/Fallback/EncoderExceptionFallbackTests.cs
src/libraries/System.Text.Encoding/tests/Fallback/EncoderReplacementFallbackTests.cs
src/libraries/System.Text.Encoding/tests/Latin1Encoding/Latin1EncodingTests.cs
src/libraries/System.Text.Encoding/tests/UTF32Encoding/UTF32EncodingTests.cs
src/libraries/System.Text.Encoding/tests/UTF7Encoding/UTF7EncodingEncode.cs
src/libraries/System.Text.Encoding/tests/UTF7Encoding/UTF7EncodingTests.cs
src/libraries/System.Text.Encoding/tests/UTF8Encoding/UTF8EncodingTests.cs
src/libraries/System.Text.Encoding/tests/UnicodeEncoding/UnicodeEncodingTests.cs
src/libraries/System.Text.Json/tests/JsonEncodedTextTests.cs
src/libraries/System.Text.Json/tests/Serialization/EnumTests.cs
src/libraries/System.Text.Json/tests/Serialization/Value.ReadTests.GenericCollections.cs
src/libraries/System.Text.Json/tests/Utf8JsonReaderTests.TryGet.cs
src/libraries/System.Text.Json/tests/Utf8JsonWriterTests.cs
src/libraries/System.Text.RegularExpressions/tests/Regex.Match.Tests.cs
src/libraries/System.Text.RegularExpressions/tests/Regex.Replace.Tests.cs
src/libraries/System.Threading.Tasks.Parallel/tests/RangePartitioner1Chunk.cs
src/libraries/System.Threading.Tasks.Parallel/tests/RangePartitionerTests.cs
src/libraries/System.Threading.Tasks/tests/Task/TaskContinueWith_ContFuncAndActionWithArgsTests.cs
src/libraries/System.Threading/tests/CountdownEventTests.cs
src/libraries/System.Threading/tests/ManualResetEventSlimTests.cs
src/libraries/System.Threading/tests/SemaphoreSlimTests.cs
src/libraries/System.Web.HttpUtility/tests/HttpUtility/HttpUtilityTest.cs

index 0fccc15fc7494afc8c1e51856f97c1c324f3465c..cf97025667a2bda016a4a6851b07edb0059a9e36 100644 (file)
     <Rule Id="SA1649" Action="None" /> <!-- File name should match first type name -->
   </Rules>
   <Rules AnalyzerId="xunit.analyzers" RuleNamespace="xunit.analyzers">
-    <Rule Id="xUnit1024" Action="None" /> <!-- Test methods cannot have overloads -->
     <Rule Id="xUnit2013" Action="None" /> <!-- Do not use equality check to check for collection size. -->
     <Rule Id="xUnit2017" Action="None" /> <!-- Do not use Contains() to check if a value exists in a collection -->
   </Rules>
index 1469c64401aa06571fff26cca0d5d7f35759f10c..053d8d393608716dc0cdd71c38b430f96cac7b2b 100644 (file)
@@ -664,18 +664,18 @@ namespace System.IO.Compression
         [Fact]
         public async Task CompressDecompress_RoundTrip()
         {
-            await CompressDecompress_RoundTrip(ReadWriteMode.SyncArray, chunkSize: 1, totalSize: 10, level: CompressionLevel.Fastest);
-            await CompressDecompress_RoundTrip(ReadWriteMode.SyncSpan, chunkSize: 1, totalSize: 10, level: CompressionLevel.Fastest);
-            await CompressDecompress_RoundTrip(ReadWriteMode.AsyncArray, chunkSize: 1, totalSize: 10, level: CompressionLevel.Fastest);
-            await CompressDecompress_RoundTrip(ReadWriteMode.AsyncMemory, chunkSize: 1, totalSize: 10, level: CompressionLevel.Fastest);
-            await CompressDecompress_RoundTrip(ReadWriteMode.AsyncBeginEnd, chunkSize: 1, totalSize: 10, level: CompressionLevel.Fastest);
-            await CompressDecompress_RoundTrip(ReadWriteMode.AsyncArray, chunkSize: 1024, totalSize: 8192, level: CompressionLevel.Optimal);
+            await CompressDecompress_RoundTrip_OuterLoop(ReadWriteMode.SyncArray, chunkSize: 1, totalSize: 10, level: CompressionLevel.Fastest);
+            await CompressDecompress_RoundTrip_OuterLoop(ReadWriteMode.SyncSpan, chunkSize: 1, totalSize: 10, level: CompressionLevel.Fastest);
+            await CompressDecompress_RoundTrip_OuterLoop(ReadWriteMode.AsyncArray, chunkSize: 1, totalSize: 10, level: CompressionLevel.Fastest);
+            await CompressDecompress_RoundTrip_OuterLoop(ReadWriteMode.AsyncMemory, chunkSize: 1, totalSize: 10, level: CompressionLevel.Fastest);
+            await CompressDecompress_RoundTrip_OuterLoop(ReadWriteMode.AsyncBeginEnd, chunkSize: 1, totalSize: 10, level: CompressionLevel.Fastest);
+            await CompressDecompress_RoundTrip_OuterLoop(ReadWriteMode.AsyncArray, chunkSize: 1024, totalSize: 8192, level: CompressionLevel.Optimal);
         }
 
         [OuterLoop]
         [Theory]
         [MemberData(nameof(RoundtripCompressDecompressOuterData))]
-        public async Task CompressDecompress_RoundTrip(ReadWriteMode readWriteMode, int chunkSize, int totalSize, CompressionLevel level)
+        public async Task CompressDecompress_RoundTrip_OuterLoop(ReadWriteMode readWriteMode, int chunkSize, int totalSize, CompressionLevel level)
         {
             byte[] data = new byte[totalSize];
             new Random(42).NextBytes(data);
@@ -715,14 +715,14 @@ namespace System.IO.Compression
         {
             if (FlushNoOps)
                 return;
-            await Flush_RoundTrip(ReadWriteMode.SyncArray, chunkSize: 1, totalSize: 10, level: CompressionLevel.Fastest);
-            await Flush_RoundTrip(ReadWriteMode.AsyncArray, chunkSize: 1024, totalSize: 8192, level: CompressionLevel.Optimal);
+            await Flush_RoundTrip_OuterLoop(ReadWriteMode.SyncArray, chunkSize: 1, totalSize: 10, level: CompressionLevel.Fastest);
+            await Flush_RoundTrip_OuterLoop(ReadWriteMode.AsyncArray, chunkSize: 1024, totalSize: 8192, level: CompressionLevel.Optimal);
         }
 
         [OuterLoop]
         [Theory]
         [MemberData(nameof(RoundtripCompressDecompressOuterData))]
-        public async Task Flush_RoundTrip(ReadWriteMode readWriteMode, int chunkSize, int totalSize, CompressionLevel level)
+        public async Task Flush_RoundTrip_OuterLoop(ReadWriteMode readWriteMode, int chunkSize, int totalSize, CompressionLevel level)
         {
             if (FlushNoOps)
                 return;
@@ -777,14 +777,14 @@ namespace System.IO.Compression
         {
             if (FlushNoOps)
                 return;
-            await Flush_Consecutive(ReadWriteMode.SyncArray, chunkSize: 1, totalSize: 10, level: CompressionLevel.Fastest);
-            await Flush_Consecutive(ReadWriteMode.AsyncArray, chunkSize: 1024, totalSize: 8192, level: CompressionLevel.Optimal);
+            await Flush_Consecutive_OuterLoop(ReadWriteMode.SyncArray, chunkSize: 1, totalSize: 10, level: CompressionLevel.Fastest);
+            await Flush_Consecutive_OuterLoop(ReadWriteMode.AsyncArray, chunkSize: 1024, totalSize: 8192, level: CompressionLevel.Optimal);
         }
 
         [OuterLoop]
         [Theory]
         [MemberData(nameof(RoundtripCompressDecompressOuterData))]
-        public async Task Flush_Consecutive(ReadWriteMode readWriteMode, int chunkSize, int totalSize, CompressionLevel level)
+        public async Task Flush_Consecutive_OuterLoop(ReadWriteMode readWriteMode, int chunkSize, int totalSize, CompressionLevel level)
         {
             if (FlushNoOps)
                 return;
@@ -851,14 +851,14 @@ namespace System.IO.Compression
         {
             if (FlushNoOps)
                 return;
-            await Flush_BeforeFirstWrites(ReadWriteMode.SyncArray, chunkSize: 1, totalSize: 10, level: CompressionLevel.Fastest);
-            await Flush_BeforeFirstWrites(ReadWriteMode.AsyncArray, chunkSize: 1024, totalSize: 8192, level: CompressionLevel.Optimal);
+            await Flush_BeforeFirstWrites_OuterLoop(ReadWriteMode.SyncArray, chunkSize: 1, totalSize: 10, level: CompressionLevel.Fastest);
+            await Flush_BeforeFirstWrites_OuterLoop(ReadWriteMode.AsyncArray, chunkSize: 1024, totalSize: 8192, level: CompressionLevel.Optimal);
         }
 
         [OuterLoop]
         [Theory]
         [MemberData(nameof(RoundtripCompressDecompressOuterData))]
-        public async Task Flush_BeforeFirstWrites(ReadWriteMode readWriteMode, int chunkSize, int totalSize, CompressionLevel level)
+        public async Task Flush_BeforeFirstWrites_OuterLoop(ReadWriteMode readWriteMode, int chunkSize, int totalSize, CompressionLevel level)
         {
             if (FlushNoOps)
                 return;
@@ -1168,7 +1168,7 @@ namespace System.IO.Compression
         [Theory]
         [InlineData(CompressionMode.Compress)]
         [InlineData(CompressionMode.Decompress)]
-        public void BaseStream(CompressionMode mode)
+        public void BaseStreamTest(CompressionMode mode)
         {
             using (var baseStream = new MemoryStream())
             using (var compressor = CreateStream(baseStream, mode))
index ba1757f67c12742948938a2b717771c851886c90..c32350dbdd3a3cf72a537233356f60b75127ea41 100644 (file)
@@ -1119,7 +1119,7 @@ namespace System.Tests
         [InlineData("", "", true)]
         [InlineData("", "hello", false)]
         [InlineData("Hello", "", true)]
-        public static void Contains(string s, string value, bool expected)
+        public static void Contains_String(string s, string value, bool expected)
         {
             Assert.Equal(expected, s.Contains(value));
             Assert.Equal(expected, s.AsSpan().Contains(value.AsSpan(), StringComparison.Ordinal));
@@ -1666,7 +1666,7 @@ namespace System.Tests
         [InlineData("Hello", "llo" + SoftHyphen, StringComparison.OrdinalIgnoreCase, false)]
         [InlineData("", "", StringComparison.OrdinalIgnoreCase, true)]
         [InlineData("", "a", StringComparison.OrdinalIgnoreCase, false)]
-        public static void EndsWith(string s, string value, StringComparison comparisonType, bool expected)
+        public static void EndsWith_StringComparison(string s, string value, StringComparison comparisonType, bool expected)
         {
             if (comparisonType == StringComparison.CurrentCulture)
             {
@@ -2482,7 +2482,7 @@ namespace System.Tests
         [InlineData("", "", StringComparison.OrdinalIgnoreCase, true)]
         [InlineData("123", 123, StringComparison.OrdinalIgnoreCase, false)] // Not a string
         [InlineData("\0AAAAAAAAA", "\0BBBBBBBBBBBB", StringComparison.OrdinalIgnoreCase, false)]
-        public static void Equals(string s1, object obj, StringComparison comparisonType, bool expected)
+        public static void EqualsTest(string s1, object obj, StringComparison comparisonType, bool expected)
         {
             string s2 = obj as string;
             if (s1 != null)
@@ -4516,7 +4516,7 @@ namespace System.Tests
                     "Mauris nulla sapien, convallis et quam quis, accumsan sodales mi. Praesent dapibus urna fermentum, sollicitudin posuere.",
                     'e', 'E',
                     "LorEm ipsum dolor sit amEt, consEctEtur adipiscing Elit. Proin maximus convallis luctus. Curabitur porttitor mi blandit tEllus maximus varius. " +
-                    "Mauris nulla sapiEn, convallis Et quam quis, accumsan sodalEs mi. PraEsEnt dapibus urna fErmEntum, sollicitudin posuErE.")] 
+                    "Mauris nulla sapiEn, convallis Et quam quis, accumsan sodalEs mi. PraEsEnt dapibus urna fErmEntum, sollicitudin posuErE.")]
         public static void Replace_Char_Char(string s, char oldChar, char newChar, string expected)
         {
             Assert.Equal(expected, s.Replace(oldChar, newChar));
@@ -4637,7 +4637,7 @@ namespace System.Tests
         [InlineData("Hello", SoftHyphen + "Hel", StringComparison.OrdinalIgnoreCase, false)]
         [InlineData("", "", StringComparison.OrdinalIgnoreCase, true)]
         [InlineData("", "hello", StringComparison.OrdinalIgnoreCase, false)]
-        public static void StartsWith(string s, string value, StringComparison comparisonType, bool expected)
+        public static void StartsWith_StringComparison(string s, string value, StringComparison comparisonType, bool expected)
         {
             if (comparisonType == StringComparison.CurrentCulture)
             {
@@ -5016,7 +5016,7 @@ namespace System.Tests
         [InlineData("hElLo", "hello")]
         [InlineData("HeLlO", "hello")]
         [InlineData("", "")]
-        public static void ToLower(string s, string expected)
+        public static void ToLower_String(string s, string expected)
         {
             Assert.Equal(expected, s.ToLower());
 
@@ -5123,7 +5123,7 @@ namespace System.Tests
             Assert.Equal(expected, s1.ToLower(CultureInfo.CurrentCulture).ToArray());
             Assert.Equal(expected, s1.ToLowerInvariant().ToArray());
             {
-                AssertExtensions.AssertThrows<InvalidOperationException, char>(a, a => 
+                AssertExtensions.AssertThrows<InvalidOperationException, char>(a, a =>
                 {
                     ReadOnlySpan<char> source = a;
                     Span<char> destination = a;
@@ -5156,7 +5156,7 @@ namespace System.Tests
                 var source = new ReadOnlySpan<char>(a, 1, 3);
 
                 AssertExtensions.AssertThrows<InvalidOperationException,char>(source, source =>
-                { 
+                {
                     var destination = new Span<char>(a, 3, 3);
                     source.ToLower(destination, CultureInfo.CurrentCulture);
                 });
@@ -5220,7 +5220,7 @@ namespace System.Tests
         }
 
         [Fact]
-        public static void ToLower()
+        public static void ToLower_CharArray()
         {
             var expectedSource = new char[3] { 'a', 'B', 'c' };
             var expectedDestination = new char[3] { 'a', 'b', 'c' };
@@ -5432,7 +5432,7 @@ namespace System.Tests
         }
 
         [Fact]
-        public static void ToUpper()
+        public static void ToUpper_CharArray()
         {
             var expectedSource = new char[3] { 'a', 'B', 'c' };
             var expectedDestination = new char[3] { 'A', 'B', 'C' };
@@ -5542,7 +5542,7 @@ namespace System.Tests
         [Theory]
         [InlineData("")]
         [InlineData("hello")]
-        public static void ToString(string s)
+        public static void ToStringTest(string s)
         {
             Assert.Same(s, s.ToString());
             Assert.Same(s, s.ToString(null));
@@ -5557,7 +5557,7 @@ namespace System.Tests
         [InlineData("hElLo", "HELLO")]
         [InlineData("HeLlO", "HELLO")]
         [InlineData("", "")]
-        public static void ToUpper(string s, string expected)
+        public static void ToUpper_String(string s, string expected)
         {
             Assert.Equal(expected, s.ToUpper());
 
index 3b9e40850ad327bfe0739ad8a230749be110a19b..ebb59e3e2e107b05ab2243bf0bd57d9aaf9da8ac 100644 (file)
@@ -141,7 +141,7 @@ namespace Microsoft.VisualBasic.Tests
         [InlineData(-1)]
         [InlineData(7)]
         [InlineData(int.MinValue)]
-        public void ErrorToString(int errorNumber)
+        public void ErrorToString_WithErrorNumber(int errorNumber)
         {
             Assert.NotNull(Conversion.ErrorToString(errorNumber));
         }
@@ -165,49 +165,49 @@ namespace Microsoft.VisualBasic.Tests
         [MemberData(nameof(Fix_Single_TestData))]
         [MemberData(nameof(Fix_Double_TestData))]
         [MemberData(nameof(Fix_Decimal_TestData))]
-        public void Fix(object value, object expected)
+        public void Fix_Object(object value, object expected)
         {
             Assert.Equal(expected, Conversion.Fix(value));
         }
 
         [Theory]
         [MemberData(nameof(Fix_Short_TestData))]
-        public void Fix(short value, short expected)
+        public void Fix_Short(short value, short expected)
         {
             Assert.Equal(expected, Conversion.Fix(value));
         }
 
         [Theory]
         [MemberData(nameof(Fix_Integer_TestData))]
-        public void Fix(int value, int expected)
+        public void Fix_Int(int value, int expected)
         {
             Assert.Equal(expected, Conversion.Fix(value));
         }
 
         [Theory]
         [MemberData(nameof(Fix_Long_TestData))]
-        public void Fix(long value, long expected)
+        public void Fix_Long(long value, long expected)
         {
             Assert.Equal(expected, Conversion.Fix(value));
         }
 
         [Theory]
         [MemberData(nameof(Fix_Single_TestData))]
-        public void Fix(float value, float expected)
+        public void Fix_Float(float value, float expected)
         {
             Assert.Equal(expected, Conversion.Fix(value));
         }
 
         [Theory]
         [MemberData(nameof(Fix_Double_TestData))]
-        public void Fix(double value, double expected)
+        public void Fix_Double(double value, double expected)
         {
             Assert.Equal(expected, Conversion.Fix(value));
         }
 
         [Theory]
         [MemberData(nameof(Fix_Decimal_TestData))]
-        public void Fix(decimal value, decimal expected)
+        public void Fix_Decimal(decimal value, decimal expected)
         {
             Assert.Equal(expected, Conversion.Fix(value));
         }
@@ -305,56 +305,56 @@ namespace Microsoft.VisualBasic.Tests
         [MemberData(nameof(Hex_Single_TestData))]
         [MemberData(nameof(Hex_Double_TestData))]
         [MemberData(nameof(Hex_Decimal_TestData))]
-        public void Hex(object value, string expected)
+        public void Hex_Object(object value, string expected)
         {
             Assert.Equal(expected, Conversion.Hex(value));
         }
 
         [Theory]
         [MemberData(nameof(Hex_Byte_TestData))]
-        public void Hex(byte value, string expected)
+        public void Hex_Byte(byte value, string expected)
         {
             Assert.Equal(expected, Conversion.Hex(value));
         }
 
         [Theory]
         [MemberData(nameof(Hex_SByte_TestData))]
-        public void Hex(sbyte value, string expected)
+        public void Hex_Sbyte(sbyte value, string expected)
         {
             Assert.Equal(expected, Conversion.Hex(value));
         }
 
         [Theory]
         [MemberData(nameof(Hex_UShort_TestData))]
-        public void Hex(ushort value, string expected)
+        public void Hex_Ushort(ushort value, string expected)
         {
             Assert.Equal(expected, Conversion.Hex(value));
         }
 
         [Theory]
         [MemberData(nameof(Hex_Short_TestData))]
-        public void Hex(short value, string expected)
+        public void Hex_Short(short value, string expected)
         {
             Assert.Equal(expected, Conversion.Hex(value));
         }
 
         [Theory]
         [MemberData(nameof(Hex_UInteger_TestData))]
-        public void Hex(uint value, string expected)
+        public void Hex_Uint(uint value, string expected)
         {
             Assert.Equal(expected, Conversion.Hex(value));
         }
 
         [Theory]
         [MemberData(nameof(Hex_Integer_TestData))]
-        public void Hex(int value, string expected)
+        public void Hex_Int(int value, string expected)
         {
             Assert.Equal(expected, Conversion.Hex(value));
         }
 
         [Theory]
         [MemberData(nameof(Hex_ULong_TestData))]
-        public void Hex(ulong value, string expected)
+        public void Hex_Ulong(ulong value, string expected)
         {
             Assert.Equal(expected, Conversion.Hex(value));
         }
@@ -362,28 +362,28 @@ namespace Microsoft.VisualBasic.Tests
         [Theory]
         [InlineData((long)-1, "FFFFFFFFFFFFFFFF")] // expected for object overload: "FFFFFFFF"
         [MemberData(nameof(Hex_Long_TestData))]
-        public void Hex(long value, string expected)
+        public void Hex_Long(long value, string expected)
         {
             Assert.Equal(expected, Conversion.Hex(value));
         }
 
         [Theory]
         [MemberData(nameof(Hex_Single_TestData))]
-        public void Hex(float value, string expected)
+        public void Hex_Float(float value, string expected)
         {
             Assert.Equal(expected, Conversion.Hex(value));
         }
 
         [Theory]
         [MemberData(nameof(Hex_Double_TestData))]
-        public void Hex(double value, string expected)
+        public void Hex_Double(double value, string expected)
         {
             Assert.Equal(expected, Conversion.Hex(value));
         }
 
         [Theory]
         [MemberData(nameof(Hex_Decimal_TestData))]
-        public void Hex(decimal value, string expected)
+        public void Hex_Decimal(decimal value, string expected)
         {
             Assert.Equal(expected, Conversion.Hex(value));
         }
@@ -502,49 +502,49 @@ namespace Microsoft.VisualBasic.Tests
         [MemberData(nameof(Int_Single_TestData))]
         [MemberData(nameof(Int_Double_TestData))]
         [MemberData(nameof(Int_Decimal_TestData))]
-        public void Int(object value, object expected)
+        public void Int_Object_Object(object value, object expected)
         {
             Assert.Equal(expected, Conversion.Int(value));
         }
 
         [Theory]
         [MemberData(nameof(Int_Short_TestData))]
-        public void Int(short value, short expected)
+        public void Int_Short(short value, short expected)
         {
             Assert.Equal(expected, Conversion.Int(value));
         }
 
         [Theory]
         [MemberData(nameof(Int_Integer_TestData))]
-        public void Int(int value, int expected)
+        public void Int_Int(int value, int expected)
         {
             Assert.Equal(expected, Conversion.Int(value));
         }
 
         [Theory]
         [MemberData(nameof(Int_Long_TestData))]
-        public void Int(long value, long expected)
+        public void Int_Long(long value, long expected)
         {
             Assert.Equal(expected, Conversion.Int(value));
         }
 
         [Theory]
         [MemberData(nameof(Int_Single_TestData))]
-        public void Int(float value, float expected)
+        public void Int_Float(float value, float expected)
         {
             Assert.Equal(expected, Conversion.Int(value));
         }
 
         [Theory]
         [MemberData(nameof(Int_Double_TestData))]
-        public void Int(double value, double expected)
+        public void Int_Double(double value, double expected)
         {
             Assert.Equal(expected, Conversion.Int(value));
         }
 
         [Theory]
         [MemberData(nameof(Int_Decimal_TestData))]
-        public void Int(decimal value, decimal expected)
+        public void Int_Decimal(decimal value, decimal expected)
         {
             Assert.Equal(expected, Conversion.Int(value));
         }
@@ -636,56 +636,56 @@ namespace Microsoft.VisualBasic.Tests
         [MemberData(nameof(Oct_Single_TestData))]
         [MemberData(nameof(Oct_Double_TestData))]
         [MemberData(nameof(Oct_Decimal_TestData))]
-        public void Oct(object value, string expected)
+        public void Oct_Object(object value, string expected)
         {
             Assert.Equal(expected, Conversion.Oct(value));
         }
 
         [Theory]
         [MemberData(nameof(Oct_Byte_TestData))]
-        public void Oct(byte value, string expected)
+        public void Oct_Byte(byte value, string expected)
         {
             Assert.Equal(expected, Conversion.Oct(value));
         }
 
         [Theory]
         [MemberData(nameof(Oct_SByte_TestData))]
-        public void Oct(sbyte value, string expected)
+        public void Oct_Sbyte(sbyte value, string expected)
         {
             Assert.Equal(expected, Conversion.Oct(value));
         }
 
         [Theory]
         [MemberData(nameof(Oct_UShort_TestData))]
-        public void Oct(ushort value, string expected)
+        public void Oct_Ushort(ushort value, string expected)
         {
             Assert.Equal(expected, Conversion.Oct(value));
         }
 
         [Theory]
         [MemberData(nameof(Oct_Short_TestData))]
-        public void Oct(short value, string expected)
+        public void Oct_Short(short value, string expected)
         {
             Assert.Equal(expected, Conversion.Oct(value));
         }
 
         [Theory]
         [MemberData(nameof(Oct_UInteger_TestData))]
-        public void Oct(uint value, string expected)
+        public void Oct_Uint(uint value, string expected)
         {
             Assert.Equal(expected, Conversion.Oct(value));
         }
 
         [Theory]
         [MemberData(nameof(Oct_Integer_TestData))]
-        public void Oct(int value, string expected)
+        public void Oct_Int(int value, string expected)
         {
             Assert.Equal(expected, Conversion.Oct(value));
         }
 
         [Theory]
         [MemberData(nameof(Oct_ULong_TestData))]
-        public void Oct(ulong value, string expected)
+        public void Oct_Ulong(ulong value, string expected)
         {
             Assert.Equal(expected, Conversion.Oct(value));
         }
@@ -693,28 +693,28 @@ namespace Microsoft.VisualBasic.Tests
         [Theory]
         [InlineData((long)-1, "1777777777777777777777")] // expected for object overload: "37777777777"
         [MemberData(nameof(Oct_Long_TestData))]
-        public void Oct(long value, string expected)
+        public void Oct_Long(long value, string expected)
         {
             Assert.Equal(expected, Conversion.Oct(value));
         }
 
         [Theory]
         [MemberData(nameof(Oct_Single_TestData))]
-        public void Oct(float value, string expected)
+        public void Oct_Float(float value, string expected)
         {
             Assert.Equal(expected, Conversion.Oct(value));
         }
 
         [Theory]
         [MemberData(nameof(Oct_Double_TestData))]
-        public void Oct(double value, string expected)
+        public void Oct_Double(double value, string expected)
         {
             Assert.Equal(expected, Conversion.Oct(value));
         }
 
         [Theory]
         [MemberData(nameof(Oct_Decimal_TestData))]
-        public void Oct(decimal value, string expected)
+        public void Oct_Decimal(decimal value, string expected)
         {
             Assert.Equal(expected, Conversion.Oct(value));
         }
@@ -868,56 +868,56 @@ namespace Microsoft.VisualBasic.Tests
         [MemberData(nameof(Val_Object_TestData))]
         [MemberData(nameof(Val_Char_TestData))]
         [MemberData(nameof(Val_String_TestData))]
-        public void Val(object value, double expected)
+        public void Val_Object_Double(object value, double expected)
         {
             Assert.Equal(expected, Conversion.Val(value));
         }
 
         [Theory]
         [MemberData(nameof(Val_Object_ArgumentException_TestData))]
-        public void Val_ArgumentException(object value)
+        public void Val_ArgumentException_Object(object value)
         {
             Assert.Throws<ArgumentException>(() => Conversion.Val(value));
         }
 
         [Theory]
         [MemberData(nameof(Val_Object_OverflowException_TestData))]
-        public void Val_OverflowException(object value)
+        public void Val_OverflowException_Object(object value)
         {
             Assert.Throws<OverflowException>(() => Conversion.Val(value));
         }
 
         [Theory]
         [MemberData(nameof(Val_Char_TestData))]
-        public void Val(char value, int expected)
+        public void Val_Char_Int(char value, int expected)
         {
             Assert.Equal(expected, Conversion.Val(value));
         }
 
         [Theory]
         [MemberData(nameof(Val_Char_ArgumentException_TestData))]
-        public void Val_ArgumentException(char value)
+        public void Val_ArgumentException_Char(char value)
         {
             Assert.Throws<ArgumentException>(() => Conversion.Val(value));
         }
 
         [Theory]
         [MemberData(nameof(Val_Char_OverflowException_TestData))]
-        public void Val_OverflowException(char value)
+        public void Val_OverflowException_Char(char value)
         {
             Assert.Throws<OverflowException>(() => Conversion.Val(value));
         }
 
         [Theory]
         [MemberData(nameof(Val_String_TestData))]
-        public void Val(string value, double expected)
+        public void Val_String_Double(string value, double expected)
         {
             Assert.Equal(expected, Conversion.Val(value));
         }
 
         [Theory]
         [MemberData(nameof(Val_String_ArgumentException_TestData))]
-        public void Val_ArgumentException(string value)
+        public void Val_ArgumentException_String(string value)
         {
             Assert.Throws<ArgumentException>(() => Conversion.Val(value));
         }
@@ -931,7 +931,7 @@ namespace Microsoft.VisualBasic.Tests
 
         [Theory]
         [MemberData(nameof(Val_String_OverflowException_TestData))]
-        public void Val_OverflowException(string value)
+        public void Val_OverflowException_String(string value)
         {
             Assert.Throws<OverflowException>(() => Conversion.Val(value));
         }
index d130c7c192adb8152093a8a5038cde1c9e7b241a..9aa13508f40c1949dedb8db34d3410f346cb6fce 100644 (file)
@@ -13,14 +13,14 @@ namespace Microsoft.VisualBasic.Tests
     {
         [Theory]
         [MemberData(nameof(DateAdd_DateInterval_TestData))]
-        public void DateAdd(DateInterval interval, double number, DateTime dateValue, DateTime expected)
+        public void DateAdd_DateInterval(DateInterval interval, double number, DateTime dateValue, DateTime expected)
         {
             Assert.Equal(expected, DateAndTime.DateAdd(interval, number, dateValue));
         }
 
         [Theory]
         [MemberData(nameof(DateAdd_DateInterval_ArgumentOutOfRangeException_TestData))]
-        public void DateAdd_ArgumentOutOfRangeException(DateInterval interval, double number, DateTime dateValue)
+        public void DateAdd_DateInterval_ArgumentOutOfRangeException(DateInterval interval, double number, DateTime dateValue)
         {
             Assert.Throws<ArgumentOutOfRangeException>(() => DateAndTime.DateAdd(interval, number, dateValue));
         }
@@ -125,14 +125,14 @@ namespace Microsoft.VisualBasic.Tests
 
         [Theory]
         [MemberData(nameof(DateAdd_StringInterval_TestData))]
-        public void DateAdd(string interval, double number, object dateValue, DateTime expected)
+        public void DateAdd_StringInterval(string interval, double number, object dateValue, DateTime expected)
         {
             Assert.Equal(expected, DateAndTime.DateAdd(interval, number, dateValue));
         }
 
         [Theory]
         [MemberData(nameof(DateAdd_StringInterval_ArgumentOutOfRangeException_TestData))]
-        public void DateAdd_ArgumentOutOfRangeException(string interval, double number, object dateValue)
+        public void DateAdd_StringInterval_ArgumentOutOfRangeException(string interval, double number, object dateValue)
         {
             Assert.Throws<ArgumentOutOfRangeException>(() => DateAndTime.DateAdd(interval, number, dateValue));
         }
@@ -237,7 +237,7 @@ namespace Microsoft.VisualBasic.Tests
 
         [Theory]
         [MemberData(nameof(DateDiff_DateInterval_TestData))]
-        public void DateDiff(DateInterval interval, DateTime dateTime1, DateTime dateTime2, long expected)
+        public void DateDiff_DateInterval(DateInterval interval, DateTime dateTime1, DateTime dateTime2, long expected)
         {
             Assert.Equal(expected, DateAndTime.DateDiff(interval, dateTime1, dateTime2));
         }
@@ -277,7 +277,7 @@ namespace Microsoft.VisualBasic.Tests
 
         [Theory]
         [MemberData(nameof(DateDiff_StringInterval_TestData))]
-        public void DateDiff(string interval, object dateTime1, object dateTime2, long expected)
+        public void DateDiff_StringInterval(string interval, object dateTime1, object dateTime2, long expected)
         {
             Assert.Equal(expected, DateAndTime.DateDiff(interval, dateTime1, dateTime2));
         }
@@ -317,7 +317,7 @@ namespace Microsoft.VisualBasic.Tests
 
         [Theory]
         [MemberData(nameof(DatePart_DateInterval_TestData))]
-        public void DatePart(DateInterval interval, DateTime dateValue, int expected)
+        public void DatePart_DateInterval(DateInterval interval, DateTime dateValue, int expected)
         {
             Assert.Equal(expected, DateAndTime.DatePart(interval, dateValue));
         }
@@ -337,7 +337,7 @@ namespace Microsoft.VisualBasic.Tests
 
         [Theory]
         [MemberData(nameof(DatePart_StringInterval_TestData))]
-        public void DatePart(string interval, object dateValue, int expected)
+        public void DatePart_StringInterval(string interval, object dateValue, int expected)
         {
             Assert.Equal(expected, DateAndTime.DatePart(interval, dateValue));
         }
index c4310036e088796f2e3fd0da95dc5fe582498c0f..e09f402c85fb402decceaf10f0bae95ed65c0b4c 100644 (file)
@@ -48,7 +48,7 @@ namespace Microsoft.VisualBasic.Tests
         [InlineData(null, null, null)]
         [InlineData("", "", "")]
         [InlineData("classID", "interfaceID", "eventID")]
-        public void Ctor_String_String(string classID, string interfaceID, string eventID)
+        public void Ctor_String_String_String(string classID, string interfaceID, string eventID)
         {
             var attribute = new ComClassAttribute(classID, interfaceID, eventID);
             Assert.Equal(classID, attribute.ClassID);
index 99e4985809b09bb5771885ac7495bbddc90e4cb2..80d69e6a24187dfb2e1a449c309a9ee2f8ac383b 100644 (file)
@@ -51,7 +51,7 @@ namespace Microsoft.VisualBasic.CompilerServices.Tests
 
         [Theory]
         [MemberData(nameof(FromDecimal_Format_TestData))]
-        public void FromDecimal(decimal value, NumberFormatInfo format, string expected)
+        public void FromDecimal_Format(decimal value, NumberFormatInfo format, string expected)
         {
             Assert.Equal(expected, StringType.FromDecimal(value, format));
         }
@@ -66,7 +66,7 @@ namespace Microsoft.VisualBasic.CompilerServices.Tests
 
         [Theory]
         [MemberData(nameof(FromDouble_Format_TestData))]
-        public void FromDouble(double value, NumberFormatInfo format, string expected)
+        public void FromDouble_Format(double value, NumberFormatInfo format, string expected)
         {
             Assert.Equal(expected, StringType.FromDouble(value, format));
         }
@@ -139,7 +139,7 @@ namespace Microsoft.VisualBasic.CompilerServices.Tests
 
         [Theory]
         [MemberData(nameof(FromSingle_Format_TestData))]
-        public void FromSingle(float value, NumberFormatInfo format, string expected)
+        public void FromSingle_Format(float value, NumberFormatInfo format, string expected)
         {
             Assert.Equal(expected, StringType.FromSingle(value, format));
         }
index da8350a036eff9cca472943cdb8c5226bae9f2b8..9800691fb1735a2c1490ccdbf09cbbec2f93409a 100644 (file)
@@ -514,7 +514,7 @@ namespace Microsoft.VisualBasic.Tests
         [Theory]
         [MemberData(nameof(Join_Object_TestData))]
         [MemberData(nameof(Join_String_TestData))]
-        public void Join(object[] source, string delimiter, string expected)
+        public void Join_ObjectArray(object[] source, string delimiter, string expected)
         {
             Assert.Equal(expected, Strings.Join(source, delimiter));
         }
@@ -531,7 +531,7 @@ namespace Microsoft.VisualBasic.Tests
 
         [Theory]
         [MemberData(nameof(Join_String_TestData))]
-        public void Join(string[] source, string delimiter, string expected)
+        public void Join_StringArray(string[] source, string delimiter, string expected)
         {
             Assert.Equal(expected, Strings.Join(source, delimiter));
         }
@@ -552,7 +552,7 @@ namespace Microsoft.VisualBasic.Tests
         [InlineData('a', 'a')]
         [InlineData('A', 'a')]
         [InlineData('1', '1')]
-        public void LCase(char value, char expected)
+        public void LCase_Char(char value, char expected)
         {
             Assert.Equal(expected, Strings.LCase(value));
         }
@@ -565,7 +565,7 @@ namespace Microsoft.VisualBasic.Tests
         [InlineData("abc", "abc")]
         [InlineData("ABC", "abc")]
         [InlineData("123", "123")]
-        public void LCase(string value, string expected)
+        public void LCase_String(string value, string expected)
         {
             Assert.Equal(expected, Strings.LCase(value));
         }
@@ -576,7 +576,7 @@ namespace Microsoft.VisualBasic.Tests
         [InlineData('a', 'A')]
         [InlineData('A', 'A')]
         [InlineData('1', '1')]
-        public void UCase(char value, char expected)
+        public void UCase_Char(char value, char expected)
         {
             Assert.Equal(expected, Strings.UCase(value));
         }
@@ -589,7 +589,7 @@ namespace Microsoft.VisualBasic.Tests
         [InlineData("abc", "ABC")]
         [InlineData("ABC", "ABC")]
         [InlineData("123", "123")]
-        public void UCase(string value, string expected)
+        public void UCase_String(string value, string expected)
         {
             Assert.Equal(expected, Strings.UCase(value));
         }
@@ -877,42 +877,42 @@ namespace Microsoft.VisualBasic.Tests
         [MemberData(nameof(StrDup_Object_TestData))]
         [MemberData(nameof(StrDup_Char_TestData))]
         [MemberData(nameof(StrDup_String_TestData))]
-        public void StrDup(int number, object character, object expected)
+        public void StrDup_Int_Object_Object(int number, object character, object expected)
         {
             Assert.Equal(expected, Strings.StrDup(number, character));
         }
 
         [Theory]
         [MemberData(nameof(StrDup_Object_ArgumentException_TestData))]
-        public void StrDup_ArgumentException(int number, object character)
+        public void StrDup_ArgumentException_Int_Object(int number, object character)
         {
             Assert.Throws< ArgumentException>(() => Strings.StrDup(number, character));
         }
 
         [Theory]
         [MemberData(nameof(StrDup_Char_TestData))]
-        public void StrDup(int number, char character, string expected)
+        public void StrDup_Int_Char_String(int number, char character, string expected)
         {
             Assert.Equal(expected, Strings.StrDup(number, character));
         }
 
         [Theory]
         [MemberData(nameof(StrDup_Char_ArgumentException_TestData))]
-        public void StrDup_ArgumentException(int number, char character)
+        public void StrDup_ArgumentException_Int_Char(int number, char character)
         {
             Assert.Throws<ArgumentException>(() => Strings.StrDup(number, character));
         }
 
         [Theory]
         [MemberData(nameof(StrDup_String_TestData))]
-        public void StrDup(int number, string character, string expected)
+        public void StrDup_Int_String_String(int number, string character, string expected)
         {
             Assert.Equal(expected, Strings.StrDup(number, character));
         }
 
         [Theory]
         [MemberData(nameof(StrDup_String_ArgumentException_TestData))]
-        public void StrDup_ArgumentException(int number, string character)
+        public void StrDup_ArgumentException_Int_String(int number, string character)
         {
             Assert.Throws<ArgumentException>(() => Strings.StrDup(number, character));
         }
index c2ccf6dd1e75f4d40ef0059edbf8f30e70f7845e..a43275b9102b80262c4377f015dccc53567d12df 100644 (file)
@@ -92,7 +92,7 @@ namespace Microsoft.Win32.RegistryTests
 
         [Theory]
         [MemberData(nameof(TestRegistrySubKeyNames))]
-        public void Verify_DeleteSubKeyTree_KeyDoesNotExists_Throws(string expected, string subKeyName) =>
+        public void DeleteSubKeyTree_KeyDoesNotExists_Throws(string expected, string subKeyName) =>
             Verify_DeleteSubKeyTree_KeyDoesNotExists_Throws(expected, () => TestRegistryKey.DeleteSubKeyTree(subKeyName));
     }
 }
index ffa1efd754b3285cc66d9871b73200f9d6c88379..5a8066201af0aa696a77f3ce344039c5350f4a9f 100644 (file)
@@ -28,7 +28,7 @@ namespace System.CodeDom.Tests
 
         [Theory]
         [MemberData(nameof(Ctor_CodeMethodReferenceExpression_ParamsCodeExpression_TestData))]
-        public void Ctor(CodeMethodReferenceExpression method, CodeExpression[] parameters)
+        public void Ctor_Method_Parameters(CodeMethodReferenceExpression method, CodeExpression[] parameters)
         {
             var methodInvoke = new CodeMethodInvokeExpression(method, parameters);
             Assert.Equal((method ?? new CodeMethodReferenceExpression()).TargetObject, methodInvoke.Method.TargetObject);
@@ -45,7 +45,7 @@ namespace System.CodeDom.Tests
 
         [Theory]
         [MemberData(nameof(Ctor_CodeExpression_String_ParamsCodeExpression_TestData))]
-        public void Ctor(CodeExpression targetObject, string methodName, CodeExpression[] parameters)
+        public void Ctor_TargetObject_MethodName_Parameters(CodeExpression targetObject, string methodName, CodeExpression[] parameters)
         {
             var methodInvoke = new CodeMethodInvokeExpression(targetObject, methodName, parameters);
             Assert.Equal(targetObject, methodInvoke.Method.TargetObject);
index db9b01442880b58d1f0bfd985c7d56fc656e3b25..018acb566ea95f6b2774766c1f1b1bc9c9c6d1da 100644 (file)
@@ -28,7 +28,7 @@ namespace System.CodeDom.Tests
 
         [Theory]
         [MemberData(nameof(Ctor_CodeExpression_String_TestData))]
-        public void Ctor(CodeExpression targetObject, string methodName)
+        public void Ctor_TargetObject_MethodName(CodeExpression targetObject, string methodName)
         {
             var methodReference = new CodeMethodReferenceExpression(targetObject, methodName);
             Assert.Equal(targetObject, methodReference.TargetObject);
@@ -44,7 +44,7 @@ namespace System.CodeDom.Tests
 
         [Theory]
         [MemberData(nameof(Ctor_CodeExpression_String_ParamsCodeExpression_TestData))]
-        public void Ctor(CodeExpression targetObject, string methodName, CodeTypeReference[] typeArguments)
+        public void Ctor_TargetObject_MethodName_TypeArguments(CodeExpression targetObject, string methodName, CodeTypeReference[] typeArguments)
         {
             var methodReference = new CodeMethodReferenceExpression(targetObject, methodName, typeArguments);
             Assert.Equal(targetObject, methodReference.TargetObject);
index 8a7a160846c7b70abd28ea84ee6331e749878ad4..bd2cc7163bdf3f166944202b0b049c17ee118c30 100644 (file)
@@ -27,7 +27,7 @@ namespace System.CodeDom.Tests
 
         [Theory]
         [MemberData(nameof(Ctor_CodeTypeReference_ParamsCodeExpression_TestData))]
-        public void Ctor(CodeTypeReference type, CodeExpression[] parameters)
+        public void Ctor_Type_Parameters(CodeTypeReference type, CodeExpression[] parameters)
         {
             var objectCreate = new CodeObjectCreateExpression(type, parameters);
             Assert.Equal((type ?? new CodeTypeReference("")).BaseType, objectCreate.CreateType.BaseType);
@@ -43,7 +43,7 @@ namespace System.CodeDom.Tests
 
         [Theory]
         [MemberData(nameof(Ctor_String_ParamsCodeExpression_TestData))]
-        public void Ctor(string type, CodeExpression[] parameters, string expectedBaseType)
+        public void Ctor_Type_Parameters_ExpectedBaseType(string type, CodeExpression[] parameters, string expectedBaseType)
         {
             var objectCreate = new CodeObjectCreateExpression(type, parameters);
             Assert.Equal(expectedBaseType, objectCreate.CreateType.BaseType);
index d2a770f26a310dbf544c623053aa33abd08956cb..374f93a6ba645e5141b4ebc3e817e239b1af4376 100644 (file)
@@ -124,20 +124,16 @@ namespace System.Collections.Concurrent.Tests
             Assert.Throws<ArgumentException>(action);
         }
 
-        [Fact]
-        public static void TestAdd1()
-        {
-            TestAdd1(1, 1, 1, 10000);
-            TestAdd1(5, 1, 1, 10000);
-            TestAdd1(1, 1, 2, 5000);
-            TestAdd1(1, 1, 5, 2000);
-            TestAdd1(4, 0, 4, 2000);
-            TestAdd1(16, 31, 4, 2000);
-            TestAdd1(64, 5, 5, 5000);
-            TestAdd1(5, 5, 5, 2500);
-        }
-
-        private static void TestAdd1(int cLevel, int initSize, int threads, int addsPerThread)
+        [Theory]
+        [InlineData(1, 1, 1, 10000)]
+        [InlineData(5, 1, 1, 10000)]
+        [InlineData(1, 1, 2, 5000)]
+        [InlineData(1, 1, 5, 2000)]
+        [InlineData(4, 0, 4, 2000)]
+        [InlineData(16, 31, 4, 2000)]
+        [InlineData(64, 5, 5, 5000)]
+        [InlineData(5, 5, 5, 2500)]
+        public static void TestAdd(int cLevel, int initSize, int threads, int addsPerThread)
         {
             ConcurrentDictionary<int, int> dictConcurrent = new ConcurrentDictionary<int, int>(cLevel, 1);
             IDictionary<int, int> dict = dictConcurrent;
@@ -193,20 +189,16 @@ namespace System.Collections.Concurrent.Tests
             Assert.Equal(expectedCount, dictConcurrent.ToArray().Length);
         }
 
-        [Fact]
-        public static void TestUpdate1()
-        {
-            TestUpdate1(1, 1, 10000);
-            TestUpdate1(5, 1, 10000);
-            TestUpdate1(1, 2, 5000);
-            TestUpdate1(1, 5, 2001);
-            TestUpdate1(4, 4, 2001);
-            TestUpdate1(15, 5, 2001);
-            TestUpdate1(64, 5, 5000);
-            TestUpdate1(5, 5, 25000);
-        }
-
-        private static void TestUpdate1(int cLevel, int threads, int updatesPerThread)
+        [Theory]
+        [InlineData(1, 1, 10000)]
+        [InlineData(5, 1, 10000)]
+        [InlineData(1, 2, 5000)]
+        [InlineData(1, 5, 2001)]
+        [InlineData(4, 4, 2001)]
+        [InlineData(15, 5, 2001)]
+        [InlineData(64, 5, 5000)]
+        [InlineData(5, 5, 25000)]
+        public static void TestUpdate(int cLevel, int threads, int updatesPerThread)
         {
             IDictionary<int, int> dict = new ConcurrentDictionary<int, int>(cLevel, 1);
 
@@ -261,20 +253,16 @@ namespace System.Collections.Concurrent.Tests
             }
         }
 
-        [Fact]
-        public static void TestRead1()
-        {
-            TestRead1(1, 1, 10000);
-            TestRead1(5, 1, 10000);
-            TestRead1(1, 2, 5000);
-            TestRead1(1, 5, 2001);
-            TestRead1(4, 4, 2001);
-            TestRead1(15, 5, 2001);
-            TestRead1(64, 5, 5000);
-            TestRead1(5, 5, 25000);
-        }
-
-        private static void TestRead1(int cLevel, int threads, int readsPerThread)
+        [Theory]
+        [InlineData(1, 1, 10000)]
+        [InlineData(5, 1, 10000)]
+        [InlineData(1, 2, 5000)]
+        [InlineData(1, 5, 2001)]
+        [InlineData(4, 4, 2001)]
+        [InlineData(15, 5, 2001)]
+        [InlineData(64, 5, 5000)]
+        [InlineData(5, 5, 25000)]
+        public static void TestRead1(int cLevel, int threads, int readsPerThread)
         {
             IDictionary<int, int> dict = new ConcurrentDictionary<int, int>(cLevel, 1);
 
@@ -309,18 +297,14 @@ namespace System.Collections.Concurrent.Tests
             }
         }
 
-        [Fact]
-        public static void TestRemove1()
-        {
-            TestRemove1(1, 1, 10000);
-            TestRemove1(5, 1, 1000);
-            TestRemove1(1, 5, 2001);
-            TestRemove1(4, 4, 2001);
-            TestRemove1(15, 5, 2001);
-            TestRemove1(64, 5, 5000);
-        }
-
-        private static void TestRemove1(int cLevel, int threads, int removesPerThread)
+        [Theory]
+        [InlineData(1, 1, 10000)]
+        [InlineData(5, 1, 1000)]
+        [InlineData(1, 5, 2001)]
+        [InlineData(4, 4, 2001)]
+        [InlineData(15, 5, 2001)]
+        [InlineData(64, 5, 5000)]
+        public static void TestRemove1(int cLevel, int threads, int removesPerThread)
         {
             ConcurrentDictionary<int, int> dict = new ConcurrentDictionary<int, int>(cLevel, 1);
             string methodparameters = string.Format("* TestRemove1(cLevel={0}, threads={1}, removesPerThread={2})", cLevel, threads, removesPerThread);
@@ -381,15 +365,11 @@ namespace System.Collections.Concurrent.Tests
             Assert.Equal(expectKeys.Count, dict.ToArray().Length);
         }
 
-        [Fact]
-        public static void TestRemove2()
-        {
-            TestRemove2(1);
-            TestRemove2(10);
-            TestRemove2(5000);
-        }
-
-        private static void TestRemove2(int removesPerThread)
+        [Theory]
+        [InlineData(1)]
+        [InlineData(10)]
+        [InlineData(5000)]
+        public static void TestRemove2(int removesPerThread)
         {
             ConcurrentDictionary<int, int> dict = new ConcurrentDictionary<int, int>();
 
index 3680f2fded80e0a44b24c223d6f0d1264333f4ab..b6116cc71e5f9af76b583ca2a9b9258229a3cca6 100644 (file)
@@ -49,17 +49,13 @@ namespace System.Collections.Concurrent.Tests
         /// We unroll the tuples and flatten them to a single sequence
         /// The single sequence is compared to the original range for verification
         /// </summary>
-        [Fact]
-        public static void CheckGetPartitions()
-        {
-            CheckGetPartitions(0, 1, 1);
-            CheckGetPartitions(1, 1999, 3);
-            CheckGetPartitions(2147473647, 9999, 4);
-            CheckGetPartitions(-1999, 5000, 63);
-            CheckGetPartitions(-2147483648, 5000, 63);
-        }
-
-        private static void CheckGetPartitions(int from, int count, int dop)
+        [Theory]
+        [InlineData(0, 1, 1)]
+        [InlineData(1, 1999, 3)]
+        [InlineData(2147473647, 9999, 4)]
+        [InlineData(-1999, 5000, 63)]
+        [InlineData(-2147483648, 5000, 63)]
+        public static void CheckGetPartitions(int from, int count, int dop)
         {
             int to = from + count;
             var partitioner = Partitioner.Create(from, to);
@@ -82,17 +78,13 @@ namespace System.Collections.Concurrent.Tests
         /// </summary>
         /// <param name="from"></param>
         /// <param name="count"></param>
-        [Fact]
-        public static void CheckGetDynamicPartitions()
-        {
-            CheckGetDynamicPartitions(0, 1);
-            CheckGetDynamicPartitions(1, 1999);
-            CheckGetDynamicPartitions(2147473647, 9999);
-            CheckGetDynamicPartitions(-1999, 5000);
-            CheckGetDynamicPartitions(-2147483648, 5000);
-        }
-
-        private static void CheckGetDynamicPartitions(int from, int count)
+        [Theory]
+        [InlineData(0, 1)]
+        [InlineData(1, 1999)]
+        [InlineData(2147473647, 9999)]
+        [InlineData(-1999, 5000)]
+        [InlineData(-2147483648, 5000)]
+        public static void CheckGetDynamicPartitions(int from, int count)
         {
             int to = from + count;
             var partitioner = Partitioner.Create(from, to);
@@ -114,17 +106,13 @@ namespace System.Collections.Concurrent.Tests
         /// The single sequence is compared to the original range for verification
         /// Also the indices are extracted to ensure that they are ordered & normalized
         /// </summary>
-        [Fact]
-        public static void CheckGetOrderablePartitions()
-        {
-            CheckGetOrderablePartitions(0, 1, 1);
-            CheckGetOrderablePartitions(1, 1999, 3);
-            CheckGetOrderablePartitions(2147473647, 9999, 4);
-            CheckGetOrderablePartitions(-1999, 5000, 63);
-            CheckGetOrderablePartitions(-2147483648, 5000, 63);
-        }
-
-        private static void CheckGetOrderablePartitions(int from, int count, int dop)
+        [Theory]
+        [InlineData(0, 1, 1)]
+        [InlineData(1, 1999, 3)]
+        [InlineData(2147473647, 9999, 4)]
+        [InlineData(-1999, 5000, 63)]
+        [InlineData(-2147483648, 5000, 63)]
+        public static void CheckGetOrderablePartitions(int from, int count, int dop)
         {
             int to = from + count;
             var partitioner = Partitioner.Create(from, to);
@@ -155,17 +143,13 @@ namespace System.Collections.Concurrent.Tests
         /// The single sequence is compared to the original range for verification
         /// Also the indices are extracted to ensure that they are ordered & normalized
         /// </summary>
-        [Fact]
-        public static void GetOrderableDynamicPartitions()
-        {
-            GetOrderableDynamicPartitions(0, 1);
-            GetOrderableDynamicPartitions(1, 1999);
-            GetOrderableDynamicPartitions(2147473647, 9999);
-            GetOrderableDynamicPartitions(-1999, 5000);
-            GetOrderableDynamicPartitions(-2147483648, 5000);
-        }
-
-        private static void GetOrderableDynamicPartitions(int from, int count)
+        [Theory]
+        [InlineData(0, 1)]
+        [InlineData(1, 1999)]
+        [InlineData(2147473647, 9999)]
+        [InlineData(-1999, 5000)]
+        [InlineData(-2147483648, 5000)]
+        public static void GetOrderableDynamicPartitions(int from, int count)
         {
             int to = from + count;
             var partitioner = Partitioner.Create(from, to);
@@ -197,17 +181,13 @@ namespace System.Collections.Concurrent.Tests
         /// The range sizes for individual ranges are checked to see if they are equal to
         /// desiredRangeSize. The last range may have less than or equal to desiredRangeSize.
         /// </summary>
-        [Fact]
-        public static void CheckGetPartitionsWithRange()
-        {
-            CheckGetPartitionsWithRange(1999, 1000, 20, 1);
-            CheckGetPartitionsWithRange(-1999, 1000, 100, 2);
-            CheckGetPartitionsWithRange(1999, 1, 2000, 3);
-            CheckGetPartitionsWithRange(2147482647, 999, 600, 4);
-            CheckGetPartitionsWithRange(-2147483648, 1000, 19, 63);
-        }
-
-        private static void CheckGetPartitionsWithRange(int from, int count, int desiredRangeSize, int dop)
+        [Theory]
+        [InlineData(1999, 1000, 20, 1)]
+        [InlineData(-1999, 1000, 100, 2)]
+        [InlineData(1999, 1, 2000, 3)]
+        [InlineData(2147482647, 999, 600, 4)]
+        [InlineData(-2147483648, 1000, 19, 63)]
+        public static void CheckGetPartitionsWithRange(int from, int count, int desiredRangeSize, int dop)
         {
             int to = from + count;
             var partitioner = Partitioner.Create(from, to, desiredRangeSize);
@@ -240,17 +220,13 @@ namespace System.Collections.Concurrent.Tests
         /// The range sizes for individual ranges are checked to see if they are equal to
         /// desiredRangeSize. The last range may have less than or equal to desiredRangeSize.
         /// </summary>
-        [Fact]
-        public static void CheckGetDynamicPartitionsWithRange()
-        {
-            CheckGetDynamicPartitionsWithRange(1999, 1000, 20);
-            CheckGetDynamicPartitionsWithRange(-1999, 1000, 100);
-            CheckGetDynamicPartitionsWithRange(1999, 1, 2000);
-            CheckGetDynamicPartitionsWithRange(2147482647, 999, 600);
-            CheckGetDynamicPartitionsWithRange(-2147483648, 1000, 19);
-        }
-
-        private static void CheckGetDynamicPartitionsWithRange(int from, int count, int desiredRangeSize)
+        [Theory]
+        [InlineData(1999, 1000, 20)]
+        [InlineData(-1999, 1000, 100)]
+        [InlineData(1999, 1, 2000)]
+        [InlineData(2147482647, 999, 600)]
+        [InlineData(-2147483648, 1000, 19)]
+        public static void CheckGetDynamicPartitionsWithRange(int from, int count, int desiredRangeSize)
         {
             int to = from + count;
             var partitioner = Partitioner.Create(from, to, desiredRangeSize);
@@ -284,17 +260,13 @@ namespace System.Collections.Concurrent.Tests
         /// The range sizes for individual ranges are checked to see if they are equal to
         /// desiredRangeSize. The last range may have less than or equal to desiredRangeSize.
         /// </summary>
-        [Fact]
-        public static void CheckGetOrderablePartitionsWithRange()
-        {
-            CheckGetOrderablePartitionsWithRange(1999, 1000, 20, 1);
-            CheckGetOrderablePartitionsWithRange(-1999, 1000, 100, 2);
-            CheckGetOrderablePartitionsWithRange(1999, 1, 2000, 3);
-            CheckGetOrderablePartitionsWithRange(2147482647, 999, 600, 4);
-            CheckGetOrderablePartitionsWithRange(-2147483648, 1000, 19, 63);
-        }
-
-        private static void CheckGetOrderablePartitionsWithRange(int from, int count, int desiredRangeSize, int dop)
+        [Theory]
+        [InlineData(1999, 1000, 20, 1)]
+        [InlineData(-1999, 1000, 100, 2)]
+        [InlineData(1999, 1, 2000, 3)]
+        [InlineData(2147482647, 999, 600, 4)]
+        [InlineData(-2147483648, 1000, 19, 63)]
+        public static void CheckGetOrderablePartitionsWithRange(int from, int count, int desiredRangeSize, int dop)
         {
             int to = from + count;
             var partitioner = Partitioner.Create(from, to, desiredRangeSize);
@@ -337,17 +309,13 @@ namespace System.Collections.Concurrent.Tests
         /// The range sizes for individual ranges are checked to see if they are equal to
         /// desiredRangeSize. The last range may have less than or equal to desiredRangeSize.
         /// </summary>
-        [Fact]
-        public static void GetOrderableDynamicPartitionsWithRange()
-        {
-            GetOrderableDynamicPartitionsWithRange(1999, 1000, 20);
-            GetOrderableDynamicPartitionsWithRange(-1999, 1000, 100);
-            GetOrderableDynamicPartitionsWithRange(1999, 1, 2000);
-            GetOrderableDynamicPartitionsWithRange(2147482647, 999, 600);
-            GetOrderableDynamicPartitionsWithRange(-2147483648, 1000, 19);
-        }
-
-        private static void GetOrderableDynamicPartitionsWithRange(int from, int count, int desiredRangeSize)
+        [Theory]
+        [InlineData(1999, 1000, 20)]
+        [InlineData(-1999, 1000, 100)]
+        [InlineData(1999, 1, 2000)]
+        [InlineData(2147482647, 999, 600)]
+        [InlineData(-2147483648, 1000, 19)]
+        public static void GetOrderableDynamicPartitionsWithRange(int from, int count, int desiredRangeSize)
         {
             int to = from + count;
             var partitioner = Partitioner.Create(from, to, desiredRangeSize);
@@ -400,20 +368,16 @@ namespace System.Collections.Concurrent.Tests
             Assert.InRange(rangeSizes[rangeSizes.Count - 1], 0, desiredRangeSize);
         }
 
-        [Fact]
-        public static void RangePartitionerChunking()
-        {
-            RangePartitionerChunking(1999, 1000, 10);
-            RangePartitionerChunking(89, 17823, -1);
-        }
-
         /// <summary>
         /// Ensure that the range partitioner doesn't chunk up elements i.e. uses chunk size = 1
         /// </summary>
         /// <param name="from"></param>
         /// <param name="count"></param>
         /// <param name="rangeSize"></param>
-        private static void RangePartitionerChunking(int from, int count, int rangeSize)
+        [Theory]
+        [InlineData(1999, 1000, 10)]
+        [InlineData(89, 17823, -1)]
+        public static void RangePartitionerChunking(int from, int count, int rangeSize)
         {
             int to = from + count;
 
@@ -480,20 +444,16 @@ namespace System.Collections.Concurrent.Tests
             Assert.Equal(count, actualCount);
         }
 
-        [Fact]
-        public static void RangePartitionerDynamicChunking()
-        {
-            RangePartitionerDynamicChunking(1999, 1000, 10);
-            RangePartitionerDynamicChunking(1, 884354, -1);
-        }
-
         /// <summary>
         /// Ensure that the range partitioner doesn't chunk up elements i.e. uses chunk size = 1
         /// </summary>
         /// <param name="from"></param>
         /// <param name="count"></param>
         /// <param name="rangeSize"></param>
-        private static void RangePartitionerDynamicChunking(int from, int count, int rangeSize)
+        [Theory]
+        [InlineData(1999, 1000, 10)]
+        [InlineData(1, 884354, -1)]
+        public static void RangePartitionerDynamicChunking(int from, int count, int rangeSize)
         {
             int to = from + count;
 
@@ -557,7 +517,7 @@ namespace System.Collections.Concurrent.Tests
             // Verifying that all items are there
             Assert.Equal(count, actualCount);
         }
-        
+
         /// <summary>
         /// Ensure that the range partitioner doesn't exceed the exclusive bound
         /// </summary>
index 98b4ecc9aec8cb3ae9f553b58cecae2ad7dbf7bc..dbb2909b52ff6d6a9b8e65db777d96ba636fd73e 100644 (file)
@@ -49,19 +49,15 @@ namespace System.Collections.Concurrent.Tests
         /// We unroll the tuples and flatten them to a single sequence
         /// The single sequence is compared to the original range for verification
         /// </summary>
-        [Fact]
-        public static void CheckGetPartitions()
-        {
-            CheckGetPartitions(0, 1, 1);
-            CheckGetPartitions(1, 1999, 3);
-            CheckGetPartitions(2147473647, 9999, 4);
-            CheckGetPartitions(2147484647, 1000, 8);
-            CheckGetPartitions(-2147484647, 1000, 16);
-            CheckGetPartitions(-1999, 5000, 63);
-            CheckGetPartitions(9223372036854774807, 999, 13); // close to Int64.Max
-        }
-
-        private static void CheckGetPartitions(long from, long count, int dop)
+        [Theory]
+        [InlineData(0, 1, 1)]
+        [InlineData(1, 1999, 3)]
+        [InlineData(2147473647, 9999, 4)]
+        [InlineData(2147484647, 1000, 8)]
+        [InlineData(-2147484647, 1000, 16)]
+        [InlineData(-1999, 5000, 63)]
+        [InlineData(9223372036854774807, 999, 13)] // close to Int64.Max
+        public static void CheckGetPartitions(long from, long count, int dop)
         {
             long to = from + count;
             var partitioner = Partitioner.Create(from, to);
@@ -81,19 +77,15 @@ namespace System.Collections.Concurrent.Tests
         /// We unroll the tuples and flatten them to a single sequence
         /// The single sequence is compared to the original range for verification
         /// </summary>
-        [Fact]
-        public static void CheckGetDynamicPartitions()
-        {
-            CheckGetDynamicPartitions(0, 1);
-            CheckGetDynamicPartitions(1, 1999);
-            CheckGetDynamicPartitions(2147473647, 9999);
-            CheckGetDynamicPartitions(2147484647, 1000);
-            CheckGetDynamicPartitions(-2147484647, 1000);
-            CheckGetDynamicPartitions(-1999, 5000);
-            CheckGetDynamicPartitions(9223372036854774807, 999); // close to Int64.Max
-        }
-
-        private static void CheckGetDynamicPartitions(long from, long count)
+        [Theory]
+        [InlineData(0, 1)]
+        [InlineData(1, 1999)]
+        [InlineData(2147473647, 9999)]
+        [InlineData(2147484647, 1000)]
+        [InlineData(-2147484647, 1000)]
+        [InlineData(-1999, 5000)]
+        [InlineData(9223372036854774807, 999)] // close to Int64.Max
+        public static void CheckGetDynamicPartitions(long from, long count)
         {
             long to = from + count;
             var partitioner = Partitioner.Create(from, to);
@@ -114,19 +106,15 @@ namespace System.Collections.Concurrent.Tests
         /// The single sequence is compared to the original range for verification
         /// Also the indices are extracted to ensure that they are ordered & normalized
         /// </summary>
-        [Fact]
-        public static void CheckGetOrderablePartitions()
-        {
-            CheckGetOrderablePartitions(0, 1, 1);
-            CheckGetOrderablePartitions(1, 1999, 3);
-            CheckGetOrderablePartitions(2147473647, 9999, 4);
-            CheckGetOrderablePartitions(2147484647, 1000, 8);
-            CheckGetOrderablePartitions(-2147484647, 1000, 16);
-            CheckGetOrderablePartitions(-1999, 5000, 63);
-            CheckGetOrderablePartitions(9223372036854774807, 999, 13); // close to Int64.Max
-        }
-
-        private static void CheckGetOrderablePartitions(long from, long count, int dop)
+        [Theory]
+        [InlineData(0, 1, 1)]
+        [InlineData(1, 1999, 3)]
+        [InlineData(2147473647, 9999, 4)]
+        [InlineData(2147484647, 1000, 8)]
+        [InlineData(-2147484647, 1000, 16)]
+        [InlineData(-1999, 5000, 63)]
+        [InlineData(9223372036854774807, 999, 13)] // close to Int64.Max
+        public static void CheckGetOrderablePartitions(long from, long count, int dop)
         {
             long to = from + count;
             var partitioner = Partitioner.Create(from, to);
@@ -159,19 +147,15 @@ namespace System.Collections.Concurrent.Tests
         /// </summary>
         /// <param name="from"></param>
         /// <param name="count"></param>
-        [Fact]
-        public static void GetOrderableDynamicPartitions()
-        {
-            GetOrderableDynamicPartitions(0, 1);
-            GetOrderableDynamicPartitions(1, 1999);
-            GetOrderableDynamicPartitions(2147473647, 9999);
-            GetOrderableDynamicPartitions(2147484647, 1000);
-            GetOrderableDynamicPartitions(-2147484647, 1000);
-            GetOrderableDynamicPartitions(-1999, 5000);
-            GetOrderableDynamicPartitions(9223372036854774807, 999); // close to Int64.Max
-        }
-
-        private static void GetOrderableDynamicPartitions(long from, long count)
+        [Theory]
+        [InlineData(0, 1)]
+        [InlineData(1, 1999)]
+        [InlineData(2147473647, 9999)]
+        [InlineData(2147484647, 1000)]
+        [InlineData(-2147484647, 1000)]
+        [InlineData(-1999, 5000)]
+        [InlineData(9223372036854774807, 999)] // close to Int64.Max
+        public static void GetOrderableDynamicPartitions(long from, long count)
         {
             long to = from + count;
             var partitioner = Partitioner.Create(from, to);
@@ -202,17 +186,13 @@ namespace System.Collections.Concurrent.Tests
         /// The range sizes for individual ranges are checked to see if they are equal to
         /// desiredRangeSize. The last range may have less than or equal to desiredRangeSize.
         /// </summary>
-        [Fact]
-        public static void CheckGetPartitionsWithRange()
-        {
-            CheckGetPartitionsWithRange(1999, 1000, 20, 1);
-            CheckGetPartitionsWithRange(-1999, 1000, 100, 2);
-            CheckGetPartitionsWithRange(1999, 1, 2000, 3);
-            CheckGetPartitionsWithRange(9223372036854774807, 999, 600, 4);
-            CheckGetPartitionsWithRange(-9223372036854774807, 1000, 19, 63);
-        }
-
-        private static void CheckGetPartitionsWithRange(long from, long count, long desiredRangeSize, int dop)
+        [Theory]
+        [InlineData(1999, 1000, 20, 1)]
+        [InlineData(-1999, 1000, 100, 2)]
+        [InlineData(1999, 1, 2000, 3)]
+        [InlineData(9223372036854774807, 999, 600, 4)]
+        [InlineData(-9223372036854774807, 1000, 19, 63)]
+        public static void CheckGetPartitionsWithRange(long from, long count, long desiredRangeSize, int dop)
         {
             long to = from + count;
             var partitioner = Partitioner.Create(from, to, desiredRangeSize);
@@ -244,17 +224,13 @@ namespace System.Collections.Concurrent.Tests
         /// The range sizes for individual ranges are checked to see if they are equal to
         /// desiredRangeSize. The last range may have less than or equal to desiredRangeSize.
         /// </summary>
-        [Fact]
-        public static void CheckGetDynamicPartitionsWithRange()
-        {
-            CheckGetDynamicPartitionsWithRange(1999, 1000, 20);
-            CheckGetDynamicPartitionsWithRange(-1999, 1000, 100);
-            CheckGetDynamicPartitionsWithRange(1999, 1, 2000);
-            CheckGetDynamicPartitionsWithRange(9223372036854774807, 999, 600);
-            CheckGetDynamicPartitionsWithRange(-9223372036854774807, 1000, 19);
-        }
-
-        private static void CheckGetDynamicPartitionsWithRange(long from, long count, long desiredRangeSize)
+        [Theory]
+        [InlineData(1999, 1000, 20)]
+        [InlineData(-1999, 1000, 100)]
+        [InlineData(1999, 1, 2000)]
+        [InlineData(9223372036854774807, 999, 600)]
+        [InlineData(-9223372036854774807, 1000, 19)]
+        public static void CheckGetDynamicPartitionsWithRange(long from, long count, long desiredRangeSize)
         {
             long to = from + count;
             var partitioner = Partitioner.Create(from, to, desiredRangeSize);
@@ -286,17 +262,13 @@ namespace System.Collections.Concurrent.Tests
         /// The range sizes for individual ranges are checked to see if they are equal to
         /// desiredRangeSize. The last range may have less than or equal to desiredRangeSize.
         /// </summary>
-        [Fact]
-        public static void CheckGetOrderablePartitionsWithRange()
-        {
-            CheckGetOrderablePartitionsWithRange(1999, 1000, 20, 1);
-            CheckGetOrderablePartitionsWithRange(-1999, 1000, 100, 2);
-            CheckGetOrderablePartitionsWithRange(1999, 1, 2000, 3);
-            CheckGetOrderablePartitionsWithRange(9223372036854774807, 999, 600, 4);
-            CheckGetOrderablePartitionsWithRange(-9223372036854774807, 1000, 19, 63);
-        }
-
-        private static void CheckGetOrderablePartitionsWithRange(long from, long count, long desiredRangeSize, int dop)
+        [Theory]
+        [InlineData(1999, 1000, 20, 1)]
+        [InlineData(-1999, 1000, 100, 2)]
+        [InlineData(1999, 1, 2000, 3)]
+        [InlineData(9223372036854774807, 999, 600, 4)]
+        [InlineData(-9223372036854774807, 1000, 19, 63)]
+        public static void CheckGetOrderablePartitionsWithRange(long from, long count, long desiredRangeSize, int dop)
         {
             long to = from + count;
             var partitioner = Partitioner.Create(from, to, desiredRangeSize);
@@ -339,17 +311,13 @@ namespace System.Collections.Concurrent.Tests
         /// The range sizes for individual ranges are checked to see if they are equal to
         /// desiredRangeSize. The last range may have less than or equal to desiredRangeSize.
         /// </summary>
-        [Fact]
-        public static void GetOrderableDynamicPartitionsWithRange()
-        {
-            GetOrderableDynamicPartitionsWithRange(1999, 1000, 20);
-            GetOrderableDynamicPartitionsWithRange(-1999, 1000, 100);
-            GetOrderableDynamicPartitionsWithRange(1999, 1, 2000);
-            GetOrderableDynamicPartitionsWithRange(9223372036854774807, 999, 600);
-            GetOrderableDynamicPartitionsWithRange(-9223372036854774807, 1000, 19);
-        }
-
-        private static void GetOrderableDynamicPartitionsWithRange(long from, long count, long desiredRangeSize)
+        [Theory]
+        [InlineData(1999, 1000, 20)]
+        [InlineData(-1999, 1000, 100)]
+        [InlineData(1999, 1, 2000)]
+        [InlineData(9223372036854774807, 999, 600)]
+        [InlineData(-9223372036854774807, 1000, 19)]
+        public static void GetOrderableDynamicPartitionsWithRange(long from, long count, long desiredRangeSize)
         {
             long to = from + count;
             var partitioner = Partitioner.Create(from, to, desiredRangeSize);
@@ -408,14 +376,10 @@ namespace System.Collections.Concurrent.Tests
         /// <summary>
         /// Ensure that the range partitioner doesn't chunk up elements i.e. uses chunk size = 1
         /// </summary>
-        [Fact]
-        public static void RangePartitionerChunking()
-        {
-            RangePartitionerChunking(2147473647, 9999, 4);
-            RangePartitionerChunking(2147484647, 1000, -1);
-        }
-
-        private static void RangePartitionerChunking(long from, long count, long rangeSize)
+        [Theory]
+        [InlineData(2147473647, 9999, 4)]
+        [InlineData(2147484647, 1000, -1)]
+        public static void RangePartitionerChunking(long from, long count, long rangeSize)
         {
             long to = from + count;
 
@@ -481,14 +445,10 @@ namespace System.Collections.Concurrent.Tests
         /// <summary>
         /// Ensure that the range partitioner doesn't chunk up elements i.e. uses chunk size = 1
         /// </summary>
-        [Fact]
-        public static void RangePartitionerDynamicChunking()
-        {
-            RangePartitionerDynamicChunking(2147473647, 9999, 4);
-            RangePartitionerDynamicChunking(2147484647, 1000, -1);
-        }
-
-        private static void RangePartitionerDynamicChunking(long from, long count, long rangeSize)
+        [Theory]
+        [InlineData(2147473647, 9999, 4)]
+        [InlineData(2147484647, 1000, -1)]
+        public static void RangePartitionerDynamicChunking(long from, long count, long rangeSize)
         {
             long to = from + count;
 
@@ -552,7 +512,7 @@ namespace System.Collections.Concurrent.Tests
             // Verifying that all items are there
             Assert.Equal(count, actualCount);
         }
-        
+
         /// <summary>
         /// Ensure that the range partitioner doesn't exceed the exclusive bound
         /// </summary>
index 0a0fa4eed58768d1d66324e85526bbb2152f9f9e..c3795c8d9a9a637d545caae2aa103e2d6c4e2232 100644 (file)
@@ -25,15 +25,11 @@ namespace System.Collections.Concurrent.Tests
         /// <summary>
         /// Test passing invalid range, 'to' is smaller or equal than 'from'
         /// </summary>
-        [Fact]
-        public static void IntFromNotGreaterThanTo()
-        {
-            IntFromNotGreaterThanTo(1000, 0, 100);
-            IntFromNotGreaterThanTo(899, 899, 100);
-            IntFromNotGreaterThanTo(-19999, -299999, 100);
-        }
-
-        private static void IntFromNotGreaterThanTo(int from, int to, int rangesize)
+        [Theory]
+        [InlineData(1000, 0, 100)]
+        [InlineData(899, 899, 100)]
+        [InlineData(-19999, -299999, 100)]
+        public static void IntFromNotGreaterThanTo(int from, int to, int rangesize)
         {
             Assert.Throws<ArgumentOutOfRangeException>(() => Partitioner.Create(from, to));
             Assert.Throws<ArgumentOutOfRangeException>(() => Partitioner.Create(from, to, rangesize));
@@ -41,15 +37,11 @@ namespace System.Collections.Concurrent.Tests
 
         /// <summary>
         /// Test passing invalid range, 'to' is smaller or equal than 'from', on long overload
-        [Fact]
-        public static void LongFromNotGreaterThanTo()
-        {
-            LongFromNotGreaterThanTo(1000, 0, 100);
-            LongFromNotGreaterThanTo(899, 899, 100);
-            LongFromNotGreaterThanTo(-19999, -299999, 100);
-        }
-
-        private static void LongFromNotGreaterThanTo(long from, long to, int rangesize)
+        [Theory]
+        [InlineData(1000, 0, 100)]
+        [InlineData(899, 899, 100)]
+        [InlineData(-19999, -299999, 100)]
+        public static void LongFromNotGreaterThanTo(long from, long to, int rangesize)
         {
             Assert.Throws<ArgumentOutOfRangeException>(() => Partitioner.Create(from, to));
             Assert.Throws<ArgumentOutOfRangeException>(() => Partitioner.Create(from, to, rangesize));
@@ -58,14 +50,10 @@ namespace System.Collections.Concurrent.Tests
         /// <summary>
         /// Test passing invalid range size, less than or equal to 0
         /// </summary>
-        [Fact]
-        public static void InvalidIntRangeSize()
-        {
-            InvalidIntRangeSize(0, 1000, 0);
-            InvalidIntRangeSize(899, 9000, -10);
-        }
-
-        private static void InvalidIntRangeSize(int from, int to, int rangesize)
+        [Theory]
+        [InlineData(0, 1000, 0)]
+        [InlineData(899, 9000, -10)]
+        public static void InvalidIntRangeSize(int from, int to, int rangesize)
         {
             Assert.Throws<ArgumentOutOfRangeException>(() => Partitioner.Create(from, to, rangesize));
         }
@@ -73,14 +61,10 @@ namespace System.Collections.Concurrent.Tests
         /// <summary>
         /// Test passing invalid range size, less than or equal to 0, on long overload
         /// </summary>
-        [Fact]
-        public static void ATestMethod()
-        {
-            InvalidLongRangeSize(0, 1000, 0);
-            InvalidLongRangeSize(899, 9000, -10);
-        }
-
-        private static void InvalidLongRangeSize(long from, long to, long rangesize)
+        [Theory]
+        [InlineData(0, 1000, 0)]
+        [InlineData(899, 9000, -10)]
+        public static void InvalidLongRangeSize(long from, long to, long rangesize)
         {
             Assert.Throws<ArgumentOutOfRangeException>(() => Partitioner.Create(from, to, rangesize));
         }
index a1bc3d7db8805a1aa786b7c4d43011ab34d748b2..192b779249efb2e890c621c50b92025ddb7457a0 100644 (file)
@@ -838,7 +838,7 @@ namespace System.Collections.Immutable.Tests
 
         [Theory]
         [MemberData(nameof(EqualsData))]
-        public void Equals(ImmutableArray<int> first, ImmutableArray<int> second, bool expected)
+        public void EqualsTest(ImmutableArray<int> first, ImmutableArray<int> second, bool expected)
         {
             Assert.Equal(expected, first == second);
             Assert.NotEqual(expected, first != second);
@@ -944,7 +944,7 @@ namespace System.Collections.Immutable.Tests
         [Theory]
         [MemberData(nameof(Int32EnumerableData))]
         [MemberData(nameof(SpecialInt32ImmutableArrayData))]
-        public void GetHashCode(IEnumerable<int> source)
+        public void GetHashCodeTest(IEnumerable<int> source)
         {
             var array = source.ToImmutableArray();
 
@@ -2252,7 +2252,7 @@ namespace System.Collections.Immutable.Tests
 
         [Theory]
         [MemberData(nameof(Int32EnumerableData))]
-        public void DebuggerAttributesValid(IEnumerable<int> source)
+        public void DebuggerAttributesValid_AdditionalCases(IEnumerable<int> source)
         {
             DebuggerAttributes.ValidateDebuggerDisplayReferences(source.ToImmutableArray());
         }
index a0d0df5ea071d6b1805a8e83131aebd1d7e0e4e7..511f2da0baffc44c93933aa51a9455d6dcb00073 100644 (file)
@@ -40,7 +40,23 @@ namespace System.Collections.Immutable.Tests
         [Fact]
         public void RemoveNonExistingTest()
         {
-            this.RemoveNonExistingTest(this.Empty<int>());
+            IImmutableSet<int> emptySet = this.Empty<int>();
+            Assert.Same(emptySet, emptySet.Remove(5));
+
+            // Also fill up a set with many elements to build up the tree, then remove from various places in the tree.
+            const int Size = 200;
+            var set = emptySet;
+            for (int i = 0; i < Size; i += 2)
+            { // only even numbers!
+                set = set.Add(i);
+            }
+
+            // Verify that removing odd numbers doesn't change anything.
+            for (int i = 1; i < Size; i += 2)
+            {
+                var setAfterRemoval = set.Remove(i);
+                Assert.Same(set, setAfterRemoval);
+            }
         }
 
         [Fact]
@@ -381,26 +397,6 @@ namespace System.Collections.Immutable.Tests
             Assert.Equal(initialCount - removedCount, set.Count);
         }
 
-        private void RemoveNonExistingTest(IImmutableSet<int> emptySet)
-        {
-            Assert.Same(emptySet, emptySet.Remove(5));
-
-            // Also fill up a set with many elements to build up the tree, then remove from various places in the tree.
-            const int Size = 200;
-            var set = emptySet;
-            for (int i = 0; i < Size; i += 2)
-            { // only even numbers!
-                set = set.Add(i);
-            }
-
-            // Verify that removing odd numbers doesn't change anything.
-            for (int i = 1; i < Size; i += 2)
-            {
-                var setAfterRemoval = set.Remove(i);
-                Assert.Same(set, setAfterRemoval);
-            }
-        }
-
         private void AddRemoveLoadTestHelper<T>(IImmutableSet<T> set, T[] data)
         {
             Assert.NotNull(set);
index f4e022abef74c50d34f39942d45f12b023fccc2b..d68474ad01f3d560df86e093b520e77ef2515a96 100644 (file)
@@ -106,7 +106,7 @@ namespace System.Collections.Specialized.Tests
         public void Keys_CopyTo(int count, int index)
         {
             MyNameObjectCollection nameObjectCollection = Helpers.CreateNameObjectCollection(count);
-            Keys_CopyTo(nameObjectCollection, index);
+            Keys_CopyTo_Helper(nameObjectCollection, index);
         }
 
         [Fact]
@@ -118,10 +118,10 @@ namespace System.Collections.Specialized.Tests
             nameObjectCollection.Add(null, null);
             nameObjectCollection.Add(null, new Foo("3"));
 
-            Keys_CopyTo(nameObjectCollection, 0);
+            Keys_CopyTo_Helper(nameObjectCollection, 0);
         }
 
-        private static void Keys_CopyTo(MyNameObjectCollection nameObjectCollection, int index)
+        private static void Keys_CopyTo_Helper(MyNameObjectCollection nameObjectCollection, int index)
         {
             ICollection keys = nameObjectCollection.Keys;
             string[] keysArray = new string[index + keys.Count + index];
index ce30429a39aa34fbc6480d5abeb68dae74bbccd7..70d5715f2b4e65df6b7803514648505b964f5048 100644 (file)
@@ -37,7 +37,7 @@ namespace System.Collections.Generic.Tests
         [MemberData(nameof(Int64EnumData))]
         [MemberData(nameof(NonEquatableValueTypeData))]
         [MemberData(nameof(ObjectData))]
-        public void Equals<T>(T left, T right, bool expected)
+        public void EqualsTest<T>(T left, T right, bool expected)
         {
             var comparer = EqualityComparer<T>.Default;
             IEqualityComparer nonGenericComparer = comparer;
@@ -305,7 +305,7 @@ namespace System.Collections.Generic.Tests
         [MemberData(nameof(Int64EnumHashData))]
         [MemberData(nameof(NonEquatableValueTypeHashData))]
         [MemberData(nameof(ObjectHashData))]
-        public void GetHashCode<T>(T value, int expected)
+        public void GetHashCodeTest<T>(T value, int expected)
         {
             var comparer = EqualityComparer<T>.Default;
             IEqualityComparer nonGenericComparer = comparer;
index 1add96637f2ef1f9dafc1ef3f78af12c630b07e3..b23e208bdb78c863537360d88317028568b1aaf3 100644 (file)
@@ -78,7 +78,7 @@ namespace System.ComponentModel.DataAnnotations.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public void Equals(FilterUIHintAttribute attribute, object obj, bool expected)
+        public void EqualsTest(FilterUIHintAttribute attribute, object obj, bool expected)
         {
             Assert.Equal(expected, attribute.Equals(obj));
             Assert.Equal(attribute.GetHashCode(), attribute.GetHashCode());
index a27cfea2ecfbc8f39cb0d4b2190f5a0c028b5db8..350f026b6cee7297bb395a621a5f2f3001621291 100644 (file)
@@ -77,7 +77,7 @@ namespace System.ComponentModel.DataAnnotations.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public void Equals(UIHintAttribute attribute, object obj, bool expected)
+        public void EqualsTest(UIHintAttribute attribute, object obj, bool expected)
         {
             Assert.Equal(expected, attribute.Equals(obj));
             Assert.Equal(attribute.GetHashCode(), attribute.GetHashCode());
index 65f4f7eaf21f2d4d2da181a07fb987de14d2c642..738370a13f3723ffe846a665e17f7a872a6ff64d 100644 (file)
@@ -22,7 +22,7 @@ namespace System.ComponentModel.Design.Tests
         [Theory]
         [InlineData(null)]
         [InlineData("Description")]
-        public void Ctor_Default(string description)
+        public void Ctor_Description(string description)
         {
             using (var transaction = new TestDesignerTransaction(description))
             {
index e3236b0659b9bc0ad81eaffdddfb9da8fcf0056f..6d3ffbd9f7bd293bb0cfb0ae40a14b4badd50c14 100644 (file)
@@ -45,7 +45,7 @@ namespace System.ComponentModel.Design.Serialization.Tests
         [Theory]
         [InlineData(null, null)]
         [InlineData("SerializerTypeName", "BaseSerializerTypeName")]
-        public void Ctor_SerializerTypeName_BaseSerializerType(string serializerTypeName, string baseSerializerTypeName)
+        public void Ctor_SerializerTypeName_BaseSerializerTypeName(string serializerTypeName, string baseSerializerTypeName)
         {
             var attribute = new DesignerSerializerAttribute(serializerTypeName, baseSerializerTypeName);
             Assert.Equal(serializerTypeName, attribute.SerializerTypeName);
index d73cb77f49c667c3a392a529e1599adf1d7a46d7..d6b566715876190ff9b8f8052a5911cc52e6de1b 100644 (file)
@@ -48,7 +48,7 @@ namespace System.ComponentModel.Design.Serialization.Tests
         [Theory]
         [InlineData(null, null, true)]
         [InlineData("SerializerTypeName", "BaseSerializerTypeName", false)]
-        public void Ctor_SerializerTypeName_BaseSerializerType(string serializerTypeName, string baseSerializerTypeName, bool reloadable)
+        public void Ctor_SerializerTypeName_BaseSerializerTypeName(string serializerTypeName, string baseSerializerTypeName, bool reloadable)
         {
             var attribute = new RootDesignerSerializerAttribute(serializerTypeName, baseSerializerTypeName, reloadable);
             Assert.Equal(serializerTypeName, attribute.SerializerTypeName);
index 13692046ddc579e2b2669437dbec2a491acfc13f..9e071a1d587990b9d8bf6ad59cba95612b5d0469 100644 (file)
@@ -15,7 +15,7 @@ namespace System.ComponentModel.Tests
         private static EnumConverter s_someFlagsEnumConverter = new EnumConverter(typeof(SomeFlagsEnum));
 
         [Fact]
-        public static void CanConvertFrom_WithContext()
+        public static void CanConvertFrom_WithContext_EnumConverter()
         {
             CanConvertFrom_WithContext(new object[2, 2]
                 {
@@ -26,7 +26,7 @@ namespace System.ComponentModel.Tests
         }
 
         [Fact]
-        public static void CanConvertTo_WithContext()
+        public static void CanConvertTo_WithContext_EnumConverter()
         {
             CanConvertTo_WithContext(new object[2, 2]
                 {
@@ -37,7 +37,7 @@ namespace System.ComponentModel.Tests
         }
 
         [Fact]
-        public static void ConvertFrom_WithContext()
+        public static void ConvertFrom_WithContext_EnumConverter()
         {
             ConvertFrom_WithContext(new object[2, 3]
                 {
@@ -62,7 +62,7 @@ namespace System.ComponentModel.Tests
         }
 
         [Fact]
-        public static void ConvertTo_WithContext()
+        public static void ConvertTo_WithContext_EnumConverter()
         {
             ConvertTo_WithContext(new object[1, 3]
                 {
index 83e88b943816b91d69fa7f049b01ce978931656c..6a164079cc61bdc2e507ea36f2de7393da02f7d5 100644 (file)
@@ -12,7 +12,7 @@ namespace System.ComponentModel.Tests
     public class MultilineStringConverterTests : ConverterTestBase
     {
         [Fact]
-        public static void ConvertTo_WithContext()
+        public static void ConvertTo_WithContext_MultilineStringConverter()
         {
             using (new ThreadCultureChange(null, CultureInfo.InvariantCulture))
             {
index f61d716f37ed7a07170d718dd353b953ccb9d383..69b9d55a0467359a7d3a428e84ed853c6670a998 100644 (file)
@@ -43,7 +43,7 @@ namespace System.ComponentModel.Tests
         }
 
         [Fact]
-        public static void CanConvertFrom_WithContext()
+        public static void CanConvertFrom_WithContext_NullableConverter()
         {
             CanConvertFrom_WithContext(new object[2, 2]
                 {
@@ -54,7 +54,7 @@ namespace System.ComponentModel.Tests
         }
 
         [Fact]
-        public static void CanConvertTo_WithContext()
+        public static void CanConvertTo_WithContext_NullableConverter()
         {
             CanConvertTo_WithContext(new object[3, 2]
                 {
@@ -66,7 +66,7 @@ namespace System.ComponentModel.Tests
         }
 
         [Fact]
-        public static void ConvertFrom_WithContext()
+        public static void ConvertFrom_WithContext_NullableConverter()
         {
             ConvertFrom_WithContext(new object[3, 3]
                 {
@@ -78,7 +78,7 @@ namespace System.ComponentModel.Tests
         }
 
         [Fact]
-        public static void ConvertTo_WithContext()
+        public static void ConvertTo_WithContext_NullableConverter()
         {
             ConvertTo_WithContext(new object[4, 3]
                 {
index 33f14469dde40f22bcc9481c748554e56d11cf7d..00b644af3379f6059802dfbd2e2fa24214d403b3 100644 (file)
@@ -202,7 +202,7 @@ namespace System.ComponentModel.Tests
         {
             yield return new object[] { new object() };
             yield return new object[] { new Component() };
-            
+
             var mockSite = new Mock<ISite>(MockBehavior.Strict);
             mockSite
                 .Setup(s => s.Container)
@@ -230,7 +230,7 @@ namespace System.ComponentModel.Tests
             {
                 yield return new object[] { new object(), result };
                 yield return new object[] { new Component(), result };
-                
+
                 var mockSite = new Mock<ISite>(MockBehavior.Strict);
                 mockSite
                     .Setup(s => s.Container)
@@ -341,7 +341,7 @@ namespace System.ComponentModel.Tests
         [Theory]
         [InlineData(null)]
         [InlineData(typeof(int))]
-        public void GetReflectionType_InvokeTypeWithoutParent_CallsTypeObjectOverload(Type objectType)
+        public void GetReflectionType_InvokeTypeWithoutParent_CallsTypeObjectOverload_ByType(Type objectType)
         {
             var mockProvider = new Mock<TypeDescriptionProvider>(MockBehavior.Strict);
             mockProvider
@@ -396,7 +396,7 @@ namespace System.ComponentModel.Tests
 
         [Theory]
         [InlineData(1, typeof(int))]
-        public void GetReflectionType_InvokeTypeWithoutParent_CallsTypeObjectOverload(object instance, Type expected)
+        public void GetReflectionType_InvokeTypeWithoutParent_CallsTypeObjectOverload_ByObjectAndType(object instance, Type expected)
         {
             var mockProvider = new Mock<TypeDescriptionProvider>(MockBehavior.Strict);
             mockProvider
@@ -499,7 +499,7 @@ namespace System.ComponentModel.Tests
             // Call again.
             Assert.Same(reflectionType, provider.GetRuntimeType(reflectionType));
         }
-        
+
         [Theory]
         [InlineData(null)]
         [InlineData(typeof(int))]
@@ -571,7 +571,7 @@ namespace System.ComponentModel.Tests
         [Theory]
         [InlineData(null)]
         [InlineData(typeof(int))]
-        public void GetTypeDescriptor_InvokeTypeWithoutParent_CallsTypeObjectOverload(Type objectType)
+        public void GetTypeDescriptor_InvokeTypeWithoutParent_CallsTypeObjectOverload_Type(Type objectType)
         {
             var mockProvider = new Mock<TypeDescriptionProvider>(MockBehavior.Strict);
             mockProvider
@@ -630,7 +630,7 @@ namespace System.ComponentModel.Tests
 
         [Theory]
         [InlineData(1)]
-        public void GetTypeDescriptor_InvokeTypeWithoutParent_CallsTypeObjectOverload(object instance)
+        public void GetTypeDescriptor_InvokeTypeWithoutParent_CallsTypeObjectOverload_Object(object instance)
         {
             var mockProvider = new Mock<TypeDescriptionProvider>(MockBehavior.Strict);
             mockProvider
@@ -783,7 +783,7 @@ namespace System.ComponentModel.Tests
             public SubTypeDescriptionProvider() : base()
             {
             }
-            
+
             public SubTypeDescriptionProvider(TypeDescriptionProvider parent) : base(parent)
             {
             }
index 78d27721c181d0d4eb679ba41a8f97b81d241381..1b7f8a5432e5ca002708b7dc4c38e3accce879d9 100644 (file)
@@ -15,7 +15,7 @@ namespace System.ComponentModel.Tests
         private static TypeListConverter s_converter = new MyTypeListConverter(new Type[] { typeof(bool), typeof(int) });
 
         [Fact]
-        public static void CanConvertFrom_WithContext()
+        public static void CanConvertFrom_WithContext_TypeListConverter()
         {
             CanConvertFrom_WithContext(new object[2, 2]
                 {
@@ -26,7 +26,7 @@ namespace System.ComponentModel.Tests
         }
 
         [Fact]
-        public static void ConvertFrom_WithContext()
+        public static void ConvertFrom_WithContext_TypeListConverter()
         {
             ConvertFrom_WithContext(new object[1, 3]
                 {
@@ -36,7 +36,7 @@ namespace System.ComponentModel.Tests
         }
 
         [Fact]
-        public static void ConvertTo_WithContext()
+        public static void ConvertTo_WithContext_TypeListConverter()
         {
             using (new ThreadCultureChange(CultureInfo.InvariantCulture))
             {
index ea390eb1213859175c42e71c16fa98099c6832e6..c23062e35e0e0fa016b2c36664f939ea040ab892 100644 (file)
@@ -14,7 +14,7 @@ namespace System.ComponentModel.Tests
         private static UriTypeConverter s_converter = new UriTypeConverter();
 
         [Fact]
-        public static void CanConvertFrom_WithContext()
+        public static void CanConvertFrom_WithContext_UriTypeConverter()
         {
             CanConvertFrom_WithContext(new object[3, 2]
                 {
@@ -26,7 +26,7 @@ namespace System.ComponentModel.Tests
         }
 
         [Fact]
-        public static void CanConvertTo_WithContext()
+        public static void CanConvertTo_WithContext_UriTypeConverter()
         {
             CanConvertTo_WithContext(new object[3, 2]
                 {
@@ -38,7 +38,7 @@ namespace System.ComponentModel.Tests
         }
 
         [Fact]
-        public static void ConvertFrom_WithContext()
+        public static void ConvertFrom_WithContext_UriTypeConverter()
         {
             ConvertFrom_WithContext(new object[5, 3]
                 {
@@ -52,7 +52,7 @@ namespace System.ComponentModel.Tests
         }
 
         [Fact]
-        public static void ConvertTo_WithContext()
+        public static void ConvertTo_WithContext_UriTypeConverter()
         {
             ConvertTo_WithContext(new object[3, 3]
                 {
index 47884a1b2a88bec49f469501aeb3ff0c8bae9f49..a2f921fe0f8a20abaf1c6938af982f3f5e18a67c 100644 (file)
@@ -12,7 +12,7 @@ namespace System.ComponentModel.Tests
         private static VersionConverter s_converter = new VersionConverter();
 
         [Fact]
-        public static void CanConvertFrom_WithContext()
+        public static void CanConvertFrom_WithContext_VersionConverter()
         {
             CanConvertFrom_WithContext(new object[3, 2]
                 {
@@ -24,7 +24,7 @@ namespace System.ComponentModel.Tests
         }
 
         [Fact]
-        public static void ConvertFrom_WithContext()
+        public static void ConvertFrom_WithContext_VersionConverter()
         {
             ConvertFrom_WithContext(new object[4, 3]
                 {
@@ -37,7 +37,7 @@ namespace System.ComponentModel.Tests
         }
 
         [Fact]
-        public static void CanConvertTo_WithContext()
+        public static void CanConvertTo_WithContext_VersionConverter()
         {
             CanConvertTo_WithContext(new object[3, 2]
                 {
index bb1caef3a291df0a7a345f0355283075c2b83288..269ae68c75a29b03861159966f7b4cf2cdb2b349 100644 (file)
@@ -29,7 +29,7 @@ namespace System.Composition.AttributeModel.Tests
         [Theory]
         [InlineData(null)]
         [InlineData(typeof(string))]
-        public void Ctor_ContractName(Type contractType)
+        public void Ctor_ContractType(Type contractType)
         {
             var attribute = new ExportAttribute(contractType);
             Assert.Null(attribute.ContractName);
index bd9f374d6191979fb9fba131a9a743a496efaa61..f9860b0e4bd78463f3ea33e5ab43b1f85cb64ab5 100644 (file)
@@ -25,7 +25,7 @@ namespace System.Composition.Runtime.Tests
         [Theory]
         [InlineData(typeof(int), null)]
         [InlineData(typeof(object), "contractName")]
-        public void Ctor_ContractType(Type contractType, string contractName)
+        public void Ctor_ContractType_ContractName(Type contractType, string contractName)
         {
             var contract = new CompositionContract(contractType, contractName);
             Assert.Equal(contractType, contract.ContractType);
index 632fca3e17b5e6d97d3f62a0ce00406df865beca..11f22b56f91b778b452462f60cf244a697fa2348 100644 (file)
@@ -436,7 +436,7 @@ namespace System.Data.Tests
         }
 
         [Fact]
-        public void Equals()
+        public void EqualsTest()
         {
             DataTable table = new DataTable("test_table");
             DataTable table2 = new DataTable("test_table");
index fe0b6cc0ebaddd98ff4ef8d5d6cbf4ccf9e8e680..1aae80f265d574ebb13a16a16bfb8a322e7826e1 100644 (file)
@@ -207,7 +207,7 @@ namespace System.Data.Tests
         }
 
         [Fact]
-        public void Equals()
+        public void EqualsTest()
         {
             DataRelationCollection drcol = _dataset.Relations;
             drcol.Add("CustOrder"
index bad2125e47b80719a21cf401c11d9880d27da346..2c72363a7a50117dac7dab1c0e5e4ea2e4796a43 100644 (file)
@@ -155,7 +155,7 @@ namespace System.Data.Tests
         }
 
         [Fact]
-        public new void ToString()
+        public void ToStringTest()
         {
             var ds = new DataSet();
             DataTable dtChild = DataProvider.CreateChildDataTable();
@@ -441,7 +441,7 @@ namespace System.Data.Tests
             PropertyCollection pc;
             pc = dRel.ExtendedProperties;
 
-            // Checking ExtendedProperties default 
+            // Checking ExtendedProperties default
             Assert.NotNull(pc);
 
             // Checking ExtendedProperties count
index f7a7114721a1469fbe8b9028acdaef2232e66c79..1db12c1ef13f56e3c9e94b1f0fa729cc93e850a2 100644 (file)
@@ -366,7 +366,7 @@ namespace System.Data.Tests
         }
 
         [Fact]
-        public void Equals()
+        public void EqualsTest()
         {
             _tbl.Columns.Add();
             _tbl.Columns.Add();
index 27037a6e2a0a59cbf7b9a51a8bac1de71334fb49..f9e0481d23a6794f3271a8417e53719986cdff91 100644 (file)
@@ -134,7 +134,7 @@ namespace System.Data.Tests
         }
 
         [Fact]
-        public void Equals()
+        public void EqualsTest()
         {
             DataTable myTable = new DataTable("myTable");
             DataRow dr1, dr2;
@@ -389,7 +389,7 @@ namespace System.Data.Tests
         }
 
         [Fact]
-        public new void GetHashCode()
+        public void GetHashCodeTest()
         {
             int iHashCode;
             DataRow dr;
index 062d11ad46460a2c7b9e92adace3b0bdbd4f0806..5bc620ca50e490972b5d27316d6263bcaacb6eef 100644 (file)
@@ -223,7 +223,7 @@ namespace System.Data.Tests
         }
 
         [Fact]
-        public void Equals()
+        public void EqualsTest()
         {
             DataTable dt = DataProvider.CreateParentDataTable();
             DataView dv = new DataView(dt);
index 0b37ff2c65bb0de3698a1f99a7e32d807dc55104..44838da48e721dffee0f088c3659e821122369a6 100644 (file)
@@ -262,7 +262,7 @@ namespace System.Data.Tests
             Assert.Equal("Table4", array1[5].TableName);
         }
         [Fact]
-        public void Equals()
+        public void EqualsTest()
         {
             DataTableCollection tbcol1 = _dataset[0].Tables;
             DataTableCollection tbcol2 = _dataset[1].Tables;
index 08f34c28051f0fdfcbb68efab5429df83857f646..55227a07ff721f8b033f50ac79c43da663c712a6 100644 (file)
@@ -1846,13 +1846,13 @@ Assert.False(true);
             Assert.False(col2.Unique);
         }
 
-        private void RowChanging(object o, DataRowChangeEventArgs e)
+        private void RowChangingEventHandler(object o, DataRowChangeEventArgs e)
         {
             Assert.Equal(_rowChangingExpectedAction, e.Action);
             _rowChangingRowChanging = true;
         }
 
-        private void RowChanged(object o, DataRowChangeEventArgs e)
+        private void RowChangedEventHandler(object o, DataRowChangeEventArgs e)
         {
             Assert.Equal(_rowChangingExpectedAction, e.Action);
             _rowChangingRowChanged = true;
@@ -1867,8 +1867,8 @@ Assert.False(true);
             DataTable dt = new DataTable("table");
             dt.Columns.Add("col1");
             dt.Columns.Add("col2");
-            dt.RowChanging += new DataRowChangeEventHandler(RowChanging);
-            dt.RowChanged += new DataRowChangeEventHandler(RowChanged);
+            dt.RowChanging += new DataRowChangeEventHandler(RowChangingEventHandler);
+            dt.RowChanged += new DataRowChangeEventHandler(RowChangedEventHandler);
             _rowChangingExpectedAction = DataRowAction.Add;
             dt.Rows.Add(new object[] { 1, 2 });
             Assert.True(_rowChangingRowChanging);
index c03ae09c3827bd16d633523d02fcb3a84f0c8a13..eaca8602d08ae3c21ac061ce65d630c3c3426c68 100644 (file)
@@ -690,7 +690,7 @@ namespace System.Data.Tests
         }
 
         [Fact]
-        public new void GetHashCode()
+        public void GetHashCodeTest()
         {
             DataTable dt = DataProvider.CreateParentDataTable();
             int iHashCode;
@@ -1431,7 +1431,7 @@ namespace System.Data.Tests
         }
 
         [Fact]
-        public new void ToString()
+        public void ToStringTest()
         {
             DataTable dt = DataProvider.CreateParentDataTable();
             dt.DisplayExpression = dt.Columns[0].ColumnName;
index 3fa8db87d390dab5fab598642de57421f47f98d6..cb334a4cfcddf99e291223e570f32ad364dd03bc 100644 (file)
@@ -51,7 +51,7 @@ namespace System.Data.Tests
         }
 
         [Fact]
-        public void Equals()
+        public void EqualsTest()
         {
             var ds = new DataSet();
             DataTable dtParent = DataProvider.CreateParentDataTable();
@@ -120,7 +120,7 @@ namespace System.Data.Tests
         }
 
         [Fact]
-        public new void ToString()
+        public void ToStringTest()
         {
             DataTable dtParent = DataProvider.CreateParentDataTable();
             DataTable dtChild = DataProvider.CreateChildDataTable();
index 0db251aad2699ae7432fbd2e987e5d96bc5e1550..e417fff21b32723f5e0b59c00f219dd92681c0c5 100644 (file)
@@ -236,7 +236,7 @@ namespace System.Data.Tests.SqlTypes
 
         // Equals
         [Fact]
-        public void Equals()
+        public void EqualsTest()
         {
             SqlBoolean sqlTrue2 = new SqlBoolean(true);
             SqlBoolean sqlFalse2 = new SqlBoolean(false);
index 2d2a70789fdd34107d1b12ff8585ca29b3fa49bb..52c2ec4fddd0d1a098bc872eb3e6ab3f827b29dc 100644 (file)
@@ -104,7 +104,7 @@ namespace System.Data.Tests.SqlTypes
         }
 
         [Fact]
-        public void Equals()
+        public void EqualsTest()
         {
             SqlInt32 x;
             SqlInt32 y;
index 9cef44f607df173028cdf79af9cebc72f1c19e15..83f2b757004aabb6cc34bde47fd020ec44e0b0ac 100644 (file)
@@ -99,7 +99,7 @@ namespace System.Data.Tests
         }
 
         [Fact]
-        public new void ToString()
+        public void ToStringTest()
         {
             DataTable dtParent = DataProvider.CreateParentDataTable();
 
index 0ea86214aed7da21a4db8a428b5181f00efbac64..327ffb17672ac4c46d97430a1ecc0e841d7626a9 100644 (file)
@@ -46,7 +46,7 @@ namespace MonoTests.System.Data
         }
 
         [Fact]
-        public void Equals()
+        public void EqualsTest()
         {
             DataRowComparer<DataRow> c = DataRowComparer.Default;
 
index ff72ff85639cca02d5689e56b477e7d8169498fe..1cea2e439d186812c567db1f1216a159acc1e0f9 100644 (file)
@@ -22,7 +22,7 @@ namespace System.Data.OleDb.Tests
         [ConditionalTheory(Helpers.IsDriverAvailable)]
         [InlineData(CommandType.Text)]
         [InlineData(CommandType.TableDirect)]
-        public void DeriveParameters_NullCommand_Throws(CommandType commandType)
+        public void DeriveParameters_InvalidCommandType_Throws(CommandType commandType)
         {
             using (var cmd = (OleDbCommand)OleDbFactory.Instance.CreateCommand())
             {
index c0ff2deda8e44c5276af5dc9bf911b319f3c651a..4e38d973a2d7c5ffdfe60b0bcc7abb7b61a50816 100644 (file)
@@ -402,7 +402,7 @@ namespace System.Diagnostics.Tests
             MemberData(nameof(StartOSXProcessWithArgumentList))]
         [PlatformSpecific(TestPlatforms.OSX)]
         [OuterLoop("Opens browser")]
-        public void ProcessStart_UseShellExecuteTrue_OpenUrl_SuccessfullyReadsArgument(string[] argumentList)
+        public void ProcessStart_UseShellExecuteTrue_OpenUrl_SuccessfullyReadsArgumentArray(string[] argumentList)
         {
             var startInfo = new ProcessStartInfo { UseShellExecute = true, FileName = "https://github.com/dotnet/corefx"};
 
index 0915dd253776686a8b6d45f5fb023a1c87bce851..900f6dbbb26d7100cc5aedf7b2361131bd7626ae 100644 (file)
@@ -124,7 +124,7 @@ namespace System.Diagnostics.Tests
         [Theory]
         [InlineData(true)]
         [InlineData(false)]
-        public void Ctor_ThrownException_GetFramesReturnsExpected(bool fNeedFileInfo)
+        public void Ctor_Bool_ThrownException_GetFramesReturnsExpected(bool fNeedFileInfo)
         {
             var stackTrace = new StackTrace(InvokeException(), fNeedFileInfo);
             VerifyFrames(stackTrace, fNeedFileInfo);
index 34e0eac0c111d522758142e331160afc206b3f81..3b2958f0b53a152049b0ec57d0e9b100e9b0069d 100644 (file)
@@ -55,7 +55,7 @@ namespace System.DirectoryServices.AccountManagement.Tests
         [InlineData(ContextType.Machine, "", null)]
         [InlineData(ContextType.Machine, "\0", null)]
         [InlineData(ContextType.Machine, "name", null)]
-        public void Ctor_ContextType_Name(ContextType contextType, string name, string container)
+        public void Ctor_ContextType_Name_Container(ContextType contextType, string name, string container)
         {
             var context = new PrincipalContext(contextType, name, container);
             Assert.Equal(contextType, context.ContextType);
index 0a635b65c343e1d95d9c9745280bacefd262bb9b..ee262ec1a03c17703de03f6044171dc6755c9110 100644 (file)
@@ -58,7 +58,7 @@ namespace System.DirectoryServices.Protocols.Tests
 
         [Theory]
         [MemberData(nameof(Ctor_Identifier_NetworkCredential_TestData))]
-        public void Ctor_Identifier_AuthType(LdapDirectoryIdentifier identifier, NetworkCredential credential)
+        public void Ctor_Identifier_Credential(LdapDirectoryIdentifier identifier, NetworkCredential credential)
         {
             var connection = new LdapConnection(identifier, credential);
             Assert.Equal(AuthType.Negotiate, connection.AuthType);
@@ -76,7 +76,7 @@ namespace System.DirectoryServices.Protocols.Tests
 
         [Theory]
         [MemberData(nameof(Ctor_Identifier_NetworkCredential_AuthType_TestData))]
-        public void Ctor_Identifier_AuthType(LdapDirectoryIdentifier identifier, NetworkCredential credential, AuthType authType)
+        public void Ctor_Identifier_Credential_AuthType(LdapDirectoryIdentifier identifier, NetworkCredential credential, AuthType authType)
         {
             var connection = new LdapConnection(identifier, credential, authType);
             Assert.Equal(authType, connection.AuthType);
index 1d138afa134bc7fe214d0d8a613660a9a0ae447e..590da560d8383f95d7d851614e9f4e77c72cc119 100644 (file)
@@ -31,7 +31,7 @@ namespace System.DirectoryServices.Protocols.Tests
 
         [Theory]
         [MemberData(nameof(Ctor_QuerySid_TestData))]
-        public void Ctor_QuerySid_TestData(SecurityIdentifier querySid, byte[] expectedValue)
+        public void Ctor_QuerySid_Test(SecurityIdentifier querySid, byte[] expectedValue)
         {
             var control = new QuotaControl(querySid);
             Assert.True(control.IsCritical);
index c5c6c103d03e0cd76ca1466eb60ebfe2aee7cfc5..e80caf642722cbd9bfbe74114402c8a04205925c 100644 (file)
@@ -20,7 +20,7 @@ namespace System.DirectoryServices.Protocols.Tests
         [Theory]
         [InlineData("", null, false)]
         [InlineData("AttributeName", null, false)]
-        public void Ctor_Default(string attributeName, string matchingRule, bool reverseOrder)
+        public void Ctor_AttributeName_MatchingRule_ReverseOrder(string attributeName, string matchingRule, bool reverseOrder)
         {
             var sortKey = new SortKey(attributeName, matchingRule, reverseOrder);
             Assert.Equal(attributeName, sortKey.AttributeName);
index 175a6c5e5bf36510ef9824356095f18864411ff4..40e2ec0eedd4b05ef6ee665c146a7980778b1357 100644 (file)
@@ -397,7 +397,7 @@ namespace System.Drawing.Tests
         [ConditionalFact(Helpers.IsDrawingSupported)]
         public void ExtractAssociatedIcon_FilePath_Success()
         {
-            ExtractAssociatedIcon_FilePath_Success(Helpers.GetTestBitmapPath("48x48_multiple_entries_4bit.ico"));
+            ExtractAssociatedIcon_FilePath_Success_Helper(Helpers.GetTestBitmapPath("48x48_multiple_entries_4bit.ico"));
         }
 
         [PlatformSpecific(TestPlatforms.Windows)] // UNC
@@ -422,10 +422,10 @@ namespace System.Drawing.Tests
 
             Assert.True(new Uri(bitmapUncPath).IsUnc);
 
-            ExtractAssociatedIcon_FilePath_Success(bitmapUncPath);
+            ExtractAssociatedIcon_FilePath_Success_Helper(bitmapUncPath);
         }
 
-        private void ExtractAssociatedIcon_FilePath_Success(string filePath)
+        private void ExtractAssociatedIcon_FilePath_Success_Helper(string filePath)
         {
             using (Icon icon = Icon.ExtractAssociatedIcon(filePath))
             {
index 02247905a6dcaa29385a04470da6ce93845b292c..00df07bf7470f981cbe7bbb7683be0999c83d278 100644 (file)
@@ -404,7 +404,7 @@ namespace System.Drawing.Imaging.Tests
 
         [ConditionalTheory(Helpers.IsDrawingSupported)]
         [MemberData(nameof(Description_TestData))]
-        public void Ctor_StringIntPtrEmfType_Success(string description)
+        public void Ctor_StringIntPtrEmfTypeDescription_Success(string description)
         {
             string fileName = GetPath("newTestImage.wmf");
             using (Bitmap bmp = new Bitmap(10, 10, PixelFormat.Format32bppArgb))
@@ -677,7 +677,7 @@ namespace System.Drawing.Imaging.Tests
 
         [ConditionalTheory(Helpers.IsDrawingSupported)]
         [MemberData(nameof(MetafileFrameUnit_Invalid_TestData))]
-        public void Ctor_InvalidEmfTypeII_ThrowsArgumentException(MetafileFrameUnit frameUnit)
+        public void Ctor_InvalidFrameUnit_ThrowsArgumentException(MetafileFrameUnit frameUnit)
         {
             string fileName = GetPath("newTestImage.wmf");
             using (Bitmap bmp = new Bitmap(10, 10, PixelFormat.Format32bppArgb))
@@ -861,7 +861,7 @@ namespace System.Drawing.Imaging.Tests
 
         [ConditionalTheory(Helpers.IsDrawingSupported)]
         [MemberData(nameof(MetafileFrameUnit_Invalid_TestData))]
-        public void Ctor_InvalidEmfTypeIII_ThrowsArgumentException(MetafileFrameUnit frameUnit)
+        public void Ctor_InvalidFrameUnitIII_ThrowsArgumentException(MetafileFrameUnit frameUnit)
         {
             using (var stream = new MemoryStream())
             using (Bitmap bmp = new Bitmap(10, 10, PixelFormat.Format32bppArgb))
index ef19f2d0e9e5b05dc972ea9b9e85448316e2c4d8..a0fc291280badf81690cf82a7bb6c740f186403d 100644 (file)
@@ -2106,7 +2106,7 @@ namespace MonoTests.System.Drawing
                     new CharacterRange (2, 1)
                 };
 
-        Region[] Measure(Graphics gfx, RectangleF rect)
+        Region[] Measure_Helper(Graphics gfx, RectangleF rect)
         {
             using (StringFormat format = StringFormat.GenericTypographic)
             {
@@ -2124,10 +2124,10 @@ namespace MonoTests.System.Drawing
         {
             using (Graphics gfx = Graphics.FromImage(new Bitmap(1, 1)))
             {
-                Region[] zero = Measure(gfx, new RectangleF(0, 0, 0, 0));
+                Region[] zero = Measure_Helper(gfx, new RectangleF(0, 0, 0, 0));
                 Assert.Equal(3, zero.Length);
 
-                Region[] small = Measure(gfx, new RectangleF(0, 0, 100, 100));
+                Region[] small = Measure_Helper(gfx, new RectangleF(0, 0, 100, 100));
                 Assert.Equal(3, small.Length);
                 for (int i = 0; i < 3; i++)
                 {
@@ -2139,7 +2139,7 @@ namespace MonoTests.System.Drawing
                     Assert.Equal(sb.Height, zb.Height);
                 }
 
-                Region[] max = Measure(gfx, new RectangleF(0, 0, float.MaxValue, float.MaxValue));
+                Region[] max = Measure_Helper(gfx, new RectangleF(0, 0, float.MaxValue, float.MaxValue));
                 Assert.Equal(3, max.Length);
                 for (int i = 0; i < 3; i++)
                 {
@@ -2158,7 +2158,7 @@ namespace MonoTests.System.Drawing
         {
             using (Graphics gfx = Graphics.FromImage(new Bitmap(1, 1)))
             {
-                Region[] min = Measure(gfx, new RectangleF(0, 0, float.MinValue, float.MinValue));
+                Region[] min = Measure_Helper(gfx, new RectangleF(0, 0, float.MinValue, float.MinValue));
                 Assert.Equal(3, min.Length);
                 for (int i = 0; i < 3; i++)
                 {
@@ -2169,7 +2169,7 @@ namespace MonoTests.System.Drawing
                     Assert.Equal(8388608.0f, mb.Height);
                 }
 
-                Region[] neg = Measure(gfx, new RectangleF(0, 0, -20, -20));
+                Region[] neg = Measure_Helper(gfx, new RectangleF(0, 0, -20, -20));
                 Assert.Equal(3, neg.Length);
                 for (int i = 0; i < 3; i++)
                 {
index 989a09c77ca0d093087014bec927511c74261fa9..c12230d9fd769e11a3601f35702f3483213d31f3 100644 (file)
@@ -250,7 +250,7 @@ namespace System.Drawing.Primitives.Tests
 
         [Theory]
         [MemberData(nameof(ColorNamePairs))]
-        public void GetHashCode(string name1, string name2)
+        public void GetHashCodeTest(string name1, string name2)
         {
             Assert.NotEqual(name1, name2);
             Color c1 = GetColorByProperty(name1) ?? Color.FromName(name1);
index c326155e60759485d6d42943dbb006c65dc2de7d..da82bbb23730c58934a3f1074d3f79d8109135f7 100644 (file)
@@ -60,7 +60,7 @@ namespace System.Globalization.Tests
         [InlineData("en-US", CompareOptions.IgnoreCase, "en-US", CompareOptions.IgnoreSymbols, false)]
         [InlineData("en-US", CompareOptions.IgnoreCase, "fr-FR", CompareOptions.IgnoreCase, false)]
         [InlineData("en-US", CompareOptions.IgnoreCase, "fr-FR", CompareOptions.Ordinal, false)]
-        public void Equals(string cultureName1, CompareOptions options1, string cultureName2, CompareOptions options2, bool expected)
+        public void EqualsTest(string cultureName1, CompareOptions options1, string cultureName2, CompareOptions options2, bool expected)
         {
             StringComparer comparer1 = new CultureInfo(cultureName1).CompareInfo.GetStringComparer(options1);
             StringComparer comparer2 = new CultureInfo(cultureName2).CompareInfo.GetStringComparer(options2);
index ddd5fc9b62a13e29453753a74259b0e41c4bd60b..f1a65e0fb8c4d75b5288e6ca213958ab504dfe53 100644 (file)
@@ -164,21 +164,21 @@ namespace System.Globalization.Tests
         [MemberData(nameof(GetAscii_Invalid_TestData))]
         public void GetAscii_Invalid(string unicode, int index, int count, Type exceptionType)
         {
-            GetAscii_Invalid(new IdnMapping() { UseStd3AsciiRules = false }, unicode, index, count, exceptionType);
-            GetAscii_Invalid(new IdnMapping() { UseStd3AsciiRules = true }, unicode, index, count, exceptionType);
-        }
-
-        private static void GetAscii_Invalid(IdnMapping idnMapping, string unicode, int index, int count, Type exceptionType)
-        {
-            if (unicode == null || index + count == unicode.Length)
+            static void getAscii_Invalid(IdnMapping idnMapping, string unicode, int index, int count, Type exceptionType)
             {
-                if (unicode == null || index == 0)
+                if (unicode == null || index + count == unicode.Length)
                 {
-                    Assert.Throws(exceptionType, () => idnMapping.GetAscii(unicode));
+                    if (unicode == null || index == 0)
+                    {
+                        Assert.Throws(exceptionType, () => idnMapping.GetAscii(unicode));
+                    }
+                    Assert.Throws(exceptionType, () => idnMapping.GetAscii(unicode, index));
                 }
-                Assert.Throws(exceptionType, () => idnMapping.GetAscii(unicode, index));
+                Assert.Throws(exceptionType, () => idnMapping.GetAscii(unicode, index, count));
             }
-            Assert.Throws(exceptionType, () => idnMapping.GetAscii(unicode, index, count));
+
+            getAscii_Invalid(new IdnMapping() { UseStd3AsciiRules = false }, unicode, index, count, exceptionType);
+            getAscii_Invalid(new IdnMapping() { UseStd3AsciiRules = true }, unicode, index, count, exceptionType);
         }
 
         [Fact]
index 3d3b5685fad05a60ff240e151d7967adad4c394e..6cafb29e901d12f4961eed345ab41046d887822c 100644 (file)
@@ -107,21 +107,21 @@ namespace System.Globalization.Tests
         [MemberData(nameof(GetUnicode_Invalid_TestData))]
         public void GetUnicode_Invalid(string ascii, int index, int count, Type exceptionType)
         {
-            GetUnicode_Invalid(new IdnMapping() { UseStd3AsciiRules = false }, ascii, index, count, exceptionType);
-            GetUnicode_Invalid(new IdnMapping() { UseStd3AsciiRules = true }, ascii, index, count, exceptionType);
-        }
-
-        private static void GetUnicode_Invalid(IdnMapping idnMapping, string ascii, int index, int count, Type exceptionType)
-        {
-            if (ascii == null || index + count == ascii.Length)
+            static void getUnicode_Invalid(IdnMapping idnMapping, string ascii, int index, int count, Type exceptionType)
             {
-                if (ascii == null || index == 0)
+                if (ascii == null || index + count == ascii.Length)
                 {
-                    Assert.Throws(exceptionType, () => idnMapping.GetUnicode(ascii));
+                    if (ascii == null || index == 0)
+                    {
+                        Assert.Throws(exceptionType, () => idnMapping.GetUnicode(ascii));
+                    }
+                    Assert.Throws(exceptionType, () => idnMapping.GetUnicode(ascii, index));
                 }
-                Assert.Throws(exceptionType, () => idnMapping.GetUnicode(ascii, index));
+                Assert.Throws(exceptionType, () => idnMapping.GetUnicode(ascii, index, count));
             }
-            Assert.Throws(exceptionType, () => idnMapping.GetUnicode(ascii, index, count));
+
+            getUnicode_Invalid(new IdnMapping() { UseStd3AsciiRules = false }, ascii, index, count, exceptionType);
+            getUnicode_Invalid(new IdnMapping() { UseStd3AsciiRules = true }, ascii, index, count, exceptionType);
         }
     }
 }
index 650e8b53e500295a1dab98fd72debf20d19ff0f6..eacaea9a2b23623e9a74f12aa358e93ae5342744 100644 (file)
@@ -129,7 +129,7 @@ namespace System.Globalization.Tests
         [InlineData(false, true)]
         [InlineData(true, false)]
         [InlineData(true, true)]
-        public static void Equals(bool allowUnassigned, bool useStd3AsciiRules)
+        public static void EqualsTest(bool allowUnassigned, bool useStd3AsciiRules)
         {
             // first check for equals
             IdnMapping original = new IdnMapping() { AllowUnassigned = allowUnassigned, UseStd3AsciiRules = useStd3AsciiRules };
index 0180d7ef6e70d2235619e42d4c72da86fce661a7..3b2f121f586b7a6847e352c6235f7fd4d9dc7906 100644 (file)
@@ -267,14 +267,14 @@ namespace System.Globalization.Tests
         [MemberData(nameof(Compare_Kana_TestData))]
         public void CompareWithKana(CompareInfo compareInfo, string string1, string string2, CompareOptions options, int expected)
         {
-            Compare(compareInfo, string1, 0, string1?.Length ?? 0, string2, 0, string2?.Length ?? 0, options, expected);
+            Compare_Advanced(compareInfo, string1, 0, string1?.Length ?? 0, string2, 0, string2?.Length ?? 0, options, expected);
         }
 
         [Theory]
         [MemberData(nameof(Compare_TestData))]
         public void Compare(CompareInfo compareInfo, string string1, string string2, CompareOptions options, int expected)
         {
-            Compare(compareInfo, string1, 0, string1?.Length ?? 0, string2, 0, string2?.Length ?? 0, options, expected);
+            Compare_Advanced(compareInfo, string1, 0, string1?.Length ?? 0, string2, 0, string2?.Length ?? 0, options, expected);
         }
 
         public static IEnumerable<object[]> Compare_Advanced_TestData()
@@ -326,7 +326,7 @@ namespace System.Globalization.Tests
 
         [Theory]
         [MemberData(nameof(Compare_Advanced_TestData))]
-        public void Compare(CompareInfo compareInfo, string string1, int offset1, int length1, string string2, int offset2, int length2, CompareOptions options, int expected)
+        public void Compare_Advanced(CompareInfo compareInfo, string string1, int offset1, int length1, string string2, int offset2, int length2, CompareOptions options, int expected)
         {
             if (offset1 + length1 == (string1?.Length ?? 0) && offset2 + length2 == (string2?.Length ?? 0))
             {
index 9967bd443fed941e8f34ef8980b8f29ce82e6ab8..b83073a76f98a2d666fa75da4f8ff1b5c83b905f 100644 (file)
@@ -40,7 +40,7 @@ namespace System.Globalization.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public void Equals(CompareInfo compare1, object value, bool expected)
+        public void EqualsTest(CompareInfo compare1, object value, bool expected)
         {
             Assert.Equal(expected, compare1.Equals(value));
             if (value is CompareInfo)
@@ -60,7 +60,7 @@ namespace System.Globalization.Tests
 
         [Theory]
         [MemberData(nameof(GetHashCodeTestData))]
-        public void GetHashCode(string source1, CompareOptions options1, string source2, CompareOptions options2, bool expected)
+        public void GetHashCodeTest(string source1, CompareOptions options1, string source2, CompareOptions options2, bool expected)
         {
             CompareInfo invariantCompare = CultureInfo.InvariantCulture.CompareInfo;
             Assert.Equal(expected, invariantCompare.GetHashCode(source1, options1).Equals(invariantCompare.GetHashCode(source2, options2)));
@@ -80,7 +80,7 @@ namespace System.Globalization.Tests
         [InlineData("", "CompareInfo - ")]
         [InlineData("en-US", "CompareInfo - en-US")]
         [InlineData("EN-US", "CompareInfo - en-US")]
-        public void ToString(string name, string expected)
+        public void ToStringTest(string name, string expected)
         {
             Assert.Equal(expected, new CultureInfo(name).CompareInfo.ToString());
         }
index 291e5d61920f38abb1bf5536209bd92db648ff8b..07eedbf34c6be55f063679cebc6d47decce28f4a 100644 (file)
@@ -26,7 +26,7 @@ namespace System.Globalization.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public void Equals(CultureInfo culture, object value, bool expected)
+        public void EqualsTest(CultureInfo culture, object value, bool expected)
         {
             Assert.Equal(expected, culture.Equals(value));
         }
index 4a920e548ad136bf2b38fc78a47f619248e2f139..ccdd9e4acc29eb9f306f421285ed9ce8f9e121b9 100644 (file)
@@ -12,7 +12,7 @@ namespace System.Globalization.Tests
         [InlineData("en-US")]
         [InlineData("en")]
         [InlineData("")]
-        public void GetHashCode(string name)
+        public void GetHashCodeTest(string name)
         {
             // The only guarantee that can be made about HashCodes is that they will be the same across calls
             CultureInfo culture = new CultureInfo(name);
index e91ba2e56c6d4368ba3a85829dbb8787b06ea5bd..d4b5bc682ceb88a255cd36d50753cab62a5b691f 100644 (file)
@@ -65,7 +65,7 @@ namespace System.Globalization.Tests
 
         [Theory]
         [MemberData(nameof(AbbreviatedMonthGenitiveNames_SetInvalidLength_TestData))]
-        public void AbbreviatedMonthGenitiveNames_SetNullValueInValues_ThrowsArgumentNullException(string[] value)
+        public void AbbreviatedMonthGenitiveNames_SetNullValueInValues_ThrowsArgumentException(string[] value)
         {
             var format = new DateTimeFormatInfo();
             AssertExtensions.Throws<ArgumentException>("value", () => format.AbbreviatedMonthGenitiveNames = value);
index 902cf1fbb65c0a1486da9b5de342260679c05bbc..ddde57e1d7e8938dd1ac6f8ad422c601a8545a5e 100644 (file)
@@ -65,7 +65,7 @@ namespace System.Globalization.Tests
 
         [Theory]
         [MemberData(nameof(AbbreviatedMonthNames_SetInvalidLength_TestData))]
-        public void AbbreviatedMonthNames_SetNullValueInValues_ThrowsArgumentNullException(string[] value)
+        public void AbbreviatedMonthNames_SetNullValueInValues_ThrowsArgumentException(string[] value)
         {
             var format = new DateTimeFormatInfo();
             AssertExtensions.Throws<ArgumentException>("value", () => format.AbbreviatedMonthNames = value);
index b269e916a4b50a9a3f9befb05bfbb0937dfc3948..817daabcd3e366c4bb8229948139e4e6dc38e1f6 100644 (file)
@@ -91,7 +91,7 @@ namespace System.Globalization.Tests
 
         [Theory]
         [MemberData(nameof(MonthGenitiveNames_SetInvalidLength_TestData))]
-        public void MonthGenitiveNames_SetNullValueInValues_ThrowsArgumentNullException(string[] value)
+        public void MonthGenitiveNames_SetNullValueInValues_ThrowsArgumentException(string[] value)
         {
             var format = new DateTimeFormatInfo();
             AssertExtensions.Throws<ArgumentException>("value", () => format.MonthGenitiveNames = value);
index 99be140787a73212519104a0efb040ffd5a80187..1ab9adbb368ee161322a4a318832e0ab40ad73ad 100644 (file)
@@ -65,7 +65,7 @@ namespace System.Globalization.Tests
 
         [Theory]
         [MemberData(nameof(MonthNames_SetInvalidLength_TestData))]
-        public void MonthNames_SetNullValueInValues_ThrowsArgumentNullException(string[] value)
+        public void MonthNames_SetNullValueInValues_ThrowsArgumentException(string[] value)
         {
             var format = new DateTimeFormatInfo();
             AssertExtensions.Throws<ArgumentException>("value", () => format.MonthNames = value);
index 22da6f9a88c411dd04d27ad3477df3b46bf3ef83..3d4184643e946f0b893b81b54add82daf6ffbe6e 100644 (file)
@@ -31,7 +31,7 @@ namespace System.Globalization.Tests
         [InlineData("as")]
         [InlineData("es-BO")]
         [InlineData("fr-CA")]
-        public void CurrencyNegativePattern_Get_ReturnsExpected(string locale)
+        public void CurrencyNegativePattern_Get_ReturnsExpected_ByLocale(string locale)
         {
             CultureInfo culture;
             try
index a4e49945a1095d2e9b7da6d95b1b290930ab6255..28663a3faa1793329476651dec01b4db87597da0 100644 (file)
@@ -18,17 +18,17 @@ namespace System.Globalization.Tests
                 if (testCase.Utf32CodeValue.Length == 1)
                 {
                     // Test the char overload for a single char
-                    GetUnicodeCategory(testCase.Utf32CodeValue[0], testCase.GeneralCategory);
+                    GetUnicodeCategoryTest_Char(testCase.Utf32CodeValue[0], testCase.GeneralCategory);
                 }
                 // Test the string overload for a surrogate pair or a single char
-                GetUnicodeCategory(testCase.Utf32CodeValue, new UnicodeCategory[] { testCase.GeneralCategory });
+                GetUnicodeCategoryTest_String(testCase.Utf32CodeValue, new UnicodeCategory[] { testCase.GeneralCategory });
                 Assert.Equal(testCase.GeneralCategory, CharUnicodeInfo.GetUnicodeCategory(testCase.CodePoint));
             }
         }
 
         [Theory]
         [InlineData('\uFFFF', UnicodeCategory.OtherNotAssigned)]
-        public void GetUnicodeCategory(char ch, UnicodeCategory expected)
+        public void GetUnicodeCategoryTest_Char(char ch, UnicodeCategory expected)
         {
             UnicodeCategory actual = CharUnicodeInfo.GetUnicodeCategory(ch);
             Assert.True(actual == expected, ErrorMessage(ch, expected, actual));
@@ -38,7 +38,7 @@ namespace System.Globalization.Tests
         [InlineData("aA1!", new UnicodeCategory[] { UnicodeCategory.LowercaseLetter, UnicodeCategory.UppercaseLetter, UnicodeCategory.DecimalDigitNumber, UnicodeCategory.OtherPunctuation })]
         [InlineData("\uD808\uDF6C", new UnicodeCategory[] { UnicodeCategory.OtherLetter, UnicodeCategory.Surrogate })]
         [InlineData("a\uD808\uDF6Ca", new UnicodeCategory[] { UnicodeCategory.LowercaseLetter, UnicodeCategory.OtherLetter, UnicodeCategory.Surrogate, UnicodeCategory.LowercaseLetter })]
-        public void GetUnicodeCategory(string s, UnicodeCategory[] expected)
+        public void GetUnicodeCategoryTest_String(string s, UnicodeCategory[] expected)
         {
             for (int i = 0; i < expected.Length; i++)
             {
@@ -50,13 +50,13 @@ namespace System.Globalization.Tests
         public void GetUnicodeCategory_String_InvalidSurrogatePairs()
         {
             // High, high surrogate pair
-            GetUnicodeCategory("\uD808\uD808", new UnicodeCategory[] { UnicodeCategory.Surrogate, UnicodeCategory.Surrogate });
+            GetUnicodeCategoryTest_String("\uD808\uD808", new UnicodeCategory[] { UnicodeCategory.Surrogate, UnicodeCategory.Surrogate });
 
             // Low, low surrogate pair
-            GetUnicodeCategory("\uDF6C\uDF6C", new UnicodeCategory[] { UnicodeCategory.Surrogate, UnicodeCategory.Surrogate });
+            GetUnicodeCategoryTest_String("\uDF6C\uDF6C", new UnicodeCategory[] { UnicodeCategory.Surrogate, UnicodeCategory.Surrogate });
 
             // Low, high surrogate pair
-            GetUnicodeCategory("\uDF6C\uD808", new UnicodeCategory[] { UnicodeCategory.Surrogate, UnicodeCategory.Surrogate });
+            GetUnicodeCategoryTest_String("\uDF6C\uD808", new UnicodeCategory[] { UnicodeCategory.Surrogate, UnicodeCategory.Surrogate });
         }
 
         [Fact]
@@ -76,16 +76,16 @@ namespace System.Globalization.Tests
                 if (testCase.Utf32CodeValue.Length == 1)
                 {
                     // Test the char overload for a single char
-                    GetNumericValue(testCase.Utf32CodeValue[0], testCase.NumericValue);
+                    GetNumericValueTest_Char(testCase.Utf32CodeValue[0], testCase.NumericValue);
                 }
                 // Test the string overload for a surrogate pair
-                GetNumericValue(testCase.Utf32CodeValue, new double[] { testCase.NumericValue });
+                GetNumericValueTest_String(testCase.Utf32CodeValue, new double[] { testCase.NumericValue });
             }
         }
 
         [Theory]
         [InlineData('\uFFFF', -1)]
-        public void GetNumericValue(char ch, double expected)
+        public void GetNumericValueTest_Char(char ch, double expected)
         {
             double actual = CharUnicodeInfo.GetNumericValue(ch);
             Assert.True(expected == actual, ErrorMessage(ch, expected, actual));
@@ -93,7 +93,7 @@ namespace System.Globalization.Tests
 
         [Theory]
         [MemberData(nameof(s_GetNumericValueData))]
-        public void GetNumericValue(string s, double[] expected)
+        public void GetNumericValueTest_String(string s, double[] expected)
         {
             for (int i = 0; i < expected.Length; i++)
             {
index f7295268e97f4d140efc26fd52fe915360793de6..6ca55371c4822b21f0f87e8537f6348ae38b8e50 100644 (file)
@@ -184,7 +184,7 @@ namespace System.Globalization.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public void Equals(RegionInfo regionInfo1, object obj, bool expected)
+        public void EqualsTest(RegionInfo regionInfo1, object obj, bool expected)
         {
             Assert.Equal(expected, regionInfo1.Equals(obj));
             Assert.Equal(regionInfo1.GetHashCode(), regionInfo1.GetHashCode());
index 070d8dd4853d8e6019c7257fb9a3b26e277df6a1..a3898c9ae962a0f788283b05326c94578a37e938 100644 (file)
@@ -111,7 +111,7 @@ namespace System.Globalization.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public void Equals(StringInfo stringInfo, object value, bool expected)
+        public void EqualsTest(StringInfo stringInfo, object value, bool expected)
         {
             Assert.Equal(expected, stringInfo.Equals(value));
             if (value is StringInfo)
@@ -240,7 +240,7 @@ namespace System.Globalization.Tests
             //                            ,-- Extend (U+20D1 COMBINING RIGHT HARPOON ABOVE)
             //                            |       ,-- Extend (U+FE22 COMBINING DOUBLE TILDE LEFT HALF)
             //                            |       |     ,-- Extend (U+20D1 COMBINING RIGHT HARPOON ABOVE)
-            //                            |       |     |     ,-- Extend (U+20EB COMBINING LONG DOUBLE SOLIDUS OVERLAY) 
+            //                            |       |     |     ,-- Extend (U+20EB COMBINING LONG DOUBLE SOLIDUS OVERLAY)
             yield return new object[] { "!\u20D1bo\uFE22\u20D1\u20EB|", new int[] { 0, 2, 3, 7 } };
 
             //                            ,-- Other (U+10FFFF <Unassigned>)
index f09f5b366754dc9d2012982e7b01a18f4b751537..7c88553899c3eae8d8cb0232a2754813cbbc0375 100644 (file)
@@ -163,7 +163,7 @@ namespace System.Globalization.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public void Equals(TextInfo textInfo, object obj, bool expected)
+        public void EqualsTest(TextInfo textInfo, object obj, bool expected)
         {
             Assert.Equal(expected, textInfo.Equals(obj));
             if (obj is TextInfo)
@@ -416,7 +416,7 @@ namespace System.Globalization.Tests
         [InlineData("en-US", "TextInfo - en-US")]
         [InlineData("fr-FR", "TextInfo - fr-FR")]
         [InlineData("", "TextInfo - ")]
-        public void ToString(string name, string expected)
+        public void ToStringTest(string name, string expected)
         {
             Assert.Equal(expected, new CultureInfo(name).TextInfo.ToString());
         }
index dddf3f879b66ec48423120b55832333bc6b88eb8..1c1a143f8d1e6fc5397b5fbce04b5157d162d825 100644 (file)
@@ -47,7 +47,7 @@ namespace System.IO.Tests
         [InlineData(1)]
         [InlineData(2)]
         [InlineData(3)]
-        public void File_Move_From_Watched_To_Unwatched(int filesCount)
+        public void File_Move_Multiple_From_Watched_To_Unwatched(int filesCount)
         {
             FileMove_Multiple_FromWatchedToUnwatched(filesCount, skipOldEvents: false);
         }
index bae1afec06568243fd5664645d2a5cad37c96bbd..d1fc2104501d4c3e8024bc434e436d2f4e6fa13f 100644 (file)
@@ -189,22 +189,6 @@ namespace System.IO.Tests
             }
         }
 
-        /// <summary>
-        /// EndInit will begin EnableRaisingEvents if we previously set EnableRaisingEvents=true
-        /// </summary>
-        [Fact]
-        public void EndInit_ResumesPausedEnableRaisingEvents()
-        {
-            using (var testDirectory = new TempDirectory(GetTestFilePath()))
-            using (var watcher = new TestFileSystemWatcher(testDirectory.Path, "*"))
-            {
-                watcher.BeginInit();
-                watcher.EnableRaisingEvents = true;
-                watcher.EndInit();
-                ExpectEvent(watcher, WatcherChangeTypes.Created | WatcherChangeTypes.Deleted, () => new TempFile(Path.Combine(testDirectory.Path, GetTestFileName())).Dispose(), null);
-            }
-        }
-
         /// <summary>
         /// EndInit will begin EnableRaisingEvents if we previously set EnableRaisingEvents=true
         /// </summary>
index 0796425d1b2a202839007089b6301efa00ef5680..0eaf19eab490d5c6399cc1f687974742c05c79f3 100644 (file)
@@ -109,7 +109,7 @@ namespace System.IO.Tests
 
         [Theory]
         [MemberData(nameof(CopyFileWithData_MemberData))]
-        public void CopyFileWithData_MemberData(char[] data, bool readOnly)
+        public void CopyFileWithData(char[] data, bool readOnly)
         {
             string testFileSource = GetTestFilePath();
             string testFileDest = GetTestFilePath();
index 989729cb2ae4ef04a8cef7b505fd4f19fe2a9410..6d4a634a7d55df999963de3a23ebfc025891b268 100644 (file)
@@ -282,7 +282,7 @@ namespace System.IO.Tests
         public Task ManyConcurrentWriteAsyncs()
         {
             // For inner loop, just test one case
-            return ManyConcurrentWriteAsyncs(
+            return ManyConcurrentWriteAsyncs_OuterLoop(
                 useAsync: RuntimeInformation.IsOSPlatform(OSPlatform.Windows),
                 presize: false,
                 exposeHandle: false,
@@ -295,7 +295,7 @@ namespace System.IO.Tests
         [Theory]
         [MemberData(nameof(MemberData_FileStreamAsyncWriting))]
         [OuterLoop] // many combinations: we test just one in inner loop and the rest outer
-        public async Task ManyConcurrentWriteAsyncs(
+        public async Task ManyConcurrentWriteAsyncs_OuterLoop(
             bool useAsync, bool presize, bool exposeHandle, bool cancelable, int bufferSize, int writeSize, int numWrites)
         {
             long totalLength = writeSize * numWrites;
index fdfa0e439bd2d76811fa9f3bf6af8b6d3f9126a1..f0c846f7e674e61cc68f12c14122e4168286652a 100644 (file)
@@ -72,7 +72,7 @@ namespace System.IO.IsolatedStorage
 
         [Theory]
         [MemberData(nameof(ValidStores))]
-        public void DirectoryExists_Existance(PresetScopes scope)
+        public void DirectoryExists_Existance_WithScope(PresetScopes scope)
         {
             using (var isf = GetPresetScope(scope))
             {
index 27c24ce391d1513477b089fd8c1acc13af2d9cb4..2cf5dd12cb41812972df5dc6d6d2ca22213801ad 100644 (file)
@@ -245,7 +245,7 @@ namespace System.IO.Tests
 
 
         [Fact]
-        public void Write()
+        public void WriteTest()
         {
             const int length = 1000;
             using (var manager = new UmsManager(FileAccess.Write, length))
index a26cf57f92a47738c6d22a157b620200101fff87..b2cfcd3852d1fc2ca19529b2193c1d59d1771a94 100644 (file)
@@ -87,7 +87,7 @@ namespace System.Linq.Tests
 
         [Theory]
         [MemberData(nameof(TestDataWithPredicate))]
-        public void Any(IEnumerable<int> source, Func<int, bool> predicate, bool expected)
+        public void Any_Predicate(IEnumerable<int> source, Func<int, bool> predicate, bool expected)
         {
             if (predicate == null)
             {
index d965c27ebb275b37da5d443690c50f26979dbb08..4dd9a947147fe9d3f1578f4d8dc91657b55903da 100644 (file)
@@ -13,7 +13,7 @@ namespace System.Linq.Tests
     {
         [Theory]
         [InlineData(new int[] { 2, 3, 2, 4, 5 }, new int[] { 1, 9, 4 })]
-        public void SameResultsWithQueryAndRepeatCalls(IEnumerable<int> first, IEnumerable<int> second)
+        public void SameResultsWithQueryAndRepeatCalls_Int(IEnumerable<int> first, IEnumerable<int> second)
         {
             // workaround: xUnit type inference doesn't work if the input type is not T (like IEnumerable<T>)
             SameResultsWithQueryAndRepeatCallsWorker(first, second);
@@ -21,7 +21,7 @@ namespace System.Linq.Tests
 
         [Theory]
         [InlineData(new[] { "AAA", "", "q", "C", "#", "!@#$%^", "0987654321", "Calling Twice" }, new[] { "!@#$%^", "C", "AAA", "", "Calling Twice", "SoS" })]
-        public void SameResultsWithQueryAndRepeatCalls(IEnumerable<string> first, IEnumerable<string> second)
+        public void SameResultsWithQueryAndRepeatCalls_String(IEnumerable<string> first, IEnumerable<string> second)
         {
             // workaround: xUnit type inference doesn't work if the input type is not T (like IEnumerable<T>)
             SameResultsWithQueryAndRepeatCallsWorker(first, second);
index 2c266fc765ecc7031ee0548428a819da81de8177..a2804c1fca477a1a163c1e3f872609d66fa93594 100644 (file)
@@ -82,13 +82,13 @@ namespace System.Linq.Tests
             Assert.Equal(expected, source.FirstOrDefault());
         }
 
-        private static IEnumerable<T> EmptySource<T>()
-        {
-            yield break;
-        }
-
         private static void TestEmptyNotIList<T>()
         {
+            static IEnumerable<T1> EmptySource<T1>()
+            {
+                yield break;
+            }
+
             var source = EmptySource<T>();
             T expected = default(T);
 
index 088d9730f240f16d63075e110d965240cdf777e1..b9632146394d1d2df8a37891c989c3de5ebdd3ce 100644 (file)
@@ -81,13 +81,13 @@ namespace System.Linq.Tests
             Assert.Equal(expected, source.First());
         }
 
-        private static IEnumerable<T> EmptySource<T>()
-        {
-            yield break;
-        }
-
         private static void TestEmptyNotIList<T>()
         {
+            static IEnumerable<T1> EmptySource<T1>()
+            {
+                yield break;
+            }
+
             var source = EmptySource<T>();
 
             Assert.Null(source as IList<T>);
index 5e5c35bb2b46a31f86e42aaf9d98c3ca9f673c9e..1aadefc1a279255b0eb35090cc32ec4047a21fd1 100644 (file)
@@ -156,7 +156,7 @@ namespace System.Buffers.Tests
 
         [Theory]
         [MemberData(nameof(SizeHints))]
-        public void GetSpan_DefaultCtor(int sizeHint)
+        public void GetSpan_DefaultCtor_WithSizeHint(int sizeHint)
         {
             var output = new ArrayBufferWriter<T>();
             Span<T> span = output.GetSpan(sizeHint);
@@ -173,7 +173,7 @@ namespace System.Buffers.Tests
 
         [Theory]
         [MemberData(nameof(SizeHints))]
-        public void GetSpan_InitSizeCtor(int sizeHint)
+        public void GetSpan_InitSizeCtor_WithSizeHint(int sizeHint)
         {
             {
                 var output = new ArrayBufferWriter<T>(256);
@@ -198,7 +198,7 @@ namespace System.Buffers.Tests
 
         [Theory]
         [MemberData(nameof(SizeHints))]
-        public void GetMemory_DefaultCtor(int sizeHint)
+        public void GetMemory_DefaultCtor_WithSizeHint(int sizeHint)
         {
             var output = new ArrayBufferWriter<T>();
             Memory<T> memory = output.GetMemory(sizeHint);
@@ -222,7 +222,7 @@ namespace System.Buffers.Tests
 
         [Theory]
         [MemberData(nameof(SizeHints))]
-        public void GetMemory_InitSizeCtor(int sizeHint)
+        public void GetMemory_InitSizeCtor_WithSizeHint(int sizeHint)
         {
             {
                 var output = new ArrayBufferWriter<T>(256);
index 40990d08cbe79dc019993ffd7b74ce8a82fe1fbf..3160cbd1d8b5de7009fbfc056a714ef2be8e4e05 100644 (file)
@@ -39,15 +39,15 @@ namespace System.MemoryTests
 
         [Theory]
         [MemberData(nameof(ReadOnlyMemoryInt32Instances))]
-        public static void AsMemory_Roundtrips(ReadOnlyMemory<int> readOnlyMemory) => AsMemory_Roundtrips_Core(readOnlyMemory, true);
+        public static void AsMemory_Roundtrips_Int(ReadOnlyMemory<int> readOnlyMemory) => AsMemory_Roundtrips_Core(readOnlyMemory, true);
 
         [Theory]
         [MemberData(nameof(ReadOnlyMemoryObjectInstances))]
-        public static void AsMemory_Roundtrips(ReadOnlyMemory<object> readOnlyMemory) => AsMemory_Roundtrips_Core(readOnlyMemory, false);
+        public static void AsMemory_Roundtrips_Object(ReadOnlyMemory<object> readOnlyMemory) => AsMemory_Roundtrips_Core(readOnlyMemory, false);
 
         [Theory]
         [MemberData(nameof(ReadOnlyMemoryCharInstances))]
-        public static void AsMemory_Roundtrips(ReadOnlyMemory<char> readOnlyMemory)
+        public static void AsMemory_Roundtrips_Char(ReadOnlyMemory<char> readOnlyMemory)
         {
             AsMemory_Roundtrips_Core(readOnlyMemory, true);
 
index db095dd3da78d2931df43afe7fea37c93bf0c603..01eafd6565492ca97e29c24cf196e0937fa854c3 100644 (file)
@@ -5,7 +5,7 @@ namespace System.PrivateUri.Tests
 {
     public class EscapeUnescapeIriTests
     {
-        public static IEnumerable<object[]> ReplacesStandaloneSurrogatesWithReplacementChar()
+        public static IEnumerable<object[]> ReplacesStandaloneSurrogatesWithReplacementChar_Data()
         {
             const string UrlEncodedReplacementChar = "%EF%BF%BD";
             const string HighSurrogate = "\ud83f";
@@ -21,7 +21,7 @@ namespace System.PrivateUri.Tests
         }
 
         [Theory]
-        [MemberData(nameof(ReplacesStandaloneSurrogatesWithReplacementChar))]
+        [MemberData(nameof(ReplacesStandaloneSurrogatesWithReplacementChar_Data))]
         public static void ReplacesStandaloneSurrogatesWithReplacementChar(string input, string expected)
         {
             const string Prefix = "scheme:";
index f4cacd1e372d3b825b32e8947d8eb477055e56eb..5b2957e1e0ffb7fd357afe544deb7727c99cb033 100644 (file)
@@ -339,7 +339,7 @@ namespace System.PrivateUri.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public void Equals(UriBuilder uriBuilder1, UriBuilder uriBuilder2, bool expected)
+        public void EqualsTest(UriBuilder uriBuilder1, UriBuilder uriBuilder2, bool expected)
         {
             Assert.Equal(expected, uriBuilder1.Equals(uriBuilder2));
             if (uriBuilder2 != null)
@@ -374,7 +374,7 @@ namespace System.PrivateUri.Tests
 
         [Theory]
         [MemberData(nameof(ToString_TestData))]
-        public void ToString(UriBuilder uriBuilder, string expected)
+        public void ToStringTest(UriBuilder uriBuilder, string expected)
         {
             Assert.Equal(expected, uriBuilder.ToString());
         }
index 406ee974097737762d5f8c7a231c727ff01f7088..dcedd9b57e7b520ec5fcc3bd5e569e5e92f56e8a 100644 (file)
@@ -21,8 +21,8 @@ public static partial class XmlSerializerTests
             mappings[i] = importer.ImportTypeMapping(types[i]);
         }
         var serializers = XmlSerializer.FromMappings(mappings, typeof(object));
-        Xml_GuidAsRoot(serializers[0]);
-        Xml_ListGenericRoot(serializers[1]);
+        Xml_GuidAsRoot_Helper(serializers[0]);
+        Xml_ListGenericRoot_Helper(serializers[1]);
     }
 
     [Fact]
@@ -35,7 +35,7 @@ public static partial class XmlSerializerTests
 
         mapping = new XmlReflectionImporter(null, null).ImportTypeMapping(typeof(List<string>));
         serializer = new XmlSerializer(mapping);
-        Xml_ListGenericRoot(serializer);
+        Xml_ListGenericRoot_Helper(serializer);
     }
 
 }
index b8b23768329eca2b1501c5bc5933656b5e5627c9..7bad221bae7a55765348ae7c4cacaf1974a43ca3 100644 (file)
@@ -161,11 +161,13 @@ public static partial class XmlSerializerTests
     [Fact]
     public static void Xml_GuidAsRoot()
     {
-        Xml_GuidAsRoot(new XmlSerializer(typeof(Guid)));
+        Xml_GuidAsRoot_Helper(new XmlSerializer(typeof(Guid)));
     }
 
-    private static void Xml_GuidAsRoot(XmlSerializer serializer)
+    private static void Xml_GuidAsRoot_Helper(XmlSerializer serializer)
     {
+        // TODO: the 'serializer' parameter is not used, this test might have issues
+
         foreach (Guid value in new Guid[] { Guid.NewGuid(), Guid.Empty })
         {
             Assert.StrictEqual(SerializeAndDeserialize<Guid>(value, string.Format(@"<?xml version=""1.0""?>
@@ -314,10 +316,10 @@ public static partial class XmlSerializerTests
     [Fact]
     public static void Xml_ListGenericRoot()
     {
-        Xml_ListGenericRoot(new XmlSerializer(typeof(List<string>)));
+        Xml_ListGenericRoot_Helper(new XmlSerializer(typeof(List<string>)));
     }
 
-    private static void Xml_ListGenericRoot(XmlSerializer serializer)
+    private static void Xml_ListGenericRoot_Helper(XmlSerializer serializer)
     {
         List<string> x = new List<string>();
         x.Add("zero");
@@ -963,8 +965,8 @@ public static partial class XmlSerializerTests
     public static void Xml_FromTypes()
     {
         var serializers = XmlSerializer.FromTypes(new Type[] { typeof(Guid), typeof(List<string>) });
-        Xml_GuidAsRoot(serializers[0]);
-        Xml_ListGenericRoot(serializers[1]);
+        Xml_GuidAsRoot_Helper(serializers[0]);
+        Xml_ListGenericRoot_Helper(serializers[1]);
 
         serializers = XmlSerializer.FromTypes(null);
         Assert.Equal(0, serializers.Length);
index fc44911bcf4328ff98e7863768dd9d2aea4d2ba9..0af024d1830677b6ea8d5048187f12f092bddcb2 100644 (file)
@@ -28,7 +28,7 @@ namespace System.Reflection.Emit.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public void Equals(SignatureHelper helper, object obj, bool expected)
+        public void EqualsTest(SignatureHelper helper, object obj, bool expected)
         {
             Assert.Equal(expected, helper.Equals(obj));
             if (obj is SignatureHelper && expected == true)
index 0d09c0d4955b0b981a159a95e8e893c7aa15dff2..9aacb8c9e8e50544870e6479939bed526419c6c7 100644 (file)
@@ -287,7 +287,7 @@ namespace System.Reflection.Emit.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public void Equals(AssemblyBuilder assembly, object obj, bool expected)
+        public void EqualsTest(AssemblyBuilder assembly, object obj, bool expected)
         {
             Assert.Equal(expected, assembly.Equals(obj));
             if (obj is AssemblyBuilder)
index 2429eb650ecb4232ae80d930a206999e6f5793e4..a75391c9aaac44834fcee38cdc675326731dd2b7 100644 (file)
@@ -74,7 +74,7 @@ namespace System.Reflection.Emit.Tests
         [Theory]
         [ActiveIssue("https://github.com/dotnet/runtime/issues/2389", TestRuntimes.Mono)]
         [MemberData(nameof(Equals_TestData))]
-        public void Equals(MethodBuilder builder, object obj, bool expected)
+        public void EqualsTest(MethodBuilder builder, object obj, bool expected)
         {
             Assert.Equal(expected, builder.Equals(obj));
         }
index 52695ff1d3fdb7d2a5c2e3b288ce8237a89448a5..f4f91c372b953f1ba37b98a8d1f2b077bfbcadab 100644 (file)
@@ -31,7 +31,7 @@ namespace System.Reflection.Emit.Tests
 
         [Theory]
         [MemberData(nameof(GetHashCode_TestData))]
-        public void GetHashCode(MethodBuilder method1, MethodBuilder method2, bool expected)
+        public void GetHashCodeTest(MethodBuilder method1, MethodBuilder method2, bool expected)
         {
             Assert.Equal(expected, method1.GetHashCode().Equals(method2.GetHashCode()));
         }
index 71a8fb4f99d142dd2e150c6874a70a4568bbbd93..67b4eee3098aab36c838f0ec7509221bfc274b0a 100644 (file)
@@ -14,7 +14,7 @@ namespace System.Reflection.Emit.Tests
         [InlineData("Test_Type")]
         [InlineData("Test Type")]
         [InlineData("   ")]
-        public void ToString(string typeName)
+        public void ToStringTest(string typeName)
         {
             TypeBuilder type = Helpers.DynamicType(TypeAttributes.NotPublic, typeName: typeName);
             Assert.Equal(typeName, type.ToString());
index 513354c53f96413bc93f6fa3f6b015046b43e741..4a28137889ea4c9ce0f3b766a58c7a410920b4b3 100644 (file)
@@ -576,7 +576,7 @@ namespace System.Reflection.Tests
         [Theory]
         [InlineData("Foo")]
         [InlineData("Hi There")]
-        public void ToString(string name)
+        public void ToStringTest(string name)
         {
             var assemblyName = new AssemblyName(name);
             Assert.StartsWith(name, assemblyName.ToString());
index 7d16eadadc061064a8e892acb12c902e97f7df42..ef4919126eb0976f8f481c4e2355df2c9bad080f 100644 (file)
@@ -122,7 +122,7 @@ namespace System.Reflection.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public void Equals(Assembly assembly1, Assembly assembly2, bool expected)
+        public void EqualsTest(Assembly assembly1, Assembly assembly2, bool expected)
         {
             Assert.Equal(expected, assembly1.Equals(assembly2));
         }
@@ -179,7 +179,7 @@ namespace System.Reflection.Tests
 
         [Theory]
         [MemberData(nameof(GetHashCode_TestData))]
-        public void GetHashCode(Assembly assembly)
+        public void GetHashCodeTest(Assembly assembly)
         {
             int hashCode = assembly.GetHashCode();
             Assert.NotEqual(-1, hashCode);
@@ -193,7 +193,7 @@ namespace System.Reflection.Tests
         [InlineData("System.Reflection.Tests.PublicStruct", true)]
         [InlineData("AssemblyPublicClass", false)]
         [InlineData("NoSuchType", false)]
-        public void GetType(string name, bool exists)
+        public void GetTypeTest(string name, bool exists)
         {
             Type type = Helpers.ExecutingAssembly.GetType(name);
             if (exists)
@@ -352,7 +352,7 @@ namespace System.Reflection.Tests
         [InlineData(50)]
         [InlineData(100)]
         // Higher numbers hit some codepaths that currently don't include the path in the exception message
-        public void LoadFile_ValidPEBadIL_ThrowsBadImageFormatExceptionWithPath(int seek)
+        public void LoadFile_ValidPEBadIL_ThrowsBadImageFormatExceptionWithPath_ByInitialSeek(int seek)
         {
             ReadOnlySpan<byte> garbage = Encoding.UTF8.GetBytes(new string('X', 500));
             string path = GetTestFilePath();
index 0907bfaff1885a43b742439d4baa7aa893960862..f872d2261e9ceb23588bd5994b6196b49991c449 100644 (file)
@@ -35,7 +35,7 @@ namespace System.Reflection.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public void Equals(ConstructorInfo constructorInfo1, ConstructorInfo constructorInfo2, bool expected)
+        public void EqualsTest(ConstructorInfo constructorInfo1, ConstructorInfo constructorInfo2, bool expected)
         {
             Assert.Equal(expected, constructorInfo1.Equals(constructorInfo2));
             Assert.NotEqual(expected, constructorInfo1 != constructorInfo2);
index 23dd4346ef98d1fe5789a19221af66ec4bc3d38c..b0e69dbc41f67aea41824e2c6c0b1d7054ed7aed 100644 (file)
@@ -142,7 +142,7 @@ namespace System.Reflection.Tests
         [InlineData(typeof(BaseClass), nameof(BaseClass.PublicEvent), typeof(BaseClass), nameof(BaseClass.PublicEvent), true)]
         [InlineData(typeof(BaseClass), nameof(BaseClass.PublicEvent), typeof(SubClass), nameof(SubClass.PublicEvent), false)]
         [InlineData(typeof(BaseClass), nameof(BaseClass.PublicEvent), typeof(BaseClass), nameof(BaseClass.PublicStaticEvent), false)]
-        public void Equals(Type type1, string name1, Type type2, string name2, bool expected)
+        public void EqualsTest(Type type1, string name1, Type type2, string name2, bool expected)
         {
             EventInfo eventInfo1 = GetEventInfo(type1, name1);
             EventInfo eventInfo2 = GetEventInfo(type2, name2);
index 444fc61558fac0ab82819b0eabbd77cba55d1fec..60f0b6e10df91dc07894dca777aad27e0b6285b6 100644 (file)
@@ -129,7 +129,7 @@ namespace System.Reflection.Tests
         [Theory]
         [InlineData(typeof(FieldInfoTests), nameof(FieldInfoTests.stringField), typeof(FieldInfoTests), nameof(FieldInfoTests.stringField), true)]
         [InlineData(typeof(FieldInfoTests), nameof(FieldInfoTests.stringField), typeof(FieldInfoTests), nameof(FieldInfoTests.s_intField), false)]
-        public void Equals(Type type1, string name1, Type type2, string name2, bool expected)
+        public void EqualsTest(Type type1, string name1, Type type2, string name2, bool expected)
         {
             FieldInfo fieldInfo1 = GetField(type1, name1);
             FieldInfo fieldInfo2 = GetField(type2, name2);
index 79f0d68768eb4b1eee92c5839d680a9efbf92408..afcb313003ce00130dd71669cd252930697c4d79 100644 (file)
@@ -87,7 +87,7 @@ namespace System.Reflection.Tests
 
         [Theory]
         [MemberData(nameof(GetType_TestData))]
-        public void GetType(string typeName, Type expectedResult)
+        public void GetTypeTest(string typeName, Type expectedResult)
         {
             Assembly a = typeof(GetTypeTests).GetTypeInfo().Assembly;
             Module m = a.ManifestModule;
index 7dfde375b9f08d3c8131bbf8c61274dd94d508d6..9906b28601ffccad1d4ad6f4ec853000e80877c7 100644 (file)
@@ -146,7 +146,7 @@ namespace System.Reflection.Tests
         [InlineData(typeof(MI_SubClass), nameof(MI_SubClass.ObjectMethodReturningString), typeof(MI_SubClass), nameof(MI_SubClass.VoidMethodReturningInt), false)]
         [InlineData(typeof(MI_SubClass), nameof(MI_GenericClass<int>.GenericMethod1), typeof(MI_GenericClass<>), nameof(MI_GenericClass<int>.GenericMethod1), false)]
         [InlineData(typeof(MI_SubClass), nameof(MI_GenericClass<int>.GenericMethod2), typeof(MI_GenericClass<string>), nameof(MI_GenericClass<int>.GenericMethod2), false)]
-        public void Equals(Type type1, string name1, Type type2, string name2, bool expected)
+        public void EqualsTest(Type type1, string name1, Type type2, string name2, bool expected)
         {
             MethodInfo methodInfo1 = GetMethod(type1, name1);
             MethodInfo methodInfo2 = GetMethod(type2, name2);
@@ -543,7 +543,7 @@ namespace System.Reflection.Tests
         [InlineData(typeof(MI_GenericClass<>), nameof(MI_GenericClass<string>.GenericMethod2), "T GenericMethod2[S](S, T, System.String)")]
         [InlineData(typeof(MI_GenericClass<string>), nameof(MI_GenericClass<string>.GenericMethod1), "System.String GenericMethod1(System.String)")]
         [InlineData(typeof(MI_GenericClass<string>), nameof(MI_GenericClass<string>.GenericMethod2), "System.String GenericMethod2[S](S, System.String, System.String)")]
-        public void ToString(Type type, string name, string expected)
+        public void ToStringTest(Type type, string name, string expected)
         {
             MethodInfo methodInfo = GetMethod(type, name);
             Assert.Equal(expected, methodInfo.ToString());
@@ -557,7 +557,7 @@ namespace System.Reflection.Tests
 
         [Theory]
         [MemberData(nameof(ToString_TestData))]
-        public void ToString(MethodInfo methodInfo, string expected)
+        public void ToStringTest_ByMethodInfo(MethodInfo methodInfo, string expected)
         {
             Assert.Equal(expected, methodInfo.ToString());
         }
index 68d10b5fb6632b4c76b698e3d4c39ba28e4c837b..fb02b778991b3010cd9b12fa6f0b3d2e91d97814 100644 (file)
@@ -69,7 +69,7 @@ namespace System.Reflection.Tests
         [InlineData("OutsideModuleTest[]", typeof(OutsideModuleTest[]))]
         [InlineData("OutsideModuleTest[,,]", typeof(OutsideModuleTest[,,]))]
         [InlineData("OutsideModuleTest[][]", typeof(OutsideModuleTest[][]))]
-        public void GetType(string className, Type expectedType)
+        public void GetTypeTest(string className, Type expectedType)
         {
             Module module = expectedType.GetTypeInfo().Module;
 
index e6c18222ec115efde0864920c5e3cec95a5daa95..59c3247a9f8e16f774851c076d1767d1fac5617e 100644 (file)
@@ -245,7 +245,7 @@ namespace System.Reflection.Tests
         [Theory]
         [InlineData(typeof(BaseClass), nameof(BaseClass.ReadWriteProperty1), typeof(BaseClass), nameof(BaseClass.ReadWriteProperty1), true)]
         [InlineData(typeof(BaseClass), nameof(BaseClass.ReadWriteProperty1), typeof(BaseClass), nameof(BaseClass.ReadWriteProperty2), false)]
-        public void Equals(Type type1, string name1, Type type2, string name2, bool expected)
+        public void EqualsTest(Type type1, string name1, Type type2, string name2, bool expected)
         {
             PropertyInfo propertyInfo1 = GetProperty(type1, name1);
             PropertyInfo propertyInfo2 = GetProperty(type2, name2);
index e6c25b95253955202376fe6795d40dc20566c353..f05ab2716ca9a05f3ce7010313be2d2e2b622df8 100644 (file)
@@ -192,7 +192,7 @@ namespace System.Tests
 
         [Theory]
         [MemberData(nameof(EnvironmentTests.EnvironmentVariableTargets), MemberType = typeof(EnvironmentTests))]
-        public void EnvironmentVariablesAreHashtable(EnvironmentVariableTarget target)
+        public void EnvironmentVariablesAreHashtable_SpecificTarget(EnvironmentVariableTarget target)
         {
             // On NetFX, the type returned was always Hashtable
             Assert.IsType<Hashtable>(Environment.GetEnvironmentVariables(target));
@@ -200,7 +200,7 @@ namespace System.Tests
 
         [Theory]
         [MemberData(nameof(EnvironmentTests.EnvironmentVariableTargets), MemberType = typeof(EnvironmentTests))]
-        public void EnumerateYieldsDictionaryEntryFromIEnumerable(EnvironmentVariableTarget target)
+        public void EnumerateYieldsDictionaryEntryFromIEnumerable_SpecificTarget(EnvironmentVariableTarget target)
         {
             // GetEnvironmentVariables has always yielded DictionaryEntry from IEnumerable
             IDictionary vars = Environment.GetEnvironmentVariables(target);
@@ -220,7 +220,7 @@ namespace System.Tests
         public void EnumerateEnvironmentVariables(EnvironmentVariableTarget target)
         {
             bool lookForSetValue = (target == EnvironmentVariableTarget.Process) || PlatformDetection.IsWindowsAndElevated;
-            
+
             // [ActiveIssue("https://github.com/dotnet/runtime/issues/30566")]
             if (PlatformDetection.IsWindowsNanoServer && target == EnvironmentVariableTarget.User)
             {
index b070203f3836787a7f5011cd481ced0377de42ef..5bba860261e3c092138e5ad1ac1c5cd83d13c189 100644 (file)
@@ -204,7 +204,7 @@ namespace System.IO.Tests
             { @"C:\\foo2", @"C:\" },
         };
 
-        protected static void GetTempPath_SetEnvVar(string envVar, string expected, string newTempPath)
+        protected static void GetTempPath_SetEnvVar_Helper(string envVar, string expected, string newTempPath)
         {
             string original = Path.GetTempPath();
             Assert.NotNull(original);
index f88a1832124db6c0408bfb89569945c68a3cbe69..39e3edb01eae86908f06a07caa33ebb73703f91b 100644 (file)
@@ -54,7 +54,7 @@ namespace System.IO.Tests
             {
                 foreach (string[] tempPath in GetTempPath_SetEnvVar_Data())
                 {
-                    GetTempPath_SetEnvVar("TMPDIR", tempPath[0], tempPath[1]);
+                    GetTempPath_SetEnvVar_Helper("TMPDIR", tempPath[0], tempPath[1]);
                 }
             }).Dispose();
         }
index 64c3aa2ab6a7a5df8bd2b74911af04b055834c8c..e6fbb701bf3abb0a4749a07d7f8987eb4c02ae0a 100644 (file)
@@ -77,7 +77,7 @@ namespace System.IO.Tests
             {
                 foreach (string[] tempPath in GetTempPath_SetEnvVar_Data())
                 {
-                    GetTempPath_SetEnvVar("TMP", tempPath[0], tempPath[1]);
+                    GetTempPath_SetEnvVar_Helper("TMP", tempPath[0], tempPath[1]);
                 }
             }).Dispose();
         }
index fc1922c8b8fbf2c88e42db9d7c8965f8f6d2471b..03a9ba8b26c114dea9046cf2a863d61386c32e25 100644 (file)
@@ -1396,14 +1396,6 @@ namespace System.Tests
             Assert.Equal(-2e16m, Math.Round(-2e16m));
         }
 
-        [Fact]
-        public static void Round_Decimal_Digits()
-        {
-            Assert.Equal(3.422m, Math.Round(3.42156m, 3, MidpointRounding.AwayFromZero));
-            Assert.Equal(-3.422m, Math.Round(-3.42156m, 3, MidpointRounding.AwayFromZero));
-            Assert.Equal(decimal.Zero, Math.Round(decimal.Zero, 3, MidpointRounding.AwayFromZero));
-        }
-
         [Fact]
         public static void Round_Double()
         {
@@ -1418,7 +1410,7 @@ namespace System.Tests
         }
 
         [Fact]
-        public static void Round_Double_Digits()
+        public static void Round_Double_Digits_SpecificCases()
         {
             Assert.Equal(3.422, Math.Round(3.42156, 3, MidpointRounding.AwayFromZero), 10);
             Assert.Equal(-3.422, Math.Round(-3.42156, 3, MidpointRounding.AwayFromZero), 10);
@@ -2431,7 +2423,7 @@ namespace System.Tests
         [InlineData(MidpointRounding.ToZero)]
         [InlineData(MidpointRounding.ToNegativeInfinity)]
         [InlineData(MidpointRounding.ToPositiveInfinity)]
-        public static void Round_Double_Digits(MidpointRounding mode)
+        public static void Round_Double_Digits_ByMidpointRounding(MidpointRounding mode)
         {
             Assert.Equal(double.NaN, Math.Round(double.NaN, 3, mode));
             Assert.Equal(double.PositiveInfinity, Math.Round(double.PositiveInfinity, 3, mode));
@@ -2458,7 +2450,7 @@ namespace System.Tests
         [InlineData(MidpointRounding.ToZero)]
         [InlineData(MidpointRounding.ToNegativeInfinity)]
         [InlineData(MidpointRounding.ToPositiveInfinity)]
-        public static void Round_Decimal_Digits(MidpointRounding mode)
+        public static void Round_Decimal_Digits_ByMidpointRounding(MidpointRounding mode)
         {
             Assert.Equal(decimal.Zero, Math.Round(decimal.Zero, 3, mode));
         }
index e105a4ad72c1da403144a5a6087f4da0cb2c0fe8..76b72cad8cf7da47171cc7cac7fdf023606226ef 100644 (file)
@@ -1463,7 +1463,7 @@ namespace System.Tests
         [InlineData(MidpointRounding.AwayFromZero)]
         [InlineData(MidpointRounding.ToNegativeInfinity)]
         [InlineData(MidpointRounding.ToPositiveInfinity)]
-        public static void Round_Digits(MidpointRounding mode)
+        public static void Round_Digits_ByMidpointRounding(MidpointRounding mode)
         {
             Assert.Equal(float.PositiveInfinity, MathF.Round(float.PositiveInfinity, 3, mode));
             Assert.Equal(float.NegativeInfinity, MathF.Round(float.NegativeInfinity, 3, mode));
index aa5df1ce6cdee588125399e131e32eb66a861f83..1419193eb961c81f2d98d8d405b85af3b8c4f38f 100644 (file)
@@ -297,7 +297,7 @@ namespace System.Runtime.InteropServices.Tests
             }
         }
 
-        public static IEnumerable<object[]> GetObjectForNativeVariant_CantMap_ThrowsArgumentException()
+        public static IEnumerable<object[]> GetObjectForNativeVariant_CantMap_ThrowsArgumentException_Data()
         {
             yield return new object[] { CreateVariant(VT_VARIANT, new UnionTypes()) };
             yield return new object[] { CreateVariant(15, new UnionTypes()) };
@@ -331,7 +331,7 @@ namespace System.Runtime.InteropServices.Tests
         }
 
         [Theory]
-        [MemberData(nameof(GetObjectForNativeVariant_CantMap_ThrowsArgumentException))]
+        [MemberData(nameof(GetObjectForNativeVariant_CantMap_ThrowsArgumentException_Data))]
         [PlatformSpecific(TestPlatforms.Windows)]
         public void GetObjectForNativeVariant_CantMap_ThrowsArgumentException(Variant variant)
         {
@@ -339,7 +339,7 @@ namespace System.Runtime.InteropServices.Tests
         }
 
         [Theory]
-        [MemberData(nameof(GetObjectForNativeVariant_CantMap_ThrowsArgumentException))]
+        [MemberData(nameof(GetObjectForNativeVariant_CantMap_ThrowsArgumentException_Data))]
         [PlatformSpecific(TestPlatforms.Windows)]
         public void GetObjectForNativeVariant_CantMapByRef_ThrowsArgumentException(Variant variant)
         {
index d3e87ee929778c30e408800a608d7bcc2d2006fb..d23a23ec34441982a4400182df78d2ec8dab9fd8 100644 (file)
@@ -100,7 +100,7 @@ namespace System.Runtime.InteropServices.Tests
         [InlineData(2, 2, 1)]
         [InlineData(2, 1, 2)]
         [InlineData(2, 0, 3)]
-        public void ReadWriteArray_NegativeCount_ThrowsArgumentOutOfRangeException(int arrayLength, int index, int count)
+        public void ReadWriteArray_NegativeCount_ThrowsArgumentException(int arrayLength, int index, int count)
         {
             var wrapper = new SubBuffer(true);
             AssertExtensions.Throws<ArgumentException>(null, () => wrapper.ReadArray(0, new int[arrayLength], index, count));
index c32dac23efcf3482f74437e4e4180c5e07eaffdc..e7045a39cae7b309ee154b407de92031017a2a17 100644 (file)
@@ -90,93 +90,93 @@ namespace System.Numerics.Tests
             string format;
 
             // Currency
-            RunStandardFormatToStringTests(s_random, "C", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalDigits, CurrencyFormatter);
-            RunStandardFormatToStringTests(s_random, "c0", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, CurrencyFormatter);
-            RunStandardFormatToStringTests(s_random, "C1", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 1, CurrencyFormatter);
-            RunStandardFormatToStringTests(s_random, "c2", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 2, CurrencyFormatter);
-            RunStandardFormatToStringTests(s_random, "C5", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 5, CurrencyFormatter);
-            RunStandardFormatToStringTests(s_random, "c33", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 33, CurrencyFormatter);
-            RunStandardFormatToStringTests(s_random, "C99", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 99, CurrencyFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "C", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalDigits, CurrencyFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "c0", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, CurrencyFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "C1", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 1, CurrencyFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "c2", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 2, CurrencyFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "C5", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 5, CurrencyFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "c33", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 33, CurrencyFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "C99", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 99, CurrencyFormatter);
 
             // Decimal
-            RunStandardFormatToStringTests(s_random, "D", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, DecimalFormatter);
-            RunStandardFormatToStringTests(s_random, "d0", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, DecimalFormatter);
-            RunStandardFormatToStringTests(s_random, "D1", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 1, DecimalFormatter);
-            RunStandardFormatToStringTests(s_random, "D0000001", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 1, DecimalFormatter);
-            RunStandardFormatToStringTests(s_random, "d2", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 2, DecimalFormatter);
-            RunStandardFormatToStringTests(s_random, "D5", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 5, DecimalFormatter);
-            RunStandardFormatToStringTests(s_random, "d33", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 33, DecimalFormatter);
-            RunStandardFormatToStringTests(s_random, "D99", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 99, DecimalFormatter);
-            RunStandardFormatToStringTests(s_random, "D\0", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, DecimalFormatter);
-            RunStandardFormatToStringTests(s_random, "D4\0", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 4, DecimalFormatter);
-            RunStandardFormatToStringTests(s_random, "D4\0Z", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 4, DecimalFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "D", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, DecimalFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "d0", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, DecimalFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "D1", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 1, DecimalFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "D0000001", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 1, DecimalFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "d2", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 2, DecimalFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "D5", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 5, DecimalFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "d33", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 33, DecimalFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "D99", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 99, DecimalFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "D\0", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, DecimalFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "D4\0", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 4, DecimalFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "D4\0Z", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 4, DecimalFormatter);
 
             // Exponential (note: negative precision means lower case e)
-            RunStandardFormatToStringTests(s_random, "E", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 6, ExponentialFormatter);
-            RunStandardFormatToStringTests(s_random, "E0", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, ExponentialFormatter);
-            RunStandardFormatToStringTests(s_random, "E1", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 1, ExponentialFormatter);
-            RunStandardFormatToStringTests(s_random, "e2", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, -2, ExponentialFormatter);
-            RunStandardFormatToStringTests(s_random, "E5", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 5, ExponentialFormatter);
-            RunStandardFormatToStringTests(s_random, "e33", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, -33, ExponentialFormatter);
-            RunStandardFormatToStringTests(s_random, "E99", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 99, ExponentialFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "E", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 6, ExponentialFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "E0", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, ExponentialFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "E1", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 1, ExponentialFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "e2", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, -2, ExponentialFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "E5", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 5, ExponentialFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "e33", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, -33, ExponentialFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "E99", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 99, ExponentialFormatter);
 
             // Test exponent of 4 digits
             test = GetDigitSequence(2000, 2000, s_random);
             VerifyToString(test, "E", ExponentialFormatter(test, 6, CultureInfo.CurrentCulture.NumberFormat));
 
             // Fixed-Point
-            RunStandardFormatToStringTests(s_random, "f", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, CultureInfo.CurrentCulture.NumberFormat.NumberDecimalDigits, FixedFormatter);
-            RunStandardFormatToStringTests(s_random, "F0", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, FixedFormatter);
-            RunStandardFormatToStringTests(s_random, "f1", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 1, FixedFormatter);
-            RunStandardFormatToStringTests(s_random, "F2", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 2, FixedFormatter);
-            RunStandardFormatToStringTests(s_random, "f5", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 5, FixedFormatter);
-            RunStandardFormatToStringTests(s_random, "F33", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 33, FixedFormatter);
-            RunStandardFormatToStringTests(s_random, "f99", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 99, FixedFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "f", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, CultureInfo.CurrentCulture.NumberFormat.NumberDecimalDigits, FixedFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "F0", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, FixedFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "f1", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 1, FixedFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "F2", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 2, FixedFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "f5", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 5, FixedFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "F33", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 33, FixedFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "f99", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 99, FixedFormatter);
 
             // General
-            RunStandardFormatToStringTests(s_random, "g", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, DecimalFormatter);
-            RunStandardFormatToStringTests(s_random, "G0", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, DecimalFormatter);
-            RunStandardFormatToStringTests(s_random, "G1", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 1, DecimalFormatter);
-            RunStandardFormatToStringTests(s_random, "G2", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 2, DecimalFormatter);
-            RunStandardFormatToStringTests(s_random, "g5", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 5, DecimalFormatter);
-            RunStandardFormatToStringTests(s_random, "G33", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 33, DecimalFormatter);
-            RunStandardFormatToStringTests(s_random, "g99", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 99, DecimalFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "g", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, DecimalFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "G0", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, DecimalFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "G1", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 1, DecimalFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "G2", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 2, DecimalFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "g5", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 5, DecimalFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "G33", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 33, DecimalFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "g99", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 99, DecimalFormatter);
 
             // Number
-            RunStandardFormatToStringTests(s_random, "n", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, CultureInfo.CurrentCulture.NumberFormat.NumberDecimalDigits, NumberFormatter);
-            RunStandardFormatToStringTests(s_random, "N0", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, NumberFormatter);
-            RunStandardFormatToStringTests(s_random, "N1", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 1, NumberFormatter);
-            RunStandardFormatToStringTests(s_random, "N2", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 2, NumberFormatter);
-            RunStandardFormatToStringTests(s_random, "n5", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 5, NumberFormatter);
-            RunStandardFormatToStringTests(s_random, "N33", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 33, NumberFormatter);
-            RunStandardFormatToStringTests(s_random, "n99", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 99, NumberFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "n", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, CultureInfo.CurrentCulture.NumberFormat.NumberDecimalDigits, NumberFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "N0", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, NumberFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "N1", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 1, NumberFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "N2", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 2, NumberFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "n5", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 5, NumberFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "N33", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 33, NumberFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "n99", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 99, NumberFormatter);
 
             // Percent
-            RunStandardFormatToStringTests(s_random, "p", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, CultureInfo.CurrentCulture.NumberFormat.PercentDecimalDigits, PercentFormatter);
-            RunStandardFormatToStringTests(s_random, "P0", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, PercentFormatter);
-            RunStandardFormatToStringTests(s_random, "P1", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 1, PercentFormatter);
-            RunStandardFormatToStringTests(s_random, "P2", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 2, PercentFormatter);
-            RunStandardFormatToStringTests(s_random, "p5", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 5, PercentFormatter);
-            RunStandardFormatToStringTests(s_random, "P33", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 33, PercentFormatter);
-            RunStandardFormatToStringTests(s_random, "p99", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 99, PercentFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "p", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, CultureInfo.CurrentCulture.NumberFormat.PercentDecimalDigits, PercentFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "P0", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, PercentFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "P1", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 1, PercentFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "P2", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 2, PercentFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "p5", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 5, PercentFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "P33", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 33, PercentFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "p99", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 99, PercentFormatter);
 
             // Hex
-            RunStandardFormatToStringTests(s_random, "X", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, HexFormatter);
-            RunStandardFormatToStringTests(s_random, "X0", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, HexFormatter);
-            RunStandardFormatToStringTests(s_random, "x1", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, -1, HexFormatter);
-            RunStandardFormatToStringTests(s_random, "X2", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 2, HexFormatter);
-            RunStandardFormatToStringTests(s_random, "x5", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, -5, HexFormatter);
-            RunStandardFormatToStringTests(s_random, "X33", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 33, HexFormatter);
-            RunStandardFormatToStringTests(s_random, "x99", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, -99, HexFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "X", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, HexFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "X0", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, HexFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "x1", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, -1, HexFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "X2", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 2, HexFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "x5", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, -5, HexFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "X33", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 33, HexFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "x99", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, -99, HexFormatter);
 
             // RoundTrip
-            RunStandardFormatToStringTests(s_random, "R", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, DecimalFormatter);
-            RunStandardFormatToStringTests(s_random, "R0", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, DecimalFormatter);
-            RunStandardFormatToStringTests(s_random, "r1", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 1, DecimalFormatter);
-            RunStandardFormatToStringTests(s_random, "R2", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 2, DecimalFormatter);
-            RunStandardFormatToStringTests(s_random, "r5", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 5, DecimalFormatter);
-            RunStandardFormatToStringTests(s_random, "R33", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 33, DecimalFormatter);
-            RunStandardFormatToStringTests(s_random, "r99", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 99, DecimalFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "R", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, DecimalFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "R0", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 0, DecimalFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "r1", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 1, DecimalFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "R2", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 2, DecimalFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "r5", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 5, DecimalFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "R33", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 33, DecimalFormatter);
+            RunStandardFormatToStringTests_Helper(s_random, "r99", CultureInfo.CurrentCulture.NumberFormat.NegativeSign, 99, DecimalFormatter);
 
             // Other - invalid format characters
             for (int i = 0; i < s_samples; i++)
@@ -200,85 +200,85 @@ namespace System.Numerics.Tests
                 using (new ThreadCultureChange(culture))
                 {
                     // Currency
-                    RunStandardFormatToStringTests(s_random, "C", culture.NumberFormat.NegativeSign, culture.NumberFormat.CurrencyDecimalDigits, CurrencyFormatter);
-                    RunStandardFormatToStringTests(s_random, "c0", culture.NumberFormat.NegativeSign, 0, CurrencyFormatter);
-                    RunStandardFormatToStringTests(s_random, "C1", culture.NumberFormat.NegativeSign, 1, CurrencyFormatter);
-                    RunStandardFormatToStringTests(s_random, "c2", culture.NumberFormat.NegativeSign, 2, CurrencyFormatter);
-                    RunStandardFormatToStringTests(s_random, "C5", culture.NumberFormat.NegativeSign, 5, CurrencyFormatter);
-                    RunStandardFormatToStringTests(s_random, "c33", culture.NumberFormat.NegativeSign, 33, CurrencyFormatter);
-                    RunStandardFormatToStringTests(s_random, "C99", culture.NumberFormat.NegativeSign, 99, CurrencyFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "C", culture.NumberFormat.NegativeSign, culture.NumberFormat.CurrencyDecimalDigits, CurrencyFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "c0", culture.NumberFormat.NegativeSign, 0, CurrencyFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "C1", culture.NumberFormat.NegativeSign, 1, CurrencyFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "c2", culture.NumberFormat.NegativeSign, 2, CurrencyFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "C5", culture.NumberFormat.NegativeSign, 5, CurrencyFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "c33", culture.NumberFormat.NegativeSign, 33, CurrencyFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "C99", culture.NumberFormat.NegativeSign, 99, CurrencyFormatter);
 
                     // Decimal
-                    RunStandardFormatToStringTests(s_random, "D", culture.NumberFormat.NegativeSign, 0, DecimalFormatter);
-                    RunStandardFormatToStringTests(s_random, "d0", culture.NumberFormat.NegativeSign, 0, DecimalFormatter);
-                    RunStandardFormatToStringTests(s_random, "D1", culture.NumberFormat.NegativeSign, 1, DecimalFormatter);
-                    RunStandardFormatToStringTests(s_random, "d2", culture.NumberFormat.NegativeSign, 2, DecimalFormatter);
-                    RunStandardFormatToStringTests(s_random, "D5", culture.NumberFormat.NegativeSign, 5, DecimalFormatter);
-                    RunStandardFormatToStringTests(s_random, "d33", culture.NumberFormat.NegativeSign, 33, DecimalFormatter);
-                    RunStandardFormatToStringTests(s_random, "D99", culture.NumberFormat.NegativeSign, 99, DecimalFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "D", culture.NumberFormat.NegativeSign, 0, DecimalFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "d0", culture.NumberFormat.NegativeSign, 0, DecimalFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "D1", culture.NumberFormat.NegativeSign, 1, DecimalFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "d2", culture.NumberFormat.NegativeSign, 2, DecimalFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "D5", culture.NumberFormat.NegativeSign, 5, DecimalFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "d33", culture.NumberFormat.NegativeSign, 33, DecimalFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "D99", culture.NumberFormat.NegativeSign, 99, DecimalFormatter);
 
                     // Exponential (note: negative precision means lower case e)
-                    RunStandardFormatToStringTests(s_random, "E", culture.NumberFormat.NegativeSign, 6, ExponentialFormatter);
-                    RunStandardFormatToStringTests(s_random, "E0", culture.NumberFormat.NegativeSign, 0, ExponentialFormatter);
-                    RunStandardFormatToStringTests(s_random, "E1", culture.NumberFormat.NegativeSign, 1, ExponentialFormatter);
-                    RunStandardFormatToStringTests(s_random, "e2", culture.NumberFormat.NegativeSign, -2, ExponentialFormatter);
-                    RunStandardFormatToStringTests(s_random, "E5", culture.NumberFormat.NegativeSign, 5, ExponentialFormatter);
-                    RunStandardFormatToStringTests(s_random, "e33", culture.NumberFormat.NegativeSign, -33, ExponentialFormatter);
-                    RunStandardFormatToStringTests(s_random, "E99", culture.NumberFormat.NegativeSign, 99, ExponentialFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "E", culture.NumberFormat.NegativeSign, 6, ExponentialFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "E0", culture.NumberFormat.NegativeSign, 0, ExponentialFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "E1", culture.NumberFormat.NegativeSign, 1, ExponentialFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "e2", culture.NumberFormat.NegativeSign, -2, ExponentialFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "E5", culture.NumberFormat.NegativeSign, 5, ExponentialFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "e33", culture.NumberFormat.NegativeSign, -33, ExponentialFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "E99", culture.NumberFormat.NegativeSign, 99, ExponentialFormatter);
 
                     // Fixed-Point
-                    RunStandardFormatToStringTests(s_random, "f", culture.NumberFormat.NegativeSign, culture.NumberFormat.NumberDecimalDigits, FixedFormatter);
-                    RunStandardFormatToStringTests(s_random, "F0", culture.NumberFormat.NegativeSign, 0, FixedFormatter);
-                    RunStandardFormatToStringTests(s_random, "f1", culture.NumberFormat.NegativeSign, 1, FixedFormatter);
-                    RunStandardFormatToStringTests(s_random, "F2", culture.NumberFormat.NegativeSign, 2, FixedFormatter);
-                    RunStandardFormatToStringTests(s_random, "f5", culture.NumberFormat.NegativeSign, 5, FixedFormatter);
-                    RunStandardFormatToStringTests(s_random, "F33", culture.NumberFormat.NegativeSign, 33, FixedFormatter);
-                    RunStandardFormatToStringTests(s_random, "f99", culture.NumberFormat.NegativeSign, 99, FixedFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "f", culture.NumberFormat.NegativeSign, culture.NumberFormat.NumberDecimalDigits, FixedFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "F0", culture.NumberFormat.NegativeSign, 0, FixedFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "f1", culture.NumberFormat.NegativeSign, 1, FixedFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "F2", culture.NumberFormat.NegativeSign, 2, FixedFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "f5", culture.NumberFormat.NegativeSign, 5, FixedFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "F33", culture.NumberFormat.NegativeSign, 33, FixedFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "f99", culture.NumberFormat.NegativeSign, 99, FixedFormatter);
 
                     // General
-                    RunStandardFormatToStringTests(s_random, "g", culture.NumberFormat.NegativeSign, 0, DecimalFormatter);
-                    RunStandardFormatToStringTests(s_random, "G0", culture.NumberFormat.NegativeSign, 0, DecimalFormatter);
-                    RunStandardFormatToStringTests(s_random, "G1", culture.NumberFormat.NegativeSign, 1, DecimalFormatter);
-                    RunStandardFormatToStringTests(s_random, "G2", culture.NumberFormat.NegativeSign, 2, DecimalFormatter);
-                    RunStandardFormatToStringTests(s_random, "g5", culture.NumberFormat.NegativeSign, 5, DecimalFormatter);
-                    RunStandardFormatToStringTests(s_random, "G33", culture.NumberFormat.NegativeSign, 33, DecimalFormatter);
-                    RunStandardFormatToStringTests(s_random, "g99", culture.NumberFormat.NegativeSign, 99, DecimalFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "g", culture.NumberFormat.NegativeSign, 0, DecimalFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "G0", culture.NumberFormat.NegativeSign, 0, DecimalFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "G1", culture.NumberFormat.NegativeSign, 1, DecimalFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "G2", culture.NumberFormat.NegativeSign, 2, DecimalFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "g5", culture.NumberFormat.NegativeSign, 5, DecimalFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "G33", culture.NumberFormat.NegativeSign, 33, DecimalFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "g99", culture.NumberFormat.NegativeSign, 99, DecimalFormatter);
 
                     // Number
-                    RunStandardFormatToStringTests(s_random, "n", culture.NumberFormat.NegativeSign, culture.NumberFormat.NumberDecimalDigits, NumberFormatter);
-                    RunStandardFormatToStringTests(s_random, "N0", culture.NumberFormat.NegativeSign, 0, NumberFormatter);
-                    RunStandardFormatToStringTests(s_random, "N1", culture.NumberFormat.NegativeSign, 1, NumberFormatter);
-                    RunStandardFormatToStringTests(s_random, "N2", culture.NumberFormat.NegativeSign, 2, NumberFormatter);
-                    RunStandardFormatToStringTests(s_random, "n5", culture.NumberFormat.NegativeSign, 5, NumberFormatter);
-                    RunStandardFormatToStringTests(s_random, "N33", culture.NumberFormat.NegativeSign, 33, NumberFormatter);
-                    RunStandardFormatToStringTests(s_random, "n99", culture.NumberFormat.NegativeSign, 99, NumberFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "n", culture.NumberFormat.NegativeSign, culture.NumberFormat.NumberDecimalDigits, NumberFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "N0", culture.NumberFormat.NegativeSign, 0, NumberFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "N1", culture.NumberFormat.NegativeSign, 1, NumberFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "N2", culture.NumberFormat.NegativeSign, 2, NumberFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "n5", culture.NumberFormat.NegativeSign, 5, NumberFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "N33", culture.NumberFormat.NegativeSign, 33, NumberFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "n99", culture.NumberFormat.NegativeSign, 99, NumberFormatter);
 
                     // Percent
-                    RunStandardFormatToStringTests(s_random, "p", culture.NumberFormat.NegativeSign, culture.NumberFormat.PercentDecimalDigits, PercentFormatter);
-                    RunStandardFormatToStringTests(s_random, "P0", culture.NumberFormat.NegativeSign, 0, PercentFormatter);
-                    RunStandardFormatToStringTests(s_random, "P1", culture.NumberFormat.NegativeSign, 1, PercentFormatter);
-                    RunStandardFormatToStringTests(s_random, "P2", culture.NumberFormat.NegativeSign, 2, PercentFormatter);
-                    RunStandardFormatToStringTests(s_random, "p5", culture.NumberFormat.NegativeSign, 5, PercentFormatter);
-                    RunStandardFormatToStringTests(s_random, "P33", culture.NumberFormat.NegativeSign, 33, PercentFormatter);
-                    RunStandardFormatToStringTests(s_random, "p99", culture.NumberFormat.NegativeSign, 99, PercentFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "p", culture.NumberFormat.NegativeSign, culture.NumberFormat.PercentDecimalDigits, PercentFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "P0", culture.NumberFormat.NegativeSign, 0, PercentFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "P1", culture.NumberFormat.NegativeSign, 1, PercentFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "P2", culture.NumberFormat.NegativeSign, 2, PercentFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "p5", culture.NumberFormat.NegativeSign, 5, PercentFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "P33", culture.NumberFormat.NegativeSign, 33, PercentFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "p99", culture.NumberFormat.NegativeSign, 99, PercentFormatter);
 
                     // Hex
-                    RunStandardFormatToStringTests(s_random, "X", culture.NumberFormat.NegativeSign, 0, HexFormatter);
-                    RunStandardFormatToStringTests(s_random, "X0", culture.NumberFormat.NegativeSign, 0, HexFormatter);
-                    RunStandardFormatToStringTests(s_random, "x1", culture.NumberFormat.NegativeSign, -1, HexFormatter);
-                    RunStandardFormatToStringTests(s_random, "X2", culture.NumberFormat.NegativeSign, 2, HexFormatter);
-                    RunStandardFormatToStringTests(s_random, "x5", culture.NumberFormat.NegativeSign, -5, HexFormatter);
-                    RunStandardFormatToStringTests(s_random, "X33", culture.NumberFormat.NegativeSign, 33, HexFormatter);
-                    RunStandardFormatToStringTests(s_random, "x99", culture.NumberFormat.NegativeSign, -99, HexFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "X", culture.NumberFormat.NegativeSign, 0, HexFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "X0", culture.NumberFormat.NegativeSign, 0, HexFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "x1", culture.NumberFormat.NegativeSign, -1, HexFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "X2", culture.NumberFormat.NegativeSign, 2, HexFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "x5", culture.NumberFormat.NegativeSign, -5, HexFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "X33", culture.NumberFormat.NegativeSign, 33, HexFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "x99", culture.NumberFormat.NegativeSign, -99, HexFormatter);
 
                     // RoundTrip
-                    RunStandardFormatToStringTests(s_random, "R", culture.NumberFormat.NegativeSign, 0, DecimalFormatter);
-                    RunStandardFormatToStringTests(s_random, "R0", culture.NumberFormat.NegativeSign, 0, DecimalFormatter);
-                    RunStandardFormatToStringTests(s_random, "r1", culture.NumberFormat.NegativeSign, 1, DecimalFormatter);
-                    RunStandardFormatToStringTests(s_random, "R2", culture.NumberFormat.NegativeSign, 2, DecimalFormatter);
-                    RunStandardFormatToStringTests(s_random, "r5", culture.NumberFormat.NegativeSign, 5, DecimalFormatter);
-                    RunStandardFormatToStringTests(s_random, "R33", culture.NumberFormat.NegativeSign, 33, DecimalFormatter);
-                    RunStandardFormatToStringTests(s_random, "r99", culture.NumberFormat.NegativeSign, 99, DecimalFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "R", culture.NumberFormat.NegativeSign, 0, DecimalFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "R0", culture.NumberFormat.NegativeSign, 0, DecimalFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "r1", culture.NumberFormat.NegativeSign, 1, DecimalFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "R2", culture.NumberFormat.NegativeSign, 2, DecimalFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "r5", culture.NumberFormat.NegativeSign, 5, DecimalFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "R33", culture.NumberFormat.NegativeSign, 33, DecimalFormatter);
+                    RunStandardFormatToStringTests_Helper(s_random, "r99", culture.NumberFormat.NegativeSign, 99, DecimalFormatter);
                 }
             }
         }
@@ -444,7 +444,7 @@ namespace System.Numerics.Tests
             VerifyToString(Int64.MaxValue.ToString("d", provider), format, provider, false, formatter(Int64.MaxValue.ToString("d", provider), precision, provider));
         }
 
-        private static void RunStandardFormatToStringTests(Random random, string format, string negativeSign, int precision, StringFormatter formatter)
+        private static void RunStandardFormatToStringTests_Helper(Random random, string format, string negativeSign, int precision, StringFormatter formatter)
         {
             string test;
 
index 34c784dee08ed7ea4153170eecde5c4e725e5fcf..4b21cdaeb4c7054d52d96a96badaa41eb767fc0e 100644 (file)
@@ -130,7 +130,7 @@ namespace System.Numerics.Tests
 
         [Theory]
         [MemberData(nameof(FromIntTests_MemberData))]
-        public void ToByteArray_FromIntTests(int i, bool isUnsigned, bool isBigEndian, byte[] expectedBytes)
+        public void ToByteArray_FromIntTests_Advanced(int i, bool isUnsigned, bool isBigEndian, byte[] expectedBytes)
         {
             BigInteger bi = new BigInteger(i);
 
@@ -151,7 +151,7 @@ namespace System.Numerics.Tests
 
         [Theory]
         [MemberData(nameof(FromLongTests_MemberData))]
-        public void ToByteArray_FromLongTests(long l, bool isUnsigned, bool isBigEndian, byte[] expectedBytes)
+        public void ToByteArray_FromLongTests_Advanced(long l, bool isUnsigned, bool isBigEndian, byte[] expectedBytes)
         {
             BigInteger bi = new BigInteger(l);
 
@@ -172,7 +172,7 @@ namespace System.Numerics.Tests
 
         [Theory]
         [MemberData(nameof(FromStringTests_MemberData))]
-        public void ToByteArray_FromStringTests(string str, bool isUnsigned, bool isBigEndian, byte[] expectedBytes)
+        public void ToByteArray_FromStringTests_Advanced(string str, bool isUnsigned, bool isBigEndian, byte[] expectedBytes)
         {
             BigInteger bi = BigInteger.Parse(str);
 
index 0cfd48f0afab5c96706e912ccc5d339e3fe29b5d..d4ceccca47f84aabe3e545d0e9eee375aafebe33 100644 (file)
@@ -783,70 +783,70 @@ namespace System.Numerics.Tests
             foreach (double invalidReal in s_invalidDoubleValues)
             {
                 invalidComplex = new Complex(invalidReal, 1);
-                Equals(invalidComplex, complex, false, false);
-                Equals(invalidComplex, invalidComplex, !double.IsNaN(invalidReal), true); // Handle double.NaN != double.NaN
+                Equals_Helper(invalidComplex, complex, false, false);
+                Equals_Helper(invalidComplex, invalidComplex, !double.IsNaN(invalidReal), true); // Handle double.NaN != double.NaN
                 foreach (double invalidImaginary in s_invalidDoubleValues)
                 {
                     invalidComplex = new Complex(1, invalidImaginary);
-                    Equals(invalidComplex, complex, false, false);
-                    Equals(invalidComplex, invalidComplex, !double.IsNaN(invalidImaginary), true); // Handle double.NaN != double.NaN
+                    Equals_Helper(invalidComplex, complex, false, false);
+                    Equals_Helper(invalidComplex, invalidComplex, !double.IsNaN(invalidImaginary), true); // Handle double.NaN != double.NaN
 
                     invalidComplex = new Complex(invalidReal, invalidImaginary);
-                    Equals(invalidComplex, complex, false, false);
-                    Equals(invalidComplex, invalidComplex, !double.IsNaN(invalidReal) && !double.IsNaN(invalidImaginary), true); // Handle double.NaN != double.NaN
+                    Equals_Helper(invalidComplex, complex, false, false);
+                    Equals_Helper(invalidComplex, invalidComplex, !double.IsNaN(invalidReal) && !double.IsNaN(invalidImaginary), true); // Handle double.NaN != double.NaN
                 }
             }
         }
 
         [Fact]
-        public static void Equals()
+        public static void EqualsTest()
         {
             // This is not InlineData, to workaround a niche bug, that mainly occurs on non Windows platforms.
             // This bug moves test values around to different intermediate memory locations, causing true assertions to be false.
             // Moving these methods into a method, not an iterator fixes this.
-            Equals(Complex.Zero, Complex.Zero, true, true);
-            Equals(Complex.Zero, Complex.One, false, false);
-            Equals(Complex.Zero, -Complex.One, false, false);
-            Equals(Complex.Zero, Complex.ImaginaryOne, false, false);
-            Equals(Complex.Zero, -Complex.ImaginaryOne, false, false);
+            Equals_Helper(Complex.Zero, Complex.Zero, true, true);
+            Equals_Helper(Complex.Zero, Complex.One, false, false);
+            Equals_Helper(Complex.Zero, -Complex.One, false, false);
+            Equals_Helper(Complex.Zero, Complex.ImaginaryOne, false, false);
+            Equals_Helper(Complex.Zero, -Complex.ImaginaryOne, false, false);
 
-            Equals(Complex.One, Complex.One, true, true);
-            Equals(Complex.One, -Complex.One, false, false);
-            Equals(Complex.One, Complex.ImaginaryOne, false, false);
-            Equals(Complex.One, -Complex.ImaginaryOne, false, false);
+            Equals_Helper(Complex.One, Complex.One, true, true);
+            Equals_Helper(Complex.One, -Complex.One, false, false);
+            Equals_Helper(Complex.One, Complex.ImaginaryOne, false, false);
+            Equals_Helper(Complex.One, -Complex.ImaginaryOne, false, false);
 
-            Equals(-Complex.One, -Complex.One, true, true);
-            Equals(-Complex.One, Complex.ImaginaryOne, false, false);
-            Equals(-Complex.One, -Complex.ImaginaryOne, false, false);
+            Equals_Helper(-Complex.One, -Complex.One, true, true);
+            Equals_Helper(-Complex.One, Complex.ImaginaryOne, false, false);
+            Equals_Helper(-Complex.One, -Complex.ImaginaryOne, false, false);
 
-            Equals(Complex.ImaginaryOne, Complex.ImaginaryOne, true, true);
-            Equals(Complex.ImaginaryOne, -Complex.ImaginaryOne, false, false);
+            Equals_Helper(Complex.ImaginaryOne, Complex.ImaginaryOne, true, true);
+            Equals_Helper(Complex.ImaginaryOne, -Complex.ImaginaryOne, false, false);
 
-            Equals(-Complex.ImaginaryOne, -Complex.ImaginaryOne, true, true);
+            Equals_Helper(-Complex.ImaginaryOne, -Complex.ImaginaryOne, true, true);
 
-            Equals(Complex.Zero, new Complex(0, 0), true, true);
-            Equals(Complex.Zero, new Complex(1, 0), false, false);
-            Equals(Complex.Zero, new Complex(0, 1), false, false);
+            Equals_Helper(Complex.Zero, new Complex(0, 0), true, true);
+            Equals_Helper(Complex.Zero, new Complex(1, 0), false, false);
+            Equals_Helper(Complex.Zero, new Complex(0, 1), false, false);
 
-            Equals(Complex.One, new Complex(1, 0), true, true);
-            Equals(Complex.One, new Complex(1, 1), false, false);
-            Equals(Complex.One, new Complex(0, 1), false, false);
+            Equals_Helper(Complex.One, new Complex(1, 0), true, true);
+            Equals_Helper(Complex.One, new Complex(1, 1), false, false);
+            Equals_Helper(Complex.One, new Complex(0, 1), false, false);
 
-            Equals(-Complex.One, new Complex(-1, 0), true, true);
-            Equals(-Complex.One, new Complex(-1, -1), false, false);
-            Equals(-Complex.One, new Complex(0, -1), false, false);
+            Equals_Helper(-Complex.One, new Complex(-1, 0), true, true);
+            Equals_Helper(-Complex.One, new Complex(-1, -1), false, false);
+            Equals_Helper(-Complex.One, new Complex(0, -1), false, false);
 
-            Equals(Complex.ImaginaryOne, new Complex(0, 1), true, true);
-            Equals(Complex.ImaginaryOne, new Complex(1, 1), false, false);
-            Equals(Complex.ImaginaryOne, new Complex(0, -1), false, false);
+            Equals_Helper(Complex.ImaginaryOne, new Complex(0, 1), true, true);
+            Equals_Helper(Complex.ImaginaryOne, new Complex(1, 1), false, false);
+            Equals_Helper(Complex.ImaginaryOne, new Complex(0, -1), false, false);
 
-            Equals(-Complex.ImaginaryOne, new Complex(0, -1), true, true);
-            Equals(-Complex.ImaginaryOne, new Complex(-1, -1), false, false);
-            Equals(-Complex.ImaginaryOne, new Complex(0, 1), false, false);
+            Equals_Helper(-Complex.ImaginaryOne, new Complex(0, -1), true, true);
+            Equals_Helper(-Complex.ImaginaryOne, new Complex(-1, -1), false, false);
+            Equals_Helper(-Complex.ImaginaryOne, new Complex(0, 1), false, false);
 
-            Equals(new Complex(0.5, 0.5), new Complex(0.5, 0.5), true, true);
-            Equals(new Complex(0.5, 0.5), new Complex(0.5, 1.5), false, false);
-            Equals(new Complex(0.5, 0.5), new Complex(1.5, 0.5), false, false);
+            Equals_Helper(new Complex(0.5, 0.5), new Complex(0.5, 0.5), true, true);
+            Equals_Helper(new Complex(0.5, 0.5), new Complex(0.5, 1.5), false, false);
+            Equals_Helper(new Complex(0.5, 0.5), new Complex(1.5, 0.5), false, false);
 
             // Boundary values
             Complex maxMax = new Complex(double.MaxValue, double.MaxValue);
@@ -854,33 +854,33 @@ namespace System.Numerics.Tests
             Complex minMax = new Complex(double.MinValue, double.MaxValue);
             Complex minMin = new Complex(double.MinValue, double.MinValue);
 
-            Equals(maxMax, maxMax, true, true);
-            Equals(maxMax, maxMin, false, false);
-            Equals(maxMax, minMax, false, false);
-            Equals(maxMax, minMin, false, false);
-            Equals(maxMax, new Complex(1, 2), false, false);
+            Equals_Helper(maxMax, maxMax, true, true);
+            Equals_Helper(maxMax, maxMin, false, false);
+            Equals_Helper(maxMax, minMax, false, false);
+            Equals_Helper(maxMax, minMin, false, false);
+            Equals_Helper(maxMax, new Complex(1, 2), false, false);
 
-            Equals(maxMin, maxMin, true, true);
-            Equals(maxMin, minMax, false, false);
-            Equals(maxMin, minMin, false, false);
-            Equals(maxMin, new Complex(1, 2), false, false);
+            Equals_Helper(maxMin, maxMin, true, true);
+            Equals_Helper(maxMin, minMax, false, false);
+            Equals_Helper(maxMin, minMin, false, false);
+            Equals_Helper(maxMin, new Complex(1, 2), false, false);
 
-            Equals(minMax, minMax, true, true);
-            Equals(minMax, minMin, false, false);
-            Equals(minMax, new Complex(1, 2), false, false);
+            Equals_Helper(minMax, minMax, true, true);
+            Equals_Helper(minMax, minMin, false, false);
+            Equals_Helper(minMax, new Complex(1, 2), false, false);
 
-            Equals(minMin, minMin, true, true);
-            Equals(minMin, new Complex(1, 2), false, false);
+            Equals_Helper(minMin, minMin, true, true);
+            Equals_Helper(minMin, new Complex(1, 2), false, false);
 
-            Equals(new Complex(100.5, 0), 100.5, false, false);
-            Equals(new Complex(0, 100.5), 100.5, false, false);
-            Equals(new Complex(100.5, 0), 0, false, false);
-            Equals(new Complex(0, 100.5), 0, false, false);
-            Equals(new Complex(0, 100.5), "0", false, false);
-            Equals(new Complex(0, 100.5), null, false, false);
+            Equals_Helper(new Complex(100.5, 0), 100.5, false, false);
+            Equals_Helper(new Complex(0, 100.5), 100.5, false, false);
+            Equals_Helper(new Complex(100.5, 0), 0, false, false);
+            Equals_Helper(new Complex(0, 100.5), 0, false, false);
+            Equals_Helper(new Complex(0, 100.5), "0", false, false);
+            Equals_Helper(new Complex(0, 100.5), null, false, false);
         }
 
-        private static void Equals(Complex complex1, object obj, bool expected, bool expectedEquals)
+        private static void Equals_Helper(Complex complex1, object obj, bool expected, bool expectedEquals)
         {
             if (obj is Complex)
             {
@@ -1728,7 +1728,7 @@ namespace System.Numerics.Tests
         [MemberData(nameof(Random_2_TestData))]
         [MemberData(nameof(SmallRandom_2_TestData))]
         [MemberData(nameof(Invalid_2_TestData))]
-        public static void ToString(double real, double imaginary)
+        public static void ToStringTest(double real, double imaginary)
         {
             var complex = new Complex(real, imaginary);
 
index 068ee152b4f64a8b3c8116a74673e3c4aa28def9..3b19ad90f9e86c2cede2fe67774711915a61ba26 100644 (file)
@@ -103,7 +103,7 @@ namespace Windows.UI.Xaml.Tests
             Assert.Equal(expected, duration1 - duration2);
         }
 
-        public static IEnumerable<object[]> Compare_TestData()
+        public static IEnumerable<object[]> Compare_TestData_Data()
         {
             yield return new object[] { new Duration(TimeSpan.FromSeconds(1)), new Duration(TimeSpan.FromSeconds(2)), -1 };
             yield return new object[] { new Duration(TimeSpan.FromSeconds(2)), new Duration(TimeSpan.FromSeconds(1)), 1 };
@@ -121,7 +121,7 @@ namespace Windows.UI.Xaml.Tests
         }
 
         [Theory]
-        [MemberData(nameof(Compare_TestData))]
+        [MemberData(nameof(Compare_TestData_Data))]
         public void Compare_TestData(Duration duration1, Duration duration2, int expected)
         {
             bool bothOrNoneAutomatic = (duration1 == Duration.Automatic) == (duration2 == Duration.Automatic);
@@ -145,7 +145,7 @@ namespace Windows.UI.Xaml.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        [MemberData(nameof(Compare_TestData))]
+        [MemberData(nameof(Compare_TestData_Data))]
         public void Equals_Object_ReturnsExpected(Duration duration, object other, int expected)
         {
             Assert.Equal(expected == 0, duration.Equals(other));
@@ -171,4 +171,4 @@ namespace Windows.UI.Xaml.Tests
             Assert.Equal(expected, duration.ToString());
         }
     }
-}
\ No newline at end of file
+}
index 560b52ff70cab90f30147fc829e0046fe5440403..9efa20a88a4c0d211dbd8485f42ebecca2c48ede 100644 (file)
@@ -35,7 +35,7 @@ namespace Windows.UI.Xaml.Tests
 
         [Theory]
         [MemberData(nameof(Values_TestData))]
-        public void Ctor_Default(double uniformLength)
+        public void Ctor_WithLengthParameter(double uniformLength)
         {
             var thickness = new Thickness(uniformLength);
             Assert.Equal(uniformLength, thickness.Left);
@@ -160,4 +160,4 @@ namespace Windows.UI.Xaml.Tests
             [FieldOffset(0)] public FakeThickness Fake;
         }
     }
-}
\ No newline at end of file
+}
index 986c7ca9ea7558ad1c4a02736fbc6c0ff28ff6ef..ec37381a4574c5e461bd2fd9faabdc46d747a0bd 100644 (file)
@@ -245,7 +245,7 @@ namespace System.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public static void Equals(ArraySegment<int> segment1, object obj, bool expected)
+        public static void EqualsTest(ArraySegment<int> segment1, object obj, bool expected)
         {
             if (obj is ArraySegment<int>)
             {
index d2bc2fd9b80beb731f38212a5adef421a9fade47..b3e350af78a4b6873db6f31f672410a975604018 100644 (file)
@@ -1770,10 +1770,10 @@ namespace System.Tests
         [MemberData(nameof(CreateInstance_TestData))]
         public static void CreateInstance(Type elementType, object repeatedValue)
         {
-            CreateInstance(elementType, new int[] { 10 }, new int[1], repeatedValue);
-            CreateInstance(elementType, new int[] { 0 }, new int[1], repeatedValue);
-            CreateInstance(elementType, new int[] { 1, 2 }, new int[] { 1, 2 }, repeatedValue);
-            CreateInstance(elementType, new int[] { 5, 6 }, new int[] { int.MinValue, 0 }, repeatedValue);
+            CreateInstance_Advanced(elementType, new int[] { 10 }, new int[1], repeatedValue);
+            CreateInstance_Advanced(elementType, new int[] { 0 }, new int[1], repeatedValue);
+            CreateInstance_Advanced(elementType, new int[] { 1, 2 }, new int[] { 1, 2 }, repeatedValue);
+            CreateInstance_Advanced(elementType, new int[] { 5, 6 }, new int[] { int.MinValue, 0 }, repeatedValue);
         }
 
         [Theory]
@@ -1785,7 +1785,7 @@ namespace System.Tests
         [InlineData(typeof(int), new int[] { 7 }, new int[] { 1 }, default(int))]
         [InlineData(typeof(int), new int[] { 7, 8 }, new int[] { 1, 2 }, default(int))]
         [InlineData(typeof(int), new int[] { 7, 8, 9 }, new int[] { 1, 2, 3 }, default(int))]
-        public static void CreateInstance(Type elementType, int[] lengths, int[] lowerBounds, object repeatedValue)
+        public static void CreateInstance_Advanced(Type elementType, int[] lengths, int[] lowerBounds, object repeatedValue)
         {
             bool lowerBoundsAreAllZero = lowerBounds.All(lowerBound => lowerBound == 0);
             if ((!lowerBoundsAreAllZero) && !PlatformDetection.IsNonZeroLowerBoundArraySupported)
@@ -3577,7 +3577,7 @@ namespace System.Tests
         [InlineData(10, 1)]
         [InlineData(9, 2)]
         [InlineData(0, 11)]
-        public void Store_NegativeLength_ThrowsArgumentOutOfRangeException(int index, int length)
+        public void Store_NegativeLength_ThrowsArgumentException(int index, int length)
         {
             AssertExtensions.Throws<ArgumentException>(null, () => Array.Sort((Array)new int[10], index, length));
             AssertExtensions.Throws<ArgumentException>(null, () => Array.Sort((Array)new int[10], index, length, null));
index 37cdb1d48f617b75a0905caf1b3f159a739eb657..852ba57a8e248d0f4d566e85d685f87d7c3f80e1 100644 (file)
@@ -187,7 +187,7 @@ namespace System.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public static void Equals(Attribute attr1, object obj, bool expected, bool hashEqualityExpected)
+        public static void EqualsTest(Attribute attr1, object obj, bool expected, bool hashEqualityExpected)
         {
             Assert.Equal(expected, attr1.Equals(obj));
 
index 5522c8ef7833a1571755a13572c803586478c602..d271df4aa7eaaf272a1dcffe01cf6addf4fd1298 100644 (file)
@@ -68,7 +68,7 @@ namespace System.Tests
         [InlineData((byte)78, null, false)]
         [InlineData((byte)78, "78", false)]
         [InlineData((byte)78, 78, false)]
-        public static void Equals(byte b, object obj, bool expected)
+        public static void EqualsTest(byte b, object obj, bool expected)
         {
             if (obj is byte b2)
             {
@@ -120,7 +120,7 @@ namespace System.Tests
 
         [Theory]
         [MemberData(nameof(ToString_TestData))]
-        public static void ToString(byte b, string format, IFormatProvider provider, string expected)
+        public static void ToStringTest(byte b, string format, IFormatProvider provider, string expected)
         {
             // Format is case insensitive
             string upperFormat = format.ToUpperInvariant();
index 3d7f4da703eafe403a4d6ba1d6f976c989b5cd58..bcc34543e3fa2638044a7fe2c1319d9b99b3bcdf 100644 (file)
@@ -155,7 +155,7 @@ namespace System.Tests
         [InlineData('a', (int)'a', false)]
         [InlineData('a', "a", false)]
         [InlineData('a', null, false)]
-        public static void Equals(char c, object obj, bool expected)
+        public static void EqualsTest(char c, object obj, bool expected)
         {
             if (obj is char)
             {
@@ -826,7 +826,7 @@ namespace System.Tests
         [Theory]
         [InlineData('a', "a")]
         [InlineData('\uabcd', "\uabcd")]
-        public static void ToString(char c, string expected)
+        public static void ToStringTest(char c, string expected)
         {
             Assert.Equal(expected, c.ToString());
             Assert.Equal(expected, char.ToString(c));
index 038ee851f7bfe03fb441abbcb1f0793830e3703a..97c85372e85a92c0984db16f2f2947cad6d52847 100644 (file)
@@ -122,7 +122,7 @@ namespace System.ComponentModel.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public static void Equals(DefaultValueAttribute attr1, object obj, bool expected)
+        public static void EqualsTest(DefaultValueAttribute attr1, object obj, bool expected)
         {
             Assert.Equal(expected, attr1.Equals(obj));
 
index 55450ca2a98b3f7e840b526126465cc2c83ca7b8..2733e642bcf28385aa7de8e4f9877ee24f3adf4c 100644 (file)
@@ -25,7 +25,7 @@ namespace System.ComponentModel.Tests
         [InlineData((EditorBrowsableState)12345, (EditorBrowsableState)12345, true)]
         [InlineData(EditorBrowsableState.Advanced, EditorBrowsableState.Always, false)]
         [InlineData(EditorBrowsableState.Advanced, EditorBrowsableState.Never, false)]
-        public static void Equals(EditorBrowsableState state1, EditorBrowsableState state2, bool equal)
+        public static void EqualsTest(EditorBrowsableState state1, EditorBrowsableState state2, bool equal)
         {
             var attr1 = new EditorBrowsableAttribute(state1);
             var attr2 = new EditorBrowsableAttribute(state2);
index e447bee02ce92922524f80f157b8143945b9b620..d62cb75547c1558ce320fe5e0301b7cdde4f881f 100644 (file)
@@ -721,7 +721,7 @@ namespace System.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public static void Equals(DateTimeOffset dateTimeOffset1, object obj, bool expectedEquals, bool expectedEqualsExact)
+        public static void EqualsTest(DateTimeOffset dateTimeOffset1, object obj, bool expectedEquals, bool expectedEqualsExact)
         {
             Assert.Equal(expectedEquals, dateTimeOffset1.Equals(obj));
             if (obj is DateTimeOffset)
index fa6744481c07bf254c2f0c6c6b2fddf12c29aab5..82ddf869c8a968a08ac703d078bc37067beee044 100644 (file)
@@ -535,7 +535,7 @@ namespace System.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public static void Equals(object obj1, object obj2, bool expected)
+        public static void EqualsTest(object obj1, object obj2, bool expected)
         {
             if (obj1 is decimal d1)
             {
@@ -1858,7 +1858,7 @@ namespace System.Tests
         }
 
         [Fact]
-        public static new void GetHashCode()
+        public static void GetHashCodeTest()
         {
             var dict = new Dictionary<string, (int hash, string value)>();
             foreach (decimal d in GetRandomData(out _, hash: true))
index de096f5672cb79c78088ae4fa183ca24304edd57..30d97ba58e3f6a74626b0896cd7ce1760538a53b 100644 (file)
@@ -112,7 +112,7 @@ namespace System.Tests
         [InlineData(double.NaN, -double.NaN, true)]
         [InlineData(789.0, 789.0f, false)]
         [InlineData(789.0, "789", false)]
-        public static void Equals(double d1, object value, bool expected)
+        public static void EqualsTest(double d1, object value, bool expected)
         {
             if (value is double d2)
             {
index 4134889bcdb9acb75cec70694dba7b3800326c14..8993232c9a6f64bac22817c69d41cbc6257fa52c 100644 (file)
@@ -944,7 +944,7 @@ namespace System.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public static void Equals(Enum e, object obj, bool expected)
+        public static void EqualsTest(Enum e, object obj, bool expected)
         {
             Assert.Equal(expected, e.Equals(obj));
             Assert.Equal(e.GetHashCode(), e.GetHashCode());
index 1cd179b4e7007d3906246b1cbe0edb38bff6718b..364be6ee0b99b6c919053e84338b0756bcfc0543 100644 (file)
@@ -310,7 +310,7 @@ namespace System.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public static void Equals(Guid guid1, object obj, bool expected)
+        public static void EqualsTest(Guid guid1, object obj, bool expected)
         {
             if (obj is Guid)
             {
@@ -343,7 +343,7 @@ namespace System.Tests
 
         [Theory]
         [MemberData(nameof(ToString_TestData))]
-        public static void ToString(Guid guid, string format, string expected)
+        public static void ToStringTest(Guid guid, string format, string expected)
         {
             IFormattable formattable = guid;
             if (string.IsNullOrEmpty(format) || format == "D")
index 46b286d0d3a8ebd72e83cf0bc3acda1a0d2e9c61..3ac050feb71f6fe6072e3aa91e84135a46c15bfd 100644 (file)
@@ -81,7 +81,7 @@ namespace System.Tests
         [InlineData((short)789, null, false)]
         [InlineData((short)789, "789", false)]
         [InlineData((short)789, 789, false)]
-        public static void Equals(short i1, object obj, bool expected)
+        public static void EqualsTest(short i1, object obj, bool expected)
         {
             if (obj is short)
             {
@@ -142,7 +142,7 @@ namespace System.Tests
 
         [Theory]
         [MemberData(nameof(ToString_TestData))]
-        public static void ToString(short i, string format, IFormatProvider provider, string expected)
+        public static void ToStringTest(short i, string format, IFormatProvider provider, string expected)
         {
             // Format is case insensitive
             string upperFormat = format.ToUpperInvariant();
index 2a338f0b99cfd81c07df9fa7ba1b500343d77a01..f2d77ce53f0123ea00f6595443931ca85e73e486 100644 (file)
@@ -81,7 +81,7 @@ namespace System.Tests
         [InlineData(789, null, false)]
         [InlineData(789, "789", false)]
         [InlineData(789, (long)789, false)]
-        public static void Equals(int i1, object obj, bool expected)
+        public static void EqualsTest(int i1, object obj, bool expected)
         {
             if (obj is int)
             {
@@ -142,7 +142,7 @@ namespace System.Tests
 
         [Theory]
         [MemberData(nameof(ToString_TestData))]
-        public static void ToString(int i, string format, IFormatProvider provider, string expected)
+        public static void ToStringTest(int i, string format, IFormatProvider provider, string expected)
         {
             // Format is case insensitive
             string upperFormat = format.ToUpperInvariant();
index d005869c21d9ec45768c7ad93fed0d1612917f94..d94cb2e1c6ca6d34c9c27be95db935e9b7eda9a9 100644 (file)
@@ -82,7 +82,7 @@ namespace System.Tests
         [InlineData((long)789, null, false)]
         [InlineData((long)789, "789", false)]
         [InlineData((long)789, 789, false)]
-        public static void Equals(long i1, object obj, bool expected)
+        public static void EqualsTest(long i1, object obj, bool expected)
         {
             if (obj is long)
             {
@@ -143,7 +143,7 @@ namespace System.Tests
 
         [Theory]
         [MemberData(nameof(ToString_TestData))]
-        public static void ToString(long i, string format, IFormatProvider provider, string expected)
+        public static void ToStringTest(long i, string format, IFormatProvider provider, string expected)
         {
             // Format is case insensitive
             string upperFormat = format.ToUpperInvariant();
index dca78325956f8f328f3b32ed30c66140ac9fec6a..90bdf0c8e89d54b89b0f8aa1691f503762f47cbc 100644 (file)
@@ -108,7 +108,7 @@ namespace System.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public static void Equals(IntPtr ptr1, object obj, bool expected)
+        public static void EqualsTest(IntPtr ptr1, object obj, bool expected)
         {
             if (obj is IntPtr)
             {
index f893543bf30e1c701da37607537a04ed8a3af616..39569abae4f29d677ee357d588dfdf8623cd1aca 100644 (file)
@@ -19,7 +19,7 @@ namespace System.Tests
         }
 
         [Fact]
-        public static void Equals()
+        public static void EqualsTest()
         {
             C c = new C();
             DFoo d1 = c.Foo;
index 219f00f4941234fb510ae8ffd272374188e430b7..4e0092213d48a374e2327a971f5e44e59a135b23 100644 (file)
@@ -25,7 +25,7 @@ namespace System.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public static void Equals(object obj1, object obj2, bool expected)
+        public static void EqualsTest(object obj1, object obj2, bool expected)
         {
             if (obj1 != null)
             {
@@ -41,7 +41,7 @@ namespace System.Tests
         }
 
         [Fact]
-        public static void ReferenceEquals()
+        public static void ReferenceEqualsTest()
         {
             var e1 = new EOverrider(7);
             var e2 = new EOverrider(8);
@@ -82,7 +82,7 @@ namespace System.Tests
 
         [Theory]
         [MemberData(nameof(GetType_TestData))]
-        public static void GetType(object obj, Type expected)
+        public static void GetTypeTest(object obj, Type expected)
         {
             Assert.Equal(expected, obj.GetType());
         }
index 3256c299a592aea8d0f24794fe53245ad6927c33..39196cb823bc8fe59cd87b7a5eaa23e8ea606fed 100644 (file)
@@ -77,7 +77,7 @@ namespace System.Tests
         [InlineData((sbyte)78, null, false)]
         [InlineData((sbyte)78, "78", false)]
         [InlineData((sbyte)78, 78, false)]
-        public static void Equals(sbyte i1, object obj, bool expected)
+        public static void EqualsTest(sbyte i1, object obj, bool expected)
         {
             if (obj is sbyte)
             {
@@ -138,7 +138,7 @@ namespace System.Tests
 
         [Theory]
         [MemberData(nameof(ToString_TestData))]
-        public static void ToString(sbyte i, string format, IFormatProvider provider, string expected)
+        public static void ToStringTest(sbyte i, string format, IFormatProvider provider, string expected)
         {
             // Format is case insensitive
             string upperFormat = format.ToUpperInvariant();
index a030d0c04fa1e249c1437d360f5a747419ea69f5..f76791a49c4907c4f46dfb5f97d8639514d8fda3 100644 (file)
@@ -113,7 +113,7 @@ namespace System.Tests
         [InlineData(float.NaN, -float.NaN, true)]
         [InlineData(789.0f, 789.0, false)]
         [InlineData(789.0f, "789", false)]
-        public static void Equals(float f1, object value, bool expected)
+        public static void EqualsTest(float f1, object value, bool expected)
         {
             if (value is float f2)
             {
@@ -456,12 +456,12 @@ namespace System.Tests
             {
                 foreach (object[] testdata in ToString_TestData_NotNetFramework())
                 {
-                    ToString((float)testdata[0], (string)testdata[1], (IFormatProvider)testdata[2], (string)testdata[3]);
+                    ToStringTest((float)testdata[0], (string)testdata[1], (IFormatProvider)testdata[2], (string)testdata[3]);
                 }
             }
         }
 
-        private static void ToString(float f, string format, IFormatProvider provider, string expected)
+        private static void ToStringTest(float f, string format, IFormatProvider provider, string expected)
         {
             bool isDefaultProvider = provider == null;
             if (string.IsNullOrEmpty(format) || format.ToUpperInvariant() == "G")
index a7c4100ae880766934790f9ca753286ba882f031..fb0bcab58580281b06a65bd2929d51761fceb870 100644 (file)
@@ -155,7 +155,7 @@ namespace System.Tests
         [InlineData("Hello", 'e', true)]
         [InlineData("Hello", 'E', false)]
         [InlineData("", 'H', false)]
-        public static void Contains(string s, char value, bool expected)
+        public static void Contains_Char(string s, char value, bool expected)
         {
             Assert.Equal(expected, s.Contains(value));
 
@@ -200,7 +200,7 @@ namespace System.Tests
         [InlineData("Hello", 'e', StringComparison.OrdinalIgnoreCase, true)]
         [InlineData("Hello", 'E', StringComparison.OrdinalIgnoreCase, true)]
         [InlineData("", 'H', StringComparison.OrdinalIgnoreCase, false)]
-        public static void Contains(string s, char value, StringComparison comparisionType, bool expected)
+        public static void Contains_Char_StringComparison(string s, char value, StringComparison comparisionType, bool expected)
         {
             Assert.Equal(expected, s.Contains(value, comparisionType));
         }
@@ -272,7 +272,7 @@ namespace System.Tests
         [InlineData("Hello", "", StringComparison.OrdinalIgnoreCase, true)]
         [InlineData("Hello", "ell" + SoftHyphen, StringComparison.OrdinalIgnoreCase, false)]
         [InlineData("Hello", "Ell" + SoftHyphen, StringComparison.OrdinalIgnoreCase, false)]
-        public static void Contains(string s, string value, StringComparison comparisonType, bool expected)
+        public static void Contains_String_StringComparison(string s, string value, StringComparison comparisonType, bool expected)
         {
             Assert.Equal(expected, s.Contains(value, comparisonType));
             Assert.Equal(expected, s.AsSpan().Contains(value, comparisonType));
@@ -426,7 +426,7 @@ namespace System.Tests
         [InlineData(StringComparison.InvariantCultureIgnoreCase)]
         [InlineData(StringComparison.Ordinal)]
         [InlineData(StringComparison.OrdinalIgnoreCase)]
-        public static void Contains_NullValue_ThrowsArgumentNullException(StringComparison comparisonType)
+        public static void Contains_NullValue_WithComparisonType_ThrowsArgumentNullException(StringComparison comparisonType)
         {
             AssertExtensions.Throws<ArgumentNullException>("value", () => "foo".Contains(null, comparisonType));
         }
@@ -964,7 +964,7 @@ namespace System.Tests
         [InlineData("_____________\u807f\u007f_", '\u007f', StringComparison.OrdinalIgnoreCase, 14)]
         [InlineData("__\u807f_______________", '\u007f', StringComparison.OrdinalIgnoreCase, -1)]
         [InlineData("__\u807f___\u007f___________", '\u007f', StringComparison.OrdinalIgnoreCase, 6)]
-        public static void IndexOf_SingleLetter(string s, char target, StringComparison stringComparison, int expected)
+        public static void IndexOf_SingleLetter_StringComparison(string s, char target, StringComparison stringComparison, int expected)
         {
             Assert.Equal(expected, s.IndexOf(target, stringComparison));
             var charArray = new char[1];
index 6fbbd5cc06926af047219da5be2002ccc69e4fd7..6772d7438c34de07df91a2a13b809659b5352713 100644 (file)
@@ -139,7 +139,7 @@ namespace System.Text.Tests
 
         [Theory]
         [MemberData(nameof(SurrogatePairTestData_InvalidOnly))]
-        public static void Ctor_SurrogatePair_Valid(char highSurrogate, char lowSurrogate)
+        public static void Ctor_SurrogatePair_Invalid(char highSurrogate, char lowSurrogate)
         {
             string expectedParamName = !char.IsHighSurrogate(highSurrogate) ? nameof(highSurrogate) : nameof(lowSurrogate);
             Assert.Throws<ArgumentOutOfRangeException>(expectedParamName, () => new Rune(highSurrogate, lowSurrogate));
index 7862302388d9e9fa4b8349dea554e0f652981ac1..86541bdac81fc107192ec511674c3b63720dd9ee 100644 (file)
@@ -1105,7 +1105,7 @@ namespace System.Text.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public static void Equals(StringBuilder sb1, StringBuilder sb2, bool expected)
+        public static void EqualsTest(StringBuilder sb1, StringBuilder sb2, bool expected)
         {
             Assert.Equal(expected, sb1.Equals(sb2));
         }
@@ -1746,7 +1746,7 @@ namespace System.Text.Tests
         [InlineData("Hello", 4, 0, "")]
         [InlineData("Hello", 0, 0, "")]
         [InlineData("", 0, 0, "")]
-        public static void ToString(string value, int startIndex, int length, string expected)
+        public static void ToStringTest(string value, int startIndex, int length, string expected)
         {
             var builder = new StringBuilder(value);
             if (startIndex == 0 && length == value.Length)
@@ -2170,7 +2170,7 @@ namespace System.Text.Tests
 
         [Theory]
         [MemberData(nameof(Equals_String_TestData))]
-        public static void Equals(StringBuilder sb1, string value, bool expected)
+        public static void Equals_String(StringBuilder sb1, string value, bool expected)
         {
             Assert.Equal(expected, sb1.Equals(value.AsSpan()));
         }
index b3cd79b60d3dc04441a2554f3f2593c7ae34cae9..4f70504ad283a53eada36c7ada6863c082f0dfb4 100644 (file)
@@ -293,7 +293,7 @@ namespace System.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public static void Equals(TimeSpan timeSpan1, object obj, bool expected)
+        public static void EqualsTest(TimeSpan timeSpan1, object obj, bool expected)
         {
             if (obj is TimeSpan)
             {
@@ -1111,7 +1111,7 @@ namespace System.Tests
         }
 
         [Theory, MemberData(nameof(ParseDifferentLengthFractionWithLeadingZerosData))]
-        public static void Multiplication(string input, TimeSpan expected)
+        public static void ParseDifferentLengthFractionWithLeadingZeros(string input, TimeSpan expected)
         {
             Assert.Equal(expected, TimeSpan.Parse(input, CultureInfo.InvariantCulture));
             Assert.Equal(expected, TimeSpan.ParseExact(input, "g", CultureInfo.InvariantCulture));
index 8738d64022ce6915b145c5fb12648459f4f483d0..cb999a9b00fad9d469c79b12d020583c98293601 100644 (file)
@@ -1891,7 +1891,7 @@ namespace System.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public static void Equals(TimeZoneInfo timeZoneInfo, object obj, bool expected)
+        public static void EqualsTest(TimeZoneInfo timeZoneInfo, object obj, bool expected)
         {
             Assert.Equal(expected, timeZoneInfo.Equals(obj));
             if (obj is TimeZoneInfo)
index ccc9f478093308cf45cc42a381087e0c7556eb85..fe9d73b48ac5301996e9c34dc012b37133e76389 100644 (file)
@@ -68,7 +68,7 @@ namespace System.Tests
         [InlineData((ushort)789, null, false)]
         [InlineData((ushort)789, "789", false)]
         [InlineData((ushort)789, 789, false)]
-        public static void Equals(ushort i1, object obj, bool expected)
+        public static void EqualsTest(ushort i1, object obj, bool expected)
         {
             if (obj is ushort)
             {
@@ -123,7 +123,7 @@ namespace System.Tests
 
         [Theory]
         [MemberData(nameof(ToString_TestData))]
-        public static void ToString(ushort i, string format, IFormatProvider provider, string expected)
+        public static void ToStringTest(ushort i, string format, IFormatProvider provider, string expected)
         {
             // Format should be case insensitive
             string upperFormat = format.ToUpperInvariant();
index a31df0e22f42b70ce6696b0f0e64379732861435..32c0f61807f5abc56f1a8bce395b10ed90c61c24 100644 (file)
@@ -69,7 +69,7 @@ namespace System.Tests
         [InlineData((uint)789, null, false)]
         [InlineData((uint)789, "789", false)]
         [InlineData((uint)789, 789, false)]
-        public static void Equals(uint i1, object obj, bool expected)
+        public static void EqualsTest(uint i1, object obj, bool expected)
         {
             if (obj is uint)
             {
@@ -125,7 +125,7 @@ namespace System.Tests
 
         [Theory]
         [MemberData(nameof(ToString_TestData))]
-        public static void ToString(uint i, string format, IFormatProvider provider, string expected)
+        public static void ToStringTest(uint i, string format, IFormatProvider provider, string expected)
         {
             // Format is case insensitive
             string upperFormat = format.ToUpperInvariant();
index 3c8b0c5d050aa63549c959540603f36a0fdb428a..fac4535217cca10d2bc6ece06f3523d1aab86071 100644 (file)
@@ -69,7 +69,7 @@ namespace System.Tests
         [InlineData((ulong)789, null, false)]
         [InlineData((ulong)789, "789", false)]
         [InlineData((ulong)789, 789, false)]
-        public static void Equals(ulong i1, object obj, bool expected)
+        public static void EqualsTest(ulong i1, object obj, bool expected)
         {
             if (obj is ulong i2)
             {
@@ -124,7 +124,7 @@ namespace System.Tests
 
         [Theory]
         [MemberData(nameof(ToString_TestData))]
-        public static void ToString(ulong i, string format, IFormatProvider provider, string expected)
+        public static void ToStringTest(ulong i, string format, IFormatProvider provider, string expected)
         {
             // Format is case insensitive
             string upperFormat = format.ToUpperInvariant();
index 53cd55b979d45778c50226b2c92a6b8b41c3f598..5881af789888a19a503ccf7b717a7c348b60c48b 100644 (file)
@@ -105,7 +105,7 @@ namespace System.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public static void Equals(UIntPtr ptr1, object obj, bool expected)
+        public static void EqualsTest(UIntPtr ptr1, object obj, bool expected)
         {
             if (obj is UIntPtr)
             {
index 633baab3ae544bf0b4e52fa121c3275e9bd413ac..444aca48cfa63f363292ccb98f1d761110220ea5 100644 (file)
@@ -386,7 +386,7 @@ namespace System.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public void Equals(Uri uri1, object obj, bool expected)
+        public void EqualsTest(Uri uri1, object obj, bool expected)
         {
             Uri uri2 = obj as Uri;
             if (uri1 != null)
@@ -599,9 +599,9 @@ namespace System.Tests
         [MemberData(nameof(GetComponents_Basic_TestData))]
         public void GetComponents(Uri uri, UriComponents components, string expected)
         {
-            GetComponents(uri, components, UriFormat.SafeUnescaped, expected);
-            GetComponents(uri, components, UriFormat.Unescaped, expected);
-            GetComponents(uri, components, UriFormat.UriEscaped, expected);
+            GetComponents_Advanced(uri, components, UriFormat.SafeUnescaped, expected);
+            GetComponents_Advanced(uri, components, UriFormat.Unescaped, expected);
+            GetComponents_Advanced(uri, components, UriFormat.UriEscaped, expected);
         }
 
         public static IEnumerable<object[]> GetComponents_Advanced_TestData()
@@ -667,7 +667,7 @@ namespace System.Tests
 
         [Theory]
         [MemberData(nameof(GetComponents_Advanced_TestData))]
-        public void GetComponents(Uri uri, UriComponents components, UriFormat format, string expected)
+        public void GetComponents_Advanced(Uri uri, UriComponents components, UriFormat format, string expected)
         {
             Assert.Equal(expected, uri.GetComponents(components, format));
         }
index 915ee3fa6f84154a7ada2f1d1fc6038b892c7df6..839669d6daa4e4efb2644c5b0fce2e940d74b261 100644 (file)
@@ -10,13 +10,13 @@ namespace System.Security.Cryptography.Dsa.Tests
     public partial class DSASignatureFormatterTests : AsymmetricSignatureFormatterTests
     {
         [Fact]
-        public static void InvalidFormatterArguments()
+        public static void InvalidFormatterArguments_DSA()
         {
             InvalidFormatterArguments(new DSASignatureFormatter());
         }
 
         [Fact]
-        public static void InvalidDeformatterArguments()
+        public static void InvalidDeformatterArguments_DSA()
         {
             InvalidDeformatterArguments(new DSASignatureDeformatter());
         }
index 40b86a82fdeddc044003f8654a39095cddbada8b..6d026036035481aaec94847e6625fce3ffa2dd61 100644 (file)
@@ -10,13 +10,13 @@ namespace System.Security.Cryptography.Rsa.Tests
     public partial class RSASignatureFormatterTests : AsymmetricSignatureFormatterTests
     {
         [Fact]
-        public static void InvalidFormatterArguments()
+        public static void InvalidFormatterArguments_RSA()
         {
             InvalidFormatterArguments(new RSAPKCS1SignatureFormatter());
         }
 
         [Fact]
-        public static void InvalidDeformatterArguments()
+        public static void InvalidDeformatterArguments_RSA()
         {
             InvalidDeformatterArguments(new RSAPKCS1SignatureDeformatter());
         }
index 15b28b1ee72836d97b482494188c8edd73e35bbc..57801a46107d38d82c90869ffb30f5e740d661f6 100644 (file)
@@ -216,7 +216,7 @@ namespace System.Security.Cryptography.RNG.Tests
             using (RandomNumberGenerator rng = RandomNumberGenerator.Create())
             {
                 AssertExtensions.Throws<ArgumentNullException>("data", () => rng.GetNonZeroBytes(null));
-                GetBytes_InvalidArgs(rng);
+                GetBytes_InvalidArgs_Helper(rng);
             }
         }
 
@@ -226,7 +226,7 @@ namespace System.Security.Cryptography.RNG.Tests
             using (var rng = new RandomNumberGeneratorMininal())
             {
                 Assert.Throws<NotImplementedException>(() => rng.GetNonZeroBytes(null));
-                GetBytes_InvalidArgs(rng);
+                GetBytes_InvalidArgs_Helper(rng);
             }
         }
 
@@ -504,7 +504,7 @@ namespace System.Security.Cryptography.RNG.Tests
             }
         }
 
-        private static void GetBytes_InvalidArgs(RandomNumberGenerator rng)
+        private static void GetBytes_InvalidArgs_Helper(RandomNumberGenerator rng)
         {
             AssertExtensions.Throws<ArgumentNullException>("data", () => rng.GetBytes(null, 0, 0));
             AssertExtensions.Throws<ArgumentOutOfRangeException>("offset", () => rng.GetBytes(Array.Empty<byte>(), -1, 0));
index d9102da95fd93ecb984a2caccc7acec2a32cd726..99026a82f33fd53306bdb7df1b2f80b06f34121d 100644 (file)
@@ -19,38 +19,38 @@ namespace System.Security.Cryptography.Encryption.Rijndael.Tests
         [Fact]
         public static void VerifyDefaults()
         {
+            static void test(Rijndael alg)
+            {
+                // The block size differs from the base
+                Assert.Equal(128, alg.LegalBlockSizes[0].MinSize);
+                Assert.Equal(128, alg.LegalBlockSizes[0].MaxSize);
+                Assert.Equal(128, alg.BlockSize);
+
+                // Different exception since we have different supported BlockSizes than desktop
+                Assert.Throws<PlatformNotSupportedException>(() => alg.BlockSize = 192);
+                Assert.Throws<PlatformNotSupportedException>(() => alg.BlockSize = 256);
+
+                // Normal exception for rest
+                Assert.Throws<CryptographicException>(() => alg.BlockSize = 111);
+
+                Assert.Equal(CipherMode.CBC, alg.Mode);
+                Assert.Equal(PaddingMode.PKCS7, alg.Padding);
+            }
+
             using (var alg = Rijndael.Create())
             {
                 // We use an internal class for the implementation, not the public RijndaelManaged
                 Assert.IsNotType<RijndaelManaged>(alg);
 
-                VerifyDefaults(alg);
+                test(alg);
             }
 
             using (var alg = new RijndaelManaged())
             {
-                VerifyDefaults(alg);
+                test(alg);
             }
         }
 
-        private static void VerifyDefaults(Rijndael alg)
-        {
-            // The block size differs from the base
-            Assert.Equal(128, alg.LegalBlockSizes[0].MinSize);
-            Assert.Equal(128, alg.LegalBlockSizes[0].MaxSize);
-            Assert.Equal(128, alg.BlockSize);
-
-            // Different exception since we have different supported BlockSizes than desktop
-            Assert.Throws<PlatformNotSupportedException>(() => alg.BlockSize = 192);
-            Assert.Throws<PlatformNotSupportedException>(() => alg.BlockSize = 256);
-
-            // Normal exception for rest
-            Assert.Throws<CryptographicException>(() => alg.BlockSize = 111);
-
-            Assert.Equal(CipherMode.CBC, alg.Mode);
-            Assert.Equal(PaddingMode.PKCS7, alg.Padding);
-        }
-
         [Fact]
         public static void VerifyBlocksizeIVNulling()
         {
@@ -90,98 +90,98 @@ namespace System.Security.Cryptography.Encryption.Rijndael.Tests
         [Fact]
         public static void EncryptDecryptKnownECB192()
         {
+            static void test(Rijndael alg)
+            {
+                byte[] plainTextBytes =
+                    new ASCIIEncoding().GetBytes("This is a sentence that is longer than a block, it ensures that multi-block functions work.");
+
+                byte[] encryptedBytesExpected = new byte[]
+                {
+                    0xC9, 0x7F, 0xA5, 0x5B, 0xC3, 0x92, 0xDC, 0xA6,
+                    0xE4, 0x9F, 0x2D, 0x1A, 0xEF, 0x7A, 0x27, 0x03,
+                    0x04, 0x9C, 0xFB, 0x56, 0x63, 0x38, 0xAE, 0x4F,
+                    0xDC, 0xF6, 0x36, 0x98, 0x28, 0x05, 0x32, 0xE9,
+                    0xF2, 0x6E, 0xEC, 0x0C, 0x04, 0x9D, 0x12, 0x17,
+                    0x18, 0x35, 0xD4, 0x29, 0xFC, 0x01, 0xB1, 0x20,
+                    0xFA, 0x30, 0xAE, 0x00, 0x53, 0xD4, 0x26, 0x25,
+                    0xA4, 0xFD, 0xD5, 0xE6, 0xED, 0x79, 0x35, 0x2A,
+                    0xE2, 0xBB, 0x95, 0x0D, 0xEF, 0x09, 0xBB, 0x6D,
+                    0xC5, 0xC4, 0xDB, 0x28, 0xC6, 0xF4, 0x31, 0x33,
+                    0x9A, 0x90, 0x12, 0x36, 0x50, 0xA0, 0xB7, 0xD1,
+                    0x35, 0xC4, 0xCE, 0x81, 0xE5, 0x2B, 0x85, 0x6B,
+                };
+
+                byte[] aes192Key = new byte[]
+                {
+                    0xA6, 0x1E, 0xC7, 0x54, 0x37, 0x4D, 0x8C, 0xA5,
+                    0xA4, 0xBB, 0x99, 0x50, 0x35, 0x4B, 0x30, 0x4D,
+                    0x6C, 0xFE, 0x3B, 0x59, 0x65, 0xCB, 0x93, 0xE3,
+                };
+
+                // The CipherMode and KeySize are different than the default values; this ensures the type
+                // forwards the state properly to Aes.
+                alg.Mode = CipherMode.ECB;
+                alg.Key = aes192Key;
+
+                byte[] encryptedBytes = alg.Encrypt(plainTextBytes);
+                Assert.Equal(encryptedBytesExpected, encryptedBytes);
+
+                byte[] decryptedBytes = alg.Decrypt(encryptedBytes);
+                Assert.Equal(plainTextBytes, decryptedBytes);
+            }
+
             using (var alg = Rijndael.Create())
             {
-                EncryptDecryptKnownECB192(alg);
+                test(alg);
             }
 
             using (var alg = new RijndaelManaged())
             {
-                EncryptDecryptKnownECB192(alg);
+                test(alg);
             }
         }
 
-        private static void EncryptDecryptKnownECB192(Rijndael alg)
+        [Fact]
+        public static void TestShims()
         {
-            byte[] plainTextBytes =
-                new ASCIIEncoding().GetBytes("This is a sentence that is longer than a block, it ensures that multi-block functions work.");
-
-            byte[] encryptedBytesExpected = new byte[]
-            {
-                0xC9, 0x7F, 0xA5, 0x5B, 0xC3, 0x92, 0xDC, 0xA6,
-                0xE4, 0x9F, 0x2D, 0x1A, 0xEF, 0x7A, 0x27, 0x03,
-                0x04, 0x9C, 0xFB, 0x56, 0x63, 0x38, 0xAE, 0x4F,
-                0xDC, 0xF6, 0x36, 0x98, 0x28, 0x05, 0x32, 0xE9,
-                0xF2, 0x6E, 0xEC, 0x0C, 0x04, 0x9D, 0x12, 0x17,
-                0x18, 0x35, 0xD4, 0x29, 0xFC, 0x01, 0xB1, 0x20,
-                0xFA, 0x30, 0xAE, 0x00, 0x53, 0xD4, 0x26, 0x25,
-                0xA4, 0xFD, 0xD5, 0xE6, 0xED, 0x79, 0x35, 0x2A,
-                0xE2, 0xBB, 0x95, 0x0D, 0xEF, 0x09, 0xBB, 0x6D,
-                0xC5, 0xC4, 0xDB, 0x28, 0xC6, 0xF4, 0x31, 0x33,
-                0x9A, 0x90, 0x12, 0x36, 0x50, 0xA0, 0xB7, 0xD1,
-                0x35, 0xC4, 0xCE, 0x81, 0xE5, 0x2B, 0x85, 0x6B,
-            };
-
-            byte[] aes192Key = new byte[]
+            static void test(Rijndael alg)
             {
-                0xA6, 0x1E, 0xC7, 0x54, 0x37, 0x4D, 0x8C, 0xA5,
-                0xA4, 0xBB, 0x99, 0x50, 0x35, 0x4B, 0x30, 0x4D,
-                0x6C, 0xFE, 0x3B, 0x59, 0x65, 0xCB, 0x93, 0xE3,
-            };
+                alg.BlockSize = 128;
+                Assert.Equal(128, alg.BlockSize);
 
-            // The CipherMode and KeySize are different than the default values; this ensures the type
-            // forwards the state properly to Aes.
-            alg.Mode = CipherMode.ECB;
-            alg.Key = aes192Key;
+                var emptyIV = new byte[alg.BlockSize / 8];
+                alg.IV = emptyIV;
+                Assert.Equal(emptyIV, alg.IV);
+                alg.GenerateIV();
+                Assert.NotEqual(emptyIV, alg.IV);
 
-            byte[] encryptedBytes = alg.Encrypt(plainTextBytes);
-            Assert.Equal(encryptedBytesExpected, encryptedBytes);
+                var emptyKey = new byte[alg.KeySize / 8];
+                alg.Key = emptyKey;
+                Assert.Equal(emptyKey, alg.Key);
+                alg.GenerateKey();
+                Assert.NotEqual(emptyKey, alg.Key);
 
-            byte[] decryptedBytes = alg.Decrypt(encryptedBytes);
-            Assert.Equal(plainTextBytes, decryptedBytes);
-        }
+                alg.KeySize = 128;
+                Assert.Equal(128, alg.KeySize);
+
+                alg.Mode = CipherMode.ECB;
+                Assert.Equal(CipherMode.ECB, alg.Mode);
+
+                alg.Padding = PaddingMode.PKCS7;
+                Assert.Equal(PaddingMode.PKCS7, alg.Padding);
+            }
 
-        [Fact]
-        public static void TestShims()
-        {
             using (var alg = Rijndael.Create())
             {
-                TestShims(alg);
+                test(alg);
             }
 
             using (var alg = new RijndaelManaged())
             {
-                TestShims(alg);
+                test(alg);
             }
         }
 
-        private static void TestShims(Rijndael alg)
-        {
-            alg.BlockSize = 128;
-            Assert.Equal(128, alg.BlockSize);
-
-            var emptyIV = new byte[alg.BlockSize / 8];
-            alg.IV = emptyIV;
-            Assert.Equal(emptyIV, alg.IV);
-            alg.GenerateIV();
-            Assert.NotEqual(emptyIV, alg.IV);
-
-            var emptyKey = new byte[alg.KeySize / 8];
-            alg.Key = emptyKey;
-            Assert.Equal(emptyKey, alg.Key);
-            alg.GenerateKey();
-            Assert.NotEqual(emptyKey, alg.Key);
-
-            alg.KeySize = 128;
-            Assert.Equal(128, alg.KeySize);
-
-            alg.Mode = CipherMode.ECB;
-            Assert.Equal(CipherMode.ECB, alg.Mode);
-
-            alg.Padding = PaddingMode.PKCS7;
-            Assert.Equal(PaddingMode.PKCS7, alg.Padding);
-        }
-
         [Fact]
         public static void RijndaelKeySize_BaseClass()
         {
index fe1935d8274ed42e101947469cc7b01bca232dc3..48afbb1c7e79a8feb9853c073f9c847c2b2afc68 100644 (file)
@@ -337,7 +337,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             Assert.Equal(252, outputData[0]);
         }
 
-        private static void TryCopyBMPString_Throws(PublicEncodingRules ruleSet, byte[] inputData)
+        private static void TryCopyBMPString_Throws_Helper(PublicEncodingRules ruleSet, byte[] inputData)
         {
             char[] outputData = new char[inputData.Length + 1];
             outputData[0] = 'a';
@@ -446,7 +446,7 @@ namespace System.Security.Cryptography.Tests.Asn1
         {
             _ = description;
             byte[] inputData = inputHex.HexToByteArray();
-            TryCopyBMPString_Throws(ruleSet, inputData);
+            TryCopyBMPString_Throws_Helper(ruleSet, inputData);
         }
 
         [Fact]
@@ -475,7 +475,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             input[5] = 0xE9;
             // EOC implicit since the byte[] initializes to zeros
 
-            TryCopyBMPString_Throws(PublicEncodingRules.CER, input);
+            TryCopyBMPString_Throws_Helper(PublicEncodingRules.CER, input);
         }
 
         [Fact]
@@ -513,7 +513,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             input[1011] = 0x02;
             // EOC implicit since the byte[] initializes to zeros
 
-            TryCopyBMPString_Throws(PublicEncodingRules.CER, input);
+            TryCopyBMPString_Throws_Helper(PublicEncodingRules.CER, input);
         }
 
         [Fact]
index 8aeb691c27de17b283ddc50b411aed350e7f0dcf..6282bbd21f903edeca9b9a803cf39c422ec92f51 100644 (file)
@@ -252,7 +252,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             Assert.Equal(expectedHex, output.AsSpan(0, bytesWritten).ByteArrayToHex());
         }
 
-        private static void TryCopyBitStringBytes_Throws(
+        private static void TryCopyBitStringBytes_Throws_Helper(
             PublicEncodingRules ruleSet,
             byte[] input)
         {
@@ -330,7 +330,7 @@ namespace System.Security.Cryptography.Tests.Asn1
         {
             _ = description;
             byte[] inputData = inputHex.HexToByteArray();
-            TryCopyBitStringBytes_Throws(ruleSet, inputData);
+            TryCopyBitStringBytes_Throws_Helper(ruleSet, inputData);
         }
 
         [Fact]
@@ -348,7 +348,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             input[2] = 0x03;
             input[3] = 0xE9;
 
-            TryCopyBitStringBytes_Throws(PublicEncodingRules.CER, input);
+            TryCopyBitStringBytes_Throws_Helper(PublicEncodingRules.CER, input);
         }
 
         [Fact]
@@ -377,7 +377,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             input[5] = 0xE9;
             // EOC implicit since the byte[] initializes to zeros
 
-            TryCopyBitStringBytes_Throws(PublicEncodingRules.CER, input);
+            TryCopyBitStringBytes_Throws_Helper(PublicEncodingRules.CER, input);
         }
 
         [Fact]
@@ -416,7 +416,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             input[1011] = 0x02;
             // EOC implicit since the byte[] initializes to zeros
 
-            TryCopyBitStringBytes_Throws(PublicEncodingRules.CER, input);
+            TryCopyBitStringBytes_Throws_Helper(PublicEncodingRules.CER, input);
         }
 
         [Fact]
index b4bde7018e5b6e0ec1d72fbd0bc84b552634006f..9fe1323f8b5d1171f93af5cf88da70829696f5cc 100644 (file)
@@ -324,7 +324,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             Assert.Equal(252, outputData[0]);
         }
 
-        private static void TryCopyIA5String_Throws(PublicEncodingRules ruleSet, byte[] inputData)
+        private static void TryCopyIA5String_Throws_Helper(PublicEncodingRules ruleSet, byte[] inputData)
         {
             char[] outputData = new char[inputData.Length + 1];
             outputData[0] = 'a';
@@ -408,7 +408,7 @@ namespace System.Security.Cryptography.Tests.Asn1
         {
             _ = description;
             byte[] inputData = inputHex.HexToByteArray();
-            TryCopyIA5String_Throws(ruleSet, inputData);
+            TryCopyIA5String_Throws_Helper(ruleSet, inputData);
         }
 
         [Fact]
@@ -437,7 +437,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             input[5] = 0xE9;
             // EOC implicit since the byte[] initializes to zeros
 
-            TryCopyIA5String_Throws(PublicEncodingRules.CER, input);
+            TryCopyIA5String_Throws_Helper(PublicEncodingRules.CER, input);
         }
 
         [Fact]
@@ -475,7 +475,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             input[1011] = 0x02;
             // EOC implicit since the byte[] initializes to zeros
 
-            TryCopyIA5String_Throws(PublicEncodingRules.CER, input);
+            TryCopyIA5String_Throws_Helper(PublicEncodingRules.CER, input);
         }
 
         [Fact]
index cf982e2aa3489a979159af47c57e54b647717518..8919d94a363ab6c2337465abbc0410276e5c7470 100644 (file)
@@ -209,7 +209,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             Assert.Equal(expectedHex, output.AsSpan(0, bytesWritten).ByteArrayToHex());
         }
 
-        private static void TryCopyOctetStringBytes_Throws(
+        private static void TryCopyOctetStringBytes_Throws_Helper(
             PublicEncodingRules ruleSet,
             byte[] input)
         {
@@ -259,7 +259,7 @@ namespace System.Security.Cryptography.Tests.Asn1
         {
             _ = description;
             byte[] inputData = inputHex.HexToByteArray();
-            TryCopyOctetStringBytes_Throws(ruleSet, inputData);
+            TryCopyOctetStringBytes_Throws_Helper(ruleSet, inputData);
         }
 
         [Fact]
@@ -288,7 +288,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             input[5] = 0xE9;
             // EOC implicit since the byte[] initializes to zeros
 
-            TryCopyOctetStringBytes_Throws(PublicEncodingRules.CER, input);
+            TryCopyOctetStringBytes_Throws_Helper(PublicEncodingRules.CER, input);
         }
 
         [Fact]
@@ -326,7 +326,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             input[1011] = 0x02;
             // EOC implicit since the byte[] initializes to zeros
 
-            TryCopyOctetStringBytes_Throws(PublicEncodingRules.CER, input);
+            TryCopyOctetStringBytes_Throws_Helper(PublicEncodingRules.CER, input);
         }
 
         [Fact]
index 7f24afd35d35bc09a490d8bffd2626ca98fc95ca..4b9464e3e59490d574ee7c02d064056806eb374e 100644 (file)
@@ -338,7 +338,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             Assert.Equal(252, outputData[0]);
         }
 
-        private static void TryCopyUTF8String_Throws(PublicEncodingRules ruleSet, byte[] inputData)
+        private static void TryCopyUTF8String_Throws_Helper(PublicEncodingRules ruleSet, byte[] inputData)
         {
             char[] outputData = new char[inputData.Length + 1];
             outputData[0] = 'a';
@@ -422,7 +422,7 @@ namespace System.Security.Cryptography.Tests.Asn1
         {
             _ = description;
             byte[] inputData = inputHex.HexToByteArray();
-            TryCopyUTF8String_Throws(ruleSet, inputData);
+            TryCopyUTF8String_Throws_Helper(ruleSet, inputData);
         }
 
         [Fact]
@@ -451,7 +451,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             input[5] = 0xE9;
             // EOC implicit since the byte[] initializes to zeros
 
-            TryCopyUTF8String_Throws(PublicEncodingRules.CER, input);
+            TryCopyUTF8String_Throws_Helper(PublicEncodingRules.CER, input);
         }
 
         [Fact]
@@ -489,7 +489,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             input[1011] = 0x02;
             // EOC implicit since the byte[] initializes to zeros
 
-            TryCopyUTF8String_Throws(PublicEncodingRules.CER, input);
+            TryCopyUTF8String_Throws_Helper(PublicEncodingRules.CER, input);
         }
 
         [Fact]
index de82f40712b73525eaef5dbbbf3824ab163edac4..890e04ff40e338d159d1c984e690da7d42fda931 100644 (file)
@@ -80,227 +80,227 @@ namespace System.Security.Cryptography.Tests.Asn1
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_BER_String(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_BER_String(input, expectedPayloadHex);
+        public void VerifyWrite_BER_String(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_BER_String_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_BER_String_CustomTag(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_BER_String_CustomTag(input, expectedPayloadHex);
+        public void VerifyWrite_BER_String_CustomTag(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_BER_String_CustomTag_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
-        public new void VerifyWrite_CER_String(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_CER_String(input, expectedPayloadHex);
+        public void VerifyWrite_CER_String(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_CER_String_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
-        public new void VerifyWrite_CER_String_CustomTag(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_CER_String_CustomTag(input, expectedPayloadHex);
+        public void VerifyWrite_CER_String_CustomTag(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_CER_String_CustomTag_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_DER_String(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_DER_String(input, expectedPayloadHex);
+        public void VerifyWrite_DER_String(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_DER_String_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_DER_String_CustomTag(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_DER_String_CustomTag(input, expectedPayloadHex);
+        public void VerifyWrite_DER_String_CustomTag(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_DER_String_CustomTag_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_BER_Span(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_BER_Span(input, expectedPayloadHex);
+        public void VerifyWrite_BER_Span(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_BER_Span_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_BER_Span_CustomTag(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_BER_Span_CustomTag(input, expectedPayloadHex);
+        public void VerifyWrite_BER_Span_CustomTag(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_BER_Span_CustomTag_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
-        public new void VerifyWrite_CER_Span(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_CER_Span(input, expectedPayloadHex);
+        public void VerifyWrite_CER_Span(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_CER_Span_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
-        public new void VerifyWrite_CER_Span_CustomTag(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_CER_Span_CustomTag(input, expectedPayloadHex);
+        public void VerifyWrite_CER_Span_CustomTag(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_CER_Span_CustomTag_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_DER_Span(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_DER_Span(input, expectedPayloadHex);
+        public void VerifyWrite_DER_Span(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_DER_Span_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_DER_Span_CustomTag(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_DER_Span_CustomTag(input, expectedPayloadHex);
+        public void VerifyWrite_DER_Span_CustomTag(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_DER_Span_CustomTag_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_BER_String_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_BER_String_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_BER_String_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_BER_String_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_BER_String_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_BER_String_CustomTag_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_BER_String_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_BER_String_CustomTag_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_BER_Span_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_BER_Span_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_BER_Span_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_BER_Span_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_BER_Span_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_BER_Span_CustomTag_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_BER_Span_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_BER_Span_CustomTag_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
-        public new void VerifyWrite_CER_String_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_CER_String_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_CER_String_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_CER_String_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
-        public new void VerifyWrite_CER_String_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_CER_String_CustomTag_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_CER_String_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_CER_String_CustomTag_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
-        public new void VerifyWrite_CER_Span_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_CER_Span_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_CER_Span_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_CER_Span_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
-        public new void VerifyWrite_CER_Span_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_CER_Span_CustomTag_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_CER_Span_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_CER_Span_CustomTag_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_DER_String_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_DER_String_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_DER_String_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_DER_String_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_DER_String_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_DER_String_CustomTag_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_DER_String_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_DER_String_CustomTag_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_DER_Span_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_DER_Span_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_DER_Span_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_DER_Span_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_DER_Span_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_DER_Span_CustomTag_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_DER_Span_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_DER_Span_CustomTag_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [InlineData(PublicEncodingRules.BER)]
         [InlineData(PublicEncodingRules.CER)]
         [InlineData(PublicEncodingRules.DER)]
-        public new void VerifyWrite_String_Null(PublicEncodingRules ruleSet) =>
-            base.VerifyWrite_String_Null(ruleSet);
+        public void VerifyWrite_String_Null(PublicEncodingRules ruleSet) =>
+            base.VerifyWrite_String_Null_Helper(ruleSet);
 
         [Theory]
         [InlineData(PublicEncodingRules.BER)]
         [InlineData(PublicEncodingRules.CER)]
         [InlineData(PublicEncodingRules.DER)]
-        public new void VerifyWrite_String_Null_CustomTag(PublicEncodingRules ruleSet) =>
-            base.VerifyWrite_String_Null_CustomTag(ruleSet);
+        public void VerifyWrite_String_Null_CustomTag(PublicEncodingRules ruleSet) =>
+            base.VerifyWrite_String_Null_CustomTag_Helper(ruleSet);
 
         [Theory]
         [InlineData(PublicEncodingRules.BER)]
         [InlineData(PublicEncodingRules.CER)]
         [InlineData(PublicEncodingRules.DER)]
-        public new void VerifyWrite_EndOfContents_String(PublicEncodingRules ruleSet) =>
-            base.VerifyWrite_EndOfContents_String(ruleSet);
+        public void VerifyWrite_EndOfContents_String(PublicEncodingRules ruleSet) =>
+            base.VerifyWrite_EndOfContents_String_Helper(ruleSet);
 
         [Theory]
         [InlineData(PublicEncodingRules.BER)]
         [InlineData(PublicEncodingRules.CER)]
         [InlineData(PublicEncodingRules.DER)]
-        public new void VerifyWrite_EndOfContents_Span(PublicEncodingRules ruleSet) =>
-            base.VerifyWrite_EndOfContents_Span(ruleSet);
+        public void VerifyWrite_EndOfContents_Span(PublicEncodingRules ruleSet) =>
+            base.VerifyWrite_EndOfContents_Span_Helper(ruleSet);
 
         [Theory]
         [MemberData(nameof(CERSegmentedCases))]
-        public new void VerifyWrite_CERSegmented_String(string input, int contentByteCount) =>
-            base.VerifyWrite_CERSegmented_String(input, contentByteCount);
+        public void VerifyWrite_CERSegmented_String(string input, int contentByteCount) =>
+            base.VerifyWrite_CERSegmented_String_Helper(input, contentByteCount);
 
         [Theory]
         [MemberData(nameof(CERSegmentedCases))]
-        public new void VerifyWrite_CERSegmented_String_CustomTag(string input, int contentByteCount) =>
-            base.VerifyWrite_CERSegmented_String_CustomTag(input, contentByteCount);
+        public void VerifyWrite_CERSegmented_String_CustomTag(string input, int contentByteCount) =>
+            base.VerifyWrite_CERSegmented_String_CustomTag_Helper(input, contentByteCount);
 
         [Theory]
         [MemberData(nameof(CERSegmentedCases))]
-        public new void VerifyWrite_CERSegmented_String_ConstructedTag(string input, int contentByteCount) =>
-            base.VerifyWrite_CERSegmented_String_ConstructedTag(input, contentByteCount);
+        public void VerifyWrite_CERSegmented_String_ConstructedTag(string input, int contentByteCount) =>
+            base.VerifyWrite_CERSegmented_String_ConstructedTag_Helper(input, contentByteCount);
 
         [Theory]
         [MemberData(nameof(CERSegmentedCases))]
-        public new void VerifyWrite_CERSegmented_String_CustomPrimitiveTag(string input, int contentByteCount) =>
-            base.VerifyWrite_CERSegmented_String_CustomPrimitiveTag(input, contentByteCount);
+        public void VerifyWrite_CERSegmented_String_CustomPrimitiveTag(string input, int contentByteCount) =>
+            base.VerifyWrite_CERSegmented_String_CustomPrimitiveTag_Helper(input, contentByteCount);
 
         [Theory]
         [MemberData(nameof(CERSegmentedCases))]
-        public new void VerifyWrite_CERSegmented_Span(string input, int contentByteCount) =>
-            base.VerifyWrite_CERSegmented_Span(input, contentByteCount);
+        public void VerifyWrite_CERSegmented_Span(string input, int contentByteCount) =>
+            base.VerifyWrite_CERSegmented_Span_Helper(input, contentByteCount);
 
         [Theory]
         [MemberData(nameof(CERSegmentedCases))]
-        public new void VerifyWrite_CERSegmented_Span_CustomTag(string input, int contentByteCount) =>
-            base.VerifyWrite_CERSegmented_Span_CustomTag(input, contentByteCount);
+        public void VerifyWrite_CERSegmented_Span_CustomTag(string input, int contentByteCount) =>
+            base.VerifyWrite_CERSegmented_Span_CustomTag_Helper(input, contentByteCount);
 
         [Theory]
         [MemberData(nameof(CERSegmentedCases))]
-        public new void VerifyWrite_CERSegmented_Span_ConstructedTag(string input, int contentByteCount) =>
-            base.VerifyWrite_CERSegmented_Span_ConstructedTag(input, contentByteCount);
+        public void VerifyWrite_CERSegmented_Span_ConstructedTag(string input, int contentByteCount) =>
+            base.VerifyWrite_CERSegmented_Span_ConstructedTag_Helper(input, contentByteCount);
 
         [Theory]
         [MemberData(nameof(CERSegmentedCases))]
-        public new void VerifyWrite_CERSegmented_Span_CustomPrimitiveTag(string input, int contentByteCount) =>
-            base.VerifyWrite_CERSegmented_Span_CustomPrimitiveTag(input, contentByteCount);
+        public void VerifyWrite_CERSegmented_Span_CustomPrimitiveTag(string input, int contentByteCount) =>
+            base.VerifyWrite_CERSegmented_Span_CustomPrimitiveTag_Helper(input, contentByteCount);
 
         [Theory]
         [MemberData(nameof(InvalidInputs))]
-        public new void VerifyWrite_String_NonEncodable(string input) =>
-            base.VerifyWrite_String_NonEncodable(input);
+        public void VerifyWrite_String_NonEncodable(string input) =>
+            base.VerifyWrite_String_NonEncodable_Helper(input);
 
         [Theory]
         [MemberData(nameof(InvalidInputs))]
-        public new void VerifyWrite_Span_NonEncodable(string input) =>
-            base.VerifyWrite_Span_NonEncodable(input);
+        public void VerifyWrite_Span_NonEncodable(string input) =>
+            base.VerifyWrite_Span_NonEncodable_Helper(input);
 
         [Theory]
         [InlineData(false)]
         [InlineData(true)]
-        public new void WriteAfterDispose_Span(bool empty) =>
-            base.WriteAfterDispose_Span(empty);
+        public void WriteAfterDispose_Span(bool empty) =>
+            base.WriteAfterDispose_Span_Helper(empty);
 
         [Theory]
         [InlineData(false)]
         [InlineData(true)]
-        public new void WriteAfterDispose_String(bool empty) =>
-            base.WriteAfterDispose_String(empty);
+        public void WriteAfterDispose_String(bool empty) =>
+            base.WriteAfterDispose_String_Helper(empty);
     }
 }
index 9ab3bac1995529de6afffac36f5cd580b6443548..5637e9dff85936fd8a83d09652ed484ff975628a 100644 (file)
@@ -40,7 +40,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             "not have died in vain-that this nation, under God, shall have a new birth of freedom-and " +
             "that government of the people, by the people, for the people, shall not perish from the earth.";
 
-        protected void VerifyWrite_BER_String(string input, string expectedPayloadHex)
+        protected void VerifyWrite_BER_String_Helper(string input, string expectedPayloadHex)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.BER))
             {
@@ -50,7 +50,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_BER_String_CustomTag(string input, string expectedPayloadHex)
+        protected void VerifyWrite_BER_String_CustomTag_Helper(string input, string expectedPayloadHex)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.BER))
             {
@@ -61,7 +61,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_CER_String(string input, string expectedPayloadHex)
+        protected void VerifyWrite_CER_String_Helper(string input, string expectedPayloadHex)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.BER))
             {
@@ -71,7 +71,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_CER_String_CustomTag(string input, string expectedPayloadHex)
+        protected void VerifyWrite_CER_String_CustomTag_Helper(string input, string expectedPayloadHex)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.BER))
             {
@@ -82,7 +82,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_DER_String(string input, string expectedPayloadHex)
+        protected void VerifyWrite_DER_String_Helper(string input, string expectedPayloadHex)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.BER))
             {
@@ -92,7 +92,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_DER_String_CustomTag(string input, string expectedPayloadHex)
+        protected void VerifyWrite_DER_String_CustomTag_Helper(string input, string expectedPayloadHex)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.BER))
             {
@@ -103,7 +103,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_BER_Span(string input, string expectedPayloadHex)
+        protected void VerifyWrite_BER_Span_Helper(string input, string expectedPayloadHex)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.BER))
             {
@@ -113,7 +113,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_BER_Span_CustomTag(string input, string expectedPayloadHex)
+        protected void VerifyWrite_BER_Span_CustomTag_Helper(string input, string expectedPayloadHex)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.BER))
             {
@@ -124,7 +124,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_CER_Span(string input, string expectedPayloadHex)
+        protected void VerifyWrite_CER_Span_Helper(string input, string expectedPayloadHex)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.BER))
             {
@@ -134,7 +134,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_CER_Span_CustomTag(string input, string expectedPayloadHex)
+        protected void VerifyWrite_CER_Span_CustomTag_Helper(string input, string expectedPayloadHex)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.BER))
             {
@@ -145,7 +145,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_DER_Span(string input, string expectedPayloadHex)
+        protected void VerifyWrite_DER_Span_Helper(string input, string expectedPayloadHex)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.BER))
             {
@@ -155,7 +155,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_DER_Span_CustomTag(string input, string expectedPayloadHex)
+        protected void VerifyWrite_DER_Span_CustomTag_Helper(string input, string expectedPayloadHex)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.BER))
             {
@@ -166,7 +166,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_BER_String_ClearsConstructed(string input, string expectedPayloadHex)
+        protected void VerifyWrite_BER_String_ClearsConstructed_Helper(string input, string expectedPayloadHex)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.BER))
             {
@@ -178,7 +178,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_BER_String_CustomTag_ClearsConstructed(string input, string expectedPayloadHex)
+        protected void VerifyWrite_BER_String_CustomTag_ClearsConstructed_Helper(string input, string expectedPayloadHex)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.BER))
             {
@@ -190,7 +190,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_BER_Span_ClearsConstructed(string input, string expectedPayloadHex)
+        protected void VerifyWrite_BER_Span_ClearsConstructed_Helper(string input, string expectedPayloadHex)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.BER))
             {
@@ -202,7 +202,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_BER_Span_CustomTag_ClearsConstructed(string input, string expectedPayloadHex)
+        protected void VerifyWrite_BER_Span_CustomTag_ClearsConstructed_Helper(string input, string expectedPayloadHex)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.BER))
             {
@@ -214,7 +214,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_CER_String_ClearsConstructed(string input, string expectedPayloadHex)
+        protected void VerifyWrite_CER_String_ClearsConstructed_Helper(string input, string expectedPayloadHex)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.CER))
             {
@@ -226,7 +226,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_CER_String_CustomTag_ClearsConstructed(string input, string expectedPayloadHex)
+        protected void VerifyWrite_CER_String_CustomTag_ClearsConstructed_Helper(string input, string expectedPayloadHex)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.CER))
             {
@@ -238,7 +238,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_CER_Span_ClearsConstructed(string input, string expectedPayloadHex)
+        protected void VerifyWrite_CER_Span_ClearsConstructed_Helper(string input, string expectedPayloadHex)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.CER))
             {
@@ -250,7 +250,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_CER_Span_CustomTag_ClearsConstructed(string input, string expectedPayloadHex)
+        protected void VerifyWrite_CER_Span_CustomTag_ClearsConstructed_Helper(string input, string expectedPayloadHex)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.CER))
             {
@@ -262,7 +262,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_DER_String_ClearsConstructed(string input, string expectedPayloadHex)
+        protected void VerifyWrite_DER_String_ClearsConstructed_Helper(string input, string expectedPayloadHex)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.DER))
             {
@@ -274,7 +274,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_DER_String_CustomTag_ClearsConstructed(string input, string expectedPayloadHex)
+        protected void VerifyWrite_DER_String_CustomTag_ClearsConstructed_Helper(string input, string expectedPayloadHex)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.DER))
             {
@@ -286,7 +286,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_DER_Span_ClearsConstructed(string input, string expectedPayloadHex)
+        protected void VerifyWrite_DER_Span_ClearsConstructed_Helper(string input, string expectedPayloadHex)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.DER))
             {
@@ -298,7 +298,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_DER_Span_CustomTag_ClearsConstructed(string input, string expectedPayloadHex)
+        protected void VerifyWrite_DER_Span_CustomTag_ClearsConstructed_Helper(string input, string expectedPayloadHex)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.DER))
             {
@@ -310,7 +310,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_String_Null(PublicEncodingRules ruleSet)
+        protected void VerifyWrite_String_Null_Helper(PublicEncodingRules ruleSet)
         {
             using (AsnWriter writer = new AsnWriter((AsnEncodingRules)ruleSet))
             {
@@ -320,7 +320,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_String_Null_CustomTag(PublicEncodingRules ruleSet)
+        protected void VerifyWrite_String_Null_CustomTag_Helper(PublicEncodingRules ruleSet)
         {
             using (AsnWriter writer = new AsnWriter((AsnEncodingRules)ruleSet))
             {
@@ -330,7 +330,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_EndOfContents_String(PublicEncodingRules ruleSet)
+        protected void VerifyWrite_EndOfContents_String_Helper(PublicEncodingRules ruleSet)
         {
             using (AsnWriter writer = new AsnWriter((AsnEncodingRules)ruleSet))
             {
@@ -340,7 +340,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_EndOfContents_Span(PublicEncodingRules ruleSet)
+        protected void VerifyWrite_EndOfContents_Span_Helper(PublicEncodingRules ruleSet)
         {
             using (AsnWriter writer = new AsnWriter((AsnEncodingRules)ruleSet))
             {
@@ -377,7 +377,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             Assert.Equal(encodedSize, encoded.Length);
         }
 
-        protected void VerifyWrite_CERSegmented_String(string input, int contentByteCount)
+        protected void VerifyWrite_CERSegmented_String_Helper(string input, int contentByteCount)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.CER))
             {
@@ -390,7 +390,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_CERSegmented_String_CustomTag(string input, int contentByteCount)
+        protected void VerifyWrite_CERSegmented_String_CustomTag_Helper(string input, int contentByteCount)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.CER))
             {
@@ -402,7 +402,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_CERSegmented_String_ConstructedTag(string input, int contentByteCount)
+        protected void VerifyWrite_CERSegmented_String_ConstructedTag_Helper(string input, int contentByteCount)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.CER))
             {
@@ -415,7 +415,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_CERSegmented_String_CustomPrimitiveTag(string input, int contentByteCount)
+        protected void VerifyWrite_CERSegmented_String_CustomPrimitiveTag_Helper(string input, int contentByteCount)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.CER))
             {
@@ -428,7 +428,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_CERSegmented_Span(string input, int contentByteCount)
+        protected void VerifyWrite_CERSegmented_Span_Helper(string input, int contentByteCount)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.CER))
             {
@@ -441,7 +441,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_CERSegmented_Span_CustomTag(string input, int contentByteCount)
+        protected void VerifyWrite_CERSegmented_Span_CustomTag_Helper(string input, int contentByteCount)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.CER))
             {
@@ -453,7 +453,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_CERSegmented_Span_ConstructedTag(string input, int contentByteCount)
+        protected void VerifyWrite_CERSegmented_Span_ConstructedTag_Helper(string input, int contentByteCount)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.CER))
             {
@@ -466,7 +466,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_CERSegmented_Span_CustomPrimitiveTag(string input, int contentByteCount)
+        protected void VerifyWrite_CERSegmented_Span_CustomPrimitiveTag_Helper(string input, int contentByteCount)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.CER))
             {
@@ -479,7 +479,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_String_NonEncodable(string input)
+        protected void VerifyWrite_String_NonEncodable_Helper(string input)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.BER))
             {
@@ -487,7 +487,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void VerifyWrite_Span_NonEncodable(string input)
+        protected void VerifyWrite_Span_NonEncodable_Helper(string input)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.BER))
             {
@@ -495,7 +495,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void WriteAfterDispose_Span(bool empty)
+        protected void WriteAfterDispose_Span_Helper(bool empty)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.DER))
             {
@@ -520,7 +520,7 @@ namespace System.Security.Cryptography.Tests.Asn1
             }
         }
 
-        protected void WriteAfterDispose_String(bool empty)
+        protected void WriteAfterDispose_String_Helper(bool empty)
         {
             using (AsnWriter writer = new AsnWriter(AsnEncodingRules.DER))
             {
index 5bd257d7e32ae7c816de12e8bef0e4411636ab21..607ef4c7fafa828846bbad6e93f8c9d09acadd1b 100644 (file)
@@ -74,227 +74,227 @@ namespace System.Security.Cryptography.Tests.Asn1
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_BER_String(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_BER_String(input, expectedPayloadHex);
+        public void VerifyWrite_BER_String(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_BER_String_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_BER_String_CustomTag(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_BER_String_CustomTag(input, expectedPayloadHex);
+        public void VerifyWrite_BER_String_CustomTag(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_BER_String_CustomTag_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
-        public new void VerifyWrite_CER_String(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_CER_String(input, expectedPayloadHex);
+        public void VerifyWrite_CER_String(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_CER_String_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
-        public new void VerifyWrite_CER_String_CustomTag(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_CER_String_CustomTag(input, expectedPayloadHex);
+        public void VerifyWrite_CER_String_CustomTag(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_CER_String_CustomTag_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_DER_String(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_DER_String(input, expectedPayloadHex);
+        public void VerifyWrite_DER_String(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_DER_String_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_DER_String_CustomTag(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_DER_String_CustomTag(input, expectedPayloadHex);
+        public void VerifyWrite_DER_String_CustomTag(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_DER_String_CustomTag_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_BER_Span(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_BER_Span(input, expectedPayloadHex);
+        public void VerifyWrite_BER_Span(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_BER_Span_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_BER_Span_CustomTag(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_BER_Span_CustomTag(input, expectedPayloadHex);
+        public void VerifyWrite_BER_Span_CustomTag(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_BER_Span_CustomTag_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
-        public new void VerifyWrite_CER_Span(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_CER_Span(input, expectedPayloadHex);
+        public void VerifyWrite_CER_Span(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_CER_Span_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
-        public new void VerifyWrite_CER_Span_CustomTag(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_CER_Span_CustomTag(input, expectedPayloadHex);
+        public void VerifyWrite_CER_Span_CustomTag(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_CER_Span_CustomTag_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_DER_Span(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_DER_Span(input, expectedPayloadHex);
+        public void VerifyWrite_DER_Span(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_DER_Span_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_DER_Span_CustomTag(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_DER_Span_CustomTag(input, expectedPayloadHex);
+        public void VerifyWrite_DER_Span_CustomTag(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_DER_Span_CustomTag_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_BER_String_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_BER_String_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_BER_String_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_BER_String_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_BER_String_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_BER_String_CustomTag_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_BER_String_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_BER_String_CustomTag_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_BER_Span_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_BER_Span_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_BER_Span_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_BER_Span_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_BER_Span_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_BER_Span_CustomTag_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_BER_Span_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_BER_Span_CustomTag_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
-        public new void VerifyWrite_CER_String_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_CER_String_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_CER_String_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_CER_String_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
-        public new void VerifyWrite_CER_String_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_CER_String_CustomTag_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_CER_String_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_CER_String_CustomTag_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
-        public new void VerifyWrite_CER_Span_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_CER_Span_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_CER_Span_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_CER_Span_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
-        public new void VerifyWrite_CER_Span_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_CER_Span_CustomTag_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_CER_Span_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_CER_Span_CustomTag_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_DER_String_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_DER_String_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_DER_String_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_DER_String_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_DER_String_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_DER_String_CustomTag_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_DER_String_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_DER_String_CustomTag_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_DER_Span_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_DER_Span_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_DER_Span_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_DER_Span_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_DER_Span_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_DER_Span_CustomTag_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_DER_Span_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_DER_Span_CustomTag_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [InlineData(PublicEncodingRules.BER)]
         [InlineData(PublicEncodingRules.CER)]
         [InlineData(PublicEncodingRules.DER)]
-        public new void VerifyWrite_String_Null(PublicEncodingRules ruleSet) =>
-            base.VerifyWrite_String_Null(ruleSet);
+        public void VerifyWrite_String_Null(PublicEncodingRules ruleSet) =>
+            base.VerifyWrite_String_Null_Helper(ruleSet);
 
         [Theory]
         [InlineData(PublicEncodingRules.BER)]
         [InlineData(PublicEncodingRules.CER)]
         [InlineData(PublicEncodingRules.DER)]
-        public new void VerifyWrite_String_Null_CustomTag(PublicEncodingRules ruleSet) =>
-            base.VerifyWrite_String_Null_CustomTag(ruleSet);
+        public void VerifyWrite_String_Null_CustomTag(PublicEncodingRules ruleSet) =>
+            base.VerifyWrite_String_Null_CustomTag_Helper(ruleSet);
 
         [Theory]
         [InlineData(PublicEncodingRules.BER)]
         [InlineData(PublicEncodingRules.CER)]
         [InlineData(PublicEncodingRules.DER)]
-        public new void VerifyWrite_EndOfContents_String(PublicEncodingRules ruleSet) =>
-            base.VerifyWrite_EndOfContents_String(ruleSet);
+        public void VerifyWrite_EndOfContents_String(PublicEncodingRules ruleSet) =>
+            base.VerifyWrite_EndOfContents_String_Helper(ruleSet);
 
         [Theory]
         [InlineData(PublicEncodingRules.BER)]
         [InlineData(PublicEncodingRules.CER)]
         [InlineData(PublicEncodingRules.DER)]
-        public new void VerifyWrite_EndOfContents_Span(PublicEncodingRules ruleSet) =>
-            base.VerifyWrite_EndOfContents_Span(ruleSet);
+        public void VerifyWrite_EndOfContents_Span(PublicEncodingRules ruleSet) =>
+            base.VerifyWrite_EndOfContents_Span_Helper(ruleSet);
 
         [Theory]
         [MemberData(nameof(CERSegmentedCases))]
-        public new void VerifyWrite_CERSegmented_String(string input, int contentByteCount) =>
-            base.VerifyWrite_CERSegmented_String(input, contentByteCount);
+        public void VerifyWrite_CERSegmented_String(string input, int contentByteCount) =>
+            base.VerifyWrite_CERSegmented_String_Helper(input, contentByteCount);
 
         [Theory]
         [MemberData(nameof(CERSegmentedCases))]
-        public new void VerifyWrite_CERSegmented_String_CustomTag(string input, int contentByteCount) =>
-            base.VerifyWrite_CERSegmented_String_CustomTag(input, contentByteCount);
+        public void VerifyWrite_CERSegmented_String_CustomTag(string input, int contentByteCount) =>
+            base.VerifyWrite_CERSegmented_String_CustomTag_Helper(input, contentByteCount);
 
         [Theory]
         [MemberData(nameof(CERSegmentedCases))]
-        public new void VerifyWrite_CERSegmented_String_ConstructedTag(string input, int contentByteCount) =>
-            base.VerifyWrite_CERSegmented_String_ConstructedTag(input, contentByteCount);
+        public void VerifyWrite_CERSegmented_String_ConstructedTag(string input, int contentByteCount) =>
+            base.VerifyWrite_CERSegmented_String_ConstructedTag_Helper(input, contentByteCount);
 
         [Theory]
         [MemberData(nameof(CERSegmentedCases))]
-        public new void VerifyWrite_CERSegmented_String_CustomPrimitiveTag(string input, int contentByteCount) =>
-            base.VerifyWrite_CERSegmented_String_CustomPrimitiveTag(input, contentByteCount);
+        public void VerifyWrite_CERSegmented_String_CustomPrimitiveTag(string input, int contentByteCount) =>
+            base.VerifyWrite_CERSegmented_String_CustomPrimitiveTag_Helper(input, contentByteCount);
 
         [Theory]
         [MemberData(nameof(CERSegmentedCases))]
-        public new void VerifyWrite_CERSegmented_Span(string input, int contentByteCount) =>
-            base.VerifyWrite_CERSegmented_Span(input, contentByteCount);
+        public void VerifyWrite_CERSegmented_Span(string input, int contentByteCount) =>
+            base.VerifyWrite_CERSegmented_Span_Helper(input, contentByteCount);
 
         [Theory]
         [MemberData(nameof(CERSegmentedCases))]
-        public new void VerifyWrite_CERSegmented_Span_CustomTag(string input, int contentByteCount) =>
-            base.VerifyWrite_CERSegmented_Span_CustomTag(input, contentByteCount);
+        public void VerifyWrite_CERSegmented_Span_CustomTag(string input, int contentByteCount) =>
+            base.VerifyWrite_CERSegmented_Span_CustomTag_Helper(input, contentByteCount);
 
         [Theory]
         [MemberData(nameof(CERSegmentedCases))]
-        public new void VerifyWrite_CERSegmented_Span_ConstructedTag(string input, int contentByteCount) =>
-            base.VerifyWrite_CERSegmented_Span_ConstructedTag(input, contentByteCount);
+        public void VerifyWrite_CERSegmented_Span_ConstructedTag(string input, int contentByteCount) =>
+            base.VerifyWrite_CERSegmented_Span_ConstructedTag_Helper(input, contentByteCount);
 
         [Theory]
         [MemberData(nameof(CERSegmentedCases))]
-        public new void VerifyWrite_CERSegmented_Span_CustomPrimitiveTag(string input, int contentByteCount) =>
-            base.VerifyWrite_CERSegmented_Span_CustomPrimitiveTag(input, contentByteCount);
+        public void VerifyWrite_CERSegmented_Span_CustomPrimitiveTag(string input, int contentByteCount) =>
+            base.VerifyWrite_CERSegmented_Span_CustomPrimitiveTag_Helper(input, contentByteCount);
 
         [Theory]
         [MemberData(nameof(InvalidInputs))]
-        public new void VerifyWrite_String_NonEncodable(string input) =>
-            base.VerifyWrite_String_NonEncodable(input);
+        public void VerifyWrite_String_NonEncodable(string input) =>
+            base.VerifyWrite_String_NonEncodable_Helper(input);
 
         [Theory]
         [MemberData(nameof(InvalidInputs))]
-        public new void VerifyWrite_Span_NonEncodable(string input) =>
-            base.VerifyWrite_Span_NonEncodable(input);
+        public void VerifyWrite_Span_NonEncodable(string input) =>
+            base.VerifyWrite_Span_NonEncodable_Helper(input);
 
         [Theory]
         [InlineData(false)]
         [InlineData(true)]
-        public new void WriteAfterDispose_Span(bool empty) =>
-            base.WriteAfterDispose_Span(empty);
+        public void WriteAfterDispose_Span(bool empty) =>
+            base.WriteAfterDispose_Span_Helper(empty);
 
         [Theory]
         [InlineData(false)]
         [InlineData(true)]
-        public new void WriteAfterDispose_String(bool empty) =>
-            base.WriteAfterDispose_String(empty);
+        public void WriteAfterDispose_String(bool empty) =>
+            base.WriteAfterDispose_String_Helper(empty);
     }
 }
index c98713403d05a0ccfd83a368803ca59e43b25f21..9caa0d8adcf3fbd9f9c0ac57af32f044382450a6 100644 (file)
@@ -73,219 +73,219 @@ namespace System.Security.Cryptography.Tests.Asn1
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_BER_String(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_BER_String(input, expectedPayloadHex);
+        public void VerifyWrite_BER_String(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_BER_String_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_BER_String_CustomTag(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_BER_String_CustomTag(input, expectedPayloadHex);
+        public void VerifyWrite_BER_String_CustomTag(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_BER_String_CustomTag_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
-        public new void VerifyWrite_CER_String(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_CER_String(input, expectedPayloadHex);
+        public void VerifyWrite_CER_String(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_CER_String_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
-        public new void VerifyWrite_CER_String_CustomTag(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_CER_String_CustomTag(input, expectedPayloadHex);
+        public void VerifyWrite_CER_String_CustomTag(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_CER_String_CustomTag_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_DER_String(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_DER_String(input, expectedPayloadHex);
+        public void VerifyWrite_DER_String(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_DER_String_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_DER_String_CustomTag(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_DER_String_CustomTag(input, expectedPayloadHex);
+        public void VerifyWrite_DER_String_CustomTag(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_DER_String_CustomTag_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_BER_Span(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_BER_Span(input, expectedPayloadHex);
+        public void VerifyWrite_BER_Span(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_BER_Span_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_BER_Span_CustomTag(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_BER_Span_CustomTag(input, expectedPayloadHex);
+        public void VerifyWrite_BER_Span_CustomTag(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_BER_Span_CustomTag_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
-        public new void VerifyWrite_CER_Span(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_CER_Span(input, expectedPayloadHex);
+        public void VerifyWrite_CER_Span(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_CER_Span_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
-        public new void VerifyWrite_CER_Span_CustomTag(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_CER_Span_CustomTag(input, expectedPayloadHex);
+        public void VerifyWrite_CER_Span_CustomTag(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_CER_Span_CustomTag_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_DER_Span(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_DER_Span(input, expectedPayloadHex);
+        public void VerifyWrite_DER_Span(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_DER_Span_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_DER_Span_CustomTag(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_DER_Span_CustomTag(input, expectedPayloadHex);
+        public void VerifyWrite_DER_Span_CustomTag(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_DER_Span_CustomTag_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_BER_String_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_BER_String_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_BER_String_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_BER_String_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_BER_String_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_BER_String_CustomTag_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_BER_String_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_BER_String_CustomTag_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_BER_Span_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_BER_Span_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_BER_Span_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_BER_Span_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_BER_Span_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_BER_Span_CustomTag_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_BER_Span_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_BER_Span_CustomTag_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
-        public new void VerifyWrite_CER_String_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_CER_String_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_CER_String_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_CER_String_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
-        public new void VerifyWrite_CER_String_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_CER_String_CustomTag_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_CER_String_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_CER_String_CustomTag_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
-        public new void VerifyWrite_CER_Span_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_CER_Span_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_CER_Span_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_CER_Span_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
-        public new void VerifyWrite_CER_Span_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_CER_Span_CustomTag_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_CER_Span_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_CER_Span_CustomTag_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_DER_String_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_DER_String_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_DER_String_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_DER_String_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_DER_String_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_DER_String_CustomTag_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_DER_String_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_DER_String_CustomTag_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_DER_Span_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_DER_Span_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_DER_Span_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_DER_Span_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [MemberData(nameof(ShortValidCases))]
         [MemberData(nameof(LongValidCases))]
-        public new void VerifyWrite_DER_Span_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
-            base.VerifyWrite_DER_Span_CustomTag_ClearsConstructed(input, expectedPayloadHex);
+        public void VerifyWrite_DER_Span_CustomTag_ClearsConstructed(string input, string expectedPayloadHex) =>
+            base.VerifyWrite_DER_Span_CustomTag_ClearsConstructed_Helper(input, expectedPayloadHex);
 
         [Theory]
         [InlineData(PublicEncodingRules.BER)]
         [InlineData(PublicEncodingRules.CER)]
         [InlineData(PublicEncodingRules.DER)]
-        public new void VerifyWrite_String_Null(PublicEncodingRules ruleSet) =>
-            base.VerifyWrite_String_Null(ruleSet);
+        public void VerifyWrite_String_Null(PublicEncodingRules ruleSet) =>
+            base.VerifyWrite_String_Null_Helper(ruleSet);
 
         [Theory]
         [InlineData(PublicEncodingRules.BER)]
         [InlineData(PublicEncodingRules.CER)]
         [InlineData(PublicEncodingRules.DER)]
-        public new void VerifyWrite_String_Null_CustomTag(PublicEncodingRules ruleSet) =>
-            base.VerifyWrite_String_Null_CustomTag(ruleSet);
+        public void VerifyWrite_String_Null_CustomTag(PublicEncodingRules ruleSet) =>
+            base.VerifyWrite_String_Null_CustomTag_Helper(ruleSet);
 
         [Theory]
         [InlineData(PublicEncodingRules.BER)]
         [InlineData(PublicEncodingRules.CER)]
         [InlineData(PublicEncodingRules.DER)]
-        public new void VerifyWrite_EndOfContents_String(PublicEncodingRules ruleSet) =>
-            base.VerifyWrite_EndOfContents_String(ruleSet);
+        public void VerifyWrite_EndOfContents_String(PublicEncodingRules ruleSet) =>
+            base.VerifyWrite_EndOfContents_String_Helper(ruleSet);
 
         [Theory]
         [InlineData(PublicEncodingRules.BER)]
         [InlineData(PublicEncodingRules.CER)]
         [InlineData(PublicEncodingRules.DER)]
-        public new void VerifyWrite_EndOfContents_Span(PublicEncodingRules ruleSet) =>
-            base.VerifyWrite_EndOfContents_Span(ruleSet);
+        public void VerifyWrite_EndOfContents_Span(PublicEncodingRules ruleSet) =>
+            base.VerifyWrite_EndOfContents_Span_Helper(ruleSet);
 
         [Theory]
         [MemberData(nameof(CERSegmentedCases))]
-        public new void VerifyWrite_CERSegmented_String(string input, int contentByteCount) =>
-            base.VerifyWrite_CERSegmented_String(input, contentByteCount);
+        public void VerifyWrite_CERSegmented_String(string input, int contentByteCount) =>
+            base.VerifyWrite_CERSegmented_String_Helper(input, contentByteCount);
 
         [Theory]
         [MemberData(nameof(CERSegmentedCases))]
-        public new void VerifyWrite_CERSegmented_String_CustomTag(string input, int contentByteCount) =>
-            base.VerifyWrite_CERSegmented_String_CustomTag(input, contentByteCount);
+        public void VerifyWrite_CERSegmented_String_CustomTag(string input, int contentByteCount) =>
+            base.VerifyWrite_CERSegmented_String_CustomTag_Helper(input, contentByteCount);
 
         [Theory]
         [MemberData(nameof(CERSegmentedCases))]
-        public new void VerifyWrite_CERSegmented_String_ConstructedTag(string input, int contentByteCount) =>
-            base.VerifyWrite_CERSegmented_String_ConstructedTag(input, contentByteCount);
+        public void VerifyWrite_CERSegmented_String_ConstructedTag(string input, int contentByteCount) =>
+            base.VerifyWrite_CERSegmented_String_ConstructedTag_Helper(input, contentByteCount);
 
         [Theory]
         [MemberData(nameof(CERSegmentedCases))]
-        public new void VerifyWrite_CERSegmented_String_CustomPrimitiveTag(string input, int contentByteCount) =>
-            base.VerifyWrite_CERSegmented_String_CustomPrimitiveTag(input, contentByteCount);
+        public void VerifyWrite_CERSegmented_String_CustomPrimitiveTag(string input, int contentByteCount) =>
+            base.VerifyWrite_CERSegmented_String_CustomPrimitiveTag_Helper(input, contentByteCount);
 
         [Theory]
         [MemberData(nameof(CERSegmentedCases))]
-        public new void VerifyWrite_CERSegmented_Span(string input, int contentByteCount) =>
-            base.VerifyWrite_CERSegmented_Span(input, contentByteCount);
+        public void VerifyWrite_CERSegmented_Span(string input, int contentByteCount) =>
+            base.VerifyWrite_CERSegmented_Span_Helper(input, contentByteCount);
 
         [Theory]
         [MemberData(nameof(CERSegmentedCases))]
-        public new void VerifyWrite_CERSegmented_Span_CustomTag(string input, int contentByteCount) =>
-            base.VerifyWrite_CERSegmented_Span_CustomTag(input, contentByteCount);
+        public void VerifyWrite_CERSegmented_Span_CustomTag(string input, int contentByteCount) =>
+            base.VerifyWrite_CERSegmented_Span_CustomTag_Helper(input, contentByteCount);
 
         [Theory]
         [MemberData(nameof(CERSegmentedCases))]
-        public new void VerifyWrite_CERSegmented_Span_ConstructedTag(string input, int contentByteCount) =>
-            base.VerifyWrite_CERSegmented_Span_ConstructedTag(input, contentByteCount);
+        public void VerifyWrite_CERSegmented_Span_ConstructedTag(string input, int contentByteCount) =>
+            base.VerifyWrite_CERSegmented_Span_ConstructedTag_Helper(input, contentByteCount);
 
         [Theory]
         [MemberData(nameof(CERSegmentedCases))]
-        public new void VerifyWrite_CERSegmented_Span_CustomPrimitiveTag(string input, int contentByteCount) =>
-            base.VerifyWrite_CERSegmented_Span_CustomPrimitiveTag(input, contentByteCount);
+        public void VerifyWrite_CERSegmented_Span_CustomPrimitiveTag(string input, int contentByteCount) =>
+            base.VerifyWrite_CERSegmented_Span_CustomPrimitiveTag_Helper(input, contentByteCount);
 
         // UTF8 has no non-encodable values.
 
         [Theory]
         [InlineData(false)]
         [InlineData(true)]
-        public new void WriteAfterDispose_Span(bool empty) =>
-            base.WriteAfterDispose_Span(empty);
+        public void WriteAfterDispose_Span(bool empty) =>
+            base.WriteAfterDispose_Span_Helper(empty);
 
         [Theory]
         [InlineData(false)]
         [InlineData(true)]
-        public new void WriteAfterDispose_String(bool empty) =>
-            base.WriteAfterDispose_String(empty);
+        public void WriteAfterDispose_String(bool empty) =>
+            base.WriteAfterDispose_String_Helper(empty);
     }
 }
index 530c71d235865d390befde762c0b16d9d35c634c..b267c70f05a6ba0a71470623a8035132e087fe83 100644 (file)
@@ -51,20 +51,20 @@ namespace System.Security.Cryptography.Hashing.Tests
         [Fact]
         public void EmptyStreamHash()
         {
-            StreamHash(0);
+            StreamHashHelper(0);
         }
 
         [Fact]
         public void StreamHash()
         {
             // This value is a completely arbitrary non-power-of-two.
-            StreamHash(82);
+            StreamHashHelper(82);
         }
 
         [Fact]
         public void LargeStreamHash()
         {
-            StreamHash(1048576);
+            StreamHashHelper(1048576);
         }
 
         [Fact]
@@ -186,7 +186,7 @@ namespace System.Security.Cryptography.Hashing.Tests
             AssertCorrectAnswer((uint)count, result);
         }
 
-        private void StreamHash(int byteCount)
+        private void StreamHashHelper(int byteCount)
         {
             byte[] result;
 
index 2cf5e71d61d093fbb313b1d5ab2d982792b5c9b8..b2c6abe6a7b94084b8a10438fe4e63823ec1793d 100644 (file)
@@ -15,14 +15,10 @@ namespace System.Security.Cryptography.ProtectedDataTests
     [PlatformSpecific(TestPlatforms.Windows)]
     public static class ProtectedDataTests
     {
-        [Fact]
-        public static void RoundTrip()
-        {
-            RoundTrip(null);
-            RoundTrip(new byte[] { 4, 5, 6 });
-        }
-
-        private static void RoundTrip(byte[] entropy)
+        [Theory]
+        [InlineData(null)]
+        [InlineData(new byte[] { 4, 5, 6 })]
+        public static void RoundTrip(byte[] entropy)
         {
             foreach (DataProtectionScope scope in new DataProtectionScope[] { DataProtectionScope.CurrentUser, DataProtectionScope.LocalMachine })
             {
@@ -74,18 +70,12 @@ namespace System.Security.Cryptography.ProtectedDataTests
             Assert.Equal<byte>(plain, recovered);
         }
 
-        [Fact]
-        public static void WrongEntropy()
-        {
-            // Passing a zero-length array as entropy is equivalent to passing null as entropy.
-            byte[] entropy1 = { 4, 5, 6 };
-            byte[] entropy2 = { 4, 5, 7 };
-            WrongEntropy(null, entropy1);
-            WrongEntropy(entropy1, null);
-            WrongEntropy(entropy1, entropy2);
-        }
-
-        private static void WrongEntropy(byte[] entropy1, byte[] entropy2)
+        [Theory]
+        // Passing a zero-length array as entropy is equivalent to passing null as entropy.
+        [InlineData(null, new byte[] { 4, 5, 6 })]
+        [InlineData(new byte[] { 4, 5, 6 }, null)]
+        [InlineData(new byte[] { 4, 5, 6 }, new byte[] { 4, 5, 7 })]
+        public static void WrongEntropy(byte[] entropy1, byte[] entropy2)
         {
             foreach (DataProtectionScope scope in new DataProtectionScope[] { DataProtectionScope.CurrentUser, DataProtectionScope.LocalMachine })
             {
index e207637de64cb773c1fb312d1f75703d4e9e5bc0..4d6c6325fcdaf6a0bf5ceef34dd4aa26ea84b03d 100644 (file)
@@ -78,7 +78,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests
         [InlineData("SHA384", true)]
         [InlineData("SHA512", false)]
         [InlineData("SHA512", true)]
-        public static void TestThumbprint(string hashAlgName, bool viaSpan)
+        public static void TestThumbprint_ByHashAlgorithm(string hashAlgName, bool viaSpan)
         {
             string expectedThumbprintHex;
 
index 5cf9f3a99395ccee148fe55523376e52937ea45b..1a90c8e767697d1fbd0382a19fa9bc9a92dd896e 100644 (file)
@@ -80,13 +80,13 @@ namespace System.Security.Cryptography.Xml.Tests
 
         [Fact]
         public void AsymmetricEncryptionRoundtripUseOAEP() =>
-            AsymmetricEncryptionRoundtrip(useOAEP: true); // OAEP is recommended
+            AsymmetricEncryptionRoundtrip_Helper(useOAEP: true); // OAEP is recommended
 
         [Fact]
         public void AsymmetricEncryptionRoundtrip() =>
-            AsymmetricEncryptionRoundtrip(useOAEP: false);
+            AsymmetricEncryptionRoundtrip_Helper(useOAEP: false);
 
-        private void AsymmetricEncryptionRoundtrip(bool useOAEP)
+        private void AsymmetricEncryptionRoundtrip_Helper(bool useOAEP)
         {
             const string testString = "some text node";
             const string exampleXmlRootElement = "example";
index d52e5757d7cb7f4e4c4f1c532cb755901e9cb58f..415a3fc067665a86b49027d8c93dad6f04f43c41 100644 (file)
@@ -1413,9 +1413,13 @@ namespace System.Security.Cryptography.Xml.Tests
             }
         }
 
-        private void HmacMustBeMultipleOfEightBits(int bits)
+        [ActiveIssue("https://github.com/dotnet/runtime/issues/20429")]
+        [Fact]
+        public void HmacMustBeMultipleOfEightBits()
         {
-            string xml = @"<?xml version=""1.0"" encoding=""UTF-8""?>
+            static void hmacMustBeMultipleOfEightBits(int bits)
+            {
+                string xml = @"<?xml version=""1.0"" encoding=""UTF-8""?>
 <Signature xmlns=""http://www.w3.org/2000/09/xmldsig#"">
   <SignedInfo>
     <CanonicalizationMethod Algorithm=""http://www.w3.org/TR/2001/REC-xml-c14n-20010315"" />
@@ -1433,20 +1437,17 @@ namespace System.Security.Cryptography.Xml.Tests
   <Object Id=""object"">some other text</Object>
 </Signature>
 ";
-            SignedXml sign = GetSignedXml(string.Format(xml, bits));
-            // only multiple of 8 bits are supported
-            sign.CheckSignature(new HMACSHA1(Encoding.ASCII.GetBytes("secret")));
-        }
+                SignedXml sign = GetSignedXml(string.Format(xml, bits));
+                // only multiple of 8 bits are supported
+                sign.CheckSignature(new HMACSHA1(Encoding.ASCII.GetBytes("secret")));
+            }
 
-        [Fact(Skip = "https://github.com/dotnet/runtime/issues/20429")]
-        public void HmacMustBeMultipleOfEightBits()
-        {
             for (int i = 1; i < 160; i++)
             {
                 // The .NET framework only supports multiple of 8 bits
                 if (i % 8 != 0)
                 {
-                    Assert.Throws<CryptographicException>(() => HmacMustBeMultipleOfEightBits(i));
+                    Assert.Throws<CryptographicException>(() => hmacMustBeMultipleOfEightBits(i));
                 }
             }
         }
index ebf80cdc386e8bf5376c636bbf34be7a8df4549c..4455c5fb19f2a9d7bfda5bc01fda5c47bad97c34 100644 (file)
@@ -254,18 +254,6 @@ namespace System.ServiceModel.Syndication.Tests
             Assert.Equal("Atom10", formatter.Version);
         }
 
-        [Fact]
-        public void GetRss20Formatter_Invoke_ReturnsExpected()
-        {
-            var feed = new SyndicationFeed();
-            Rss20FeedFormatter formatter = Assert.IsType<Rss20FeedFormatter>(feed.GetRss20Formatter());
-            Assert.Same(feed, formatter.Feed);
-            Assert.True(formatter.PreserveAttributeExtensions);
-            Assert.True(formatter.PreserveElementExtensions);
-            Assert.True(formatter.SerializeExtensionsAsAtom);
-            Assert.Equal("Rss20", formatter.Version);
-        }
-
         [Theory]
         [InlineData(true)]
         [InlineData(false)]
index 1ca98ae3653f2f05080acf2c7d7d1d737532b830..9ea9420128ec54ef7c038e5b1cd15037cd16ac52 100644 (file)
@@ -446,18 +446,6 @@ namespace System.ServiceModel.Syndication.Tests
             Assert.Equal("Atom10", formatter.Version);
         }
 
-        [Fact]
-        public void GetRss20Formatter_Invoke_ReturnsExpected()
-        {
-            var item = new SyndicationItem();
-            Rss20ItemFormatter formatter = Assert.IsType<Rss20ItemFormatter>(item.GetRss20Formatter());
-            Assert.Same(item, formatter.Item);
-            Assert.True(formatter.PreserveAttributeExtensions);
-            Assert.True(formatter.PreserveElementExtensions);
-            Assert.True(formatter.SerializeExtensionsAsAtom);
-            Assert.Equal("Rss20", formatter.Version);
-        }
-
         [Theory]
         [InlineData(true)]
         [InlineData(false)]
index 69b95fe4b8550d5d6e6847a4a263fdf934d871b3..cea25dc13bc2386232a38999e00cab850cb6f1fa 100644 (file)
@@ -24,7 +24,7 @@ namespace System.ServiceModel.Syndication.Tests
             Assert.Null(workspace.Title);
         }
 
-        public static IEnumerable<object[]> Ctor_String_Collections()
+        public static IEnumerable<object[]> Ctor_String_Collections_Data()
         {
             yield return new object[] { null, null };
             yield return new object[] { "", new ResourceCollectionInfo[0] };
@@ -32,7 +32,7 @@ namespace System.ServiceModel.Syndication.Tests
         }
 
         [Theory]
-        [MemberData(nameof(Ctor_String_Collections))]
+        [MemberData(nameof(Ctor_String_Collections_Data))]
         public void Ctor_String_Collections(string title, ResourceCollectionInfo[] collections)
         {
             var workspace = new Workspace(title, collections);
@@ -51,7 +51,7 @@ namespace System.ServiceModel.Syndication.Tests
             }
         }
 
-        public static IEnumerable<object[]> Ctor_TextSyndicationContent_Collections()
+        public static IEnumerable<object[]> Ctor_TextSyndicationContent_Collections_Data()
         {
             yield return new object[] { null, null };
             yield return new object[] { new TextSyndicationContent("", TextSyndicationContentKind.Html), new ResourceCollectionInfo[0] };
@@ -59,7 +59,7 @@ namespace System.ServiceModel.Syndication.Tests
         }
 
         [Theory]
-        [MemberData(nameof(Ctor_TextSyndicationContent_Collections))]
+        [MemberData(nameof(Ctor_TextSyndicationContent_Collections_Data))]
         public void Ctor_TextSyndicationContent_Collections(TextSyndicationContent title, ResourceCollectionInfo[] collections)
         {
             var workspace = new Workspace(title, collections);
index 0fadc83119313adf50295d5a36ca48e3c46611dc..3426e473cb07546a035669dc1d80ab4d6036a859 100644 (file)
@@ -75,7 +75,7 @@ namespace System.Text.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public void Equals(ASCIIEncoding encoding, object value, bool expected)
+        public void EqualsTest(ASCIIEncoding encoding, object value, bool expected)
         {
             Assert.Equal(expected, encoding.Equals(value));
             Assert.Equal(expected, encoding.GetHashCode().Equals(value?.GetHashCode()));
index b61c9ec1ee4089f8b78de784ac8b3f6dca9f0592..15f70331ca99daf521589add01e86379d54b7e15 100644 (file)
@@ -110,14 +110,28 @@ namespace System.Text.Tests
         [MemberData(nameof(Encoders_MixedInput))]
         public void EncoderGetBytesMixedInput(Encoder encoder, int asciiSize, int unicodeSize0, int unicodeSize1)
         {
+            static void encoderGetBytesMixedInput(Encoder encoder, char[] chars, int length, int asciiSize, int unicodeSize0, int unicodeSize1)
+            {
+                int byteLength = asciiSize
+                    + Clamp(length - 1, 0, 1) * unicodeSize0
+                    + Clamp(length - 2, 0, 1) * unicodeSize1
+                    + Math.Max(length - 3, 0) * asciiSize;
+                byte[] b = new byte[byteLength];
+                Assert.Equal(byteLength, encoder.GetBytes(chars, 0, length, new byte[byteLength], 0, flush: true));
+
+                // Fixed buffer so make larger
+                b = new byte[20];
+                VerificationFixedEncodingHelper(encoder, chars, length, b, byteLength);
+            }
+
             // Bytes does not have enough capacity to accomodate result
             string s = "T\uD83D\uDE01est";
             char[] c = s.ToCharArray();
 
-            EncoderGetBytesMixedInput(encoder, c, 2, asciiSize, unicodeSize0, unicodeSize1);
-            EncoderGetBytesMixedInput(encoder, c, 3, asciiSize, unicodeSize0, unicodeSize1);
-            EncoderGetBytesMixedInput(encoder, c, 4, asciiSize, unicodeSize0, unicodeSize1);
-            EncoderGetBytesMixedInput(encoder, c, 5, asciiSize, unicodeSize0, unicodeSize1);
+            encoderGetBytesMixedInput(encoder, c, 2, asciiSize, unicodeSize0, unicodeSize1);
+            encoderGetBytesMixedInput(encoder, c, 3, asciiSize, unicodeSize0, unicodeSize1);
+            encoderGetBytesMixedInput(encoder, c, 4, asciiSize, unicodeSize0, unicodeSize1);
+            encoderGetBytesMixedInput(encoder, c, 5, asciiSize, unicodeSize0, unicodeSize1);
         }
 
         // Call GetBytes to convert an ASCIIUnicode character array by different encoders
@@ -135,20 +149,6 @@ namespace System.Text.Tests
             EncoderGetBytesMixedInputThrows(encoder, c, 5, asciiSize, unicodeSize0, unicodeSize1);
         }
 
-        private void EncoderGetBytesMixedInput(Encoder encoder, char[] chars, int length, int asciiSize, int unicodeSize0, int unicodeSize1)
-        {
-            int byteLength = asciiSize
-                + Clamp(length - 1, 0, 1) * unicodeSize0
-                + Clamp(length - 2, 0, 1) * unicodeSize1
-                + Math.Max(length - 3, 0) * asciiSize;
-            byte[] b = new byte[byteLength];
-            Assert.Equal(byteLength, encoder.GetBytes(chars, 0, length, new byte[byteLength], 0, flush: true));
-
-            // Fixed buffer so make larger
-            b = new byte[20];
-            VerificationFixedEncodingHelper(encoder, chars, length, b, byteLength);
-        }
-
         private void EncoderGetBytesMixedInputThrows(Encoder encoder, char[] chars, int length, int asciiSize, int unicodeSize0, int unicodeSize1)
         {
             int byteLength = asciiSize
index 1362557981651e1a76c7b893a02e1a9b63912b92..0cacbaa18c7b8db80e19a532131075f7870acbaa 100644 (file)
@@ -67,7 +67,7 @@ namespace System.Text.Encodings.Tests
 
         [Theory]
         [MemberData(nameof(Encoding_TestData))]
-        public static void NormalizationTest(int codepage, string name, string bodyName, string headerName, bool isBrowserDisplay,
+        public static void VerifyCodePageAttributes(int codepage, string name, string bodyName, string headerName, bool isBrowserDisplay,
                                             bool isBrowserSave, bool isMailNewsDisplay, bool isMailNewsSave, int windowsCodePage)
         {
             Encoding encoding = Encoding.GetEncoding(codepage);
index 99ae71140244235393b330dffd53fcb82a845b4a..f7115570e1beefb4d87a86e9089c62ccdadf91de 100644 (file)
@@ -16,27 +16,27 @@ namespace System.Text.Tests
         [InlineData("\uD800\uDC00")]
         public void Convert(string source)
         {
+            static void convert(Encoding srcEncoding, Encoding dstEncoding, byte[] bytes, int index, int count, byte[] expected)
+            {
+                if (index == 0 && count == bytes.Length)
+                {
+                    Assert.Equal(expected, Encoding.Convert(srcEncoding, dstEncoding, bytes));
+                }
+                Assert.Equal(expected, Encoding.Convert(srcEncoding, dstEncoding, bytes, index, count));
+            }
+
             Encoding[] encodings = new Encoding[] { Encoding.UTF8, Encoding.Unicode, Encoding.BigEndianUnicode };
             foreach (Encoding srcEncoding in encodings)
             {
                 foreach (Encoding dstEncoding in encodings)
                 {
                     byte[] bytes = srcEncoding.GetBytes(source);
-                    Convert(srcEncoding, dstEncoding, bytes, 0, bytes.Length, dstEncoding.GetBytes(source));
-                    Convert(srcEncoding, dstEncoding, bytes, 0, 0, new byte[0]);
+                    convert(srcEncoding, dstEncoding, bytes, 0, bytes.Length, dstEncoding.GetBytes(source));
+                    convert(srcEncoding, dstEncoding, bytes, 0, 0, new byte[0]);
                 }
             }
         }
 
-        private static void Convert(Encoding srcEncoding, Encoding dstEncoding, byte[] bytes, int index, int count, byte[] expected)
-        {
-            if (index == 0 && count == bytes.Length)
-            {
-                Assert.Equal(expected, Encoding.Convert(srcEncoding, dstEncoding, bytes));
-            }
-            Assert.Equal(expected, Encoding.Convert(srcEncoding, dstEncoding, bytes, index, count));
-        }
-
         [Fact]
         public void Convert_Invalid()
         {
index 5fc224b140fb176be99192fd3d7ec03529ef3c40..57df3da1ac1e69dde3dafb3d3285d5ef9cf5855e 100644 (file)
@@ -26,7 +26,7 @@ namespace System.Text.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public void Equals(DecoderExceptionFallback fallback, object value, bool expected)
+        public void EqualsTest(DecoderExceptionFallback fallback, object value, bool expected)
         {
             Assert.Equal(expected, fallback.Equals(value));
         }
index 8474df5ca418c1f9c3770e1d4c752d9c25ce6f9e..f4812f2d1e475fb3572c3f118c75f1a5a6588095 100644 (file)
@@ -59,7 +59,7 @@ namespace System.Text.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public void Equals(DecoderReplacementFallback fallback, object value, bool expected)
+        public void EqualsTest(DecoderReplacementFallback fallback, object value, bool expected)
         {
             Assert.Equal(expected, fallback.Equals(value));
         }
index 7bc56687322fa3a4edde9b1e26c354ce6cee3bb1..7ce1604553a10734d1fa6d48184ab35a793b2148 100644 (file)
@@ -26,7 +26,7 @@ namespace System.Text.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public void Equals(EncoderExceptionFallback fallback, object value, bool expected)
+        public void EqualsTest(EncoderExceptionFallback fallback, object value, bool expected)
         {
             Assert.Equal(expected, fallback.Equals(value));
         }
index 37bb872852906aed1c9e6433eca2c3934263e124..5d3b4c2bc09cb6c2d7187c5b03261101f01e0793 100644 (file)
@@ -59,7 +59,7 @@ namespace System.Text.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public void Equals(EncoderReplacementFallback fallback, object value, bool expected)
+        public void EqualsTest(EncoderReplacementFallback fallback, object value, bool expected)
         {
             Assert.Equal(expected, fallback.Equals(value));
         }
index 57d9ad87c740c00cca3c68ce4733d849944c3079..5d80c31619063f9d53c05946f4ae7e7384bba442 100644 (file)
@@ -73,7 +73,7 @@ namespace System.Text.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public void Equals(Encoding encoding, object value, bool expected)
+        public void EqualsTest(Encoding encoding, object value, bool expected)
         {
             Assert.Equal(expected, encoding.Equals(value));
             Assert.Equal(expected, encoding.GetHashCode().Equals(value?.GetHashCode()));
index 17c738d0cebede1e1bf48b577663de543f50fec4..2a60335e07538a291ae3960608092035733fc6e1 100644 (file)
@@ -145,7 +145,7 @@ namespace System.Text.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public void Equals(UTF32Encoding encoding, object value, bool expected)
+        public void EqualsTest(UTF32Encoding encoding, object value, bool expected)
         {
             Assert.Equal(expected, encoding.Equals(value));
             Assert.Equal(expected, encoding.GetHashCode().Equals(value?.GetHashCode()));
index c2abbe1bc4b84319bd4687f33cb95170a7aaf3f6..2a9503cf5ba4c9aea0dac42cacffab4dff4088fe 100644 (file)
@@ -61,10 +61,10 @@ namespace System.Text.Tests
 
         [Theory]
         [MemberData(nameof(Encode_Basic_TestData))]
-        public void Encode(string source, int index, int count, byte[] expected)
+        public void Encode_Basic(string source, int index, int count, byte[] expected)
         {
-            Encode(true, source, index, count, expected);
-            Encode(false, source, index, count, expected);
+            Encode_Advanced(true, source, index, count, expected);
+            Encode_Advanced(false, source, index, count, expected);
 
             // UTF7Encoding performs no error checking, so even encoding invalid chars with
             // a custom fallback should never throw
@@ -108,7 +108,7 @@ namespace System.Text.Tests
 
         [Theory]
         [MemberData(nameof(Encode_Advanced_TestData))]
-        public void Encode(bool allowOptionals, string source, int index, int count, byte[] expected)
+        public void Encode_Advanced(bool allowOptionals, string source, int index, int count, byte[] expected)
         {
             EncodingHelpers.Encode(new UTF7Encoding(allowOptionals), source, index, count, expected);
         }
index e94e028e79e640ff9cb30f159c6279f45c4730e9..0935ab36a9e5f66557e7bd07f1e3eeddab1456a1 100644 (file)
@@ -115,7 +115,7 @@ namespace System.Text.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public void Equals(UTF7Encoding encoding, object value, bool expected)
+        public void EqualsTest(UTF7Encoding encoding, object value, bool expected)
         {
             Assert.Equal(expected, encoding.Equals(value));
             Assert.Equal(value is UTF7Encoding, encoding.GetHashCode().Equals(value?.GetHashCode()));
index 87d5df8ee50a95763676d722832b61d7c4aaa993..2244acf231c8d02ac0268dff1a75bc04ef5effc2 100644 (file)
@@ -162,7 +162,7 @@ namespace System.Text.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public void Equals(UTF8Encoding encoding, object value, bool expected)
+        public void EqualsTest(UTF8Encoding encoding, object value, bool expected)
         {
             Assert.Equal(expected, encoding.Equals(value));
             if (value is UTF8Encoding)
index 7e17dcd9a90d4e80de95cf333217b93afd1f2fa3..71bbca8f671027915dcd449f195a677227bc6e10 100644 (file)
@@ -147,7 +147,7 @@ namespace System.Text.Tests
 
         [Theory]
         [MemberData(nameof(Equals_TestData))]
-        public void Equals(UnicodeEncoding encoding, object value, bool expected)
+        public void EqualsTest(UnicodeEncoding encoding, object value, bool expected)
         {
             Assert.Equal(expected, encoding.Equals(value));
             Assert.Equal(expected, encoding.GetHashCode().Equals(value?.GetHashCode()));
index 63fe55bf26a64a1a7d7726f7e536d816fded423e..f01a188ff00e7465e76805f27b43c4ba5ee3d84a 100644 (file)
@@ -111,7 +111,7 @@ namespace System.Text.Json.Tests
         }
 
         [Fact]
-        public static void Equals()
+        public static void EqualsTest()
         {
             string message = "message";
 
index 929bf5655ee4dc23215b90f8d01ff9e7270892ad..3c5d1bc9b3017bf1a7f0fdf10f0f75157a6b5cfb 100644 (file)
@@ -65,7 +65,7 @@ namespace System.Text.Json.Serialization.Tests
 
         [Theory]
         [MemberData(nameof(Parse_WithinRange_Signed))]
-        public static void Parse_WithinRange_ReturnsExpected(object expected, long value, string name)
+        public static void Parse_WithinRange_Signed_ReturnsExpected(object expected, long value, string name)
         {
             string json = $"{{ \"{ name }\" : { value } }}";
             SimpleTestClass result = JsonSerializer.Deserialize<SimpleTestClass>(json);
@@ -90,7 +90,7 @@ namespace System.Text.Json.Serialization.Tests
 
         [Theory]
         [MemberData(nameof(Parse_WithinRange_Unsigned))]
-        public static void Parse_WithinRange_ReturnsExpected(object expected, ulong value, string name)
+        public static void Parse_WithinRange_Unsigned_ReturnsExpected(object expected, ulong value, string name)
         {
             string json = $"{{ \"{ name }\" : { value } }}";
             SimpleTestClass result = JsonSerializer.Deserialize<SimpleTestClass>(json);
index 3071a9b79c36c93bf6a473786d4de3e5135dba9a..84df389d1e76d4062470f606a1d22a35b172527b 100644 (file)
@@ -997,16 +997,6 @@ namespace System.Text.Json.Serialization.Tests
             Assert.Equal(3, input.Value[2]);
         }
 
-        [Fact]
-        public static void ReadKeyValuePairOfKeyValuePair()
-        {
-            KeyValuePair<string, KeyValuePair<int, int>> input = JsonSerializer.Deserialize<KeyValuePair<string, KeyValuePair<int, int>>>(@"{""Key"":""Key"", ""Value"":{""Key"":1, ""Value"":2}}");
-
-            Assert.Equal("Key", input.Key);
-            Assert.Equal(1, input.Value.Key);
-            Assert.Equal(2, input.Value.Value);
-        }
-
         [Theory]
         [InlineData(@"{""Key"":""Key"", ""Value"":{""Key"":1, ""Value"":2}}")]
         [InlineData(@"{""Key"":""Key"", ""Value"":{""Value"":2, ""Key"":1}}")]
index 49d2bf5333cefc77d6f5dbf81b48bada287c2d60..a27069f20025081cc64c267daebc3b04cdd0b725 100644 (file)
@@ -1336,27 +1336,27 @@ namespace System.Text.Json.Tests
         [MemberData(nameof(JsonGuidTestData.ValidGuidTests), MemberType = typeof(JsonGuidTestData))]
         public static void TryGetGuid_HasValueSequence_RetrievesGuid(string testString, string expectedString)
         {
-            TryGetGuid_HasValueSequence_RetrievesGuid(testString, expectedString, isFinalBlock: true);
-            TryGetGuid_HasValueSequence_RetrievesGuid(testString, expectedString, isFinalBlock: false);
-        }
+            static void test(string testString, string expectedString, bool isFinalBlock)
+            {
+                byte[] dataUtf8 = Encoding.UTF8.GetBytes($"\"{testString}\"");
+                ReadOnlySequence<byte> sequence = JsonTestHelper.GetSequence(dataUtf8, 1);
+                var json = new Utf8JsonReader(sequence, isFinalBlock: isFinalBlock, state: default);
 
-        private static void TryGetGuid_HasValueSequence_RetrievesGuid(string testString, string expectedString, bool isFinalBlock)
-        {
-            byte[] dataUtf8 = Encoding.UTF8.GetBytes($"\"{testString}\"");
-            ReadOnlySequence<byte> sequence = JsonTestHelper.GetSequence(dataUtf8, 1);
-            var json = new Utf8JsonReader(sequence, isFinalBlock: isFinalBlock, state: default);
+                Guid expected = new Guid(expectedString);
 
-            Guid expected = new Guid(expectedString);
+                Assert.True(json.Read(), "json.Read()");
+                Assert.Equal(JsonTokenType.String, json.TokenType);
 
-            Assert.True(json.Read(), "json.Read()");
-            Assert.Equal(JsonTokenType.String, json.TokenType);
+                Assert.True(json.HasValueSequence, "json.HasValueSequence");
+                Assert.False(json.ValueSequence.IsEmpty, "json.ValueSequence.IsEmpty");
+                Assert.True(json.ValueSpan.IsEmpty, "json.ValueSpan.IsEmpty");
+                Assert.True(json.TryGetGuid(out Guid actual), "TryGetGuid");
+                Assert.Equal(expected, actual);
+                Assert.Equal(expected, json.GetGuid());
+            }
 
-            Assert.True(json.HasValueSequence, "json.HasValueSequence");
-            Assert.False(json.ValueSequence.IsEmpty, "json.ValueSequence.IsEmpty");
-            Assert.True(json.ValueSpan.IsEmpty, "json.ValueSpan.IsEmpty");
-            Assert.True(json.TryGetGuid(out Guid actual), "TryGetGuid");
-            Assert.Equal(expected, actual);
-            Assert.Equal(expected, json.GetGuid());
+            test(testString, expectedString, isFinalBlock: true);
+            test(testString, expectedString, isFinalBlock: false);
         }
 
         [Theory]
@@ -1379,25 +1379,25 @@ namespace System.Text.Json.Tests
         [MemberData(nameof(JsonGuidTestData.InvalidGuidTests), MemberType = typeof(JsonGuidTestData))]
         public static void TryGetGuid_HasValueSequence_False(string testString)
         {
-            TryGetGuid_HasValueSequence_False(testString, isFinalBlock: true);
-            TryGetGuid_HasValueSequence_False(testString, isFinalBlock: false);
-        }
+            static void test(string testString, bool isFinalBlock)
+            {
+                byte[] dataUtf8 = Encoding.UTF8.GetBytes($"\"{testString}\"");
+                ReadOnlySequence<byte> sequence = JsonTestHelper.GetSequence(dataUtf8, 1);
+                var json = new Utf8JsonReader(sequence, isFinalBlock: isFinalBlock, state: default);
 
-        private static void TryGetGuid_HasValueSequence_False(string testString, bool isFinalBlock)
-        {
-            byte[] dataUtf8 = Encoding.UTF8.GetBytes($"\"{testString}\"");
-            ReadOnlySequence<byte> sequence = JsonTestHelper.GetSequence(dataUtf8, 1);
-            var json = new Utf8JsonReader(sequence, isFinalBlock: isFinalBlock, state: default);
+                Assert.True(json.Read(), "json.Read()");
+                Assert.Equal(JsonTokenType.String, json.TokenType);
+                Assert.True(json.HasValueSequence, "json.HasValueSequence");
+                // If the string is empty, the ValueSequence is empty, because it contains all 0 bytes between the two characters
+                Assert.Equal(string.IsNullOrEmpty(testString), json.ValueSequence.IsEmpty);
+                Assert.False(json.TryGetGuid(out Guid actual), "json.TryGetGuid(out Guid actual)");
+                Assert.Equal(Guid.Empty, actual);
 
-            Assert.True(json.Read(), "json.Read()");
-            Assert.Equal(JsonTokenType.String, json.TokenType);
-            Assert.True(json.HasValueSequence, "json.HasValueSequence");
-            // If the string is empty, the ValueSequence is empty, because it contains all 0 bytes between the two characters
-            Assert.Equal(string.IsNullOrEmpty(testString), json.ValueSequence.IsEmpty);
-            Assert.False(json.TryGetGuid(out Guid actual), "json.TryGetGuid(out Guid actual)");
-            Assert.Equal(Guid.Empty, actual);
+                JsonTestHelper.AssertThrows<FormatException>(json, (jsonReader) => jsonReader.GetGuid());
+            }
 
-            JsonTestHelper.AssertThrows<FormatException>(json, (jsonReader) => jsonReader.GetGuid());
+            test(testString, isFinalBlock: true);
+            test(testString, isFinalBlock: false);
         }
     }
 }
index b01a19d4d0ec1fd3362c5d95f5255d234b56735b..82ab722487415288e5450120d267ea6e1e394cd5 100644 (file)
@@ -4159,7 +4159,7 @@ namespace System.Text.Json.Tests
         [InlineData(true, false, ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>mess\nage", ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>Hello, \nWorld!")]
         [InlineData(false, true, ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>mess\nage", ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>Hello, \nWorld!")]
         [InlineData(false, false, ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>mess\nage", ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>Hello, \nWorld!")]
-        public void WriteHelloWorldEscaped(bool formatted, bool skipValidation, string key, string value)
+        public void WriteHelloWorldEscaped_AdditionalCases(bool formatted, bool skipValidation, string key, string value)
         {
             string expectedStr = GetEscapedExpectedString(prettyPrint: formatted, key, value, StringEscapeHandling.EscapeHtml);
 
@@ -4666,7 +4666,7 @@ namespace System.Text.Json.Tests
         public void OutputConsistentWithJsonEncodedText()
         {
             string jsonEncodedText = $"{{\"{JsonEncodedText.Encode("propertyName+1")}\":\"{JsonEncodedText.Encode("value+1")}\"}}";
-            
+
             var output = new ArrayBufferWriter<byte>(1024);
 
             using (var writer = new Utf8JsonWriter(output))
@@ -4880,7 +4880,7 @@ namespace System.Text.Json.Tests
         [InlineData(true, false, 100)]
         [InlineData(false, true, 100)]
         [InlineData(false, false, 100)]
-        public void WriteStartEndWithPropertyNameArray(bool formatted, bool skipValidation, int keyLength)
+        public void WriteStartEndWithPropertyNameArrayDifferentKeyLengths(bool formatted, bool skipValidation, int keyLength)
         {
             var keyChars = new char[keyLength];
             for (int i = 0; i < keyChars.Length; i++)
@@ -4969,7 +4969,7 @@ namespace System.Text.Json.Tests
         [InlineData(true, false, 100)]
         [InlineData(false, true, 100)]
         [InlineData(false, false, 100)]
-        public void WriteStartEndWithPropertyNameObject(bool formatted, bool skipValidation, int keyLength)
+        public void WriteStartEndWithPropertyNameObjectDifferentKeyLengths(bool formatted, bool skipValidation, int keyLength)
         {
             var keyChars = new char[keyLength];
             for (int i = 0; i < keyChars.Length; i++)
index 565340e40e025c6d84a447955ef9da6f8f7ff69d..1f027233ed5943845fa163b493f7271d060b14e3 100644 (file)
@@ -799,7 +799,7 @@ namespace System.Text.RegularExpressions.Tests
         [Theory]
         [MemberData(nameof(Match_Advanced_TestData))]
         [MemberData(nameof(RegexCompilationHelper.TransformRegexOptions), nameof(Match_Advanced_TestData), 2, MemberType = typeof(RegexCompilationHelper))]
-        public void Match(string pattern, string input, RegexOptions options, int beginning, int length, CaptureData[] expected)
+        public void Match_Advanced(string pattern, string input, RegexOptions options, int beginning, int length, CaptureData[] expected)
         {
             Regex r;
 
index e6ebb469202d2588e135518ac1698c45394a6d23..9a3e965a061cff9f9c1c770acf47c4e28159d77f 100644 (file)
@@ -178,7 +178,7 @@ namespace System.Text.RegularExpressions.Tests
         [Theory]
         [MemberData(nameof(Replace_MatchEvaluator_TestData))]
         [MemberData(nameof(RegexCompilationHelper.TransformRegexOptions), nameof(Replace_MatchEvaluator_TestData), 3, MemberType = typeof(RegexCompilationHelper))]
-        public void Replace(string pattern, string input, MatchEvaluator evaluator, RegexOptions options, int count, int start, string expected)
+        public void Replace_MatchEvaluator_Test(string pattern, string input, MatchEvaluator evaluator, RegexOptions options, int count, int start, string expected)
         {
             bool isDefaultStart = RegexHelpers.IsDefaultStart(input, options, start);
             bool isDefaultCount = RegexHelpers.IsDefaultCount(input, options, count);
index ade05f41933b4e520435cb305a17e4ba1b9232be..4020bb7f46419be2ae7cd634f01d69ba8bb57ecb 100644 (file)
@@ -39,60 +39,61 @@ namespace System.Threading.Tasks.Tests
         [Fact]
         public static void OneMoveNext()
         {
+            static void oneMoveNext(int length, bool isOrderable)
+            {
+                Debug.WriteLine("Length: {0} IsOrderable: {1}", length, isOrderable);
+                List<int> ds = new List<int>();
+                for (int i = 0; i < length; i++)
+                    ds.Add(i);
+                int dataSourceMoveNextCalls = 0;
+
+                //this is an enumerable that will execute user actions on move next, current and dispose
+                //in this case we will set it to wait on MoveNext for the even indexes
+                UserActionEnumerable<int> customEnumerable = new UserActionEnumerable<int>(ds);
+                Action<int> moveNextUserAction = (currentElement) =>
+                {
+                    //keep track how many times the move next of the data source was called
+                    //it is expected as
+                    //every call of MoveNext on partitioner>GetDynamicPartions.GetEnumerator
+                    //to result in only one call of datasource Move Next
+                    //there is not need to guard for concurrency issues because this scenario is single threaded
+                    dataSourceMoveNextCalls++;
+                };
+
+                customEnumerable.MoveNextAction = moveNextUserAction;
+
+                var partitioner = Partitioner.Create<int>(customEnumerable, EnumerablePartitionerOptions.NoBuffering);
+                //get the dynamic partitions - enumerator
+                if (isOrderable)
+                {
+                    IEnumerator<KeyValuePair<long, int>> enumerator = partitioner.GetOrderableDynamicPartitions().GetEnumerator();
+                    while (enumerator.MoveNext())
+                    {
+                        Assert.Equal(1, dataSourceMoveNextCalls);
+                        //reset the count - for the next moveNext call
+                        dataSourceMoveNextCalls = 0;
+                    }
+                }
+                else
+                {
+                    IEnumerator<int> enumerator = partitioner.GetDynamicPartitions().GetEnumerator();
+
+                    while (enumerator.MoveNext())
+                    {
+                        Assert.Equal(1, dataSourceMoveNextCalls);
+                        //reset the count - for the next moveNext call
+                        dataSourceMoveNextCalls = 0;
+                    }
+                }
+            }
+
             int[] lengthsArray = new[] { 1, 8, 16, 32, 64, 1024 };
             bool[] isOrderableArray = new[] { true, false };
 
             foreach (var length in lengthsArray)
             {
                 foreach (var order in isOrderableArray)
-                    OneMoveNext(length, order);
-            }
-        }
-        private static void OneMoveNext(int length, bool isOrderable)
-        {
-            Debug.WriteLine("Length: {0} IsOrderable: {1}", length, isOrderable);
-            List<int> ds = new List<int>();
-            for (int i = 0; i < length; i++)
-                ds.Add(i);
-            int dataSourceMoveNextCalls = 0;
-
-            //this is an enumerable that will execute user actions on move next, current and dispose
-            //in this case we will set it to wait on MoveNext for the even indexes
-            UserActionEnumerable<int> customEnumerable = new UserActionEnumerable<int>(ds);
-            Action<int> moveNextUserAction = (currentElement) =>
-            {
-                //keep track how many times the move next of the data source was called
-                //it is expected as
-                //every call of MoveNext on partitioner>GetDynamicPartions.GetEnumerator
-                //to result in only one call of datasource Move Next
-                //there is not need to guard for concurrency issues because this scenario is single threaded
-                dataSourceMoveNextCalls++;
-            };
-
-            customEnumerable.MoveNextAction = moveNextUserAction;
-
-            var partitioner = Partitioner.Create<int>(customEnumerable, EnumerablePartitionerOptions.NoBuffering);
-            //get the dynamic partitions - enumerator
-            if (isOrderable)
-            {
-                IEnumerator<KeyValuePair<long, int>> enumerator = partitioner.GetOrderableDynamicPartitions().GetEnumerator();
-                while (enumerator.MoveNext())
-                {
-                    Assert.Equal(1, dataSourceMoveNextCalls);
-                    //reset the count - for the next moveNext call
-                    dataSourceMoveNextCalls = 0;
-                }
-            }
-            else
-            {
-                IEnumerator<int> enumerator = partitioner.GetDynamicPartitions().GetEnumerator();
-
-                while (enumerator.MoveNext())
-                {
-                    Assert.Equal(1, dataSourceMoveNextCalls);
-                    //reset the count - for the next moveNext call
-                    dataSourceMoveNextCalls = 0;
-                }
+                    oneMoveNext(length, order);
             }
         }
 
@@ -103,36 +104,37 @@ namespace System.Threading.Tasks.Tests
         [Fact]
         public static void IterationsWithDependency()
         {
-            IterationsWithDependency(128, 126);
-            IterationsWithDependency(128, 65);
-        }
-        private static void IterationsWithDependency(int length, int dependencyIndex)
-        {
-            List<int> ds = new List<int>();
-            for (int i = 0; i < length; i++)
-                ds.Add(i);
-            var partitioner = Partitioner.Create<int>(ds, EnumerablePartitionerOptions.NoBuffering);
-            ManualResetEvent mre = new ManualResetEvent(false);
-            ConcurrentQueue<int> savedDS = new ConcurrentQueue<int>();
-
-            Parallel.ForEach(partitioner, (index) =>
-                {
-                    if (index == dependencyIndex + 1)
-                    {
-                        mre.Set();
-                    }
-                    if (index == dependencyIndex)
+            static void iterationsWithDependency(int length, int dependencyIndex)
+            {
+                List<int> ds = new List<int>();
+                for (int i = 0; i < length; i++)
+                    ds.Add(i);
+                var partitioner = Partitioner.Create<int>(ds, EnumerablePartitionerOptions.NoBuffering);
+                ManualResetEvent mre = new ManualResetEvent(false);
+                ConcurrentQueue<int> savedDS = new ConcurrentQueue<int>();
+
+                Parallel.ForEach(partitioner, (index) =>
                     {
-                        //if the chunk size will not be one,
-                        //this iteration and the next one will not be processed by the same thread
-                        //waiting here will lead to a deadlock
-                        mre.WaitOne();
-                    }
-                    savedDS.Enqueue(index);
-                });
-            //if the PForEach ends this means pass
-            //verify the collection
-            Assert.True(CompareCollections(savedDS, ds));
+                        if (index == dependencyIndex + 1)
+                        {
+                            mre.Set();
+                        }
+                        if (index == dependencyIndex)
+                        {
+                            //if the chunk size will not be one,
+                            //this iteration and the next one will not be processed by the same thread
+                            //waiting here will lead to a deadlock
+                            mre.WaitOne();
+                        }
+                        savedDS.Enqueue(index);
+                    });
+                //if the PForEach ends this means pass
+                //verify the collection
+                Assert.True(CompareCollections(savedDS, ds));
+            }
+
+            iterationsWithDependency(128, 126);
+            iterationsWithDependency(128, 65);
         }
 
         /// <summary>
@@ -141,13 +143,9 @@ namespace System.Threading.Tasks.Tests
 
         [Fact]
         public static void PFEDisposeEnum()
-        {
-            PFEDisposeEnum(1204);
-        }
-        private static void PFEDisposeEnum(int length)
         {
             List<int> ds = new List<int>();
-            for (int i = 0; i < length; i++)
+            for (int i = 0; i < 1024; i++)
                 ds.Add(i);
             //this is an enumerable that will execute user actions on move next, current and dispose
             //in this case we will set it to wait on MoveNext for the even indexes
@@ -171,33 +169,34 @@ namespace System.Threading.Tasks.Tests
         [Fact]
         public static void ExceptionOnMoveNext()
         {
-            ExceptionOnMoveNext(128, 65, true);
-            ExceptionOnMoveNext(128, 65, false);
-        }
-        private static void ExceptionOnMoveNext(int length, int indexToThrow, bool isOrderable)
-        {
-            List<int> ds = new List<int>();
-            for (int i = 0; i < length; i++)
-                ds.Add(i);
-
-            Exception userEx = new InvalidOperationException("UserException");
-            //this is an enumerable that will execute user actions on move next, current and dispose
-            //in this case we will set it to throw on MoveNext for specified index
-            UserActionEnumerable<int> customEnumerable = new UserActionEnumerable<int>(ds);
-            Action<int> moveNextUserAction = (currentElement) =>
-                                                            {
-                                                                if (currentElement == indexToThrow)
+            static void exceptionOnMoveNext(int length, int indexToThrow, bool isOrderable)
+            {
+                List<int> ds = new List<int>();
+                for (int i = 0; i < length; i++)
+                    ds.Add(i);
+
+                Exception userEx = new InvalidOperationException("UserException");
+                //this is an enumerable that will execute user actions on move next, current and dispose
+                //in this case we will set it to throw on MoveNext for specified index
+                UserActionEnumerable<int> customEnumerable = new UserActionEnumerable<int>(ds);
+                Action<int> moveNextUserAction = (currentElement) =>
                                                                 {
-                                                                    throw userEx;
+                                                                    if (currentElement == indexToThrow)
+                                                                    {
+                                                                        throw userEx;
+                                                                    };
                                                                 };
-                                                            };
 
 
-            customEnumerable.MoveNextAction = moveNextUserAction;
-            var partitioner = Partitioner.Create<int>(customEnumerable, EnumerablePartitionerOptions.NoBuffering);
-            var exception = Assert.Throws<AggregateException>(() => Parallel.ForEach(partitioner, (index) => { }));
-            VerifyAggregateException(exception, userEx);
-            Assert.True(customEnumerable.AreEnumeratorsDisposed());
+                customEnumerable.MoveNextAction = moveNextUserAction;
+                var partitioner = Partitioner.Create<int>(customEnumerable, EnumerablePartitionerOptions.NoBuffering);
+                var exception = Assert.Throws<AggregateException>(() => Parallel.ForEach(partitioner, (index) => { }));
+                VerifyAggregateException(exception, userEx);
+                Assert.True(customEnumerable.AreEnumeratorsDisposed());
+            }
+
+            exceptionOnMoveNext(128, 65, true);
+            exceptionOnMoveNext(128, 65, false);
         }
 
         /// <summary>
index d6154baf09147e565cf2a0f2c26d3bb7400d095d..c13d348912da5845d6b3e52b3aaed7547734e566 100644 (file)
@@ -44,66 +44,66 @@ namespace System.Threading.Tasks.Tests
         [Fact]
         public static void RangePartitionerCoverageTest()
         {
-            RangePartitionerCoverageTest(0, 1, -1);
-            RangePartitionerCoverageTest(-15, -14, -1);
-            RangePartitionerCoverageTest(14, 15, -1);
-            RangePartitionerCoverageTest(0, 1, 1);
-            RangePartitionerCoverageTest(-15, -14, 1);
-            RangePartitionerCoverageTest(14, 15, 1);
-            RangePartitionerCoverageTest(0, 1, 20);
-            RangePartitionerCoverageTest(-15, -14, 20);
-            RangePartitionerCoverageTest(14, 15, 20);
-            RangePartitionerCoverageTest(0, 7, -1);
-            RangePartitionerCoverageTest(-21, -14, -1);
-            RangePartitionerCoverageTest(14, 21, -1);
-            RangePartitionerCoverageTest(0, 7, 1);
-            RangePartitionerCoverageTest(-21, -14, 1);
-            RangePartitionerCoverageTest(14, 21, 1);
-            RangePartitionerCoverageTest(0, 7, 2);
-            RangePartitionerCoverageTest(-21, -14, 2);
-            RangePartitionerCoverageTest(14, 21, 2);
-            RangePartitionerCoverageTest(0, 7, 20);
-            RangePartitionerCoverageTest(-21, -14, 20);
-            RangePartitionerCoverageTest(14, 21, 20);
-            RangePartitionerCoverageTest(0, 1000, -1);
-            RangePartitionerCoverageTest(-2000, -1000, -1);
-            RangePartitionerCoverageTest(1000, 2000, -1);
-            RangePartitionerCoverageTest(0, 1000, 1);
-            RangePartitionerCoverageTest(-2000, -1000, 1);
-            RangePartitionerCoverageTest(1000, 2000, 1);
-            RangePartitionerCoverageTest(0, 1000, 27);
-            RangePartitionerCoverageTest(-2000, -1000, 27);
-            RangePartitionerCoverageTest(1000, 2000, 27);
-            RangePartitionerCoverageTest(0, 1000, 250);
-            RangePartitionerCoverageTest(-2000, -1000, 250);
-            RangePartitionerCoverageTest(1000, 2000, 250);
-            RangePartitionerCoverageTest(0, 1000, 750);
-            RangePartitionerCoverageTest(-2000, -1000, 750);
-            RangePartitionerCoverageTest(1000, 2000, 750);
+            RangePartitionerCoverageTest_HelperInt(0, 1, -1);
+            RangePartitionerCoverageTest_HelperInt(-15, -14, -1);
+            RangePartitionerCoverageTest_HelperInt(14, 15, -1);
+            RangePartitionerCoverageTest_HelperInt(0, 1, 1);
+            RangePartitionerCoverageTest_HelperInt(-15, -14, 1);
+            RangePartitionerCoverageTest_HelperInt(14, 15, 1);
+            RangePartitionerCoverageTest_HelperInt(0, 1, 20);
+            RangePartitionerCoverageTest_HelperInt(-15, -14, 20);
+            RangePartitionerCoverageTest_HelperInt(14, 15, 20);
+            RangePartitionerCoverageTest_HelperInt(0, 7, -1);
+            RangePartitionerCoverageTest_HelperInt(-21, -14, -1);
+            RangePartitionerCoverageTest_HelperInt(14, 21, -1);
+            RangePartitionerCoverageTest_HelperInt(0, 7, 1);
+            RangePartitionerCoverageTest_HelperInt(-21, -14, 1);
+            RangePartitionerCoverageTest_HelperInt(14, 21, 1);
+            RangePartitionerCoverageTest_HelperInt(0, 7, 2);
+            RangePartitionerCoverageTest_HelperInt(-21, -14, 2);
+            RangePartitionerCoverageTest_HelperInt(14, 21, 2);
+            RangePartitionerCoverageTest_HelperInt(0, 7, 20);
+            RangePartitionerCoverageTest_HelperInt(-21, -14, 20);
+            RangePartitionerCoverageTest_HelperInt(14, 21, 20);
+            RangePartitionerCoverageTest_HelperInt(0, 1000, -1);
+            RangePartitionerCoverageTest_HelperInt(-2000, -1000, -1);
+            RangePartitionerCoverageTest_HelperInt(1000, 2000, -1);
+            RangePartitionerCoverageTest_HelperInt(0, 1000, 1);
+            RangePartitionerCoverageTest_HelperInt(-2000, -1000, 1);
+            RangePartitionerCoverageTest_HelperInt(1000, 2000, 1);
+            RangePartitionerCoverageTest_HelperInt(0, 1000, 27);
+            RangePartitionerCoverageTest_HelperInt(-2000, -1000, 27);
+            RangePartitionerCoverageTest_HelperInt(1000, 2000, 27);
+            RangePartitionerCoverageTest_HelperInt(0, 1000, 250);
+            RangePartitionerCoverageTest_HelperInt(-2000, -1000, 250);
+            RangePartitionerCoverageTest_HelperInt(1000, 2000, 250);
+            RangePartitionerCoverageTest_HelperInt(0, 1000, 750);
+            RangePartitionerCoverageTest_HelperInt(-2000, -1000, 750);
+            RangePartitionerCoverageTest_HelperInt(1000, 2000, 750);
         }
 
         // Test that chunk sizes are being honored
         [Fact]
         public static void RangePartitionerChunkTest()
         {
-            RangePartitionerChunkTest(0, 10, 1);
-            RangePartitionerChunkTest(-20, -10, 1);
-            RangePartitionerChunkTest(10, 20, 1);
-            RangePartitionerChunkTest(0, 10, 3);
-            RangePartitionerChunkTest(-20, -10, 3);
-            RangePartitionerChunkTest(10, 20, 3);
-            RangePartitionerChunkTest(0, 10, 5);
-            RangePartitionerChunkTest(-20, -10, 5);
-            RangePartitionerChunkTest(10, 20, 5);
-            RangePartitionerChunkTest(0, 10, 7);
-            RangePartitionerChunkTest(-20, -10, 7);
-            RangePartitionerChunkTest(10, 20, 7);
-            RangePartitionerChunkTest(0, 1000000, 32768);
-            RangePartitionerChunkTest(-2000000, -1000000, 32768);
-            RangePartitionerChunkTest(1000000, 2000000, 32768);
+            RangePartitionerChunkTest_HelperInt(0, 10, 1);
+            RangePartitionerChunkTest_HelperInt(-20, -10, 1);
+            RangePartitionerChunkTest_HelperInt(10, 20, 1);
+            RangePartitionerChunkTest_HelperInt(0, 10, 3);
+            RangePartitionerChunkTest_HelperInt(-20, -10, 3);
+            RangePartitionerChunkTest_HelperInt(10, 20, 3);
+            RangePartitionerChunkTest_HelperInt(0, 10, 5);
+            RangePartitionerChunkTest_HelperInt(-20, -10, 5);
+            RangePartitionerChunkTest_HelperInt(10, 20, 5);
+            RangePartitionerChunkTest_HelperInt(0, 10, 7);
+            RangePartitionerChunkTest_HelperInt(-20, -10, 7);
+            RangePartitionerChunkTest_HelperInt(10, 20, 7);
+            RangePartitionerChunkTest_HelperInt(0, 1000000, 32768);
+            RangePartitionerChunkTest_HelperInt(-2000000, -1000000, 32768);
+            RangePartitionerChunkTest_HelperInt(1000000, 2000000, 32768);
         }
 
-        private static void RangePartitionerChunkTest(int from, int to, int rangeSize)
+        private static void RangePartitionerChunkTest_HelperInt(int from, int to, int rangeSize)
         {
             Debug.WriteLine("    RangePartitionChunkTest[int]({0},{1},{2})", from, to, rangeSize);
             int numLess = 0;
@@ -125,10 +125,10 @@ namespace System.Threading.Tasks.Tests
 
             Assert.False(numLess > 1, string.Format("    > FAILED.  {0} chunks smaller than desired range size.", numLess));
 
-            RangePartitionerChunkTest((long)from, (long)to, (long)rangeSize);
+            RangePartitionerChunkTest_HelperLong((long)from, (long)to, (long)rangeSize);
         }
 
-        private static void RangePartitionerChunkTest(long from, long to, long rangeSize)
+        private static void RangePartitionerChunkTest_HelperLong(long from, long to, long rangeSize)
         {
             Debug.WriteLine("    RangePartitionChunkTest[long]({0},{1},{2})", from, to, rangeSize);
             int numLess = 0;
@@ -150,7 +150,7 @@ namespace System.Threading.Tasks.Tests
             Assert.False(numLess > 1, string.Format("    > FAILED.  {0} chunks smaller than desired range size.", numLess));
         }
 
-        private static void RangePartitionerCoverageTest(int from, int to, int rangeSize)
+        private static void RangePartitionerCoverageTest_HelperInt(int from, int to, int rangeSize)
         {
             Debug.WriteLine("    RangePartitionCoverageTest[int]({0},{1},{2})", from, to, rangeSize);
 
@@ -172,10 +172,10 @@ namespace System.Threading.Tasks.Tests
                 Assert.False(visits[i] != 1, string.Format("    > FAILED.  Visits[{0}] = {1}", i, visits[i]));
             }
 
-            RangePartitionerCoverageTest((long)from, (long)to, (long)rangeSize);
+            RangePartitionerCoverageTest_HelperLong((long)from, (long)to, (long)rangeSize);
         }
 
-        private static void RangePartitionerCoverageTest(long from, long to, long rangeSize)
+        private static void RangePartitionerCoverageTest_HelperLong(long from, long to, long rangeSize)
         {
             Debug.WriteLine("    RangePartitionCoverageTest[long]({0},{1},{2})", from, to, rangeSize);
 
index 7c6b844bfecd0bd95859ded4b76fec1292800be3..7636d5a6424f7fe5354c9c42bdcc58d73b70e30e 100644 (file)
@@ -25,161 +25,161 @@ namespace System.Threading.Tasks.Tests
         [Fact]
         public static void RunContinueWithTaskTask_State()
         {
-            RunContinueWithTaskTask_State(TaskContinuationOptions.None);
-            RunContinueWithTaskTask_State(s_onlyOnRanToCompletion);
+            RunContinueWithTaskTask_State_Helper(TaskContinuationOptions.None);
+            RunContinueWithTaskTask_State_Helper(s_onlyOnRanToCompletion);
 
-            RunContinueWithTaskTask_State(TaskContinuationOptions.ExecuteSynchronously);
-            RunContinueWithTaskTask_State(s_onlyOnRanToCompletion | TaskContinuationOptions.ExecuteSynchronously);
+            RunContinueWithTaskTask_State_Helper(TaskContinuationOptions.ExecuteSynchronously);
+            RunContinueWithTaskTask_State_Helper(s_onlyOnRanToCompletion | TaskContinuationOptions.ExecuteSynchronously);
         }
 
         [Fact]
         public static void RunContinueWithTaskFuture_State()
         {
-            RunContinueWithTaskFuture_State(TaskContinuationOptions.None);
-            RunContinueWithTaskFuture_State(s_onlyOnRanToCompletion);
+            RunContinueWithTaskFuture_State_Helper(TaskContinuationOptions.None);
+            RunContinueWithTaskFuture_State_Helper(s_onlyOnRanToCompletion);
 
-            RunContinueWithTaskFuture_State(TaskContinuationOptions.ExecuteSynchronously);
-            RunContinueWithTaskFuture_State(s_onlyOnRanToCompletion | TaskContinuationOptions.ExecuteSynchronously);
+            RunContinueWithTaskFuture_State_Helper(TaskContinuationOptions.ExecuteSynchronously);
+            RunContinueWithTaskFuture_State_Helper(s_onlyOnRanToCompletion | TaskContinuationOptions.ExecuteSynchronously);
         }
 
         [Fact]
         public static void RunContinueWithFutureTask_State()
         {
-            RunContinueWithFutureTask_State(TaskContinuationOptions.None);
-            RunContinueWithFutureTask_State(s_onlyOnRanToCompletion);
+            RunContinueWithFutureTask_State_Helper(TaskContinuationOptions.None);
+            RunContinueWithFutureTask_State_Helper(s_onlyOnRanToCompletion);
 
-            RunContinueWithFutureTask_State(TaskContinuationOptions.ExecuteSynchronously);
-            RunContinueWithFutureTask_State(s_onlyOnRanToCompletion | TaskContinuationOptions.ExecuteSynchronously);
+            RunContinueWithFutureTask_State_Helper(TaskContinuationOptions.ExecuteSynchronously);
+            RunContinueWithFutureTask_State_Helper(s_onlyOnRanToCompletion | TaskContinuationOptions.ExecuteSynchronously);
         }
 
         [Fact]
         public static void RunContinueWithFutureFuture_State()
         {
-            RunContinueWithFutureFuture_State(TaskContinuationOptions.None);
-            RunContinueWithFutureFuture_State(s_onlyOnRanToCompletion);
+            RunContinueWithFutureFuture_State_Helper(TaskContinuationOptions.None);
+            RunContinueWithFutureFuture_State_Helper(s_onlyOnRanToCompletion);
 
-            RunContinueWithFutureFuture_State(TaskContinuationOptions.ExecuteSynchronously);
-            RunContinueWithFutureFuture_State(s_onlyOnRanToCompletion | TaskContinuationOptions.ExecuteSynchronously);
+            RunContinueWithFutureFuture_State_Helper(TaskContinuationOptions.ExecuteSynchronously);
+            RunContinueWithFutureFuture_State_Helper(s_onlyOnRanToCompletion | TaskContinuationOptions.ExecuteSynchronously);
         }
 
         [Fact]
         public static void RunContinueWithTaskTask_State_FaultedCanceled()
         {
-            RunContinueWithTaskTask_State(s_onlyOnCanceled);
-            RunContinueWithTaskTask_State(s_onlyOnFaulted);
+            RunContinueWithTaskTask_State_Helper(s_onlyOnCanceled);
+            RunContinueWithTaskTask_State_Helper(s_onlyOnFaulted);
 
-            RunContinueWithTaskTask_State(s_onlyOnCanceled | TaskContinuationOptions.ExecuteSynchronously);
-            RunContinueWithTaskTask_State(s_onlyOnFaulted | TaskContinuationOptions.ExecuteSynchronously);
+            RunContinueWithTaskTask_State_Helper(s_onlyOnCanceled | TaskContinuationOptions.ExecuteSynchronously);
+            RunContinueWithTaskTask_State_Helper(s_onlyOnFaulted | TaskContinuationOptions.ExecuteSynchronously);
         }
 
         [Fact]
         public static void RunContinueWithTaskFuture_State_FaultedCanceled()
         {
-            RunContinueWithTaskFuture_State(s_onlyOnCanceled);
-            RunContinueWithTaskFuture_State(s_onlyOnFaulted);
+            RunContinueWithTaskFuture_State_Helper(s_onlyOnCanceled);
+            RunContinueWithTaskFuture_State_Helper(s_onlyOnFaulted);
 
-            RunContinueWithTaskFuture_State(s_onlyOnCanceled | TaskContinuationOptions.ExecuteSynchronously);
-            RunContinueWithTaskFuture_State(s_onlyOnFaulted | TaskContinuationOptions.ExecuteSynchronously);
+            RunContinueWithTaskFuture_State_Helper(s_onlyOnCanceled | TaskContinuationOptions.ExecuteSynchronously);
+            RunContinueWithTaskFuture_State_Helper(s_onlyOnFaulted | TaskContinuationOptions.ExecuteSynchronously);
         }
 
         [Fact]
         public static void RunContinueWithFutureTask_State_FaultedCanceled()
         {
-            RunContinueWithFutureTask_State(s_onlyOnCanceled);
-            RunContinueWithFutureTask_State(s_onlyOnFaulted);
+            RunContinueWithFutureTask_State_Helper(s_onlyOnCanceled);
+            RunContinueWithFutureTask_State_Helper(s_onlyOnFaulted);
 
-            RunContinueWithFutureTask_State(s_onlyOnCanceled | TaskContinuationOptions.ExecuteSynchronously);
-            RunContinueWithFutureTask_State(s_onlyOnFaulted | TaskContinuationOptions.ExecuteSynchronously);
+            RunContinueWithFutureTask_State_Helper(s_onlyOnCanceled | TaskContinuationOptions.ExecuteSynchronously);
+            RunContinueWithFutureTask_State_Helper(s_onlyOnFaulted | TaskContinuationOptions.ExecuteSynchronously);
         }
 
         [Fact]
         public static void RunContinueWithFutureFuture_State_FaultedCanceled()
         {
-            RunContinueWithFutureFuture_State(s_onlyOnCanceled);
-            RunContinueWithFutureFuture_State(s_onlyOnFaulted);
+            RunContinueWithFutureFuture_State_Helper(s_onlyOnCanceled);
+            RunContinueWithFutureFuture_State_Helper(s_onlyOnFaulted);
 
-            RunContinueWithFutureFuture_State(s_onlyOnCanceled | TaskContinuationOptions.ExecuteSynchronously);
-            RunContinueWithFutureFuture_State(s_onlyOnFaulted | TaskContinuationOptions.ExecuteSynchronously);
+            RunContinueWithFutureFuture_State_Helper(s_onlyOnCanceled | TaskContinuationOptions.ExecuteSynchronously);
+            RunContinueWithFutureFuture_State_Helper(s_onlyOnFaulted | TaskContinuationOptions.ExecuteSynchronously);
         }
 
         [Fact]
         public static void RunContinueWithTaskTask_State_OnException()
         {
-            RunContinueWithTaskTask_State(TaskContinuationOptions.None, true);
-            RunContinueWithTaskTask_State(s_onlyOnRanToCompletion, true);
+            RunContinueWithTaskTask_State_Helper(TaskContinuationOptions.None, true);
+            RunContinueWithTaskTask_State_Helper(s_onlyOnRanToCompletion, true);
 
-            RunContinueWithTaskTask_State(TaskContinuationOptions.ExecuteSynchronously, true);
-            RunContinueWithTaskTask_State(s_onlyOnRanToCompletion | TaskContinuationOptions.ExecuteSynchronously, true);
+            RunContinueWithTaskTask_State_Helper(TaskContinuationOptions.ExecuteSynchronously, true);
+            RunContinueWithTaskTask_State_Helper(s_onlyOnRanToCompletion | TaskContinuationOptions.ExecuteSynchronously, true);
         }
 
         [Fact]
         public static void RunContinueWithTaskFuture_State_OnException()
         {
-            RunContinueWithTaskFuture_State(TaskContinuationOptions.None, true);
-            RunContinueWithTaskFuture_State(s_onlyOnRanToCompletion, true);
+            RunContinueWithTaskFuture_State_Helper(TaskContinuationOptions.None, true);
+            RunContinueWithTaskFuture_State_Helper(s_onlyOnRanToCompletion, true);
 
-            RunContinueWithTaskFuture_State(TaskContinuationOptions.ExecuteSynchronously, true);
-            RunContinueWithTaskFuture_State(s_onlyOnRanToCompletion | TaskContinuationOptions.ExecuteSynchronously, true);
+            RunContinueWithTaskFuture_State_Helper(TaskContinuationOptions.ExecuteSynchronously, true);
+            RunContinueWithTaskFuture_State_Helper(s_onlyOnRanToCompletion | TaskContinuationOptions.ExecuteSynchronously, true);
         }
 
         [Fact]
         public static void RunContinueWithFutureTask_State_OnException()
         {
-            RunContinueWithFutureTask_State(TaskContinuationOptions.None, true);
-            RunContinueWithFutureTask_State(s_onlyOnRanToCompletion, true);
+            RunContinueWithFutureTask_State_Helper(TaskContinuationOptions.None, true);
+            RunContinueWithFutureTask_State_Helper(s_onlyOnRanToCompletion, true);
 
-            RunContinueWithFutureTask_State(TaskContinuationOptions.ExecuteSynchronously, true);
-            RunContinueWithFutureTask_State(s_onlyOnRanToCompletion | TaskContinuationOptions.ExecuteSynchronously, true);
+            RunContinueWithFutureTask_State_Helper(TaskContinuationOptions.ExecuteSynchronously, true);
+            RunContinueWithFutureTask_State_Helper(s_onlyOnRanToCompletion | TaskContinuationOptions.ExecuteSynchronously, true);
         }
 
         [Fact]
         public static void RunContinueWithFutureFuture_State_OnException()
         {
-            RunContinueWithFutureFuture_State(TaskContinuationOptions.None, true);
-            RunContinueWithFutureFuture_State(s_onlyOnRanToCompletion, true);
+            RunContinueWithFutureFuture_State_Helper(TaskContinuationOptions.None, true);
+            RunContinueWithFutureFuture_State_Helper(s_onlyOnRanToCompletion, true);
 
-            RunContinueWithFutureFuture_State(TaskContinuationOptions.ExecuteSynchronously, true);
-            RunContinueWithFutureFuture_State(s_onlyOnRanToCompletion | TaskContinuationOptions.ExecuteSynchronously, true);
+            RunContinueWithFutureFuture_State_Helper(TaskContinuationOptions.ExecuteSynchronously, true);
+            RunContinueWithFutureFuture_State_Helper(s_onlyOnRanToCompletion | TaskContinuationOptions.ExecuteSynchronously, true);
         }
 
         [Fact]
         public static void RunContinueWithTaskTask_State_FaultedCanceled_OnException()
         {
-            RunContinueWithTaskTask_State(s_onlyOnCanceled, true);
-            RunContinueWithTaskTask_State(s_onlyOnFaulted, true);
+            RunContinueWithTaskTask_State_Helper(s_onlyOnCanceled, true);
+            RunContinueWithTaskTask_State_Helper(s_onlyOnFaulted, true);
 
-            RunContinueWithTaskTask_State(s_onlyOnCanceled | TaskContinuationOptions.ExecuteSynchronously, true);
-            RunContinueWithTaskTask_State(s_onlyOnFaulted | TaskContinuationOptions.ExecuteSynchronously, true);
+            RunContinueWithTaskTask_State_Helper(s_onlyOnCanceled | TaskContinuationOptions.ExecuteSynchronously, true);
+            RunContinueWithTaskTask_State_Helper(s_onlyOnFaulted | TaskContinuationOptions.ExecuteSynchronously, true);
         }
 
         [Fact]
         public static void RunContinueWithTaskFuture_State_FaultedCanceled_OnException()
         {
-            RunContinueWithTaskFuture_State(s_onlyOnCanceled, true);
-            RunContinueWithTaskFuture_State(s_onlyOnFaulted, true);
+            RunContinueWithTaskFuture_State_Helper(s_onlyOnCanceled, true);
+            RunContinueWithTaskFuture_State_Helper(s_onlyOnFaulted, true);
 
-            RunContinueWithTaskFuture_State(s_onlyOnCanceled | TaskContinuationOptions.ExecuteSynchronously, true);
-            RunContinueWithTaskFuture_State(s_onlyOnFaulted | TaskContinuationOptions.ExecuteSynchronously, true);
+            RunContinueWithTaskFuture_State_Helper(s_onlyOnCanceled | TaskContinuationOptions.ExecuteSynchronously, true);
+            RunContinueWithTaskFuture_State_Helper(s_onlyOnFaulted | TaskContinuationOptions.ExecuteSynchronously, true);
         }
 
         [Fact]
         public static void RunContinueWithFutureTask_State_FaultedCanceled_OnException()
         {
-            RunContinueWithFutureTask_State(s_onlyOnCanceled, true);
-            RunContinueWithFutureTask_State(s_onlyOnFaulted, true);
+            RunContinueWithFutureTask_State_Helper(s_onlyOnCanceled, true);
+            RunContinueWithFutureTask_State_Helper(s_onlyOnFaulted, true);
 
-            RunContinueWithFutureTask_State(s_onlyOnCanceled | TaskContinuationOptions.ExecuteSynchronously, true);
-            RunContinueWithFutureTask_State(s_onlyOnFaulted | TaskContinuationOptions.ExecuteSynchronously, true);
+            RunContinueWithFutureTask_State_Helper(s_onlyOnCanceled | TaskContinuationOptions.ExecuteSynchronously, true);
+            RunContinueWithFutureTask_State_Helper(s_onlyOnFaulted | TaskContinuationOptions.ExecuteSynchronously, true);
         }
 
         [Fact]
         public static void RunContinueWithFutureFuture_State_FaultedCanceled_OnException()
         {
-            RunContinueWithFutureFuture_State(s_onlyOnCanceled, true);
-            RunContinueWithFutureFuture_State(s_onlyOnFaulted, true);
+            RunContinueWithFutureFuture_State_Helper(s_onlyOnCanceled, true);
+            RunContinueWithFutureFuture_State_Helper(s_onlyOnFaulted, true);
 
-            RunContinueWithFutureFuture_State(s_onlyOnCanceled | TaskContinuationOptions.ExecuteSynchronously, true);
-            RunContinueWithFutureFuture_State(s_onlyOnFaulted | TaskContinuationOptions.ExecuteSynchronously, true);
+            RunContinueWithFutureFuture_State_Helper(s_onlyOnCanceled | TaskContinuationOptions.ExecuteSynchronously, true);
+            RunContinueWithFutureFuture_State_Helper(s_onlyOnFaulted | TaskContinuationOptions.ExecuteSynchronously, true);
         }
 
         [Fact]
@@ -414,7 +414,7 @@ namespace System.Threading.Tasks.Tests
         #region Helper Methods
 
         // Chains a Task continuation to a Task.
-        private static void RunContinueWithTaskTask_State(TaskContinuationOptions options, bool runNegativeCases = false)
+        private static void RunContinueWithTaskTask_State_Helper(TaskContinuationOptions options, bool runNegativeCases = false)
         {
             bool ran = false;
 
@@ -447,7 +447,7 @@ namespace System.Threading.Tasks.Tests
         }
 
         // Chains a Task<T> continuation to a Task, with a Func<Task, T>.
-        private static void RunContinueWithTaskFuture_State(TaskContinuationOptions options, bool runNegativeCases = false)
+        private static void RunContinueWithTaskFuture_State_Helper(TaskContinuationOptions options, bool runNegativeCases = false)
         {
             bool ran = false;
 
@@ -481,7 +481,7 @@ namespace System.Threading.Tasks.Tests
         }
 
         // Chains a Task continuation to a Task<T>.
-        private static void RunContinueWithFutureTask_State(TaskContinuationOptions options, bool runNegativeCases = false)
+        private static void RunContinueWithFutureTask_State_Helper(TaskContinuationOptions options, bool runNegativeCases = false)
         {
             bool ran = false;
 
@@ -515,7 +515,7 @@ namespace System.Threading.Tasks.Tests
         }
 
         // Chains a Task<U> continuation to a Task<T>, with a Func<Task<T>, U>.
-        private static void RunContinueWithFutureFuture_State(TaskContinuationOptions options, bool runNegativeCases = false)
+        private static void RunContinueWithFutureFuture_State_Helper(TaskContinuationOptions options, bool runNegativeCases = false)
         {
             bool ran = false;
 
index e04f02e89d2c0fcff92ee239a8878ea193191652..187eabcd26eabe24d76901bd0148e1ae8f5303d4 100644 (file)
@@ -9,34 +9,24 @@ namespace System.Threading.Tests
 {
     public class CountdownEventTests
     {
-        [Fact]
-        public static void RunCountdownEventTest0_StateTrans()
-        {
-            RunCountdownEventTest0_StateTrans(0, 0, false);
-            RunCountdownEventTest0_StateTrans(1, 0, false);
-            RunCountdownEventTest0_StateTrans(128, 0, false);
-            RunCountdownEventTest0_StateTrans(1024 * 1024, 0, false);
-            RunCountdownEventTest0_StateTrans(1, 1024, false);
-            RunCountdownEventTest0_StateTrans(128, 1024, false);
-            RunCountdownEventTest0_StateTrans(1024 * 1024, 1024, false);
-            RunCountdownEventTest0_StateTrans(1, 0, true);
-            RunCountdownEventTest0_StateTrans(128, 0, true);
-            RunCountdownEventTest0_StateTrans(1024 * 1024, 0, true);
-            RunCountdownEventTest0_StateTrans(1, 1024, true);
-            RunCountdownEventTest0_StateTrans(128, 1024, true);
-            RunCountdownEventTest0_StateTrans(1024 * 1024, 1024, true);
-        }
-
-        [Fact]
-        public static void RunCountdownEventTest1_SimpleTimeout()
+        [Theory]
+        [InlineData(0, 0, false)]
+        [InlineData(1, 0, false)]
+        [InlineData(128, 0, false)]
+        [InlineData(1024 * 1024, 0, false)]
+        [InlineData(1, 1024, false)]
+        [InlineData(128, 1024, false)]
+        [InlineData(1024 * 1024, 1024, false)]
+        [InlineData(1, 0, true)]
+        [InlineData(128, 0, true)]
+        [InlineData(1024 * 1024, 0, true)]
+        [InlineData(1, 1024, true)]
+        [InlineData(128, 1024, true)]
+        [InlineData(1024 * 1024, 1024, true)]
+        public static void RunCountdownEventTest0_StateTrans(int initCount, int increms, bool takeAllAtOnce)
         {
-            RunCountdownEventTest1_SimpleTimeout(0);
-            RunCountdownEventTest1_SimpleTimeout(100);
-        }
+            // Validates init, set, reset state transitions.
 
-        // Validates init, set, reset state transitions.
-        private static void RunCountdownEventTest0_StateTrans(int initCount, int increms, bool takeAllAtOnce)
-        {
             CountdownEvent ev = new CountdownEvent(initCount);
 
             Assert.Equal(initCount, ev.InitialCount);
@@ -70,15 +60,17 @@ namespace System.Threading.Tests
             Assert.Equal(ev.InitialCount, ev.CurrentCount);
         }
 
-        // Tries some simple timeout cases.
-        private static void RunCountdownEventTest1_SimpleTimeout(int ms)
+        [Theory]
+        [InlineData(0)]
+        [InlineData(100)]
+        public static void RunCountdownEventTest1_SimpleTimeout(int ms)
         {
-            // Wait on the event.
             CountdownEvent ev = new CountdownEvent(999);
             Assert.False(ev.Wait(ms));
             Assert.False(ev.IsSet);
             Assert.False(ev.WaitHandle.WaitOne(ms));
         }
+
         [Fact]
         public static void RunCountdownEventTest2_Exceptions()
         {
index e007ac1dd1190e72802926e425f6b8fcc375b530..28b56bc19b83b3213270d78ccb08463a40b0d0e1 100644 (file)
@@ -10,15 +10,11 @@ namespace System.Threading.Tests
 {
     public class ManualResetEventSlimTests
     {
-        [Fact]
-        public static void RunManualResetEventSlimTest0_StateTrans()
-        {
-            RunManualResetEventSlimTest0_StateTrans(false);
-            RunManualResetEventSlimTest0_StateTrans(true);
-        }
-
         // Validates init, set, reset state transitions.
-        private static void RunManualResetEventSlimTest0_StateTrans(bool init)
+        [Theory]
+        [InlineData(true)]
+        [InlineData(false)]
+        public static void RunManualResetEventSlimTest0_StateTrans(bool init)
         {
             ManualResetEventSlim ev = new ManualResetEventSlim(init);
             Assert.Equal(init, ev.IsSet);
index cd353f09088bf00d866fa4316cd1198338b73cc9..86cb1bcebecc873baa9d0b1f8bc74f51addeccdf 100644 (file)
@@ -30,43 +30,43 @@ namespace System.Threading.Tests
         [Fact]
         public static void RunSemaphoreSlimTest0_Ctor()
         {
-            RunSemaphoreSlimTest0_Ctor(0, 10, null);
-            RunSemaphoreSlimTest0_Ctor(5, 10, null);
-            RunSemaphoreSlimTest0_Ctor(10, 10, null);
+            RunSemaphoreSlimTest0_Helper(0, 10, null);
+            RunSemaphoreSlimTest0_Helper(5, 10, null);
+            RunSemaphoreSlimTest0_Helper(10, 10, null);
         }
 
         [Fact]
         public static void RunSemaphoreSlimTest0_Ctor_Negative()
         {
-            RunSemaphoreSlimTest0_Ctor(10, 0, typeof(ArgumentOutOfRangeException));
-            RunSemaphoreSlimTest0_Ctor(10, -1, typeof(ArgumentOutOfRangeException));
-            RunSemaphoreSlimTest0_Ctor(-1, 10, typeof(ArgumentOutOfRangeException));
+            RunSemaphoreSlimTest0_Helper(10, 0, typeof(ArgumentOutOfRangeException));
+            RunSemaphoreSlimTest0_Helper(10, -1, typeof(ArgumentOutOfRangeException));
+            RunSemaphoreSlimTest0_Helper(-1, 10, typeof(ArgumentOutOfRangeException));
         }
 
         [Fact]
         public static void RunSemaphoreSlimTest1_Wait()
         {
             // Infinite timeout
-            RunSemaphoreSlimTest1_Wait(10, 10, -1, true, null);
-            RunSemaphoreSlimTest1_Wait(1, 10, -1, true, null);
+            RunSemaphoreSlimTest1_Wait_Helper(10, 10, -1, true, null);
+            RunSemaphoreSlimTest1_Wait_Helper(1, 10, -1, true, null);
 
             // Zero timeout
-            RunSemaphoreSlimTest1_Wait(10, 10, 0, true, null);
-            RunSemaphoreSlimTest1_Wait(1, 10, 0, true, null);
-            RunSemaphoreSlimTest1_Wait(0, 10, 0, false, null);
+            RunSemaphoreSlimTest1_Wait_Helper(10, 10, 0, true, null);
+            RunSemaphoreSlimTest1_Wait_Helper(1, 10, 0, true, null);
+            RunSemaphoreSlimTest1_Wait_Helper(0, 10, 0, false, null);
 
             // Positive timeout
-            RunSemaphoreSlimTest1_Wait(10, 10, 10, true, null);
-            RunSemaphoreSlimTest1_Wait(1, 10, 10, true, null);
-            RunSemaphoreSlimTest1_Wait(0, 10, 10, false, null);
+            RunSemaphoreSlimTest1_Wait_Helper(10, 10, 10, true, null);
+            RunSemaphoreSlimTest1_Wait_Helper(1, 10, 10, true, null);
+            RunSemaphoreSlimTest1_Wait_Helper(0, 10, 10, false, null);
         }
 
         [Fact]
         public static void RunSemaphoreSlimTest1_Wait_NegativeCases()
         {
             // Invalid timeout
-            RunSemaphoreSlimTest1_Wait(10, 10, -10, true, typeof(ArgumentOutOfRangeException));
-            RunSemaphoreSlimTest1_Wait
+            RunSemaphoreSlimTest1_Wait_Helper(10, 10, -10, true, typeof(ArgumentOutOfRangeException));
+            RunSemaphoreSlimTest1_Wait_Helper
                (10, 10, new TimeSpan(0, 0, int.MaxValue), true, typeof(ArgumentOutOfRangeException));
         }
 
@@ -74,26 +74,26 @@ namespace System.Threading.Tests
         public static void RunSemaphoreSlimTest1_WaitAsync()
         {
             // Infinite timeout
-            RunSemaphoreSlimTest1_WaitAsync(10, 10, -1, true, null);
-            RunSemaphoreSlimTest1_WaitAsync(1, 10, -1, true, null);
+            RunSemaphoreSlimTest1_WaitAsync_Helper(10, 10, -1, true, null);
+            RunSemaphoreSlimTest1_WaitAsync_Helper(1, 10, -1, true, null);
 
             // Zero timeout
-            RunSemaphoreSlimTest1_WaitAsync(10, 10, 0, true, null);
-            RunSemaphoreSlimTest1_WaitAsync(1, 10, 0, true, null);
-            RunSemaphoreSlimTest1_WaitAsync(0, 10, 0, false, null);
+            RunSemaphoreSlimTest1_WaitAsync_Helper(10, 10, 0, true, null);
+            RunSemaphoreSlimTest1_WaitAsync_Helper(1, 10, 0, true, null);
+            RunSemaphoreSlimTest1_WaitAsync_Helper(0, 10, 0, false, null);
 
             // Positive timeout
-            RunSemaphoreSlimTest1_WaitAsync(10, 10, 10, true, null);
-            RunSemaphoreSlimTest1_WaitAsync(1, 10, 10, true, null);
-            RunSemaphoreSlimTest1_WaitAsync(0, 10, 10, false, null);
+            RunSemaphoreSlimTest1_WaitAsync_Helper(10, 10, 10, true, null);
+            RunSemaphoreSlimTest1_WaitAsync_Helper(1, 10, 10, true, null);
+            RunSemaphoreSlimTest1_WaitAsync_Helper(0, 10, 10, false, null);
         }
 
         [Fact]
         public static void RunSemaphoreSlimTest1_WaitAsync_NegativeCases()
         {
             // Invalid timeout
-            RunSemaphoreSlimTest1_WaitAsync(10, 10, -10, true, typeof(ArgumentOutOfRangeException));
-            RunSemaphoreSlimTest1_WaitAsync
+            RunSemaphoreSlimTest1_WaitAsync_Helper(10, 10, -10, true, typeof(ArgumentOutOfRangeException));
+            RunSemaphoreSlimTest1_WaitAsync_Helper
                (10, 10, new TimeSpan(0, 0, int.MaxValue), true, typeof(ArgumentOutOfRangeException));
             RunSemaphoreSlimTest1_WaitAsync2();
         }
@@ -102,62 +102,62 @@ namespace System.Threading.Tests
         public static void RunSemaphoreSlimTest2_Release()
         {
             // Valid release count
-            RunSemaphoreSlimTest2_Release(5, 10, 1, null);
-            RunSemaphoreSlimTest2_Release(0, 10, 1, null);
-            RunSemaphoreSlimTest2_Release(5, 10, 5, null);
+            RunSemaphoreSlimTest2_Release_Helper(5, 10, 1, null);
+            RunSemaphoreSlimTest2_Release_Helper(0, 10, 1, null);
+            RunSemaphoreSlimTest2_Release_Helper(5, 10, 5, null);
         }
 
         [Fact]
         public static void RunSemaphoreSlimTest2_Release_NegativeCases()
         {
             // Invalid release count
-            RunSemaphoreSlimTest2_Release(5, 10, 0, typeof(ArgumentOutOfRangeException));
-            RunSemaphoreSlimTest2_Release(5, 10, -1, typeof(ArgumentOutOfRangeException));
+            RunSemaphoreSlimTest2_Release_Helper(5, 10, 0, typeof(ArgumentOutOfRangeException));
+            RunSemaphoreSlimTest2_Release_Helper(5, 10, -1, typeof(ArgumentOutOfRangeException));
 
             // Semaphore Full
-            RunSemaphoreSlimTest2_Release(10, 10, 1, typeof(SemaphoreFullException));
-            RunSemaphoreSlimTest2_Release(5, 10, 6, typeof(SemaphoreFullException));
-            RunSemaphoreSlimTest2_Release(int.MaxValue - 1, int.MaxValue, 10, typeof(SemaphoreFullException));
+            RunSemaphoreSlimTest2_Release_Helper(10, 10, 1, typeof(SemaphoreFullException));
+            RunSemaphoreSlimTest2_Release_Helper(5, 10, 6, typeof(SemaphoreFullException));
+            RunSemaphoreSlimTest2_Release_Helper(int.MaxValue - 1, int.MaxValue, 10, typeof(SemaphoreFullException));
         }
 
         [Fact]
         public static void RunSemaphoreSlimTest4_Dispose()
         {
-            RunSemaphoreSlimTest4_Dispose(5, 10, null, null);
-            RunSemaphoreSlimTest4_Dispose(5, 10, SemaphoreSlimActions.CurrentCount, null);
-            RunSemaphoreSlimTest4_Dispose
+            RunSemaphoreSlimTest4_Dispose_Helper(5, 10, null, null);
+            RunSemaphoreSlimTest4_Dispose_Helper(5, 10, SemaphoreSlimActions.CurrentCount, null);
+            RunSemaphoreSlimTest4_Dispose_Helper
                (5, 10, SemaphoreSlimActions.Wait, typeof(ObjectDisposedException));
-            RunSemaphoreSlimTest4_Dispose
+            RunSemaphoreSlimTest4_Dispose_Helper
                (5, 10, SemaphoreSlimActions.WaitAsync, typeof(ObjectDisposedException));
-            RunSemaphoreSlimTest4_Dispose
+            RunSemaphoreSlimTest4_Dispose_Helper
               (5, 10, SemaphoreSlimActions.Release, typeof(ObjectDisposedException));
-            RunSemaphoreSlimTest4_Dispose
+            RunSemaphoreSlimTest4_Dispose_Helper
               (5, 10, SemaphoreSlimActions.AvailableWaitHandle, typeof(ObjectDisposedException));
         }
 
         [Fact]
         public static void RunSemaphoreSlimTest5_CurrentCount()
         {
-            RunSemaphoreSlimTest5_CurrentCount(5, 10, null);
-            RunSemaphoreSlimTest5_CurrentCount(5, 10, SemaphoreSlimActions.Wait);
-            RunSemaphoreSlimTest5_CurrentCount(5, 10, SemaphoreSlimActions.WaitAsync);
-            RunSemaphoreSlimTest5_CurrentCount(5, 10, SemaphoreSlimActions.Release);
+            RunSemaphoreSlimTest5_CurrentCount_Helper(5, 10, null);
+            RunSemaphoreSlimTest5_CurrentCount_Helper(5, 10, SemaphoreSlimActions.Wait);
+            RunSemaphoreSlimTest5_CurrentCount_Helper(5, 10, SemaphoreSlimActions.WaitAsync);
+            RunSemaphoreSlimTest5_CurrentCount_Helper(5, 10, SemaphoreSlimActions.Release);
         }
 
         [Fact]
         public static void RunSemaphoreSlimTest7_AvailableWaitHandle()
         {
-            RunSemaphoreSlimTest7_AvailableWaitHandle(5, 10, null, true);
-            RunSemaphoreSlimTest7_AvailableWaitHandle(0, 10, null, false);
+            RunSemaphoreSlimTest7_AvailableWaitHandle_Helper(5, 10, null, true);
+            RunSemaphoreSlimTest7_AvailableWaitHandle_Helper(0, 10, null, false);
 
-            RunSemaphoreSlimTest7_AvailableWaitHandle(5, 10, SemaphoreSlimActions.Wait, true);
-            RunSemaphoreSlimTest7_AvailableWaitHandle(1, 10, SemaphoreSlimActions.Wait, false);
-            RunSemaphoreSlimTest7_AvailableWaitHandle(5, 10, SemaphoreSlimActions.Wait, true);
+            RunSemaphoreSlimTest7_AvailableWaitHandle_Helper(5, 10, SemaphoreSlimActions.Wait, true);
+            RunSemaphoreSlimTest7_AvailableWaitHandle_Helper(1, 10, SemaphoreSlimActions.Wait, false);
+            RunSemaphoreSlimTest7_AvailableWaitHandle_Helper(5, 10, SemaphoreSlimActions.Wait, true);
 
-            RunSemaphoreSlimTest7_AvailableWaitHandle(5, 10, SemaphoreSlimActions.WaitAsync, true);
-            RunSemaphoreSlimTest7_AvailableWaitHandle(1, 10, SemaphoreSlimActions.WaitAsync, false);
-            RunSemaphoreSlimTest7_AvailableWaitHandle(5, 10, SemaphoreSlimActions.WaitAsync, true);
-            RunSemaphoreSlimTest7_AvailableWaitHandle(0, 10, SemaphoreSlimActions.Release, true);
+            RunSemaphoreSlimTest7_AvailableWaitHandle_Helper(5, 10, SemaphoreSlimActions.WaitAsync, true);
+            RunSemaphoreSlimTest7_AvailableWaitHandle_Helper(1, 10, SemaphoreSlimActions.WaitAsync, false);
+            RunSemaphoreSlimTest7_AvailableWaitHandle_Helper(5, 10, SemaphoreSlimActions.WaitAsync, true);
+            RunSemaphoreSlimTest7_AvailableWaitHandle_Helper(0, 10, SemaphoreSlimActions.Release, true);
         }
 
         /// <summary>
@@ -168,7 +168,7 @@ namespace System.Threading.Tests
         /// <param name="exceptionType">The type of the thrown exception in case of invalid cases,
         /// null for valid cases</param>
         /// <returns>True if the test succeeded, false otherwise</returns>
-        private static void RunSemaphoreSlimTest0_Ctor(int initial, int maximum, Type exceptionType)
+        private static void RunSemaphoreSlimTest0_Helper(int initial, int maximum, Type exceptionType)
         {
             string methodFailed = "RunSemaphoreSlimTest0_Ctor(" + initial + "," + maximum + "):  FAILED.  ";
             Exception exception = null;
@@ -195,7 +195,7 @@ namespace System.Threading.Tests
         /// <param name="exceptionType">The type of the thrown exception in case of invalid cases,
         /// null for valid cases</param>
         /// <returns>True if the test succeeded, false otherwise</returns>
-        private static void RunSemaphoreSlimTest1_Wait
+        private static void RunSemaphoreSlimTest1_Wait_Helper
             (int initial, int maximum, object timeout, bool returnValue, Type exceptionType)
         {
             SemaphoreSlim semaphore = new SemaphoreSlim(initial, maximum);
@@ -233,7 +233,7 @@ namespace System.Threading.Tests
         /// <param name="exceptionType">The type of the thrown exception in case of invalid cases,
         /// null for valid cases</param>
         /// <returns>True if the test succeeded, false otherwise</returns>
-        private static void RunSemaphoreSlimTest1_WaitAsync
+        private static void RunSemaphoreSlimTest1_WaitAsync_Helper
             (int initial, int maximum, object timeout, bool returnValue, Type exceptionType)
         {
             SemaphoreSlim semaphore = new SemaphoreSlim(initial, maximum);
@@ -308,7 +308,7 @@ namespace System.Threading.Tests
         /// <param name="exceptionType">The type of the thrown exception in case of invalid cases,
         /// null for valid cases</param>
         /// <returns>True if the test succeeded, false otherwise</returns>
-        private static void RunSemaphoreSlimTest2_Release
+        private static void RunSemaphoreSlimTest2_Release_Helper
            (int initial, int maximum, int releaseCount, Type exceptionType)
         {
             SemaphoreSlim semaphore = new SemaphoreSlim(initial, maximum);
@@ -395,7 +395,7 @@ namespace System.Threading.Tests
         /// <param name="exceptionType">The type of the thrown exception in case of invalid cases,
         /// null for valid cases</param>
         /// <returns>True if the test succeeded, false otherwise</returns>
-        private static void RunSemaphoreSlimTest4_Dispose(int initial, int maximum, SemaphoreSlimActions? action, Type exceptionType)
+        private static void RunSemaphoreSlimTest4_Dispose_Helper(int initial, int maximum, SemaphoreSlimActions? action, Type exceptionType)
         {
             SemaphoreSlim semaphore = new SemaphoreSlim(initial, maximum);
             try
@@ -417,7 +417,7 @@ namespace System.Threading.Tests
         /// <param name="maximum">The maximum semaphore count</param>
         /// <param name="action">SemaphoreSlim action to be called before CurrentCount</param>
         /// <returns>True if the test succeeded, false otherwise</returns>
-        private static void RunSemaphoreSlimTest5_CurrentCount(int initial, int maximum, SemaphoreSlimActions? action)
+        private static void RunSemaphoreSlimTest5_CurrentCount_Helper(int initial, int maximum, SemaphoreSlimActions? action)
         {
             SemaphoreSlim semaphore = new SemaphoreSlim(initial, maximum);
 
@@ -440,7 +440,7 @@ namespace System.Threading.Tests
         /// <param name="action">SemaphoreSlim action to be called before WaitHandle</param>
         /// <param name="state">The expected wait handle state</param>
         /// <returns>True if the test succeeded, false otherwise</returns>
-        private static void RunSemaphoreSlimTest7_AvailableWaitHandle(int initial, int maximum, SemaphoreSlimActions? action, bool state)
+        private static void RunSemaphoreSlimTest7_AvailableWaitHandle_Helper(int initial, int maximum, SemaphoreSlimActions? action, bool state)
         {
             SemaphoreSlim semaphore = new SemaphoreSlim(initial, maximum);
 
index 2dfab0d42e1f8ae380a42f1bc3fec61d1c54e4a3..a4b7bf512fc9e04ace13255331b2b05b21de5def 100644 (file)
@@ -639,7 +639,7 @@ namespace System.Web.Tests
         [Theory]
         [InlineData(" abc defgh", "abc+def", 1, 7)]
         [InlineData(" abc defgh", "", 1, 0)]
-        public void UrlEncodeToBytesExplicitSize(string decoded, string encoded, int offset, int count)
+        public void UrlEncodeToBytesExplicitSize_WithOffsetAndCount(string decoded, string encoded, int offset, int count)
         {
             byte[] bytes = Encoding.UTF8.GetBytes(decoded);
             Assert.Equal(encoded, Encoding.UTF8.GetString(HttpUtility.UrlEncodeToBytes(bytes, offset, count)));