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)
commit61733e21bbe965977827205639bf4b835b522494
treee93e1828306c9b5ffed26f70c094e9575be0c8d7
parentad0ea43b86d169b05944ea72bcc62cfa00e7d7f2
Enable xunit1024 (#34512)

* 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