From 06a0b8ad91e426d0bd5a1b1de5379df642bf862e Mon Sep 17 00:00:00 2001 From: Kelly Song Date: Thu, 26 Sep 2024 11:53:13 -0700 Subject: [PATCH 1/2] add disable discovery enumeration = true to all theory tests --- .../JsonClaimSetTests.cs | 4 +- .../JsonWebTokenHandlerTests.cs | 78 +++++++++---------- ...ebTokenHandlerValidationParametersTests.cs | 2 +- .../JsonWebTokenTests.cs | 6 +- .../LoggerTests.cs | 2 +- .../End2EndTests.cs | 2 +- .../OpenIdConnectMessageTests.cs | 4 +- .../OpenIdConnectProtocolValidatorTests.cs | 24 +++--- .../PopKeyResolvingTests.cs | 18 ++--- .../SignedHttpRequestCreationTests.cs | 24 +++--- .../SignedHttpRequestE2ETests.cs | 2 +- .../SignedHttpRequestExceptionTests.cs | 2 +- .../SignedHttpRequestUtilityTests.cs | 6 +- .../SignedHttpRequestValidationTests.cs | 20 ++--- .../ExtensibilityTests.cs | 2 +- .../FileDocumentRetrieverTests.cs | 2 +- .../HttpDocumentRetrieverTests.cs | 2 +- ...WsFederationConfigurationRetrieverTests.cs | 14 ++-- ...WsFederationConfigurationValidatorTests.cs | 2 +- .../WsFederationMessageTests.cs | 16 ++-- .../TestStub.cs | 2 +- .../RoundTripSamlTokenTests.cs | 2 +- .../Saml2SecurityTokenHandlerTests.cs | 22 +++--- .../Saml2SerializerTests.cs | 28 +++---- .../SamlSecurityTokenHandlerTests.cs | 22 +++--- .../SamlSecurityTokenReadTest.cs | 2 +- .../SamlSerializerTests.cs | 28 +++---- .../AsymmetricAdapterTests.cs | 2 +- .../AsymmetricSignatureTests.cs | 6 +- ...tedEncryptionProviderExtensibilityTests.cs | 6 +- .../AuthenticatedEncryptionProviderTests.cs | 10 +-- .../BaseConfigurationComparerTests.cs | 2 +- .../CallContextTests.cs | 2 +- .../CaseSensitiveClaimsIdentityTests.cs | 6 +- .../CrossTokenTests.cs | 4 +- .../CryptoExtensibilityTests.cs | 6 +- .../CryptoProviderCacheTests.cs | 8 +- .../CryptoProviderFactoryTests.cs | 14 ++-- .../ECDsaAdapterTests.cs | 2 +- .../EcdhEsTests.cs | 4 +- .../EncryptingCredentialsTests.cs | 4 +- .../Json/JsonWebKeySerializationTests.cs | 6 +- .../Json/JsonWebKeySetSerializationTests.cs | 4 +- .../JsonWebKeyConverterTest.cs | 6 +- .../JsonWebKeySetTests.cs | 4 +- .../JsonWebKeyTests.cs | 6 +- .../JweUsingEchdTests.cs | 2 +- .../KeyVaultVerify.cs | 4 +- .../KeyWrapProviderTests.cs | 10 +-- .../MultiThreadingTests.cs | 2 +- .../ReferenceTests.cs | 4 +- .../RsaCryptoServiceProviderProxyTests.cs | 12 +-- .../RsaKeyWrapProviderTests.cs | 10 +-- .../RsaSecurityKeyTests.cs | 2 +- .../SecurityKeyTests.cs | 4 +- .../SecurityTokenExceptionTests.cs | 2 +- .../SignatureProviderTests.cs | 32 ++++---- .../StaticCryptoProviderTests.cs | 2 +- .../SupportedAlgorithmTests.cs | 6 +- .../SymmetricSecurityKeyTests.cs | 2 +- .../TamperedTokenTests.cs | 2 +- .../Validation/ValidatorsTests.cs | 14 ++-- .../X509EncryptingCredentialsTests.cs | 2 +- .../AadIssuerValidatorTests.cs | 2 +- ...TokenValidationParametersExtensionTests.cs | 10 +-- .../DSigSerializerTests.cs | 20 ++--- .../DelegatingXmlDictionaryReaderTests.cs | 4 +- .../DelegatingXmlDictionaryWriterTests.cs | 2 +- .../EnvelopedSignatureReaderTests.cs | 6 +- .../EnvelopedSignatureWriterTests.cs | 8 +- ...ExclusiveCanonicalizationTransformTests.cs | 4 +- .../IssuerSerialTests.cs | 4 +- .../KeyInfoTests.cs | 4 +- .../ReferenceTests.cs | 2 +- .../RsaKeyValueTests.cs | 4 +- .../SignatureTests.cs | 4 +- .../SignedInfoTests.cs | 2 +- .../TransformFactoryTest.cs | 4 +- .../X509DataTests.cs | 4 +- .../CreateAndValidateTokens.cs | 10 +-- .../JwtHeaderTests.cs | 2 +- .../JwtPayloadTest.cs | 2 +- .../JwtReferenceTests.cs | 6 +- .../JwtSecurityTokenConverterTests.cs | 2 +- ...tSecurityTokenHandlerExtensibilityTests.cs | 2 +- .../JwtSecurityTokenHandlerTests.cs | 52 ++++++------- .../JwtSecurityTokenTests.cs | 4 +- 87 files changed, 358 insertions(+), 358 deletions(-) diff --git a/test/Microsoft.IdentityModel.JsonWebTokens.Tests/JsonClaimSetTests.cs b/test/Microsoft.IdentityModel.JsonWebTokens.Tests/JsonClaimSetTests.cs index f114fa38a3..eac451399c 100644 --- a/test/Microsoft.IdentityModel.JsonWebTokens.Tests/JsonClaimSetTests.cs +++ b/test/Microsoft.IdentityModel.JsonWebTokens.Tests/JsonClaimSetTests.cs @@ -34,7 +34,7 @@ public class JsonClaimSetTests new Claim("dateTimeIso8061", _dateTime.ToUniversalTime().ToString("o", CultureInfo.InvariantCulture), ClaimValueTypes.DateTime, "LOCAL AUTHORITY", "LOCAL AUTHORITY"), }; - [Theory, MemberData(nameof(DirectClaimSetTestCases))] + [Theory, MemberData(nameof(DirectClaimSetTestCases), DisableDiscoveryEnumeration = true)] public void DirectClaimSetTests(JsonClaimSetTheoryData theoryData) { CompareContext context = TestUtilities.WriteHeader($"{this}.ClaimSetTests", theoryData); @@ -78,7 +78,7 @@ public static TheoryData DirectClaimSetTestCases() return theoryData; } - [Theory, MemberData(nameof(GetClaimAsTypeTheoryData))] + [Theory, MemberData(nameof(GetClaimAsTypeTheoryData), DisableDiscoveryEnumeration = true)] public void GetClaimAsType(JsonClaimSetTheoryData theoryData) { CompareContext context = TestUtilities.WriteHeader($"{this}.GetClaimAsType", theoryData); diff --git a/test/Microsoft.IdentityModel.JsonWebTokens.Tests/JsonWebTokenHandlerTests.cs b/test/Microsoft.IdentityModel.JsonWebTokens.Tests/JsonWebTokenHandlerTests.cs index eb2c661d6a..1b3617bc96 100644 --- a/test/Microsoft.IdentityModel.JsonWebTokens.Tests/JsonWebTokenHandlerTests.cs +++ b/test/Microsoft.IdentityModel.JsonWebTokens.Tests/JsonWebTokenHandlerTests.cs @@ -90,7 +90,7 @@ public void CreateTokenThrowsNullArgumentException() Assert.Throws(() => handler.CreateToken("Payload", Default.SymmetricEncryptingCredentials, (Dictionary)null)); } - [Theory, MemberData(nameof(TokenValidationClaimsTheoryData))] + [Theory, MemberData(nameof(TokenValidationClaimsTheoryData), DisableDiscoveryEnumeration = true)] public async Task ValidateTokenValidationResult(JsonWebTokenTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ValidateTokenValidationResult"); @@ -98,7 +98,7 @@ public async Task ValidateTokenValidationResult(JsonWebTokenTheoryData theoryDat Assert.Equal(tokenValidationResult.Claims, TokenUtilities.CreateDictionaryFromClaims(tokenValidationResult.ClaimsIdentity.Claims)); } - [Theory, MemberData(nameof(TokenValidationClaimsTheoryData))] + [Theory, MemberData(nameof(TokenValidationClaimsTheoryData), DisableDiscoveryEnumeration = true)] public async Task ValidateTokenDerivedHandlerValidationResult(JsonWebTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateTokenDerivedHandlerValidationResult", theoryData); @@ -157,7 +157,7 @@ public static TheoryData TokenValidationClaimsTheoryData return theoryData; } - [Theory, MemberData(nameof(TokenValidationTheoryData))] + [Theory, MemberData(nameof(TokenValidationTheoryData), DisableDiscoveryEnumeration = true)] public async Task ValidateTokenValidationResultThrowsWarning(JsonWebTokenTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ValidateTokenValidationResultThrowsWarning"); @@ -176,7 +176,7 @@ public async Task ValidateTokenValidationResultThrowsWarning(JsonWebTokenTheoryD Assert.Contains(warningId, listener.TraceBuffer); } - [Theory, MemberData(nameof(TokenValidationTheoryData))] + [Theory, MemberData(nameof(TokenValidationTheoryData), DisableDiscoveryEnumeration = true)] public async Task ValidateTokenValidationResultDoesNotThrowWarningWithIsValidRead(JsonWebTokenTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ValidateTokenValidationResultDoesNotThrowWarningWithIsValidRead"); @@ -196,7 +196,7 @@ public async Task ValidateTokenValidationResultDoesNotThrowWarningWithIsValidRea Assert.DoesNotContain(warningId, listener.TraceBuffer); } - [Theory, MemberData(nameof(TokenValidationTheoryData))] + [Theory, MemberData(nameof(TokenValidationTheoryData), DisableDiscoveryEnumeration = true)] public async Task ValidateTokenValidationResultDoesNotThrowWarningWithExceptionRead(JsonWebTokenTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ValidateTokenValidationResultDoesNotThrowWarningWithExceptionRead"); @@ -245,7 +245,7 @@ public static TheoryData TokenValidationTheoryData() return theoryData; } - [Theory, MemberData(nameof(SegmentTheoryData))] + [Theory, MemberData(nameof(SegmentTheoryData), DisableDiscoveryEnumeration = true)] public void SegmentCanRead(JwtTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.SegmentCanRead", theoryData); @@ -281,7 +281,7 @@ public static TheoryData SegmentTheoryData() return theoryData; } - [Theory, MemberData(nameof(CreateTokenWithEmptyPayloadUsingSecurityTokenDescriptorTheoryData))] + [Theory, MemberData(nameof(CreateTokenWithEmptyPayloadUsingSecurityTokenDescriptorTheoryData), DisableDiscoveryEnumeration = true)] public async Task CreateTokenWithEmptyPayloadUsingSecurityTokenDescriptor(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateEmptyJWSUsingSecurityTokenDescriptor", theoryData); @@ -405,7 +405,7 @@ public static TheoryData CreateTokenWithEmptyPayloadUsing /// Verify the results from ValidateToken() and ValidateTokenAsync() should match. /// /// The test data. - [Theory, MemberData(nameof(CreateJWEWithAesGcmTheoryData))] + [Theory, MemberData(nameof(CreateJWEWithAesGcmTheoryData), DisableDiscoveryEnumeration = true)] public async Task TokenValidationResultsShouldMatch(CreateTokenTheoryData theoryData) { if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) @@ -436,7 +436,7 @@ public async Task TokenValidationResultsShouldMatch(CreateTokenTheoryData theory } } - [Theory, MemberData(nameof(CreateJWEWithAesGcmTheoryData))] + [Theory, MemberData(nameof(CreateJWEWithAesGcmTheoryData), DisableDiscoveryEnumeration = true)] public async Task CreateJWEWithAesGcm(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateJWEWithAesGcm", theoryData); @@ -540,7 +540,7 @@ public static TheoryData CreateJWEWithAesGcmTheoryData // Tests checks to make sure that the token string created by the JsonWebTokenHandler is consistent with the // token string created by the JwtSecurityTokenHandler. - [Theory, MemberData(nameof(CreateJWETheoryData))] + [Theory, MemberData(nameof(CreateJWETheoryData), DisableDiscoveryEnumeration = true)] public async Task CreateJWE(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateJWE", theoryData); @@ -662,7 +662,7 @@ public static TheoryData CreateJWETheoryData } } - [Theory, MemberData(nameof(SecurityTokenDecryptionTheoryData))] + [Theory, MemberData(nameof(SecurityTokenDecryptionTheoryData), DisableDiscoveryEnumeration = true)] public void GetEncryptionKeys(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.EncryptionKeysCheck", theoryData); @@ -827,7 +827,7 @@ private static OpenIdConnectConfiguration CreateCustomConfigurationThatThrows() // Tests checks to make sure that the token string (JWE) created by calling // CreateToken(string payload, SigningCredentials signingCredentials, EncryptingCredentials encryptingCredentials) // is equivalent to the token string created by calling CreateToken(SecurityTokenDescriptor tokenDescriptor). - [Theory, MemberData(nameof(CreateJWEUsingSecurityTokenDescriptorTheoryData))] + [Theory, MemberData(nameof(CreateJWEUsingSecurityTokenDescriptorTheoryData), DisableDiscoveryEnumeration = true)] public async Task CreateJWEUsingSecurityTokenDescriptor(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateJWEUsingSecurityTokenDescriptor", theoryData); @@ -1217,7 +1217,7 @@ public static TheoryData CreateJWEUsingSecurityTokenDescr // Tests checks to make sure that the token string created by the JsonWebTokenHandler is consistent with the // token string created by the JwtSecurityTokenHandler. - [Theory, MemberData(nameof(CreateJWSTheoryData))] + [Theory, MemberData(nameof(CreateJWSTheoryData), DisableDiscoveryEnumeration = true)] public async Task CreateJWS(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateJWS", theoryData); @@ -1348,7 +1348,7 @@ public static TheoryData CreateJWSTheoryData } // This test checks to make sure that SecurityTokenDescriptor.Audience, Expires, IssuedAt, NotBefore, Issuer have priority over SecurityTokenDescriptor.Claims. - [Theory, MemberData(nameof(CreateJWSWithSecurityTokenDescriptorClaimsTheoryData))] + [Theory, MemberData(nameof(CreateJWSWithSecurityTokenDescriptorClaimsTheoryData), DisableDiscoveryEnumeration = true)] public void CreateJWSWithSecurityTokenDescriptorClaims(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateJWSWithSecurityTokenDescriptorClaims", theoryData); @@ -1496,7 +1496,7 @@ public static TheoryData CreateJWSWithSecurityTokenDescri // This test checks to make sure that additional header claims are added as expected to the JWT token header. - [Theory, MemberData(nameof(CreateJWSWithAdditionalHeaderClaimsTheoryData))] + [Theory, MemberData(nameof(CreateJWSWithAdditionalHeaderClaimsTheoryData), DisableDiscoveryEnumeration = true)] public void CreateJWSWithAdditionalHeaderClaims(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateJWSWithAdditionalHeaderClaims", theoryData); @@ -1570,7 +1570,7 @@ public static TheoryData CreateJWSWithAdditionalHeaderCla } } - [Theory, MemberData(nameof(CreateJWEWithPayloadStringTheoryData))] + [Theory, MemberData(nameof(CreateJWEWithPayloadStringTheoryData), DisableDiscoveryEnumeration = true)] public async Task CreateJWEWithPayloadString(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateJWEWithPayloadString", theoryData); @@ -1751,7 +1751,7 @@ public static TheoryData CreateJWEWithPayloadStringTheory } // This test checks to make sure that additional header claims are added as expected to the outer token header. - [Theory, MemberData(nameof(CreateJWEWithAdditionalHeaderClaimsTheoryData))] + [Theory, MemberData(nameof(CreateJWEWithAdditionalHeaderClaimsTheoryData), DisableDiscoveryEnumeration = true)] public async Task CreateJWEWithAdditionalHeaderClaims(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateJWEWithAdditionalHeaderClaims", theoryData); @@ -1934,7 +1934,7 @@ public static TheoryData CreateJWEWithAdditionalHeaderCla // Tests checks to make sure that the token string (JWS) created by calling CreateToken(string payload, SigningCredentials signingCredentials) // is equivalent to the token string created by calling CreateToken(SecurityTokenDescriptor tokenDescriptor). - [Theory, MemberData(nameof(CreateJWSUsingSecurityTokenDescriptorTheoryData))] + [Theory, MemberData(nameof(CreateJWSUsingSecurityTokenDescriptorTheoryData), DisableDiscoveryEnumeration = true)] public async Task CreateJWSUsingSecurityTokenDescriptor(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateJWSUsingSecurityTokenDescriptor", theoryData); @@ -2496,7 +2496,7 @@ public async Task RoundTripJWS() } // Test ensure paths to creating a token with an empty payload are successful. - [Theory, MemberData(nameof(RoundTripWithEmptyPayloadTestCases))] + [Theory, MemberData(nameof(RoundTripWithEmptyPayloadTestCases), DisableDiscoveryEnumeration = true)] public async Task RoundTripWithEmptyPayload(CreateTokenTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.RoundTripWithEmptyPayload"); @@ -2641,7 +2641,7 @@ public static TheoryData RoundTripWithEmptyPayloadTestCas } } - [Theory, MemberData(nameof(RoundTripJWEDirectTestCases))] + [Theory, MemberData(nameof(RoundTripJWEDirectTestCases), DisableDiscoveryEnumeration = true)] public async Task RoundTripJWEInnerJWSDirect(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.RoundTripJWEInnerJWSDirect", theoryData); @@ -2674,7 +2674,7 @@ public async Task RoundTripJWEInnerJWSDirect(CreateTokenTheoryData theoryData) TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(RoundTripJWEDirectTestCases))] + [Theory, MemberData(nameof(RoundTripJWEDirectTestCases), DisableDiscoveryEnumeration = true)] public async Task RoundTripJWEDirect(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.RoundTripJWEDirect", theoryData); @@ -2773,7 +2773,7 @@ public static TheoryData RoundTripJWEDirectTestCases } } - [Theory, MemberData(nameof(RoundTripJWEKeyWrapTestCases))] + [Theory, MemberData(nameof(RoundTripJWEKeyWrapTestCases), DisableDiscoveryEnumeration = true)] public async Task RoundTripJWEInnerJWSKeyWrap(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.RoundTripJWEInnerJWSKeyWrap", theoryData); @@ -2806,7 +2806,7 @@ public async Task RoundTripJWEInnerJWSKeyWrap(CreateTokenTheoryData theoryData) TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(RoundTripJWEKeyWrapTestCases))] + [Theory, MemberData(nameof(RoundTripJWEKeyWrapTestCases), DisableDiscoveryEnumeration = true)] public async Task RoundTripJWEKeyWrap(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.RoundTripJWEKeyWrap", theoryData); @@ -3027,7 +3027,7 @@ public async Task ValidateTokenClaims() } - [Theory, MemberData(nameof(ValidateTypeTheoryData))] + [Theory, MemberData(nameof(ValidateTypeTheoryData), DisableDiscoveryEnumeration = true)] public async Task ValidateType(JwtTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ValidateType", theoryData); @@ -3043,7 +3043,7 @@ public async Task ValidateType(JwtTheoryData theoryData) public static TheoryData ValidateTypeTheoryData = JwtSecurityTokenHandlerTests.ValidateTypeTheoryData; - [Theory, MemberData(nameof(ValidateJweTestCases))] + [Theory, MemberData(nameof(ValidateJweTestCases), DisableDiscoveryEnumeration = true)] public async Task ValidateJWE(JwtTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateJWE", theoryData); @@ -3178,7 +3178,7 @@ public async Task ValidateDifferentClaimsBetweenHandlers() TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(ValidateJweTestCases))] + [Theory, MemberData(nameof(ValidateJweTestCases), DisableDiscoveryEnumeration = true)] public async Task ValidateJWEAsync(JwtTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateJWEAsync", theoryData); @@ -3307,7 +3307,7 @@ public static TheoryData ValidateJweTestCases } } - [Theory, MemberData(nameof(ValidateJwsTestCases))] + [Theory, MemberData(nameof(ValidateJwsTestCases), DisableDiscoveryEnumeration = true)] public async Task ValidateJWSAsync(JwtTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateJWSAsync", theoryData); @@ -3337,7 +3337,7 @@ public async Task ValidateJWSAsync(JwtTheoryData theoryData) TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(ValidateJwsTestCases))] + [Theory, MemberData(nameof(ValidateJwsTestCases), DisableDiscoveryEnumeration = true)] public async Task ValidateJWS(JwtTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateJWS", theoryData); @@ -3566,7 +3566,7 @@ public static TheoryData ValidateJwsTestCases } } - [Theory, MemberData(nameof(ValidateJwsWithConfigTheoryData))] + [Theory, MemberData(nameof(ValidateJwsWithConfigTheoryData), DisableDiscoveryEnumeration = true)] public async Task ValidateJWSWithConfig(JwtTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateJWSWithConfig", theoryData); @@ -3598,7 +3598,7 @@ public async Task ValidateJWSWithConfig(JwtTheoryData theoryData) TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(ValidateJwsWithConfigTheoryData))] + [Theory, MemberData(nameof(ValidateJwsWithConfigTheoryData), DisableDiscoveryEnumeration = true)] public async Task ValidateJWSWithConfigAsync(JwtTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateJWSWithConfigAsync", theoryData); @@ -3670,7 +3670,7 @@ public static TheoryData ValidateJwsWithConfigTheoryData return theoryData; } } - [Theory, MemberData(nameof(ValidateJwsWithLastKnownGoodTheoryData))] + [Theory, MemberData(nameof(ValidateJwsWithLastKnownGoodTheoryData), DisableDiscoveryEnumeration = true)] public async Task ValidateJWSWithLastKnownGood(JwtTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateJWSWithLastKnownGood", theoryData); @@ -3728,7 +3728,7 @@ public async Task ValidateJWSWithLastKnownGood(JwtTheoryData theoryData) public static TheoryData ValidateJwsWithLastKnownGoodTheoryData => JwtTestDatasets.ValidateJwsWithLastKnownGoodTheoryData; - [Theory, MemberData(nameof(ValidateJWEWithLastKnownGoodTheoryData))] + [Theory, MemberData(nameof(ValidateJWEWithLastKnownGoodTheoryData), DisableDiscoveryEnumeration = true)] public async Task ValidateJWEWithLastKnownGood(JwtTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateJWEWithLastKnownGood", theoryData); @@ -3785,7 +3785,7 @@ public async Task ValidateJWEWithLastKnownGood(JwtTheoryData theoryData) public static TheoryData ValidateJWEWithLastKnownGoodTheoryData => JwtTestDatasets.ValidateJWEWithLastKnownGoodTheoryData; - [Theory, MemberData(nameof(JWECompressionTheoryData))] + [Theory, MemberData(nameof(JWECompressionTheoryData), DisableDiscoveryEnumeration = true)] public async Task EncryptExistingJWSWithCompressionTest(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.EncryptExistingJWSWithCompressionTest", theoryData); @@ -3817,7 +3817,7 @@ public async Task EncryptExistingJWSWithCompressionTest(CreateTokenTheoryData th TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(JWECompressionTheoryData))] + [Theory, MemberData(nameof(JWECompressionTheoryData), DisableDiscoveryEnumeration = true)] public async Task JWECompressionTest(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.JWECompressionTest", theoryData); @@ -3966,7 +3966,7 @@ public static TheoryData JWECompressionTheoryData } } - [Theory, MemberData(nameof(JweDecompressSizeTheoryData))] + [Theory, MemberData(nameof(JweDecompressSizeTheoryData), DisableDiscoveryEnumeration = true)] public async Task JWEDecompressionSizeTest(JWEDecompressionTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.JWEDecompressionTest", theoryData); @@ -4030,7 +4030,7 @@ public static TheoryData JweDecompressSizeTheoryData return theoryData; } - [Theory, MemberData(nameof(JWEDecompressionTheoryData))] + [Theory, MemberData(nameof(JWEDecompressionTheoryData), DisableDiscoveryEnumeration = true)] public async Task JWEDecompressionTest(JWEDecompressionTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.JWEDecompressionTest", theoryData); @@ -4149,7 +4149,7 @@ public static TheoryData JWEDecompressionTheoryData( }; } - [Theory, MemberData(nameof(SecurityKeyNotFoundExceptionTestTheoryData))] + [Theory, MemberData(nameof(SecurityKeyNotFoundExceptionTestTheoryData), DisableDiscoveryEnumeration = true)] public async Task SecurityKeyNotFoundExceptionTest(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.SecurityKeyNotFoundExceptionTest", theoryData); @@ -4248,7 +4248,7 @@ public static TheoryData SecurityKeyNotFoundExceptionTest }; } - [Theory, MemberData(nameof(IncludeSecurityTokenOnFailureTestTheoryData))] + [Theory, MemberData(nameof(IncludeSecurityTokenOnFailureTestTheoryData), DisableDiscoveryEnumeration = true)] public async Task IncludeSecurityTokenOnFailedValidationTest(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.IncludeSecurityTokenOnFailedValidationTest", theoryData); @@ -4319,7 +4319,7 @@ public static TheoryData IncludeSecurityTokenOnFailureTes }; } - [Theory, MemberData(nameof(ValidateAuthenticationTagLengthTheoryData))] + [Theory, MemberData(nameof(ValidateAuthenticationTagLengthTheoryData), DisableDiscoveryEnumeration = true)] public async Task ValidateTokenAsync_ModifiedAuthNTag(CreateTokenTheoryData theoryData) { // arrange diff --git a/test/Microsoft.IdentityModel.JsonWebTokens.Tests/JsonWebTokenHandlerValidationParametersTests.cs b/test/Microsoft.IdentityModel.JsonWebTokens.Tests/JsonWebTokenHandlerValidationParametersTests.cs index 75a740196c..7032ea7ab8 100644 --- a/test/Microsoft.IdentityModel.JsonWebTokens.Tests/JsonWebTokenHandlerValidationParametersTests.cs +++ b/test/Microsoft.IdentityModel.JsonWebTokens.Tests/JsonWebTokenHandlerValidationParametersTests.cs @@ -17,7 +17,7 @@ namespace Microsoft.IdentityModel.JsonWebTokens.Tests { public class JsonWebTokenHandlerValidationParametersTests { - [Theory, MemberData(nameof(JsonWebTokenHandlerValidationParametersTestCases))] + [Theory, MemberData(nameof(JsonWebTokenHandlerValidationParametersTestCases), DisableDiscoveryEnumeration = true)] public async Task ValidateTokenAsync(JsonWebTokenHandlerValidationParametersTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateTokenAsync", theoryData); diff --git a/test/Microsoft.IdentityModel.JsonWebTokens.Tests/JsonWebTokenTests.cs b/test/Microsoft.IdentityModel.JsonWebTokens.Tests/JsonWebTokenTests.cs index 04e9902186..f16e95eafc 100644 --- a/test/Microsoft.IdentityModel.JsonWebTokens.Tests/JsonWebTokenTests.cs +++ b/test/Microsoft.IdentityModel.JsonWebTokens.Tests/JsonWebTokenTests.cs @@ -1466,7 +1466,7 @@ public static TheoryData GetPayloadValueTheoryData // Time values can be floats, ints, or strings. // This test checks to make sure that parsing does not fault in any of the above cases. - [Theory, MemberData(nameof(ParseTimeValuesTheoryData))] + [Theory, MemberData(nameof(ParseTimeValuesTheoryData), DisableDiscoveryEnumeration = true)] public void ParseTimeValues(ParseTimeValuesTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ParseTimeValues", theoryData); @@ -1544,7 +1544,7 @@ public static TheoryData ParseTimeValuesTheoryData // Test ensures that we only try to populate a JsonWebToken from a string if it is a properly formatted JWT. // More specifically, we only want to try and decode // a JWT token if it has the correct number of (JWE or JWS) token parts. - [Theory, MemberData(nameof(ParseTokenTheoryData))] + [Theory, MemberData(nameof(ParseTokenTheoryData), DisableDiscoveryEnumeration = true)] public void ParseToken(JwtTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ParseToken", theoryData); @@ -1721,7 +1721,7 @@ public void DifferentCultureJsonWebToken() } // Test to verify equality between JsonWebTokens created from a string and an equivalent span - [Theory, MemberData(nameof(ParseTokenTheoryData))] + [Theory, MemberData(nameof(ParseTokenTheoryData), DisableDiscoveryEnumeration = true)] public void StringAndMemoryConstructors_CreateEquivalentTokens(JwtTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CompareJsonWebToken", theoryData); diff --git a/test/Microsoft.IdentityModel.Logging.Tests/LoggerTests.cs b/test/Microsoft.IdentityModel.Logging.Tests/LoggerTests.cs index 2f4ffa6bb7..65ebfd33b9 100644 --- a/test/Microsoft.IdentityModel.Logging.Tests/LoggerTests.cs +++ b/test/Microsoft.IdentityModel.Logging.Tests/LoggerTests.cs @@ -247,7 +247,7 @@ public void PrepareMessageWithNoArguments() var exception = LogHelper.LogExceptionMessage(new ArgumentException("This is the first parameter '{0}'. This is the second parameter '{1}'.")); } - [Theory, MemberData(nameof(LoggerTestTheoryData))] + [Theory, MemberData(nameof(LoggerTestTheoryData), DisableDiscoveryEnumeration = true)] public void LoggerInstanceTests(LoggerTheoryData theoryData) { LogHelper.Logger = theoryData.Logger; diff --git a/test/Microsoft.IdentityModel.Protocols.OpenIdConnect.Tests/End2EndTests.cs b/test/Microsoft.IdentityModel.Protocols.OpenIdConnect.Tests/End2EndTests.cs index 76721b3252..f0bb8f7870 100644 --- a/test/Microsoft.IdentityModel.Protocols.OpenIdConnect.Tests/End2EndTests.cs +++ b/test/Microsoft.IdentityModel.Protocols.OpenIdConnect.Tests/End2EndTests.cs @@ -16,7 +16,7 @@ namespace Microsoft.IdentityModel.Protocols.OpenIdConnect.Tests /// public class End2EndTests { - [Theory, MemberData(nameof(OpenIdConnectTheoryData))] + [Theory, MemberData(nameof(OpenIdConnectTheoryData), DisableDiscoveryEnumeration = true)] public async Task OpenIdConnect(OpenIdConnectTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.OpenIdConnect", theoryData); diff --git a/test/Microsoft.IdentityModel.Protocols.OpenIdConnect.Tests/OpenIdConnectMessageTests.cs b/test/Microsoft.IdentityModel.Protocols.OpenIdConnect.Tests/OpenIdConnectMessageTests.cs index 2d4afd4b9a..e8ffe4c2d6 100644 --- a/test/Microsoft.IdentityModel.Protocols.OpenIdConnect.Tests/OpenIdConnectMessageTests.cs +++ b/test/Microsoft.IdentityModel.Protocols.OpenIdConnect.Tests/OpenIdConnectMessageTests.cs @@ -268,7 +268,7 @@ public void GetSets() TestUtilities.AssertFailIfErrors("OpenIdConnectMessage_GetSets*** Test Failures:\n", context.Errors); } - [Theory, MemberData(nameof(CreateAuthenticationRequestUrlTheoryData))] + [Theory, MemberData(nameof(CreateAuthenticationRequestUrlTheoryData), DisableDiscoveryEnumeration = true)] public void OidcCreateAuthenticationRequestUrl(string testId, OpenIdConnectMessage message, string expectedMessage) { TestUtilities.WriteHeader(testId, "OidcCreateAuthenticationRequestUrl", true); @@ -542,7 +542,7 @@ public static TheoryData CreateAuthenticat return theoryData; } - [Theory, MemberData(nameof(CreateLogoutRequestUrlTheoryData))] + [Theory, MemberData(nameof(CreateLogoutRequestUrlTheoryData), DisableDiscoveryEnumeration = true)] public void OidcCreateLogoutRequestUrl(string testId, OpenIdConnectMessage message, string expectedMessage) { TestUtilities.WriteHeader("OidcCreateLogoutRequestUrl - " + testId, true); diff --git a/test/Microsoft.IdentityModel.Protocols.OpenIdConnect.Tests/OpenIdConnectProtocolValidatorTests.cs b/test/Microsoft.IdentityModel.Protocols.OpenIdConnect.Tests/OpenIdConnectProtocolValidatorTests.cs index 32ad889f05..3b1560d7fd 100644 --- a/test/Microsoft.IdentityModel.Protocols.OpenIdConnect.Tests/OpenIdConnectProtocolValidatorTests.cs +++ b/test/Microsoft.IdentityModel.Protocols.OpenIdConnect.Tests/OpenIdConnectProtocolValidatorTests.cs @@ -146,7 +146,7 @@ public void GetSets() } - [Theory, MemberData(nameof(ValidateAuthenticationResponseTheoryData))] + [Theory, MemberData(nameof(ValidateAuthenticationResponseTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateAuthenticationResponse(OidcProtocolValidatorTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ValidateAuthenticationResponse", theoryData); @@ -277,7 +277,7 @@ public static TheoryData ValidateAuthentication } } - [Theory, MemberData(nameof(ValidateTokenResponseTheoryData))] + [Theory, MemberData(nameof(ValidateTokenResponseTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateTokenResponse(OidcProtocolValidatorTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ValidateTokenResponse", theoryData); @@ -376,7 +376,7 @@ public static TheoryData ValidateTokenResponseT } } - [Theory, MemberData(nameof(ValidateUserInfoResponseTheoryData))] + [Theory, MemberData(nameof(ValidateUserInfoResponseTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateUserInfoResponse(OidcProtocolValidatorTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ValidateUserInfoResponse", theoryData); @@ -498,7 +498,7 @@ public static TheoryData ValidateUserInfoRespon } } - [Theory, MemberData(nameof(ValidateIdTokenTheoryData))] + [Theory, MemberData(nameof(ValidateIdTokenTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateIdToken(OidcProtocolValidatorTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ValidateIdToken", theoryData); @@ -726,7 +726,7 @@ public static TheoryData ValidateIdTokenTheoryD } } - [Theory, MemberData(nameof(ValidateCHashTheoryData))] + [Theory, MemberData(nameof(ValidateCHashTheoryData), DisableDiscoveryEnumeration = true)] private void ValidateCHash(OidcProtocolValidatorTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateCHash", theoryData); @@ -960,7 +960,7 @@ public static TheoryData ValidateCHashTheoryDat } } - [Theory, MemberData(nameof(ValidateJWEPayloadCHashTheoryData))] + [Theory, MemberData(nameof(ValidateJWEPayloadCHashTheoryData), DisableDiscoveryEnumeration = true)] private void ValidateJWEPayloadCHash(OidcProtocolValidatorTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateJWEPayloadCHash", theoryData); @@ -1091,7 +1091,7 @@ public static TheoryData ValidateJWEPayloadCHas } } - [Theory, MemberData(nameof(ValidateNonceTheoryData))] + [Theory, MemberData(nameof(ValidateNonceTheoryData), DisableDiscoveryEnumeration = true)] private void ValidateNonce(OidcProtocolValidatorTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ValidateNonce", theoryData); @@ -1317,7 +1317,7 @@ public static TheoryData ValidateNonceTheoryDat } } - [Theory, MemberData(nameof(ValidateAtHashTheoryData))] + [Theory, MemberData(nameof(ValidateAtHashTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateAtHash(OidcProtocolValidatorTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ValidateAtHash", theoryData); @@ -1429,7 +1429,7 @@ public static TheoryData ValidateAtHashTheoryDa } } - [Theory, MemberData(nameof(ValidateJWEPayloadAtHashTheoryData))] + [Theory, MemberData(nameof(ValidateJWEPayloadAtHashTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateJWEPayloadAtHash(OidcProtocolValidatorTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateJWEPayloadAtHash", theoryData); @@ -1470,7 +1470,7 @@ public static TheoryData ValidateJWEPayloadAtHa } } - [Theory, MemberData(nameof(ValidateStateTheoryData))] + [Theory, MemberData(nameof(ValidateStateTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateState(OidcProtocolValidatorTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ValidateState", theoryData); @@ -1629,7 +1629,7 @@ public void DefaultAlgorithmMapTest(string algorithm, string expectedHash, bool Assert.Equal(hashFound, expectedHash); } - [Theory, MemberData(nameof(HashAlgorithmExtensibilityTheoryData))] + [Theory, MemberData(nameof(HashAlgorithmExtensibilityTheoryData), DisableDiscoveryEnumeration = true)] public void HashAlgorithmExtensibility(OpenIdConnectProtocolValidator protocolValidator, string alg, Type algorithmType, ExpectedException ee) { ee.Verbose = false; @@ -1702,7 +1702,7 @@ public static TheoryData ResolvePopKeyFromCnfClaimAsync } } - [Theory, MemberData(nameof(ResolvePopKeyAsyncTheoryData))] + [Theory, MemberData(nameof(ResolvePopKeyAsyncTheoryData), DisableDiscoveryEnumeration = true)] public async Task ResolvePopKeyAsync(ResolvePopKeyTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ResolvePopKeyTheoryData", theoryData); @@ -198,7 +198,7 @@ public static TheoryData ResolvePopKeyAsyncTheoryData } } - [Theory, MemberData(nameof(ResolvePopKeyFromJwkTheoryData))] + [Theory, MemberData(nameof(ResolvePopKeyFromJwkTheoryData), DisableDiscoveryEnumeration = true)] public void ResolvePopKeyFromJwk(ResolvePopKeyTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ResolvePopKeyTheoryData", theoryData); @@ -269,7 +269,7 @@ public static TheoryData ResolvePopKeyFromJwkTheoryData } } - [Theory, MemberData(nameof(ResolvePopKeyFromJweTheoryData))] + [Theory, MemberData(nameof(ResolvePopKeyFromJweTheoryData), DisableDiscoveryEnumeration = true)] public async Task ResolvePopKeyFromJweAsync(ResolvePopKeyTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ResolvePopKeyFromJwe", theoryData); @@ -393,7 +393,7 @@ public static TheoryData ResolvePopKeyFromJweTheoryData } } - [Theory, MemberData(nameof(ResolvePopKeyFromJkuTheoryData))] + [Theory, MemberData(nameof(ResolvePopKeyFromJkuTheoryData), DisableDiscoveryEnumeration = true)] public async Task ResolvePopKeyFromJkuAsync(ResolvePopKeyTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ResolvePopKeyFromJkuAsync", theoryData); @@ -562,7 +562,7 @@ public static TheoryData ResolvePopKeyFromJkuTheoryData } } - [Theory, MemberData(nameof(GetCnfClaimValueTheoryData))] + [Theory, MemberData(nameof(GetCnfClaimValueTheoryData), DisableDiscoveryEnumeration = true)] public void GetCnfClaimValue(ResolvePopKeyTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.GetCnfClaimValue", theoryData); @@ -625,7 +625,7 @@ public static TheoryData GetCnfClaimValueTheoryData } } - [Theory, MemberData(nameof(ResolvePopKeyFromJkuKidTheoryData))] + [Theory, MemberData(nameof(ResolvePopKeyFromJkuKidTheoryData), DisableDiscoveryEnumeration = true)] public async Task ResolvePopKeyFromJkuKidAsync(ResolvePopKeyTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ResolvePopKeyFromJkuKidAsync", theoryData); @@ -742,7 +742,7 @@ public static TheoryData ResolvePopKeyFromJkuKidTheoryD } } - [Theory(Skip = "flaky"), MemberData(nameof(GetPopKeysFromJkuAsyncTheoryData))] + [Theory(Skip = "flaky"), MemberData(nameof(GetPopKeysFromJkuAsyncTheoryData), DisableDiscoveryEnumeration = true)] public async Task GetPopKeysFromJkuAsync(ResolvePopKeyTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.GetPopKeysFromJkuAsync", theoryData); @@ -856,7 +856,7 @@ public static TheoryData GetPopKeysFromJkuAsyncTheoryDa } } - [Theory, MemberData(nameof(ResolvePopKeyFromKeyIdentifierAsyncTheoryData))] + [Theory, MemberData(nameof(ResolvePopKeyFromKeyIdentifierAsyncTheoryData), DisableDiscoveryEnumeration = true)] public async Task ResolvePopKeyFromKeyIdentifierAsync(ResolvePopKeyTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ResolvePopKeyFromKeyIdentifierAsync", theoryData); diff --git a/test/Microsoft.IdentityModel.Protocols.SignedHttpRequest.Tests/SignedHttpRequestCreationTests.cs b/test/Microsoft.IdentityModel.Protocols.SignedHttpRequest.Tests/SignedHttpRequestCreationTests.cs index 246322d335..bf61144f11 100644 --- a/test/Microsoft.IdentityModel.Protocols.SignedHttpRequest.Tests/SignedHttpRequestCreationTests.cs +++ b/test/Microsoft.IdentityModel.Protocols.SignedHttpRequest.Tests/SignedHttpRequestCreationTests.cs @@ -93,7 +93,7 @@ public async Task CreateSignedHttpRequestWithAdditionalHeaderClaims() } - [Theory, MemberData(nameof(CreateClaimCallsTheoryData))] + [Theory, MemberData(nameof(CreateClaimCallsTheoryData), DisableDiscoveryEnumeration = true)] public void CreateClaimCalls(CreateSignedHttpRequestTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateClaimCalls", theoryData); @@ -177,7 +177,7 @@ public static TheoryData CreateClaimCallsTheo } } - [Theory, MemberData(nameof(CreateAtClaimTheoryData))] + [Theory, MemberData(nameof(CreateAtClaimTheoryData), DisableDiscoveryEnumeration = true)] public void CreateAtClaim(CreateSignedHttpRequestTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateAtClaimTheoryData", theoryData); @@ -217,7 +217,7 @@ public static TheoryData CreateAtClaimTheoryD } } - [Theory(Skip = "This test failed on build server due to some EpochTime changes, should be fixed later"), MemberData(nameof(CreateTsClaimTheoryData))] + [Theory(Skip = "This test failed on build server due to some EpochTime changes, should be fixed later"), MemberData(nameof(CreateTsClaimTheoryData), DisableDiscoveryEnumeration = true)] public void CreateTsClaim(CreateSignedHttpRequestTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateTsClaim", theoryData); @@ -269,7 +269,7 @@ public static TheoryData CreateTsClaimTheoryD } } - [Theory, MemberData(nameof(CreateMClaimTheoryData))] + [Theory, MemberData(nameof(CreateMClaimTheoryData), DisableDiscoveryEnumeration = true)] public void CreateMClaim(CreateSignedHttpRequestTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateMClaim", theoryData); @@ -320,7 +320,7 @@ public static TheoryData CreateMClaimTheoryDa } } - [Theory, MemberData(nameof(CreateUClaimTheoryData))] + [Theory, MemberData(nameof(CreateUClaimTheoryData), DisableDiscoveryEnumeration = true)] public void CreateUClaim(CreateSignedHttpRequestTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateUClaim", theoryData); @@ -389,7 +389,7 @@ public static TheoryData CreateUClaimTheoryDa } } - [Theory, MemberData(nameof(CreatePClaimTheoryData))] + [Theory, MemberData(nameof(CreatePClaimTheoryData), DisableDiscoveryEnumeration = true)] public void CreatePClaim(CreateSignedHttpRequestTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreatePClaim", theoryData); @@ -470,7 +470,7 @@ public static TheoryData CreatePClaimTheoryDa } } - [Theory, MemberData(nameof(CreateQClaimTheoryData))] + [Theory, MemberData(nameof(CreateQClaimTheoryData), DisableDiscoveryEnumeration = true)] public void CreateQClaim(CreateSignedHttpRequestTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateQClaim", theoryData); @@ -607,7 +607,7 @@ public static TheoryData CreateQClaimTheoryDa } } - [Theory, MemberData(nameof(CreateHClaimTheoryData))] + [Theory, MemberData(nameof(CreateHClaimTheoryData), DisableDiscoveryEnumeration = true)] public void CreateHClaim(CreateSignedHttpRequestTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateHClaim", theoryData); @@ -784,7 +784,7 @@ public static TheoryData CreateHClaimTheoryDa } } - [Theory, MemberData(nameof(CreateBClaimTheoryData))] + [Theory, MemberData(nameof(CreateBClaimTheoryData), DisableDiscoveryEnumeration = true)] public void CreateBClaim(CreateSignedHttpRequestTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateBClaim", theoryData); @@ -836,7 +836,7 @@ public static TheoryData CreateBClaimTheoryDa } } - [Theory, MemberData(nameof(CreateCnfClaimTheoryData))] + [Theory, MemberData(nameof(CreateCnfClaimTheoryData), DisableDiscoveryEnumeration = true)] public void CreateCnfClaim(CreateSignedHttpRequestTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateCnfClaim", theoryData); @@ -929,7 +929,7 @@ public static TheoryData CreateCnfClaimTheory } } - [Theory, MemberData(nameof(CreateNonceClaimTheoryData))] + [Theory, MemberData(nameof(CreateNonceClaimTheoryData), DisableDiscoveryEnumeration = true)] public void CreateNonceClaim(CreateSignedHttpRequestTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateNonceClaim", theoryData); @@ -974,7 +974,7 @@ public static TheoryData CreateNonceClaimTheo } } - [Theory, MemberData(nameof(CreateAdditionalClaimTheoryData))] + [Theory, MemberData(nameof(CreateAdditionalClaimTheoryData), DisableDiscoveryEnumeration = true)] public void CreateAdditionalClaim(CreateSignedHttpRequestTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateAdditionalClaim", theoryData); diff --git a/test/Microsoft.IdentityModel.Protocols.SignedHttpRequest.Tests/SignedHttpRequestE2ETests.cs b/test/Microsoft.IdentityModel.Protocols.SignedHttpRequest.Tests/SignedHttpRequestE2ETests.cs index 40ddf556de..356b11ea8d 100644 --- a/test/Microsoft.IdentityModel.Protocols.SignedHttpRequest.Tests/SignedHttpRequestE2ETests.cs +++ b/test/Microsoft.IdentityModel.Protocols.SignedHttpRequest.Tests/SignedHttpRequestE2ETests.cs @@ -28,7 +28,7 @@ public class SignedHttpRequestE2ETests }); - [Theory, MemberData(nameof(RoundtripTheoryData))] + [Theory, MemberData(nameof(RoundtripTheoryData), DisableDiscoveryEnumeration = true)] public async Task Roundtrips(RoundtripSignedHttpRequestTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.Roundtrips", theoryData); diff --git a/test/Microsoft.IdentityModel.Protocols.SignedHttpRequest.Tests/SignedHttpRequestExceptionTests.cs b/test/Microsoft.IdentityModel.Protocols.SignedHttpRequest.Tests/SignedHttpRequestExceptionTests.cs index 31123267b1..b608e30ce6 100644 --- a/test/Microsoft.IdentityModel.Protocols.SignedHttpRequest.Tests/SignedHttpRequestExceptionTests.cs +++ b/test/Microsoft.IdentityModel.Protocols.SignedHttpRequest.Tests/SignedHttpRequestExceptionTests.cs @@ -13,7 +13,7 @@ namespace Microsoft.IdentityModel.Protocols.SignedHttpRequest.Tests { public class SignedHttpRequestExceptionTests { - [Theory, MemberData(nameof(ExceptionTypes))] + [Theory, MemberData(nameof(ExceptionTypes), DisableDiscoveryEnumeration = true)] public void SerializeAndDeserialzeExceptions(SignedHttpExceptionTypeTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.{nameof(SerializeAndDeserialzeExceptions)}", theoryData); diff --git a/test/Microsoft.IdentityModel.Protocols.SignedHttpRequest.Tests/SignedHttpRequestUtilityTests.cs b/test/Microsoft.IdentityModel.Protocols.SignedHttpRequest.Tests/SignedHttpRequestUtilityTests.cs index 79c50066e4..315f71cd83 100644 --- a/test/Microsoft.IdentityModel.Protocols.SignedHttpRequest.Tests/SignedHttpRequestUtilityTests.cs +++ b/test/Microsoft.IdentityModel.Protocols.SignedHttpRequest.Tests/SignedHttpRequestUtilityTests.cs @@ -35,7 +35,7 @@ public void CreateSignedHttpRequestHeader() Assert.Equal("PoP abcd", SignedHttpRequestUtilities.CreateSignedHttpRequestHeader("abcd")); } - [Theory, MemberData(nameof(AppendHeadersTheoryData))] + [Theory, MemberData(nameof(AppendHeadersTheoryData), DisableDiscoveryEnumeration = true)] public void AppendHeaders(SignedHttpRequestUtilityTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.AppendHeaders", theoryData); @@ -58,7 +58,7 @@ public void AppendHeaders(SignedHttpRequestUtilityTheoryData theoryData) TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(CreateJwkClaimTheoryData))] + [Theory, MemberData(nameof(CreateJwkClaimTheoryData), DisableDiscoveryEnumeration = true)] public void CreateJwkClaim(SignedHttpRequestUtilityTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateJwkClaim", theoryData); @@ -257,7 +257,7 @@ public static TheoryData AppendHeadersTheory } } - [Theory, MemberData(nameof(ToHttpRequestDataAsyncTheoryData))] + [Theory, MemberData(nameof(ToHttpRequestDataAsyncTheoryData), DisableDiscoveryEnumeration = true)] public async Task ToHttpRequestDataAsync(SignedHttpRequestUtilityTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ToHttpRequestDataAsync", theoryData); diff --git a/test/Microsoft.IdentityModel.Protocols.SignedHttpRequest.Tests/SignedHttpRequestValidationTests.cs b/test/Microsoft.IdentityModel.Protocols.SignedHttpRequest.Tests/SignedHttpRequestValidationTests.cs index 66c5c5d181..0efecb9bc6 100644 --- a/test/Microsoft.IdentityModel.Protocols.SignedHttpRequest.Tests/SignedHttpRequestValidationTests.cs +++ b/test/Microsoft.IdentityModel.Protocols.SignedHttpRequest.Tests/SignedHttpRequestValidationTests.cs @@ -84,7 +84,7 @@ private string CreateDefaultSHRWithCustomNonce(SignedHttpRequestHandler handler, return handler.CreateSignedHttpRequest(descriptor); } - [Theory, MemberData(nameof(ValidateTsClaimTheoryData))] + [Theory, MemberData(nameof(ValidateTsClaimTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateTsClaim(ValidateSignedHttpRequestTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateTsClaim", theoryData); @@ -142,7 +142,7 @@ public static TheoryData ValidateTsClaimThe } } - [Theory, MemberData(nameof(ValidateMClaimTheoryData))] + [Theory, MemberData(nameof(ValidateMClaimTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateMClaim(ValidateSignedHttpRequestTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateMClaim", theoryData); @@ -224,7 +224,7 @@ public static TheoryData ValidateMClaimTheo } } - [Theory, MemberData(nameof(ValidateUClaimTheoryData))] + [Theory, MemberData(nameof(ValidateUClaimTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateUClaim(ValidateSignedHttpRequestTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateUClaim", theoryData); @@ -318,7 +318,7 @@ public static TheoryData ValidateUClaimTheo } } - [Theory, MemberData(nameof(ValidatePClaimTheoryData))] + [Theory, MemberData(nameof(ValidatePClaimTheoryData), DisableDiscoveryEnumeration = true)] public void ValidatePClaim(ValidateSignedHttpRequestTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidatePClaim", theoryData); @@ -429,7 +429,7 @@ public static TheoryData ValidatePClaimTheo } } - [Theory, MemberData(nameof(ValidateHClaimTheoryData))] + [Theory, MemberData(nameof(ValidateHClaimTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateHClaim(ValidateSignedHttpRequestTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateHClaim", theoryData); @@ -680,7 +680,7 @@ public static TheoryData ValidateHClaimTheo } } - [Theory, MemberData(nameof(ValidateQClaimTheoryData))] + [Theory, MemberData(nameof(ValidateQClaimTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateQClaim(ValidateSignedHttpRequestTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateQClaim", theoryData); @@ -855,7 +855,7 @@ public static TheoryData ValidateQClaimTheo } } - [Theory, MemberData(nameof(ValidateBClaimTheoryData))] + [Theory, MemberData(nameof(ValidateBClaimTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateBClaim(ValidateSignedHttpRequestTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateBClaim", theoryData); @@ -913,7 +913,7 @@ public static TheoryData ValidateBClaimTheo } } - [Theory, MemberData(nameof(ValidateSignedHttpRequestCallsTheoryData))] + [Theory, MemberData(nameof(ValidateSignedHttpRequestCallsTheoryData), DisableDiscoveryEnumeration = true)] public async Task ValidateSignedHttpRequestCalls(ValidateSignedHttpRequestTheoryData theoryData) { var containsClaim = new Func((validationParams, claim) => @@ -1259,7 +1259,7 @@ public static TheoryData ValidateSignedHttp } } - [Theory, MemberData(nameof(ValidateSignedHttpRequestSignatureTheoryData))] + [Theory, MemberData(nameof(ValidateSignedHttpRequestSignatureTheoryData), DisableDiscoveryEnumeration = true)] public async Task ValidateSignedHttpRequestSignature(ValidateSignedHttpRequestTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateSignedHttpRequestSignature", theoryData); @@ -1363,7 +1363,7 @@ public static TheoryData ValidateSignedHttp } } - [Theory, MemberData(nameof(ValidateSignedHttpRequestTheoryData))] + [Theory, MemberData(nameof(ValidateSignedHttpRequestTheoryData), DisableDiscoveryEnumeration = true)] public async Task ValidateSignedHttpRequest(ValidateSignedHttpRequestTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateSignedHttpRequest", theoryData); diff --git a/test/Microsoft.IdentityModel.Protocols.Tests/ExtensibilityTests.cs b/test/Microsoft.IdentityModel.Protocols.Tests/ExtensibilityTests.cs index b9a6d2cc6a..c37f5d04ce 100644 --- a/test/Microsoft.IdentityModel.Protocols.Tests/ExtensibilityTests.cs +++ b/test/Microsoft.IdentityModel.Protocols.Tests/ExtensibilityTests.cs @@ -48,7 +48,7 @@ internal class IssuerMetadata public class ExtensibilityTests { - [Theory, MemberData(nameof(GetMetadataTheoryData))] + [Theory, MemberData(nameof(GetMetadataTheoryData), DisableDiscoveryEnumeration = true)] public async Task GetMetadataTest(DocumentRetrieverTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.GetMetadataTest", theoryData); diff --git a/test/Microsoft.IdentityModel.Protocols.Tests/FileDocumentRetrieverTests.cs b/test/Microsoft.IdentityModel.Protocols.Tests/FileDocumentRetrieverTests.cs index 78aabe7f52..964c0618b3 100644 --- a/test/Microsoft.IdentityModel.Protocols.Tests/FileDocumentRetrieverTests.cs +++ b/test/Microsoft.IdentityModel.Protocols.Tests/FileDocumentRetrieverTests.cs @@ -15,7 +15,7 @@ namespace Microsoft.IdentityModel.Protocols.Tests public class FileDocumentRetrieverTests { - [Theory, MemberData(nameof(GetMetadataTheoryData))] + [Theory, MemberData(nameof(GetMetadataTheoryData), DisableDiscoveryEnumeration = true)] public async Task GetMetadataTest(DocumentRetrieverTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.GetMetadataTest", theoryData); diff --git a/test/Microsoft.IdentityModel.Protocols.Tests/HttpDocumentRetrieverTests.cs b/test/Microsoft.IdentityModel.Protocols.Tests/HttpDocumentRetrieverTests.cs index 379bab4945..76794c7cbe 100644 --- a/test/Microsoft.IdentityModel.Protocols.Tests/HttpDocumentRetrieverTests.cs +++ b/test/Microsoft.IdentityModel.Protocols.Tests/HttpDocumentRetrieverTests.cs @@ -55,7 +55,7 @@ public void GetSets() TestUtilities.AssertFailIfErrors("HttpDocumentRetrieverTests_GetSets", context.Errors); } - [Theory, MemberData(nameof(GetMetadataTheoryData))] + [Theory, MemberData(nameof(GetMetadataTheoryData), DisableDiscoveryEnumeration = true)] public async Task GetMetadataTest(DocumentRetrieverTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.GetMetadataTest", theoryData); diff --git a/test/Microsoft.IdentityModel.Protocols.WsFederation.Tests/WsFederationConfigurationRetrieverTests.cs b/test/Microsoft.IdentityModel.Protocols.WsFederation.Tests/WsFederationConfigurationRetrieverTests.cs index 3c8cee087f..25d28afb1b 100644 --- a/test/Microsoft.IdentityModel.Protocols.WsFederation.Tests/WsFederationConfigurationRetrieverTests.cs +++ b/test/Microsoft.IdentityModel.Protocols.WsFederation.Tests/WsFederationConfigurationRetrieverTests.cs @@ -19,7 +19,7 @@ namespace Microsoft.IdentityModel.Protocols.WsFederation.Tests /// public class WsFederationConfigurationRetrieverTests { - [Theory, MemberData(nameof(ReadMetadataTheoryData))] + [Theory, MemberData(nameof(ReadMetadataTheoryData), DisableDiscoveryEnumeration = true)] public void ReadMetadata(WsFederationMetadataTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReadMetadata", theoryData); @@ -326,7 +326,7 @@ public static TheoryData ReadMetadataTheoryData } } - [Theory, MemberData(nameof(ReadEntityDescriptorTheoryData))] + [Theory, MemberData(nameof(ReadEntityDescriptorTheoryData), DisableDiscoveryEnumeration = true)] public void ReadEntityDescriptor(WsFederationMetadataTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReadEntityDescriptor", theoryData); @@ -366,7 +366,7 @@ public static TheoryData ReadEntityDescriptorThe } } - [Theory, MemberData(nameof(ReadKeyDescriptorForSigningTheoryData))] + [Theory, MemberData(nameof(ReadKeyDescriptorForSigningTheoryData), DisableDiscoveryEnumeration = true)] public void ReadKeyDescriptorForSigning(WsFederationMetadataTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReadKeyDescriptorForSigning", theoryData); @@ -401,7 +401,7 @@ public static TheoryData ReadKeyDescriptorForSig } } - [Theory, MemberData(nameof(ReadKeyDescriptorForSigningKeyUseTheoryData))] + [Theory, MemberData(nameof(ReadKeyDescriptorForSigningKeyUseTheoryData), DisableDiscoveryEnumeration = true)] public void ReadKeyDescriptorForSigningKeyUse(WsFederationMetadataTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReadKeyDescriptorForSigningKeyUse", theoryData); @@ -446,7 +446,7 @@ public static TheoryData ReadKeyDescriptorForSig } } - [Theory, MemberData(nameof(ReadSecurityTokenServiceTypeRoleDescriptorTheoryData))] + [Theory, MemberData(nameof(ReadSecurityTokenServiceTypeRoleDescriptorTheoryData), DisableDiscoveryEnumeration = true)] public void ReadSecurityTokenServiceTypeRoleDescriptor(WsFederationMetadataTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReadSecurityTokenServiceTypeRoleDescriptor", theoryData); @@ -486,7 +486,7 @@ public static TheoryData ReadSecurityTokenServic } } - [Theory, MemberData(nameof(ReadSecurityTokenEndpointTheoryData))] + [Theory, MemberData(nameof(ReadSecurityTokenEndpointTheoryData), DisableDiscoveryEnumeration = true)] public void ReadSecurityTokenEndpoint(WsFederationMetadataTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReadSecurityTokenEndpoint", theoryData); @@ -539,7 +539,7 @@ public static TheoryData ReadSecurityTokenEndpoi } } - [Theory, MemberData(nameof(WriteMetadataTheoryData))] + [Theory, MemberData(nameof(WriteMetadataTheoryData), DisableDiscoveryEnumeration = true)] public void WriteMetadata(WsFederationMetadataTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.WriteMetadata", theoryData); diff --git a/test/Microsoft.IdentityModel.Protocols.WsFederation.Tests/WsFederationConfigurationValidatorTests.cs b/test/Microsoft.IdentityModel.Protocols.WsFederation.Tests/WsFederationConfigurationValidatorTests.cs index 53218a036f..03ae7bbb52 100644 --- a/test/Microsoft.IdentityModel.Protocols.WsFederation.Tests/WsFederationConfigurationValidatorTests.cs +++ b/test/Microsoft.IdentityModel.Protocols.WsFederation.Tests/WsFederationConfigurationValidatorTests.cs @@ -16,7 +16,7 @@ namespace Microsoft.IdentityModel.Protocols.WsFederation.Tests /// public class WsFederationConfigurationValidatorTests { - [Theory, MemberData(nameof(ValidateConfigurationTheoryData))] + [Theory, MemberData(nameof(ValidateConfigurationTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateConfiguration(WsFederationConfigurationTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateConfiguration", theoryData); diff --git a/test/Microsoft.IdentityModel.Protocols.WsFederation.Tests/WsFederationMessageTests.cs b/test/Microsoft.IdentityModel.Protocols.WsFederation.Tests/WsFederationMessageTests.cs index 339ef20337..6a4bdb4771 100644 --- a/test/Microsoft.IdentityModel.Protocols.WsFederation.Tests/WsFederationMessageTests.cs +++ b/test/Microsoft.IdentityModel.Protocols.WsFederation.Tests/WsFederationMessageTests.cs @@ -56,7 +56,7 @@ public void GetSets() TestUtilities.AssertFailIfErrors($"{this}.GetSets", context.Errors); } - [Theory, MemberData(nameof(MessageTheoryData))] + [Theory, MemberData(nameof(MessageTheoryData), DisableDiscoveryEnumeration = true)] public void ConstructorTest(WsFederationMessageTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ConstructorTest", theoryData); @@ -89,7 +89,7 @@ public void ConstructorTest(WsFederationMessageTheoryData theoryData) } } - [Theory, MemberData(nameof(WaSignInTheoryData))] + [Theory, MemberData(nameof(WaSignInTheoryData), DisableDiscoveryEnumeration = true)] public void WaSignIn(WsFederationSigninMessageTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.WaSignIn", theoryData); @@ -275,7 +275,7 @@ private static Saml2SecurityToken CreateSaml2Token(IList claims) } - [Theory, MemberData(nameof(GetTokenTheoryData))] + [Theory, MemberData(nameof(GetTokenTheoryData), DisableDiscoveryEnumeration = true)] public void GetTokenTest(WsFederationMessageTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.GetTokenTest", theoryData); @@ -381,7 +381,7 @@ public static TheoryData GetTokenTheoryData } } - [Theory, MemberData(nameof(GetTokenParsingStringData))] + [Theory, MemberData(nameof(GetTokenParsingStringData), DisableDiscoveryEnumeration = true)] public void GetTokenParsingString(WsFederationMessageTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.GetTokenParsingString", theoryData); @@ -507,7 +507,7 @@ public static TheoryData GetTokenParsingStringDat } } - [Theory, MemberData(nameof(GetTokenAspWsFedHandlerTestTheoryData))] + [Theory, MemberData(nameof(GetTokenAspWsFedHandlerTestTheoryData), DisableDiscoveryEnumeration = true)] public void GetTokenAspWsFedHandlerTest(WsFederationMessageTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.GetTokenAspWsFedHandlerTest", theoryData); @@ -546,7 +546,7 @@ public static TheoryData GetTokenAspWsFedHandlerT } } - [Theory, MemberData(nameof(GetTokenNegativeTestTheoryData))] + [Theory, MemberData(nameof(GetTokenNegativeTestTheoryData), DisableDiscoveryEnumeration = true)] public void GetTokenNegativeTest(WsFederationMessageTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.GetTokenNegativeTest", theoryData); @@ -634,7 +634,7 @@ public static TheoryData GetTokenNegativeTestTheo } } - [Theory, MemberData(nameof(MessageTheoryData))] + [Theory, MemberData(nameof(MessageTheoryData), DisableDiscoveryEnumeration = true)] public void ParametersTest(WsFederationMessageTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ParametersTest", theoryData); @@ -713,7 +713,7 @@ public static TheoryData MessageTheoryData } } - [Theory, MemberData(nameof(QueryStringTheoryData))] + [Theory, MemberData(nameof(QueryStringTheoryData), DisableDiscoveryEnumeration = true)] public void QueryStringTest(WsFederationMessageTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.QueryStringTest", theoryData); diff --git a/test/Microsoft.IdentityModel.TestUtils/TestStub.cs b/test/Microsoft.IdentityModel.TestUtils/TestStub.cs index 811def29eb..14aeeb180b 100644 --- a/test/Microsoft.IdentityModel.TestUtils/TestStub.cs +++ b/test/Microsoft.IdentityModel.TestUtils/TestStub.cs @@ -13,7 +13,7 @@ namespace Microsoft.IdentityModel.TestUtils /// public class TestStubTests { - [Theory, MemberData(nameof(TestStubTheoryData))] + [Theory, MemberData(nameof(TestStubTheoryData), DisableDiscoveryEnumeration = true)] public void TestStubTest1(TestStubTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.TestStubTest1", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Saml.Tests/RoundTripSamlTokenTests.cs b/test/Microsoft.IdentityModel.Tokens.Saml.Tests/RoundTripSamlTokenTests.cs index 7f4e7587bf..4fc0bfb659 100644 --- a/test/Microsoft.IdentityModel.Tokens.Saml.Tests/RoundTripSamlTokenTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Saml.Tests/RoundTripSamlTokenTests.cs @@ -18,7 +18,7 @@ namespace Microsoft.IdentityModel.Tokens.Saml.Tests public class RoundTripSamlTokenTests { - [Theory, MemberData(nameof(RoundTripTokenTheoryData))] + [Theory, MemberData(nameof(RoundTripTokenTheoryData), DisableDiscoveryEnumeration = true)] public void RoundTripTokens(SamlRoundTripTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.RoundTripTokens", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Saml.Tests/Saml2SecurityTokenHandlerTests.cs b/test/Microsoft.IdentityModel.Tokens.Saml.Tests/Saml2SecurityTokenHandlerTests.cs index 5592563962..6cb2ad5c94 100644 --- a/test/Microsoft.IdentityModel.Tokens.Saml.Tests/Saml2SecurityTokenHandlerTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Saml.Tests/Saml2SecurityTokenHandlerTests.cs @@ -54,7 +54,7 @@ public void GetSets() TestUtilities.AssertFailIfErrors("Saml2SecurityTokenHandlerTests_GetSets", context.Errors); } - [Theory, MemberData(nameof(CanReadTokenTheoryData))] + [Theory, MemberData(nameof(CanReadTokenTheoryData), DisableDiscoveryEnumeration = true)] public void CanReadToken(Saml2TheoryData theoryData) { TestUtilities.WriteHeader($"{this}.CanReadToken", theoryData); @@ -111,7 +111,7 @@ public static TheoryData CanReadTokenTheoryData }; } - [Theory, MemberData(nameof(ConsolidateAttributesTheoryData))] + [Theory, MemberData(nameof(ConsolidateAttributesTheoryData), DisableDiscoveryEnumeration = true)] public void ConsolidateAttributes(Saml2TheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ConsolidateAttributes", theoryData); @@ -233,7 +233,7 @@ public static bool AreSaml2AttributesEqual(Saml2Attribute attribute1, Saml2Attri return context.Merge(localContext); } - [Theory, MemberData(nameof(ReadTokenTheoryData))] + [Theory, MemberData(nameof(ReadTokenTheoryData), DisableDiscoveryEnumeration = true)] public void ReadToken(Saml2TheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ReadToken", theoryData); @@ -287,7 +287,7 @@ public static TheoryData ReadTokenTheoryData } } - [Theory, MemberData(nameof(RoundTripActorTheoryData))] + [Theory, MemberData(nameof(RoundTripActorTheoryData), DisableDiscoveryEnumeration = true)] public void RoundTripActor(Saml2TheoryData theoryData) { TestUtilities.WriteHeader($"{this}.RoundTripActor", theoryData); @@ -297,7 +297,7 @@ public void RoundTripActor(Saml2TheoryData theoryData) var actor = handler.CreateActorStringPublic(theoryData.TokenDescriptor.Subject); } - [Theory, MemberData(nameof(WriteTokenTheoryData))] + [Theory, MemberData(nameof(WriteTokenTheoryData), DisableDiscoveryEnumeration = true)] public void WriteToken(Saml2TheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.WriteToken", theoryData); @@ -497,7 +497,7 @@ public void SetDefaultTimesOnTokenCreation() Assert.NotEqual(DateTime.MinValue, saml2SecurityToken.ValidTo); } - [Theory, MemberData(nameof(ValidateAudienceTheoryData))] + [Theory, MemberData(nameof(ValidateAudienceTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateAudience(Saml2TheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ValidateAudience", theoryData); @@ -533,7 +533,7 @@ public static TheoryData ValidateAudienceTheoryData } } - [Theory, MemberData(nameof(ValidateIssuerTheoryData))] + [Theory, MemberData(nameof(ValidateIssuerTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateIssuer(Saml2TheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ValidateIssuer", theoryData); @@ -569,7 +569,7 @@ public static TheoryData ValidateIssuerTheoryData } } - [Theory, MemberData(nameof(ValidateTokenTheoryData))] + [Theory, MemberData(nameof(ValidateTokenTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateToken(Saml2TheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ValidateToken", theoryData); @@ -1083,7 +1083,7 @@ public static TheoryData ValidateTokenTheoryData } } - [Theory, MemberData(nameof(CreateSaml2TokenUsingTokenDescriptorTheoryData))] + [Theory, MemberData(nameof(CreateSaml2TokenUsingTokenDescriptorTheoryData), DisableDiscoveryEnumeration = true)] public void CreateSaml2TokenUsingTokenDescriptor(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateSaml2TokenUsingTokenDescriptor", theoryData); @@ -1344,7 +1344,7 @@ public static TheoryData CreateSaml2TokenUsingTokenDescri } } - [Theory, MemberData(nameof(CreateValidateActorClaimProcessing))] + [Theory, MemberData(nameof(CreateValidateActorClaimProcessing), DisableDiscoveryEnumeration = true)] public void ValidateActorClaimProcessing(Saml2TheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateActorClaimProcessing", theoryData); @@ -1388,7 +1388,7 @@ public static TheoryData CreateValidateActorClaimProcessing } } - [Theory, MemberData(nameof(SecurityKeyNotFoundExceptionTestTheoryData))] + [Theory, MemberData(nameof(SecurityKeyNotFoundExceptionTestTheoryData), DisableDiscoveryEnumeration = true)] public void Saml2SecurityKeyNotFoundExceptionTest(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.SecurityKeyNotFoundExceptionTest", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Saml.Tests/Saml2SerializerTests.cs b/test/Microsoft.IdentityModel.Tokens.Saml.Tests/Saml2SerializerTests.cs index 17751662ca..47da4c6bba 100644 --- a/test/Microsoft.IdentityModel.Tokens.Saml.Tests/Saml2SerializerTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Saml.Tests/Saml2SerializerTests.cs @@ -17,7 +17,7 @@ namespace Microsoft.IdentityModel.Tokens.Saml2.Tests public class Saml2SerializerTests { #region Saml2Action - [Theory, MemberData(nameof(ReadActionTheoryData))] + [Theory, MemberData(nameof(ReadActionTheoryData), DisableDiscoveryEnumeration = true)] public void ReadAction(Saml2TheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReadAction", theoryData); @@ -58,7 +58,7 @@ public static TheoryData ReadActionTheoryData #endregion #region Saml2Advice - [Theory, MemberData(nameof(ReadAdviceTheoryData))] + [Theory, MemberData(nameof(ReadAdviceTheoryData), DisableDiscoveryEnumeration = true)] public void ReadAdvice(Saml2TheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ReadAdvice", theoryData); @@ -99,7 +99,7 @@ public static TheoryData ReadAdviceTheoryData #endregion #region Saml2Assertion - [Theory, MemberData(nameof(ReadAssertionTheoryData))] + [Theory, MemberData(nameof(ReadAssertionTheoryData), DisableDiscoveryEnumeration = true)] public void ReadAssertion(Saml2TheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReadAssertion", theoryData); @@ -119,7 +119,7 @@ public void ReadAssertion(Saml2TheoryData theoryData) TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(ReadAssertionTheoryData))] + [Theory, MemberData(nameof(ReadAssertionTheoryData), DisableDiscoveryEnumeration = true)] public void ReadAssertionUsingDictionaryReader(Saml2TheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReadAssertionUsingDictionaryReader", theoryData); @@ -139,7 +139,7 @@ public void ReadAssertionUsingDictionaryReader(Saml2TheoryData theoryData) TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(ReadAssertionTheoryData))] + [Theory, MemberData(nameof(ReadAssertionTheoryData), DisableDiscoveryEnumeration = true)] public void ReadAssertionUsingXDocumentReader(Saml2TheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReadAssertionUsingXDocumentReader", theoryData); @@ -180,7 +180,7 @@ public static TheoryData ReadAssertionTheoryData #endregion #region Saml2Attribute - [Theory, MemberData(nameof(ReadAttributeTheoryData))] + [Theory, MemberData(nameof(ReadAttributeTheoryData), DisableDiscoveryEnumeration = true)] public void ReadAttribute(Saml2TheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReadAttribute", theoryData); @@ -220,7 +220,7 @@ public static TheoryData ReadAttributeTheoryData #endregion #region Saml2AttributeStatement - [Theory, MemberData(nameof(ReadAttributeStatementTheoryData))] + [Theory, MemberData(nameof(ReadAttributeStatementTheoryData), DisableDiscoveryEnumeration = true)] public void ReadAttributeStatement(Saml2TheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ReadAttributeStatement", theoryData); @@ -262,7 +262,7 @@ public static TheoryData ReadAttributeStatementTheoryData #endregion #region Saml2AudienceRestrictionCondition - [Theory, MemberData(nameof(ReadAudienceRestrictionConditionTheoryData))] + [Theory, MemberData(nameof(ReadAudienceRestrictionConditionTheoryData), DisableDiscoveryEnumeration = true)] public void ReadAudienceRestriction(Saml2TheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ReadAudienceRestriction", theoryData); @@ -304,7 +304,7 @@ public static TheoryData ReadAudienceRestrictionConditionTheory #endregion #region Saml2AuthenticationStatement - [Theory, MemberData(nameof(ReadAuthenticationStatementTheoryData))] + [Theory, MemberData(nameof(ReadAuthenticationStatementTheoryData), DisableDiscoveryEnumeration = true)] public void ReadAuthenticationStatement(Saml2TheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ReadAuthenticationStatement", theoryData); @@ -345,7 +345,7 @@ public static TheoryData ReadAuthenticationStatementTheoryData #endregion #region Saml2AuthorizationDecisionStatement - [Theory, MemberData(nameof(ReadAuthorizationDecisionStatementTheoryData))] + [Theory, MemberData(nameof(ReadAuthorizationDecisionStatementTheoryData), DisableDiscoveryEnumeration = true)] public void ReadAuthorizationDecisionStatement(Saml2TheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ReadAuthorizationDecisionStatement", theoryData); @@ -387,7 +387,7 @@ public static TheoryData ReadAuthorizationDecisionStatementTheo #endregion #region Saml2Conditions - [Theory, MemberData(nameof(ReadConditionsTheoryData))] + [Theory, MemberData(nameof(ReadConditionsTheoryData), DisableDiscoveryEnumeration = true)] public void ReadConditions(Saml2TheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ReadConditions", theoryData); @@ -432,7 +432,7 @@ public static TheoryData ReadConditionsTheoryData #endregion #region SamlEvidence - [Theory, MemberData(nameof(ReadEvidenceTheoryData))] + [Theory, MemberData(nameof(ReadEvidenceTheoryData), DisableDiscoveryEnumeration = true)] public void ReadEvidence(Saml2TheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ReadEvidence", theoryData); @@ -473,7 +473,7 @@ public static TheoryData ReadEvidenceTheoryData #region Saml2ProxyRestriction - [Theory, MemberData(nameof(WriteSaml2ProxyRestrictionTheoryData))] + [Theory, MemberData(nameof(WriteSaml2ProxyRestrictionTheoryData), DisableDiscoveryEnumeration = true)] public void WriteSaml2ProxyRestriction(Saml2TheoryData theoryData) { TestUtilities.WriteHeader($"{this}.WriteSaml2ProxyRestriction", theoryData); @@ -521,7 +521,7 @@ public static TheoryData WriteSaml2ProxyRestrictionTheoryData #endregion #region Saml2Subject - [Theory, MemberData(nameof(ReadSubjectTheoryData))] + [Theory, MemberData(nameof(ReadSubjectTheoryData), DisableDiscoveryEnumeration = true)] public void ReadSubject(Saml2TheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ReadSubject", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Saml.Tests/SamlSecurityTokenHandlerTests.cs b/test/Microsoft.IdentityModel.Tokens.Saml.Tests/SamlSecurityTokenHandlerTests.cs index bdc24a5472..3ee02af2e3 100644 --- a/test/Microsoft.IdentityModel.Tokens.Saml.Tests/SamlSecurityTokenHandlerTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Saml.Tests/SamlSecurityTokenHandlerTests.cs @@ -63,7 +63,7 @@ public void GetSets() } - [Theory, MemberData(nameof(CanReadTokenTheoryData))] + [Theory, MemberData(nameof(CanReadTokenTheoryData), DisableDiscoveryEnumeration = true)] public void CanReadToken(SamlTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CanReadToken", theoryData); @@ -116,7 +116,7 @@ public static TheoryData CanReadTokenTheoryData } } - [Theory, MemberData(nameof(CreateClaimsIdentitiesTheoryData))] + [Theory, MemberData(nameof(CreateClaimsIdentitiesTheoryData), DisableDiscoveryEnumeration = true)] public void CreateClaimsIdentities(SamlTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.CreateClaimsIdentities", theoryData); @@ -173,7 +173,7 @@ public static TheoryData CreateClaimsIdentitiesTheoryData } } - [Theory, MemberData(nameof(ReadTokenTheoryData))] + [Theory, MemberData(nameof(ReadTokenTheoryData), DisableDiscoveryEnumeration = true)] public void ReadToken(SamlTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReadToken", theoryData); @@ -236,7 +236,7 @@ public void SetDefaultTimesOnTokenCreation() Assert.NotEqual(DateTime.MinValue, samlSecurityToken.ValidTo); } - [Theory, MemberData(nameof(ValidateAudienceTheoryData))] + [Theory, MemberData(nameof(ValidateAudienceTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateAudience(SamlTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateAudience", theoryData); @@ -271,7 +271,7 @@ public static TheoryData ValidateAudienceTheoryData } } - [Theory, MemberData(nameof(ValidateIssuerTheoryData))] + [Theory, MemberData(nameof(ValidateIssuerTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateIssuer(SamlTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateIssuer", theoryData); @@ -306,7 +306,7 @@ public static TheoryData ValidateIssuerTheoryData } } - [Theory, MemberData(nameof(ValidateTokenTheoryData))] + [Theory, MemberData(nameof(ValidateTokenTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateToken(SamlTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateToken", theoryData); @@ -323,7 +323,7 @@ public void ValidateToken(SamlTheoryData theoryData) TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(ValidateTokenTheoryData))] + [Theory, MemberData(nameof(ValidateTokenTheoryData), DisableDiscoveryEnumeration = true)] public async Task ValidateTokenAsync(SamlTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateToken", theoryData); @@ -836,7 +836,7 @@ public static TheoryData ValidateTokenTheoryData } } - [Theory, MemberData(nameof(WriteTokenTheoryData))] + [Theory, MemberData(nameof(WriteTokenTheoryData), DisableDiscoveryEnumeration = true)] public void WriteToken(SamlTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.WriteToken", theoryData); @@ -1012,7 +1012,7 @@ public static TheoryData WriteTokenTheoryData } } - [Theory, MemberData(nameof(WriteTokenXmlTheoryData))] + [Theory, MemberData(nameof(WriteTokenXmlTheoryData), DisableDiscoveryEnumeration = true)] public void WriteTokenXml(SamlTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.WriteTokenXml", theoryData); @@ -1068,7 +1068,7 @@ public static TheoryData WriteTokenXmlTheoryData } } - [Theory, MemberData(nameof(CreateSamlTokenUsingTokenDescriptorTheoryData))] + [Theory, MemberData(nameof(CreateSamlTokenUsingTokenDescriptorTheoryData), DisableDiscoveryEnumeration = true)] public void CreateSamlTokenUsingTokenDescriptor(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateSamlTokenUsingTokenDescriptor", theoryData); @@ -1345,7 +1345,7 @@ public static TheoryData CreateSamlTokenUsingTokenDescrip } } - [Theory, MemberData(nameof(SecurityKeyNotFoundExceptionTestTheoryData))] + [Theory, MemberData(nameof(SecurityKeyNotFoundExceptionTestTheoryData), DisableDiscoveryEnumeration = true)] public void SamlSecurityKeyNotFoundExceptionTest(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.SecurityKeyNotFoundExceptionTest", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Saml.Tests/SamlSecurityTokenReadTest.cs b/test/Microsoft.IdentityModel.Tokens.Saml.Tests/SamlSecurityTokenReadTest.cs index fe94c9a03c..ce3fd97fb2 100644 --- a/test/Microsoft.IdentityModel.Tokens.Saml.Tests/SamlSecurityTokenReadTest.cs +++ b/test/Microsoft.IdentityModel.Tokens.Saml.Tests/SamlSecurityTokenReadTest.cs @@ -14,7 +14,7 @@ namespace Microsoft.IdentityModel.Tokens.Saml.Tests { public class SamlSecurityTokenReadTest { - [Theory, MemberData(nameof(SamlReadFromTheoryData))] + [Theory, MemberData(nameof(SamlReadFromTheoryData), DisableDiscoveryEnumeration = true)] public void SamlSecurityTokenReadFrom(SamlTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.SamlSecurityTokenReadFrom", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Saml.Tests/SamlSerializerTests.cs b/test/Microsoft.IdentityModel.Tokens.Saml.Tests/SamlSerializerTests.cs index b402fedb76..1af7b6d9f5 100644 --- a/test/Microsoft.IdentityModel.Tokens.Saml.Tests/SamlSerializerTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Saml.Tests/SamlSerializerTests.cs @@ -17,7 +17,7 @@ namespace Microsoft.IdentityModel.Tokens.Saml.Tests public class SamlSerializerTests { #region SamlAction - [Theory, MemberData(nameof(ReadActionTheoryData))] + [Theory, MemberData(nameof(ReadActionTheoryData), DisableDiscoveryEnumeration = true)] public void ReadAction(SamlTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReadAction", theoryData); @@ -96,7 +96,7 @@ public static TheoryData ReadActionTheoryData #endregion #region SamlAdvice - [Theory, MemberData(nameof(ReadAdviceTheoryData))] + [Theory, MemberData(nameof(ReadAdviceTheoryData), DisableDiscoveryEnumeration = true)] public void ReadAdvice(SamlTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ReadAdvice", theoryData); @@ -161,7 +161,7 @@ public static TheoryData ReadAdviceTheoryData #endregion #region SamlAssertion - [Theory, MemberData(nameof(ReadAssertionTheoryData))] + [Theory, MemberData(nameof(ReadAssertionTheoryData), DisableDiscoveryEnumeration = true)] public void ReadAssertion(SamlTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReadAssertion", theoryData); @@ -182,7 +182,7 @@ public void ReadAssertion(SamlTheoryData theoryData) TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(ReadAssertionTheoryData))] + [Theory, MemberData(nameof(ReadAssertionTheoryData), DisableDiscoveryEnumeration = true)] public void ReadAssertionUsingDictionaryReader(SamlTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReadAssertionUsingDictionaryReader", theoryData); @@ -203,7 +203,7 @@ public void ReadAssertionUsingDictionaryReader(SamlTheoryData theoryData) TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(ReadAssertionTheoryData))] + [Theory, MemberData(nameof(ReadAssertionTheoryData), DisableDiscoveryEnumeration = true)] public void ReadAssertionUsingXDocumentReader(SamlTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReadAssertionUsingXDocumentReader", theoryData); @@ -348,7 +348,7 @@ public static TheoryData ReadAssertionTheoryData } } - [Theory, MemberData(nameof(WriteAssertionTheoryData))] + [Theory, MemberData(nameof(WriteAssertionTheoryData), DisableDiscoveryEnumeration = true)] public void WriteAssertion(SamlTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.WriteToken", theoryData); @@ -413,7 +413,7 @@ public static TheoryData WriteAssertionTheoryData #endregion #region SamlAttribute - [Theory, MemberData(nameof(ReadAttributeTheoryData))] + [Theory, MemberData(nameof(ReadAttributeTheoryData), DisableDiscoveryEnumeration = true)] public void ReadAttribute(SamlTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReadAttribute", theoryData); @@ -498,7 +498,7 @@ public static TheoryData ReadAttributeTheoryData #endregion #region SamlAttributeStatement - [Theory, MemberData(nameof(ReadAttributeStatementTheoryData))] + [Theory, MemberData(nameof(ReadAttributeStatementTheoryData), DisableDiscoveryEnumeration = true)] public void ReadAttributeStatement(SamlTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ReadAttributeStatement", theoryData); @@ -558,7 +558,7 @@ public static TheoryData ReadAttributeStatementTheoryData #endregion #region SamlAudienceRestrictionCondition - [Theory, MemberData(nameof(ReadAudienceRestrictionConditionTheoryData))] + [Theory, MemberData(nameof(ReadAudienceRestrictionConditionTheoryData), DisableDiscoveryEnumeration = true)] public void ReadAudienceRestrictionCondition(SamlTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ReadAudienceRestrictionCondition", theoryData); @@ -625,7 +625,7 @@ public static TheoryData ReadAudienceRestrictionConditionTheoryD #endregion #region SamlAuthenticationStatement - [Theory, MemberData(nameof(ReadAuthenticationStatementTheoryData))] + [Theory, MemberData(nameof(ReadAuthenticationStatementTheoryData), DisableDiscoveryEnumeration = true)] public void ReadAuthenticationStatement(SamlTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ReadAuthenticationStatement", theoryData); @@ -744,7 +744,7 @@ public static TheoryData ReadAuthenticationStatementTheoryData #endregion #region SamlAuthorizationDecisionStatement - [Theory, MemberData(nameof(ReadAuthorizationDecisionStatementTheoryData))] + [Theory, MemberData(nameof(ReadAuthorizationDecisionStatementTheoryData), DisableDiscoveryEnumeration = true)] public void ReadAuthorizationDecisionStatement(SamlTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ReadAuthorizationDecisionStatement", theoryData); @@ -844,7 +844,7 @@ public static TheoryData ReadAuthorizationDecisionStatementTheor #endregion #region SamlConditions - [Theory, MemberData(nameof(ReadConditionsTheoryData))] + [Theory, MemberData(nameof(ReadConditionsTheoryData), DisableDiscoveryEnumeration = true)] public void ReadConditions(SamlTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ReadConditions", theoryData); @@ -914,7 +914,7 @@ public static TheoryData ReadConditionsTheoryData #endregion #region SamlEvidence - [Theory, MemberData(nameof(ReadEvidenceTheoryData))] + [Theory, MemberData(nameof(ReadEvidenceTheoryData), DisableDiscoveryEnumeration = true)] public void ReadEvidence(SamlTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ReadEvidence", theoryData); @@ -987,7 +987,7 @@ public static TheoryData ReadEvidenceTheoryData #endregion #region SamlSubject - [Theory, MemberData(nameof(ReadSubjectTheoryData))] + [Theory, MemberData(nameof(ReadSubjectTheoryData), DisableDiscoveryEnumeration = true)] public void ReadSubject(SamlTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ReadSubject", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/AsymmetricAdapterTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/AsymmetricAdapterTests.cs index fd7c37f0e3..d0a157c6d7 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/AsymmetricAdapterTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/AsymmetricAdapterTests.cs @@ -14,7 +14,7 @@ namespace Microsoft.IdentityModel.Tokens.Tests { public class AsymmetricAdapterTests { - [Theory, MemberData(nameof(AsymmetricAdapterUsageTestCases))] + [Theory, MemberData(nameof(AsymmetricAdapterUsageTestCases), DisableDiscoveryEnumeration = true)] public void AsymmetricAdapterUsageTests(AsymmetricAdapterTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.AsymmetricAdapterUsageTests", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/AsymmetricSignatureTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/AsymmetricSignatureTests.cs index 18f25331df..1d1331b22d 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/AsymmetricSignatureTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/AsymmetricSignatureTests.cs @@ -51,7 +51,7 @@ public void UnsupportedRSATypes() TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(SignVerifyTheoryData))] + [Theory, MemberData(nameof(SignVerifyTheoryData), DisableDiscoveryEnumeration = true)] public void SignVerify(SignatureProviderTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.SignVerify", theoryData); @@ -273,7 +273,7 @@ public static TheoryData SignVerifyTheoryData } } - [Theory, MemberData(nameof(ValidateAsymmetricKeySizeTheoryData))] + [Theory, MemberData(nameof(ValidateAsymmetricKeySizeTheoryData), DisableDiscoveryEnumeration = true)] public void VerifyAsymmetricKeySize(AsymmetricSignatureProviderTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.VerifyAsymmetricKeySize", theoryData); @@ -376,7 +376,7 @@ public static TheoryData ValidateAsymmetr /// This test ensures that if every algorithm in SupportedAlgorithms has a value in our maps that validate key sizes /// /// - [Theory, MemberData(nameof(VerifyAlgorithmsInDefaultMinimumAsymmetricKeySizeTests))] + [Theory, MemberData(nameof(VerifyAlgorithmsInDefaultMinimumAsymmetricKeySizeTests), DisableDiscoveryEnumeration = true)] public void VerifyAlgorithmsInDefaultMinimumAsymmetricKeySize(AsymmetricSignatureProviderTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.VerifyAlgorithmsInDefaultMinimumAsymmetricKeySize", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/AuthenticatedEncryptionProviderExtensibilityTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/AuthenticatedEncryptionProviderExtensibilityTests.cs index 80f03dcbcd..d93a2ff2ca 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/AuthenticatedEncryptionProviderExtensibilityTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/AuthenticatedEncryptionProviderExtensibilityTests.cs @@ -43,7 +43,7 @@ public void EncryptVirtual() Assert.True(provider.EncryptCalled); } - [Theory, MemberData(nameof(GetKeyBytesTheoryData))] + [Theory, MemberData(nameof(GetKeyBytesTheoryData), DisableDiscoveryEnumeration = true)] public void GetKeyBytes(AuthenticatedEncryptionTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.GetKeyBytes", theoryData); @@ -97,7 +97,7 @@ public static TheoryData GetKeyBytesTheoryDat }; } - [Theory, MemberData(nameof(IsSupportedAlgorithmTheoryData))] + [Theory, MemberData(nameof(IsSupportedAlgorithmTheoryData), DisableDiscoveryEnumeration = true)] public void IsSupportedAlgorithm(AuthenticatedEncryptionTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.IsSupportedAlgorithm", theoryData); @@ -156,7 +156,7 @@ public static TheoryData IsSupportedAlgorithm }; } - [Theory, MemberData(nameof(ValidateKeySizeTheoryData))] + [Theory, MemberData(nameof(ValidateKeySizeTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateKeySize(AuthenticatedEncryptionTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateKeySize", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/AuthenticatedEncryptionProviderTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/AuthenticatedEncryptionProviderTests.cs index 62b02bc8d7..afc42a9267 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/AuthenticatedEncryptionProviderTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/AuthenticatedEncryptionProviderTests.cs @@ -108,7 +108,7 @@ public void AesGcm_Dispose() } #endif - [Theory, MemberData(nameof(AEPConstructorTheoryData))] + [Theory, MemberData(nameof(AEPConstructorTheoryData), DisableDiscoveryEnumeration = true)] public void Constructors(string testId, SecurityKey key, string algorithm, ExpectedException ee) { TestUtilities.WriteHeader("Constructors - " + testId, true); @@ -161,7 +161,7 @@ public static TheoryData AEPCons return theoryData; } - [Theory, MemberData(nameof(DecryptTheoryData))] + [Theory, MemberData(nameof(DecryptTheoryData), DisableDiscoveryEnumeration = true)] public void Decrypt(AuthenticatedEncryptionTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.Decrypt", theoryData); @@ -284,7 +284,7 @@ private static void AddDecryptParameterCheckTheoryData(string testId, byte[] aut }); } - [Theory, MemberData(nameof(DecryptMismatchTheoryData))] + [Theory, MemberData(nameof(DecryptMismatchTheoryData), DisableDiscoveryEnumeration = true)] public void DecryptMismatch(AuthenticatedEncryptionTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.DecryptMismatch", theoryData); @@ -391,7 +391,7 @@ private static void AddDecryptMismatchTheoryData( }); } - [Theory, MemberData(nameof(DisposeTheoryData))] + [Theory, MemberData(nameof(DisposeTheoryData), DisableDiscoveryEnumeration = true)] public void Dispose(AuthenticatedEncryptionTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.Dispose", theoryData); @@ -639,7 +639,7 @@ public static TheoryData DisposeTheoryData() } #endregion - [Theory, MemberData(nameof(EncryptDecryptTheoryData))] + [Theory, MemberData(nameof(EncryptDecryptTheoryData), DisableDiscoveryEnumeration = true)] public void EncryptDecrypt(AuthenticatedEncryptionTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.EncryptDecrypt", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/BaseConfigurationComparerTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/BaseConfigurationComparerTests.cs index 5139df5dae..73aaab5c03 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/BaseConfigurationComparerTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/BaseConfigurationComparerTests.cs @@ -9,7 +9,7 @@ namespace Microsoft.IdentityModel.Tokens.Tests { public class BaseConfigurationComparerTests { - [Theory, MemberData(nameof(ComparerTheoryData))] + [Theory, MemberData(nameof(ComparerTheoryData), DisableDiscoveryEnumeration = true)] public void Compare(BaseConfigurationComparerTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.Compare", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/CallContextTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/CallContextTests.cs index d874147046..65ee3f7cda 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/CallContextTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/CallContextTests.cs @@ -12,7 +12,7 @@ namespace Microsoft.IdentityModel.Tokens.Tests { public class CallContextTests { - [Theory, MemberData(nameof(CallContextTestTheoryData))] + [Theory, MemberData(nameof(CallContextTestTheoryData), DisableDiscoveryEnumeration = true)] public void LoggerInstanceTests(CallContextTheoryData theoryData) { var context = new CallContext(theoryData.ActivityId) { DebugId = theoryData.TestId }; diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/CaseSensitiveClaimsIdentityTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/CaseSensitiveClaimsIdentityTests.cs index 8cd3b1e84d..8d93bb3651 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/CaseSensitiveClaimsIdentityTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/CaseSensitiveClaimsIdentityTests.cs @@ -25,7 +25,7 @@ public class CaseSensitiveClaimsIdentityTests [JwtRegisteredClaimNames.Aud] = Default.Audience, }; - [Theory, MemberData(nameof(GetCaseSensitiveClaimsIdentityTheoryData))] + [Theory, MemberData(nameof(GetCaseSensitiveClaimsIdentityTheoryData), DisableDiscoveryEnumeration = true)] public void FindAll_DoesCaseSensitiveSearch(CaseSensitiveClaimsIdentityTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.FindAll_DoesCaseSensitiveSearch", theoryData); @@ -45,7 +45,7 @@ public void FindAll_DoesCaseSensitiveSearch(CaseSensitiveClaimsIdentityTheoryDat TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(GetCaseSensitiveClaimsIdentityTheoryData))] + [Theory, MemberData(nameof(GetCaseSensitiveClaimsIdentityTheoryData), DisableDiscoveryEnumeration = true)] public void FindFirst_DoesCaseSensitiveSearch(CaseSensitiveClaimsIdentityTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.FindFirst_DoesCaseSensitiveSearch", theoryData); @@ -65,7 +65,7 @@ public void FindFirst_DoesCaseSensitiveSearch(CaseSensitiveClaimsIdentityTheoryD TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(GetCaseSensitiveClaimsIdentityTheoryData))] + [Theory, MemberData(nameof(GetCaseSensitiveClaimsIdentityTheoryData), DisableDiscoveryEnumeration = true)] public void HasClaim_DoesCaseSensitiveSearch(CaseSensitiveClaimsIdentityTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.HasClaim_DoesCaseSensitiveSearch", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/CrossTokenTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/CrossTokenTests.cs index 82e4cd9efb..2498c9ecf5 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/CrossTokenTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/CrossTokenTests.cs @@ -20,7 +20,7 @@ namespace Microsoft.IdentityModel.Tokens.Tests /// public class CrossTokenTests { - [Theory, MemberData(nameof(CrossTokenValidateTokenTheoryData))] + [Theory, MemberData(nameof(CrossTokenValidateTokenTheoryData), DisableDiscoveryEnumeration = true)] public void CrossTokenValidateToken(CrossTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CrossTokenValidateToken", theoryData); @@ -81,7 +81,7 @@ public static TheoryData CrossTokenValidateTokenTheoryData } } - [Theory, MemberData(nameof(CanReadTokenTheoryData))] + [Theory, MemberData(nameof(CanReadTokenTheoryData), DisableDiscoveryEnumeration = true)] public void CanReadToken(TokenHandlerTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CanReadToken", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/CryptoExtensibilityTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/CryptoExtensibilityTests.cs index 8a554efa2d..7602961e67 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/CryptoExtensibilityTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/CryptoExtensibilityTests.cs @@ -18,7 +18,7 @@ public class CryptoExtensibilityTests /// /// SecurityTokenDescriptor.CryptoProviderFactory has priority over SecurityKey.CryptoProviderFactory /// - [Theory, MemberData(nameof(SecurityTokenDescriptorDataSet))] + [Theory, MemberData(nameof(SecurityTokenDescriptorDataSet), DisableDiscoveryEnumeration = true)] public void CryptoProviderOrderingWhenSigning(SecurityTokenDescriptor tokenDescriptor) { var tokenHandler = new JwtSecurityTokenHandler(); @@ -80,7 +80,7 @@ public static TheoryData SecurityTokenDescriptorDataSet /// /// TokenValidationParameters.CryptoProviderFactory has priority over SecurityKey.CryptoProviderFactory /// - [Theory, MemberData(nameof(SigningCredentialsDataSet))] + [Theory, MemberData(nameof(SigningCredentialsDataSet), DisableDiscoveryEnumeration = true)] public void CryptoProviderOrderingWhenVerifying(string testId, TokenValidationParameters validationParameters, string jwt) { TestUtilities.WriteHeader("CryptoProviderOrderingWhenVerifying - " + testId, true); @@ -212,7 +212,7 @@ public void CustomCryptoProvider() Assert.False(customHashAlgorithm.DisposeCalled, "customHashAlgorithm.DisposeCalled"); } - [Theory, MemberData(nameof(CreateSignatureProviderExtensibilityTheoryData))] + [Theory, MemberData(nameof(CreateSignatureProviderExtensibilityTheoryData), DisableDiscoveryEnumeration = true)] public void CreateSignatureProviderExtensibility(CryptoProviderFactoryTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateSignatureProviderExtensibility", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/CryptoProviderCacheTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/CryptoProviderCacheTests.cs index 6ed0a3d6c8..41b2269352 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/CryptoProviderCacheTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/CryptoProviderCacheTests.cs @@ -38,7 +38,7 @@ public void CryptoProviderCacheOptions() /// Tests that a cache key generated from a or a set of components are equal. /// /// - [Theory, MemberData(nameof(GetCacheKeyTheoryData))] + [Theory, MemberData(nameof(GetCacheKeyTheoryData), DisableDiscoveryEnumeration = true)] public void GetCacheKey(CryptoProviderCacheTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.GetCacheKey", theoryData); @@ -165,7 +165,7 @@ public static TheoryData GetCacheKeyTheoryData } } - [Theory, MemberData(nameof(TryAddTheoryData))] + [Theory, MemberData(nameof(TryAddTheoryData), DisableDiscoveryEnumeration = true)] public void TryAdd(CryptoProviderCacheTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.TryAdd", theoryData); @@ -296,7 +296,7 @@ public static TheoryData TryAddTheoryData /// Tests that a cache key generated from a or a set of components are equal. /// /// - [Theory, MemberData(nameof(TryGetSignatureProviderTheoryData))] + [Theory, MemberData(nameof(TryGetSignatureProviderTheoryData), DisableDiscoveryEnumeration = true)] public void TryGetSignatureProvider(CryptoProviderCacheTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.TryGetSignatureProvider", theoryData); @@ -447,7 +447,7 @@ public void CryptoProviderCacheDispose() TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(TryRemoveTheoryData))] + [Theory, MemberData(nameof(TryRemoveTheoryData), DisableDiscoveryEnumeration = true)] public void TryRemove(CryptoProviderCacheTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.TryRemove", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/CryptoProviderFactoryTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/CryptoProviderFactoryTests.cs index 0abf57f1c5..89a5aa4830 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/CryptoProviderFactoryTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/CryptoProviderFactoryTests.cs @@ -29,7 +29,7 @@ public class CryptoProviderFactoryTests /// /// This test checks that SignatureProviders are properly created and released when CryptoProviderFactory.CacheSignatureProviders = false. /// - [Theory, MemberData(nameof(CreateAndReleaseSignatureProvidersTheoryData))] + [Theory, MemberData(nameof(CreateAndReleaseSignatureProvidersTheoryData), DisableDiscoveryEnumeration = true)] public void CreateAndReleaseSignatureProviders(SignatureProviderTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateAndReleaseSignatureProvidersTheoryData", theoryData); @@ -185,7 +185,7 @@ public void GetSets() /// Tests that SymmetricSignatureProviders that fault will be removed from cache /// /// - [Theory, MemberData(nameof(FaultingAsymmetricSignatureProvidersTheoryData))] + [Theory, MemberData(nameof(FaultingAsymmetricSignatureProvidersTheoryData), DisableDiscoveryEnumeration = true)] public void FaultingAsymmetricSignatureProviders(SignatureProviderTheoryData theoryData) { IdentityModelEventSource.ShowPII = true; @@ -303,7 +303,7 @@ public static TheoryData FaultingAsymmetricSignatur /// Tests that SymmetricSignatureProviders that fault will be removed from cache /// /// - [Theory, MemberData(nameof(FaultingSymmetricSignatureProvidersTheoryData))] + [Theory, MemberData(nameof(FaultingSymmetricSignatureProvidersTheoryData), DisableDiscoveryEnumeration = true)] public void FaultingSymmetricSignatureProviders(SignatureProviderTheoryData theoryData) { IdentityModelEventSource.ShowPII = true; @@ -547,7 +547,7 @@ public static TheoryData FaultingSymmetricSignature } } - [Theory, MemberData(nameof(ReleaseSignatureProvidersTheoryData))] + [Theory, MemberData(nameof(ReleaseSignatureProvidersTheoryData), DisableDiscoveryEnumeration = true)] public void ReleaseSignatureProviders(SignatureProviderTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReleaseSignatureProviders", theoryData); @@ -636,7 +636,7 @@ public static TheoryData ReleaseSignatureProvidersT } } - [Theory, MemberData(nameof(ReleaseHashAlgorithmsTheoryData))] + [Theory, MemberData(nameof(ReleaseHashAlgorithmsTheoryData), DisableDiscoveryEnumeration = true)] public void ReleaseHashAlgorithms(CryptoProviderFactoryTheoryData theoryData) { IdentityModelEventSource.ShowPII = true; @@ -691,7 +691,7 @@ public static TheoryData ReleaseHashAlgorithmsT } } - [Theory, MemberData(nameof(ReleaseKeyWrapProvidersTheoryData))] + [Theory, MemberData(nameof(ReleaseKeyWrapProvidersTheoryData), DisableDiscoveryEnumeration = true)] public void ReleaseKeyWrapProviders(CryptoProviderFactoryTheoryData theoryData) { IdentityModelEventSource.ShowPII = true; @@ -748,7 +748,7 @@ public static TheoryData ReleaseKeyWrapProvider } } - [Theory, MemberData(nameof(ReleaseRsaKeyWrapProvidersTheoryData))] + [Theory, MemberData(nameof(ReleaseRsaKeyWrapProvidersTheoryData), DisableDiscoveryEnumeration = true)] public void ReleaseRsaKeyWrapProviders(CryptoProviderFactoryTheoryData theoryData) { IdentityModelEventSource.ShowPII = true; diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/ECDsaAdapterTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/ECDsaAdapterTests.cs index 2f81a40f6a..e4da8aece1 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/ECDsaAdapterTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/ECDsaAdapterTests.cs @@ -14,7 +14,7 @@ namespace Microsoft.IdentityModel.Tokens.Tests { public class ECDsaAdapterTests { - [Theory, MemberData(nameof(CreateECDsaFromJsonWebKeyTheoryData))] + [Theory, MemberData(nameof(CreateECDsaFromJsonWebKeyTheoryData), DisableDiscoveryEnumeration = true)] public void CreateECDsa(JsonWebKeyTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateECDsa", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/EcdhEsTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/EcdhEsTests.cs index 8e520c92e0..cd5307ff77 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/EcdhEsTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/EcdhEsTests.cs @@ -13,7 +13,7 @@ namespace Microsoft.IdentityModel.Tokens.Tests { public class EcdhEsTests { - [Theory, MemberData(nameof(CreateEcdhEsTestCases))] + [Theory, MemberData(nameof(CreateEcdhEsTestCases), DisableDiscoveryEnumeration = true)] public void EcdhEsKeyExchangeProviderTests(EcdhEsTheoryData theoryData) { var context = new CompareContext(); @@ -43,7 +43,7 @@ public void EcdhEsKeyExchangeProviderTests(EcdhEsTheoryData theoryData) } - [Theory, MemberData(nameof(CreateEcdhEsTestCases))] + [Theory, MemberData(nameof(CreateEcdhEsTestCases), DisableDiscoveryEnumeration = true)] public void CreateEcdhEsTests(EcdhEsTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateEcdhEsTests", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/EncryptingCredentialsTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/EncryptingCredentialsTests.cs index ad787f01d4..1b066ec03b 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/EncryptingCredentialsTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/EncryptingCredentialsTests.cs @@ -12,7 +12,7 @@ namespace Microsoft.IdentityModel.Tokens.Tests public class EncryptingCredentialsTests { //public EncryptingCredentials(SecurityKey key, string alg, string enc) - [Theory, MemberData(nameof(ConstructorATheoryData))] + [Theory, MemberData(nameof(ConstructorATheoryData), DisableDiscoveryEnumeration = true)] public void ConstructorA(EncryptingCredentialsTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ConstructorA", theoryData); @@ -31,7 +31,7 @@ public void ConstructorA(EncryptingCredentialsTheoryData theoryData) //Used in scenarios when a key represents a 'shared' symmetric key //public EncryptingCredentials(SecurityKey key, string enc) - [Theory, MemberData(nameof(ConstructorBTheoryData))] + [Theory, MemberData(nameof(ConstructorBTheoryData), DisableDiscoveryEnumeration = true)] public void ConstructorB(EncryptingCredentialsTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ConstructorB", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/Json/JsonWebKeySerializationTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/Json/JsonWebKeySerializationTests.cs index 287770907a..450bfbcace 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/Json/JsonWebKeySerializationTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/Json/JsonWebKeySerializationTests.cs @@ -22,7 +22,7 @@ public class JsonWebKeySerializationTests /// This test is designed to ensure that JsonDeserialize and Utf8Reader are consistent w.r.t. exceptions. /// /// - [Theory, MemberData(nameof(DeserializeTheoryData))] + [Theory, MemberData(nameof(DeserializeTheoryData), DisableDiscoveryEnumeration = true)] public void DeserializeExceptions(JsonSerializerTheoryData theoryData) { var context = new CompareContext(theoryData); @@ -184,7 +184,7 @@ private static void AddArrayOfStringsTestCases(TheoryData /// - [Theory, MemberData(nameof(DeserializeDataSet))] + [Theory, MemberData(nameof(DeserializeDataSet), DisableDiscoveryEnumeration = true)] public void Deserialize(JsonWebKeyTheoryData theoryData) { CompareContext context = new CompareContext(theoryData); @@ -283,7 +283,7 @@ public static TheoryData DeserializeDataSet /// This test is to ensure that a JsonWebKey serializes roundtripping objects in AdditionalData. /// /// - [Theory, MemberData(nameof(RoundTripDataSet))] + [Theory, MemberData(nameof(RoundTripDataSet), DisableDiscoveryEnumeration = true)] public void RoundTrip(JsonWebKeyTheoryData theoryData) { var context = new CompareContext(theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/Json/JsonWebKeySetSerializationTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/Json/JsonWebKeySetSerializationTests.cs index 19572dedfc..6527d3fd3f 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/Json/JsonWebKeySetSerializationTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/Json/JsonWebKeySetSerializationTests.cs @@ -14,7 +14,7 @@ public class JsonWebKeySetSerializationTests /// This test is to ensure that JsonWebKeySet serialization with fully populated with each property checked. /// /// - [Theory, MemberData(nameof(SerializeDataSet))] + [Theory, MemberData(nameof(SerializeDataSet), DisableDiscoveryEnumeration = true)] public void Serialize(JsonWebKeySetTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.Serialize", theoryData); @@ -63,7 +63,7 @@ public static TheoryData SerializeDataSet } } - [Theory, MemberData(nameof(JsonWebKeySetTheoryData))] + [Theory, MemberData(nameof(JsonWebKeySetTheoryData), DisableDiscoveryEnumeration = true)] public void Deserialize(JsonWebKeySetTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.Deserialize", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/JsonWebKeyConverterTest.cs b/test/Microsoft.IdentityModel.Tokens.Tests/JsonWebKeyConverterTest.cs index 76a777cb71..0826925abc 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/JsonWebKeyConverterTest.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/JsonWebKeyConverterTest.cs @@ -11,7 +11,7 @@ namespace Microsoft.IdentityModel.Tokens.Tests { public class JsonWebKeyConverterTest { - [Theory, MemberData(nameof(ConvertSecurityKeyToJsonWebKeyTheoryData))] + [Theory, MemberData(nameof(ConvertSecurityKeyToJsonWebKeyTheoryData), DisableDiscoveryEnumeration = true)] public void ConvertSecurityKeyToJsonWebKey(JsonWebKeyConverterTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ConvertSecurityKeyToJsonWebKey", theoryData); @@ -32,7 +32,7 @@ public void ConvertSecurityKeyToJsonWebKey(JsonWebKeyConverterTheoryData theoryD TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(ConvertToJsonWebKeyToSecurityKeyTheoryData))] + [Theory, MemberData(nameof(ConvertToJsonWebKeyToSecurityKeyTheoryData), DisableDiscoveryEnumeration = true)] public void ConvertJsonWebKeyToSecurityKey(JsonWebKeyConverterTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ConvertJsonWebKeyToSecurityKey", theoryData); @@ -52,7 +52,7 @@ public void ConvertJsonWebKeyToSecurityKey(JsonWebKeyConverterTheoryData theoryD TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(ConvertX509SecurityKeyToJsonWebKeyTheoryData))] + [Theory, MemberData(nameof(ConvertX509SecurityKeyToJsonWebKeyTheoryData), DisableDiscoveryEnumeration = true)] public void ConvertX509SecurityKeyAsRsaSecurityKeyToJsonWebKey(JsonWebKeyConverterTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ConvertX509SecurityKeyToJsonWebKeyTheoryData", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/JsonWebKeySetTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/JsonWebKeySetTests.cs index 3a26584b36..9fd943a037 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/JsonWebKeySetTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/JsonWebKeySetTests.cs @@ -13,7 +13,7 @@ namespace Microsoft.IdentityModel.Tokens.Json.Tests { public class JsonWebKeySetTests { - [Theory, MemberData(nameof(ConstructorDataSet))] + [Theory, MemberData(nameof(ConstructorDataSet), DisableDiscoveryEnumeration = true)] public void Constructors(JsonWebKeySetTheoryData theoryData) { var context = new CompareContext(theoryData); @@ -219,7 +219,7 @@ private SecurityKey ResolveX509Certificate(string token, SecurityToken securityT return null; } - [Theory, MemberData(nameof(GetSigningKeysTheoryData))] + [Theory, MemberData(nameof(GetSigningKeysTheoryData), DisableDiscoveryEnumeration = true)] public void GetSigningKeys(JsonWebKeySetTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.GetSigningKeys", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/JsonWebKeyTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/JsonWebKeyTests.cs index 6d9f9886d5..dbe90b5ef7 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/JsonWebKeyTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/JsonWebKeyTests.cs @@ -10,7 +10,7 @@ namespace Microsoft.IdentityModel.Tokens.Json.Tests { public class JsonWebKeyTests { - [Theory, MemberData(nameof(ConstructorDataSet))] + [Theory, MemberData(nameof(ConstructorDataSet), DisableDiscoveryEnumeration = true)] public void Constructors(JsonWebKeyTheoryData theoryData) { var context = new CompareContext(); @@ -198,7 +198,7 @@ public void ComputeJwkThumbprintSpec() TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(ComputeJwkThumbprintTheoryData))] + [Theory, MemberData(nameof(ComputeJwkThumbprintTheoryData), DisableDiscoveryEnumeration = true)] public void ComputeJwkThumbprint(JwkThumbprintTheoryData theoryData) { Logging.IdentityModelEventSource.ShowPII = true; @@ -217,7 +217,7 @@ public void ComputeJwkThumbprint(JwkThumbprintTheoryData theoryData) TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(ComputeJwkThumbprintTheoryData))] + [Theory, MemberData(nameof(ComputeJwkThumbprintTheoryData), DisableDiscoveryEnumeration = true)] public void CanComputeJwkThumbprint(JwkThumbprintTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CanComputeJwkThumbprint", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/JweUsingEchdTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/JweUsingEchdTests.cs index 1c0d56ee9f..50a34a26be 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/JweUsingEchdTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/JweUsingEchdTests.cs @@ -16,7 +16,7 @@ namespace Microsoft.IdentityModel.Tokens.Tests { public class JweUsingEcdhEsTests { - [Theory, MemberData(nameof(CreateEcdhEsTestcases))] + [Theory, MemberData(nameof(CreateEcdhEsTestCases), DisableDiscoveryEnumeration = true)] public async Task CreateJweEcdhEsTests(CreateEcdhEsTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateJweEcdhEsTests", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/KeyVaultVerify.cs b/test/Microsoft.IdentityModel.Tokens.Tests/KeyVaultVerify.cs index 62ac0781ce..00f2d8acd3 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/KeyVaultVerify.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/KeyVaultVerify.cs @@ -13,7 +13,7 @@ namespace Microsoft.IdentityModel.Tokens.Tests { public class KeyVaultVerify { - [Theory, MemberData(nameof(KeyWrapTheoryData))] + [Theory, MemberData(nameof(KeyWrapTheoryData), DisableDiscoveryEnumeration = true)] public void DecryptValidate(KeyWrapTestParams testParams) { if (testParams.Algorithm.Equals(SecurityAlgorithms.Aes128KW, StringComparison.OrdinalIgnoreCase) @@ -40,7 +40,7 @@ public void DecryptValidate(KeyWrapTestParams testParams) } } - [Theory, MemberData(nameof(KeyWrapTheoryData))] + [Theory, MemberData(nameof(KeyWrapTheoryData), DisableDiscoveryEnumeration = true)] public void EncryptValidate(KeyWrapTestParams testParams) { if (testParams.Algorithm.Equals(SecurityAlgorithms.Aes128KW, StringComparison.OrdinalIgnoreCase) diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/KeyWrapProviderTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/KeyWrapProviderTests.cs index 60f45459c5..06d4583da2 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/KeyWrapProviderTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/KeyWrapProviderTests.cs @@ -29,7 +29,7 @@ namespace Microsoft.IdentityModel.Tokens.Tests /// public class KeyWrapProviderTests { - [Theory, MemberData(nameof(KeyWrapConstructorTestCases))] + [Theory, MemberData(nameof(KeyWrapConstructorTestCases), DisableDiscoveryEnumeration = true)] public void Constructors(SupportedAlgorithmTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.Constructors", theoryData); @@ -109,7 +109,7 @@ public void UnwrapKey() Assert.True(provider.GetSymmetricAlgorithmCalled); } - [Theory, MemberData(nameof(WrapUnwrapTheoryData))] + [Theory, MemberData(nameof(WrapUnwrapTheoryData), DisableDiscoveryEnumeration = true)] public void WrapUnwrapKey(KeyWrapTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.WrapUnwrapKey", theoryData); @@ -171,7 +171,7 @@ private static void AddWrapParameterCheckTheoryData(string testId, string algori }); } - [Theory, MemberData(nameof(UnwrapTamperedTheoryData))] + [Theory, MemberData(nameof(UnwrapTamperedTheoryData), DisableDiscoveryEnumeration = true)] public void UnwrapTamperedData(KeyWrapTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.UnwrapTamperedData", theoryData); @@ -217,7 +217,7 @@ private static void AddUnwrapTamperedTheoryData(string testId, SecurityKey key, }); } - [Theory, MemberData(nameof(UnwrapMismatchTheoryData))] + [Theory, MemberData(nameof(UnwrapMismatchTheoryData), DisableDiscoveryEnumeration = true)] public void UnwrapMismatch(KeyWrapTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.UnwrapMismatch", theoryData); @@ -262,7 +262,7 @@ private static void AddUnwrapMismatchTheoryData(string testId, SecurityKey encry }); } - [Theory, MemberData(nameof(UnwrapTheoryData))] + [Theory, MemberData(nameof(UnwrapTheoryData), DisableDiscoveryEnumeration = true)] public void UnwrapParameterCheck(KeyWrapTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.UnwrapParameterCheck", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/MultiThreadingTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/MultiThreadingTests.cs index 6352fc6fe4..a783d8d5a1 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/MultiThreadingTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/MultiThreadingTests.cs @@ -14,7 +14,7 @@ namespace Microsoft.IdentityModel.Tokens.Tests { public class MultiThreadingTokenTests { - [Theory, MemberData(nameof(MultiThreadingCreateAndVerifyTestCases))] + [Theory, MemberData(nameof(MultiThreadingCreateAndVerifyTestCases), DisableDiscoveryEnumeration = true)] public void MultiThreadingCreateAndVerify(MultiThreadingTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.MultiThreadingCreateAndVerify", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/ReferenceTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/ReferenceTests.cs index 56b4de05da..a7cea9b727 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/ReferenceTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/ReferenceTests.cs @@ -75,7 +75,7 @@ public void AesGcmReferenceTest() } } - [Theory, MemberData(nameof(AuthenticatedEncryptionTheoryData))] + [Theory, MemberData(nameof(AuthenticatedEncryptionTheoryData), DisableDiscoveryEnumeration = true)] public void AuthenticatedEncryptionReferenceTest(AuthenticationEncryptionTestParams testParams) { var context = TestUtilities.WriteHeader("AuthenticatedEncryptionReferenceTest", testParams); @@ -167,7 +167,7 @@ public override string ToString() } } - [Theory, MemberData(nameof(KeyWrapTheoryData))] + [Theory, MemberData(nameof(KeyWrapTheoryData), DisableDiscoveryEnumeration = true)] public void KeyWrapReferenceTest(KeyWrapTestParams testParams) { if (testParams.Algorithm.Equals(SecurityAlgorithms.Aes128KW, StringComparison.OrdinalIgnoreCase) diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/RsaCryptoServiceProviderProxyTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/RsaCryptoServiceProviderProxyTests.cs index 222938fe89..27a2c30c00 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/RsaCryptoServiceProviderProxyTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/RsaCryptoServiceProviderProxyTests.cs @@ -18,7 +18,7 @@ namespace Microsoft.IdentityModel.Tokens.Tests { public class RsaCryptoServiceProviderProxyTests { - [Theory, MemberData(nameof(RSADecryptTheoryData))] + [Theory, MemberData(nameof(RSADecryptTheoryData), DisableDiscoveryEnumeration = true)] public void RSADecrypt(RSACryptoServiceProviderProxyTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.RSADecrypt", theoryData); @@ -36,7 +36,7 @@ public void RSADecrypt(RSACryptoServiceProviderProxyTheoryData theoryData) TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(RSADecryptTheoryData))] + [Theory, MemberData(nameof(RSADecryptTheoryData), DisableDiscoveryEnumeration = true)] public void RSADecryptValue(RSACryptoServiceProviderProxyTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.RSADecryptValue", theoryData); @@ -84,7 +84,7 @@ public static TheoryData RSADecryptTheo } } - [Theory, MemberData(nameof(RSAEncryptDecryptTheoryData))] + [Theory, MemberData(nameof(RSAEncryptDecryptTheoryData), DisableDiscoveryEnumeration = true)] public void RSAEncryptDecrypt(RSACryptoServiceProviderProxyTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.RSAEncryptDecrypt", theoryData); @@ -158,7 +158,7 @@ public static TheoryData RSAEncryptDecr } } - [Theory, MemberData(nameof(RSAEncryptDecryptValueTheoryData))] + [Theory, MemberData(nameof(RSAEncryptDecryptValueTheoryData), DisableDiscoveryEnumeration = true)] public void RSAEncryptDecryptValue(RSACryptoServiceProviderProxyTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.RSAEncryptDecryptValue", theoryData); @@ -224,7 +224,7 @@ public static TheoryData RSAEncryptDecr } } - [Theory, MemberData(nameof(RSASignVerifyDataTheoryData))] + [Theory, MemberData(nameof(RSASignVerifyDataTheoryData), DisableDiscoveryEnumeration = true)] public void RSASignVerifyData(RSACryptoServiceProviderProxyTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.RSASignVerifyData", theoryData); @@ -304,7 +304,7 @@ public static TheoryData RSASignVerifyD } } - [Theory, MemberData(nameof(RSAVerifyDataTheoryData))] + [Theory, MemberData(nameof(RSAVerifyDataTheoryData), DisableDiscoveryEnumeration = true)] public void RSAVerifyData(RSACryptoServiceProviderProxyTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.RSAVerifyData", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/RsaKeyWrapProviderTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/RsaKeyWrapProviderTests.cs index d84a37f441..8f5cc935ba 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/RsaKeyWrapProviderTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/RsaKeyWrapProviderTests.cs @@ -29,7 +29,7 @@ namespace Microsoft.IdentityModel.Tokens.Tests /// public class RsaKeyWrapProviderTests { - [Theory, MemberData(nameof(RsaKeyWrapConstructorTheoryData))] + [Theory, MemberData(nameof(RsaKeyWrapConstructorTheoryData), DisableDiscoveryEnumeration = true)] public void Constructors(KeyWrapTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.Constructors", theoryData); @@ -159,7 +159,7 @@ public void UnwrapKey() Assert.True(provider.WrapKeyCalled); } - [Theory, MemberData(nameof(RsaUnwrapMismatchTheoryData))] + [Theory, MemberData(nameof(RsaUnwrapMismatchTheoryData), DisableDiscoveryEnumeration = true)] public void RsaUnwrapMismatch(KeyWrapTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.RsaUnwrapParameterCheck", theoryData); @@ -214,7 +214,7 @@ public static TheoryData RsaUnwrapMismatchTheoryData() }; } - [Theory, MemberData(nameof(RsaUnwrapTamperedTheoryData))] + [Theory, MemberData(nameof(RsaUnwrapTamperedTheoryData), DisableDiscoveryEnumeration = true)] public void RsaUnwrapTamperedData(KeyWrapTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.RsaUnwrapParameterCheck", theoryData); @@ -273,7 +273,7 @@ private static void AddUnwrapTamperedTheoryData( }); } - [Theory, MemberData(nameof(RsaUnwrapTheoryData))] + [Theory, MemberData(nameof(RsaUnwrapTheoryData), DisableDiscoveryEnumeration = true)] public void RsaUnwrapParameterCheck(KeyWrapTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.RsaUnwrapParameterCheck", theoryData); @@ -315,7 +315,7 @@ public static TheoryData RsaUnwrapTheoryData() }; } - [Theory, MemberData(nameof(RsaWrapUnwrapTheoryData))] + [Theory, MemberData(nameof(RsaWrapUnwrapTheoryData), DisableDiscoveryEnumeration = true)] public void RsaWrapUnwrapKey(KeyWrapTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.RsaWrapUnwrapKey", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/RsaSecurityKeyTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/RsaSecurityKeyTests.cs index 59245df430..0de9c27d43 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/RsaSecurityKeyTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/RsaSecurityKeyTests.cs @@ -54,7 +54,7 @@ private void RsaSecurityKeyConstructorWithRsa(RSA rsa, ExpectedException ee) } } - [Theory, MemberData(nameof(HasPrivateKeyTheoryData))] + [Theory, MemberData(nameof(HasPrivateKeyTheoryData), DisableDiscoveryEnumeration = true)] public void HasPrivateKey(string testId, RsaSecurityKey key, bool expected) { if (expected) diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/SecurityKeyTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/SecurityKeyTests.cs index 2d4ef698b1..f3c9789364 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/SecurityKeyTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/SecurityKeyTests.cs @@ -23,7 +23,7 @@ public void ComputeJwkThumbprint() #endif } - [Theory, MemberData(nameof(CompareJwkThumbprintsTestCases))] + [Theory, MemberData(nameof(CompareJwkThumbprintsTestCases), DisableDiscoveryEnumeration = true)] public void CompareJwkThumbprints(JsonWebKeyConverterTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CompareJwkThumbprints", theoryData); @@ -107,7 +107,7 @@ public static TheoryData CompareJwkThumbprintsTes } } - [Theory, MemberData(nameof(CreateInternalIdsTestCases))] + [Theory, MemberData(nameof(CreateInternalIdsTestCases), DisableDiscoveryEnumeration = true)] public void CreateInternalIds(SecurityKeyTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateInternalIds", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/SecurityTokenExceptionTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/SecurityTokenExceptionTests.cs index 11bba38b64..029dcbb8f7 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/SecurityTokenExceptionTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/SecurityTokenExceptionTests.cs @@ -19,7 +19,7 @@ namespace Microsoft.IdentityModel.Tokens.Tests { public class SecurityTokenExceptionTests { - [Theory, MemberData(nameof(ExceptionTestData))] + [Theory, MemberData(nameof(ExceptionTestData), DisableDiscoveryEnumeration = true)] public void SecurityTokenExceptionSerializationTests(SecurityTokenExceptionTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.{nameof(SecurityTokenExceptionSerializationTests)}", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/SignatureProviderTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/SignatureProviderTests.cs index 18a647ba75..1afd38f4a4 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/SignatureProviderTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/SignatureProviderTests.cs @@ -25,7 +25,7 @@ namespace Microsoft.IdentityModel.Tokens.Tests /// public class SignatureProviderTests { - [Theory, MemberData(nameof(SignatureProviderConstructorParamsTheoryData))] + [Theory, MemberData(nameof(SignatureProviderConstructorParamsTheoryData), DisableDiscoveryEnumeration = true)] public void CryptoProviderFactoryConstructorParams(CryptoProviderFactoryTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CryptoProviderFactoryConstructorParams", theoryData); @@ -47,7 +47,7 @@ public void CryptoProviderFactoryConstructorParams(CryptoProviderFactoryTheoryDa TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(SignatureProviderConstructorParamsTheoryData))] + [Theory, MemberData(nameof(SignatureProviderConstructorParamsTheoryData), DisableDiscoveryEnumeration = true)] public void AsymmetricSignatureProviderConstructorParams(SignatureProviderTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.AsymmetricSignatureProviderConstructorParams", theoryData); @@ -65,7 +65,7 @@ public void AsymmetricSignatureProviderConstructorParams(SignatureProviderTheory TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(SignatureProviderConstructorParamsTheoryData))] + [Theory, MemberData(nameof(SignatureProviderConstructorParamsTheoryData), DisableDiscoveryEnumeration = true)] public void SymmetricSignatureProviderConstructorParams(SignatureProviderTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.SymmetricSignatureProviderConstructorParams", theoryData); @@ -117,7 +117,7 @@ public static TheoryData SignatureProviderConstruct /// Tests Asymmetric SecurityKeys /// /// - [Theory, MemberData(nameof(AsymmetricSignAndVerifyTheoryData))] + [Theory, MemberData(nameof(AsymmetricSignAndVerifyTheoryData), DisableDiscoveryEnumeration = true)] public void AsymmetricSignAndVerify(SignatureProviderTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.AsymmetricSignAndVerify", theoryData); @@ -209,7 +209,7 @@ public static TheoryData AsymmetricSignAndVerifyThe }; } - [Theory, MemberData(nameof(SymmetricSignAndVerifyTheoryData))] + [Theory, MemberData(nameof(SymmetricSignAndVerifyTheoryData), DisableDiscoveryEnumeration = true)] public void SymmetricSignAndVerify(SignatureProviderTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.SignAndVerify", theoryData); @@ -406,7 +406,7 @@ public void AsymmetricSignatureProvider_SupportedAlgorithms() } - [Theory, MemberData(nameof(AsymmetricSignatureProviderVerifyParameterChecksTheoryData))] + [Theory, MemberData(nameof(AsymmetricSignatureProviderVerifyParameterChecksTheoryData), DisableDiscoveryEnumeration = true)] public void AsymmetricSignatureProviderVerifyParameterChecks(SignatureProviderTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.AsymmetricSignatureProviderVerifyParameterChecks", theoryData); @@ -466,7 +466,7 @@ public static TheoryData AsymmetricSignatureProvide } } - [Theory, MemberData(nameof(SymmetricSignatureProviderVerifyParameterChecksTheoryData))] + [Theory, MemberData(nameof(SymmetricSignatureProviderVerifyParameterChecksTheoryData), DisableDiscoveryEnumeration = true)] public void SymmetricSignatureProviderVerifyParameterChecks(SignatureProviderTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.SymmetricSignatureProviderVerifyParameterChecks", theoryData); @@ -526,7 +526,7 @@ public static TheoryData SymmetricSignatureProvider } } - [Theory, MemberData(nameof(SymmetricVerifySignatureSizeTheoryData))] + [Theory, MemberData(nameof(SymmetricVerifySignatureSizeTheoryData), DisableDiscoveryEnumeration = true)] public void SymmetricVerify1Tests(SignatureProviderTheoryData theoryData) { // verifies: public bool Verify(byte[] input, byte[] signature) @@ -544,7 +544,7 @@ public void SymmetricVerify1Tests(SignatureProviderTheoryData theoryData) TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(SymmetricVerifySignatureSizeTheoryData))] + [Theory, MemberData(nameof(SymmetricVerifySignatureSizeTheoryData), DisableDiscoveryEnumeration = true)] public void SymmetricVerify2Tests(SignatureProviderTheoryData theoryData) { // verifies: public bool Verify(byte[] input, byte[] signature, int length) @@ -562,7 +562,7 @@ public void SymmetricVerify2Tests(SignatureProviderTheoryData theoryData) TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(SymmetricVerifySignatureSizeTheoryData))] + [Theory, MemberData(nameof(SymmetricVerifySignatureSizeTheoryData), DisableDiscoveryEnumeration = true)] public void SymmetricVerify3Tests(SignatureProviderTheoryData theoryData) { // verifies: public override bool Verify(byte[] input, int inputOffset, int inputLength, byte[] signature, int signatureOffset, int signatureLength) @@ -611,7 +611,7 @@ public static TheoryData SymmetricVerifySignatureSi } } - [Theory, MemberData(nameof(SymmetricVerifySignatureSizeInternalTheoryData))] + [Theory, MemberData(nameof(SymmetricVerifySignatureSizeInternalTheoryData), DisableDiscoveryEnumeration = true)] public void SymmetricVerify4Tests(SignatureProviderTheoryData theoryData) { // verifies: internal bool Verify(byte[] input, int inputOffset, int inputLength, byte[] signature, int signatureOffset, int signatureLength, string algorithm) @@ -698,7 +698,7 @@ public void SymmetricSignatureProvider_SupportedAlgorithms() } } - [Theory, MemberData(nameof(SymmetricSecurityKeySizesTheoryData))] + [Theory, MemberData(nameof(SymmetricSecurityKeySizesTheoryData), DisableDiscoveryEnumeration = true)] public void SymmetricSecurityKeySizesSign(SymmetricSignatureProviderTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.SymmetricSecurityKeySizes", theoryData); @@ -717,7 +717,7 @@ public void SymmetricSecurityKeySizesSign(SymmetricSignatureProviderTheoryData t TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(SymmetricSecurityKeySizesTheoryData))] + [Theory, MemberData(nameof(SymmetricSecurityKeySizesTheoryData), DisableDiscoveryEnumeration = true)] public void SymmetricSecurityKeySizesVerify(SymmetricSignatureProviderTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.SymmetricSecurityKeySizes", theoryData); @@ -819,7 +819,7 @@ public void SymmetricSignatureProvider_Publics() } } - [Theory, MemberData(nameof(KeyDisposeData))] + [Theory, MemberData(nameof(KeyDisposeData), DisableDiscoveryEnumeration = true)] public void SignatureProviderDispose_Test(string testId, SecurityKey securityKey, string algorithm, ExpectedException ee) { try @@ -938,7 +938,7 @@ public static TheoryData KeyDisposeData() return theoryData; } - [Theory, MemberData(nameof(SignatureTheoryData))] + [Theory, MemberData(nameof(SignatureTheoryData), DisableDiscoveryEnumeration = true)] public void SignatureTampering(SignatureProviderTheoryData theoryData) { if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) @@ -970,7 +970,7 @@ public void SignatureTampering(SignatureProviderTheoryData theoryData) } } - [Theory, MemberData(nameof(SignatureTheoryData))] + [Theory, MemberData(nameof(SignatureTheoryData), DisableDiscoveryEnumeration = true)] public void SignatureTruncation(SignatureProviderTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.SignatureTruncation", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/StaticCryptoProviderTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/StaticCryptoProviderTests.cs index 9500f44135..a15d1aedd3 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/StaticCryptoProviderTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/StaticCryptoProviderTests.cs @@ -17,7 +17,7 @@ public class StaticCryptoProviderTests /// Tests that we can set the default . /// /// - [Theory, MemberData(nameof(CompressionFactoryTestsTheoryData))] + [Theory, MemberData(nameof(CompressionFactoryTestsTheoryData), DisableDiscoveryEnumeration = true)] public void CompressionFactoryTests(CompressionProviderFactoryTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CompressionFactoryTests", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/SupportedAlgorithmTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/SupportedAlgorithmTests.cs index 9ec12420e6..5b7859128e 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/SupportedAlgorithmTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/SupportedAlgorithmTests.cs @@ -17,7 +17,7 @@ public class SupportedAlgorithmTests /// 2. Our default algorithms are supported. /// /// - [Theory, MemberData(nameof(IsSupportedAlgorithmAndKeyTestCases))] + [Theory, MemberData(nameof(IsSupportedAlgorithmAndKeyTestCases), DisableDiscoveryEnumeration = true)] public void IsSupportedAlgorithmAndKey(SupportedAlgorithmTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.IsSupportedAlgorithm", theoryData); @@ -174,7 +174,7 @@ public static TheoryData IsSupportedAlgorithmAndKe } } - [Theory, MemberData(nameof(IsSymmetricKeyWrapSupportedTests))] + [Theory, MemberData(nameof(IsSymmetricKeyWrapSupportedTests), DisableDiscoveryEnumeration = true)] public void IsSymmetricKeyWrapSupported(SupportedAlgorithmTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.IsSymmetricKeyWrapSupported", theoryData); @@ -215,7 +215,7 @@ public static TheoryData IsSymmetricKeyWrapSupport } } - [Theory, MemberData(nameof(GetDigestFromSignatureAlgorithmTests))] + [Theory, MemberData(nameof(GetDigestFromSignatureAlgorithmTests), DisableDiscoveryEnumeration = true)] public void GetDigestFromSignatureAlgorithm(SupportedAlgorithmTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.GetDigestFromSignatureAlgorithm", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/SymmetricSecurityKeyTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/SymmetricSecurityKeyTests.cs index 96c57fba76..b60fe4b6c7 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/SymmetricSecurityKeyTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/SymmetricSecurityKeyTests.cs @@ -16,7 +16,7 @@ namespace Microsoft.IdentityModel.Tokens.Tests public class SymmetricSecurityKeyTests { - [Theory, MemberData(nameof(ConstructorDataSet))] + [Theory, MemberData(nameof(ConstructorDataSet), DisableDiscoveryEnumeration = true)] public void Constructor(byte[] key, EE ee) { try diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/TamperedTokenTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/TamperedTokenTests.cs index 38bfcaf8f8..4f2b1d7616 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/TamperedTokenTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/TamperedTokenTests.cs @@ -15,7 +15,7 @@ namespace Microsoft.IdentityModel.Tokens.Tests { public class TamperedTokenTests { - [Theory, MemberData(nameof(JwtSignatureTruncationTheoryData))] + [Theory, MemberData(nameof(JwtSignatureTruncationTheoryData), DisableDiscoveryEnumeration = true)] public async Task JwtSignatureTruncation(ValidateTokenTheoryData theoryData) { CompareContext compareContext = TestUtilities.WriteHeader($"{this}.JwtSignatureTruncation", theoryData); diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/Validation/ValidatorsTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/Validation/ValidatorsTests.cs index cf3944eaf8..788a662384 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/Validation/ValidatorsTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/Validation/ValidatorsTests.cs @@ -12,7 +12,7 @@ namespace Microsoft.IdentityModel.Tokens.Tests { public class ValidatorsTests { - [Theory, MemberData(nameof(ValidateAudienceParametersTheoryData))] + [Theory, MemberData(nameof(ValidateAudienceParametersTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateAudienceParameters(AudienceValidationTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateAudienceParameters", theoryData); @@ -118,7 +118,7 @@ public static TheoryData ValidateAudienceParameter } } - [Theory, MemberData(nameof(ValidateAudienceTheoryData))] + [Theory, MemberData(nameof(ValidateAudienceTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateAudience(AudienceValidationTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateAudience", theoryData); @@ -280,7 +280,7 @@ public static TheoryData ValidateAudienceTheoryDat } } - [Theory, MemberData(nameof(IssuerDataSet))] + [Theory, MemberData(nameof(IssuerDataSet), DisableDiscoveryEnumeration = true)] public void Issuer(string issuer, SecurityToken securityToken, TokenValidationParameters validationParameters, BaseConfiguration configuration, ExpectedException ee) { try @@ -319,7 +319,7 @@ public static TheoryData EnableAadS return theoryData; } - [Theory, MemberData(nameof(ValidateSigningKeyCloudInstanceNameTestCases))] + [Theory, MemberData(nameof(ValidateSigningKeyCloudInstanceNameTestCases), DisableDiscoveryEnumeration = true)] public void ValidateSigningKeyCloudInstanceNameTests(AadSigningKeyTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateSigningKeyCloudInstanceNameTests", theoryData); @@ -327,7 +327,7 @@ OpenIdConnectConfiguration GetConfigurationMock(string configurationCloudInstanc } } - [Theory, MemberData(nameof(ValidateIssuerSigningKeyCertificateTestCases))] + [Theory, MemberData(nameof(ValidateIssuerSigningKeyCertificateTestCases), DisableDiscoveryEnumeration = true)] public void ValidateIssuerSigningKeyCertificateTests(AadSigningKeyTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateIssuerSigningKeyCertificateTests", theoryData); @@ -392,7 +392,7 @@ public static TheoryData ValidateIssuerSigningKeyCertif return theoryData; } - [Theory, MemberData(nameof(ValidateIssuerSigningKeyTestCases))] + [Theory, MemberData(nameof(ValidateIssuerSigningKeyTestCases), DisableDiscoveryEnumeration = true)] public void ValidateIssuerSigningKeyTests(AadSigningKeyTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateIssuerSigningKeyTests", theoryData); diff --git a/test/Microsoft.IdentityModel.Xml.Tests/DSigSerializerTests.cs b/test/Microsoft.IdentityModel.Xml.Tests/DSigSerializerTests.cs index 0d06983895..4f14f1c427 100644 --- a/test/Microsoft.IdentityModel.Xml.Tests/DSigSerializerTests.cs +++ b/test/Microsoft.IdentityModel.Xml.Tests/DSigSerializerTests.cs @@ -38,7 +38,7 @@ public void GetSets() TestUtilities.AssertFailIfErrors("DSigSerializerTests_GetSets", context.Errors); } - [Theory, MemberData(nameof(ReadKeyInfoTheoryData))] + [Theory, MemberData(nameof(ReadKeyInfoTheoryData), DisableDiscoveryEnumeration = true)] public void ReadKeyInfo(DSigSerializerTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ReadKeyInfo", theoryData); @@ -100,7 +100,7 @@ public static TheoryData ReadKeyInfoTheoryData } } - [Theory, MemberData(nameof(WriteKeyInfoTheoryData))] + [Theory, MemberData(nameof(WriteKeyInfoTheoryData), DisableDiscoveryEnumeration = true)] public void WriteKeyInfo(DSigSerializerTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.WriteKeyInfo", theoryData); @@ -148,7 +148,7 @@ public static DSigSerializerTheoryData KeyInfoTest(KeyInfoTestSet keyInfo, Expec }; } - [Theory, MemberData(nameof(ReadSignatureTheoryData))] + [Theory, MemberData(nameof(ReadSignatureTheoryData), DisableDiscoveryEnumeration = true)] public void ReadSignature(DSigSerializerTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReadSignature", theoryData); @@ -236,7 +236,7 @@ public static TheoryData ReadSignatureTheoryData } } - [Theory, MemberData(nameof(WriteSignatureTheoryData))] + [Theory, MemberData(nameof(WriteSignatureTheoryData), DisableDiscoveryEnumeration = true)] public void WriteSignature(DSigSerializerTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.WriteSignature", theoryData); @@ -287,7 +287,7 @@ public static DSigSerializerTheoryData SignatureTest(SignatureTestSet testSet, E }; } - [Theory, MemberData(nameof(ReadSignedInfoTheoryData))] + [Theory, MemberData(nameof(ReadSignedInfoTheoryData), DisableDiscoveryEnumeration = true)] public void ReadSignedInfo(DSigSerializerTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReadSignedInfo", theoryData); @@ -337,7 +337,7 @@ public static TheoryData ReadSignedInfoTheoryData } } - [Theory, MemberData(nameof(WriteSignedInfoTheoryData))] + [Theory, MemberData(nameof(WriteSignedInfoTheoryData), DisableDiscoveryEnumeration = true)] public void WriteSignedInfo(DSigSerializerTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.WriteSignedInfo", theoryData); @@ -387,7 +387,7 @@ public static DSigSerializerTheoryData SignedInfoTest(SignedInfoTestSet testSet, }; } - [Theory, MemberData(nameof(ReadReferenceTheoryData))] + [Theory, MemberData(nameof(ReadReferenceTheoryData), DisableDiscoveryEnumeration = true)] public void ReadReference(DSigSerializerTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ReadReference", theoryData); @@ -433,7 +433,7 @@ public static DSigSerializerTheoryData ReferenceTest(ReferenceTestSet testSet, E }; } - [Theory, MemberData(nameof(ReadTransformsTheoryData))] + [Theory, MemberData(nameof(ReadTransformsTheoryData), DisableDiscoveryEnumeration = true)] public void ReadTransforms(DSigSerializerTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReadTransform", theoryData); @@ -506,7 +506,7 @@ public static DSigSerializerTheoryData TransformsTest(TransformTestSet testSet, }; } - [Theory, MemberData(nameof(ReadTransformTheoryData))] + [Theory, MemberData(nameof(ReadTransformTheoryData), DisableDiscoveryEnumeration = true)] public void ReadTransform(DSigSerializerTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ReadTransforms", theoryData); @@ -553,7 +553,7 @@ public static DSigSerializerTheoryData TransformsTest(TransformsTestSet testSet, }; } - [Theory, MemberData(nameof(WriteReferenceTheoryData))] + [Theory, MemberData(nameof(WriteReferenceTheoryData), DisableDiscoveryEnumeration = true)] public void WriteReference(DSigSerializerTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.WriteReference", theoryData); diff --git a/test/Microsoft.IdentityModel.Xml.Tests/DelegatingXmlDictionaryReaderTests.cs b/test/Microsoft.IdentityModel.Xml.Tests/DelegatingXmlDictionaryReaderTests.cs index 50a66c9eed..8eb3e20115 100644 --- a/test/Microsoft.IdentityModel.Xml.Tests/DelegatingXmlDictionaryReaderTests.cs +++ b/test/Microsoft.IdentityModel.Xml.Tests/DelegatingXmlDictionaryReaderTests.cs @@ -13,7 +13,7 @@ namespace Microsoft.IdentityModel.Tokens.Xml.Tests { public class DelegatingXmlDictionaryReaderTests { - [Theory, MemberData(nameof(ReadXmlTheoryData))] + [Theory, MemberData(nameof(ReadXmlTheoryData), DisableDiscoveryEnumeration = true)] public void ReadXml(DelegatingXmlDictionaryReaderTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReadXml", theoryData); @@ -40,7 +40,7 @@ public void ReadXml(DelegatingXmlDictionaryReaderTheoryData theoryData) TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(ReadPartialXmlWithUniqueIdTheoryData))] + [Theory, MemberData(nameof(ReadPartialXmlWithUniqueIdTheoryData), DisableDiscoveryEnumeration = true)] public void ReadPartialXml(DelegatingXmlDictionaryReaderTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReadXml", theoryData); diff --git a/test/Microsoft.IdentityModel.Xml.Tests/DelegatingXmlDictionaryWriterTests.cs b/test/Microsoft.IdentityModel.Xml.Tests/DelegatingXmlDictionaryWriterTests.cs index 25f3c240a8..85fc1f3424 100644 --- a/test/Microsoft.IdentityModel.Xml.Tests/DelegatingXmlDictionaryWriterTests.cs +++ b/test/Microsoft.IdentityModel.Xml.Tests/DelegatingXmlDictionaryWriterTests.cs @@ -14,7 +14,7 @@ namespace Microsoft.IdentityModel.Tokens.Xml.Tests { public class DelegatingXmlDictionaryWriterTests { - [Theory, MemberData(nameof(WriteXmlTheoryData))] + [Theory, MemberData(nameof(WriteXmlTheoryData), DisableDiscoveryEnumeration = true)] public void WriteXml(DelegatingXmlDictionaryWriterTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.WriteXml", theoryData); diff --git a/test/Microsoft.IdentityModel.Xml.Tests/EnvelopedSignatureReaderTests.cs b/test/Microsoft.IdentityModel.Xml.Tests/EnvelopedSignatureReaderTests.cs index b6e9267556..72f46353d0 100644 --- a/test/Microsoft.IdentityModel.Xml.Tests/EnvelopedSignatureReaderTests.cs +++ b/test/Microsoft.IdentityModel.Xml.Tests/EnvelopedSignatureReaderTests.cs @@ -40,7 +40,7 @@ public void GetSets() TestUtilities.AssertFailIfErrors($"{this}.GetSets", context.Errors); } - [Theory, MemberData(nameof(ConstructorTheoryData))] + [Theory, MemberData(nameof(ConstructorTheoryData), DisableDiscoveryEnumeration = true)] public void Constructor(EnvelopedSignatureTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.Constructor", theoryData); @@ -83,7 +83,7 @@ public static TheoryData ConstructorTheoryData } } - [Theory, MemberData(nameof(ReadSignedXmlTheoryData))] + [Theory, MemberData(nameof(ReadSignedXmlTheoryData), DisableDiscoveryEnumeration = true)] public void ReadSignedXml(EnvelopedSignatureTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ReadSignedXml", theoryData); @@ -163,7 +163,7 @@ public static TheoryData ReadSignedXmlTheoryData } } - [Theory, MemberData(nameof(ReadXmlElementsTheoryData))] + [Theory, MemberData(nameof(ReadXmlElementsTheoryData), DisableDiscoveryEnumeration = true)] public void ReadXmlElements(EnvelopedSignatureTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ReadXmlElements", theoryData); diff --git a/test/Microsoft.IdentityModel.Xml.Tests/EnvelopedSignatureWriterTests.cs b/test/Microsoft.IdentityModel.Xml.Tests/EnvelopedSignatureWriterTests.cs index 3aec7aef96..91e91020a5 100644 --- a/test/Microsoft.IdentityModel.Xml.Tests/EnvelopedSignatureWriterTests.cs +++ b/test/Microsoft.IdentityModel.Xml.Tests/EnvelopedSignatureWriterTests.cs @@ -18,7 +18,7 @@ namespace Microsoft.IdentityModel.Tokens.Xml.Tests { public class EnvelopedSignatureWriterTests { - [Theory, MemberData(nameof(ConstructorTestCases))] + [Theory, MemberData(nameof(ConstructorTestCases), DisableDiscoveryEnumeration = true)] public void Constructor(EnvelopedSignatureTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.Constructor", theoryData); @@ -60,7 +60,7 @@ public static TheoryData ConstructorTestCases } } - [Theory, MemberData(nameof(CreateSignatureWithoutSpecifyingDigestTestCases))] + [Theory, MemberData(nameof(CreateSignatureWithoutSpecifyingDigestTestCases), DisableDiscoveryEnumeration = true)] public void CreateSignatureWithoutSpecifyingDigest(EnvelopedSignatureTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateSignatureWithoutSpecifyingDigest", theoryData); @@ -149,7 +149,7 @@ private static EnvelopedSignatureTheoryData CreateSignatureTestCase(SecurityKey }; } - [Theory, MemberData(nameof(RoundTripSaml2TestCases))] + [Theory, MemberData(nameof(RoundTripSaml2TestCases), DisableDiscoveryEnumeration = true)] public void RoundTripSaml2(EnvelopedSignatureTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.RoundTripSaml2", theoryData); @@ -202,7 +202,7 @@ public static TheoryData RoundTripSaml2TestCases } } - [Theory, MemberData(nameof(RoundTripWsMetadataTestCases))] + [Theory, MemberData(nameof(RoundTripWsMetadataTestCases), DisableDiscoveryEnumeration = true)] public void RoundTripWsMetadata(EnvelopedSignatureTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.RoundTripWsMetadata", theoryData); diff --git a/test/Microsoft.IdentityModel.Xml.Tests/ExclusiveCanonicalizationTransformTests.cs b/test/Microsoft.IdentityModel.Xml.Tests/ExclusiveCanonicalizationTransformTests.cs index 57177862e7..aee55d614a 100644 --- a/test/Microsoft.IdentityModel.Xml.Tests/ExclusiveCanonicalizationTransformTests.cs +++ b/test/Microsoft.IdentityModel.Xml.Tests/ExclusiveCanonicalizationTransformTests.cs @@ -50,7 +50,7 @@ public void GetSets() TestUtilities.AssertFailIfErrors($"{this}.GetSets", context.Errors); } - [Theory, MemberData(nameof(ConstructorTheoryData))] + [Theory, MemberData(nameof(ConstructorTheoryData), DisableDiscoveryEnumeration = true)] public void Constructor(ExclusiveCanonicalizationTransformTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.Constructor", theoryData); @@ -83,7 +83,7 @@ public static TheoryData Construct } } - [Theory, MemberData(nameof(ProcessAndDigestTheoryData))] + [Theory, MemberData(nameof(ProcessAndDigestTheoryData), DisableDiscoveryEnumeration = true)] public void ProcessAndDigest(ExclusiveCanonicalizationTransformTheoryData theoryData) { TestUtilities.WriteHeader($"{this}", "ProcessAndDigest", true); diff --git a/test/Microsoft.IdentityModel.Xml.Tests/IssuerSerialTests.cs b/test/Microsoft.IdentityModel.Xml.Tests/IssuerSerialTests.cs index 7245b892ea..643f108a94 100644 --- a/test/Microsoft.IdentityModel.Xml.Tests/IssuerSerialTests.cs +++ b/test/Microsoft.IdentityModel.Xml.Tests/IssuerSerialTests.cs @@ -43,7 +43,7 @@ public void IssuerSerial_ListCollectionTests() Assert.True(Enumerable.SequenceEqual(list, secondList)); } - [Theory, MemberData(nameof(IssuerSerialComparisonData))] + [Theory, MemberData(nameof(IssuerSerialComparisonData), DisableDiscoveryEnumeration = true)] public void IssuerSerial_HashCodeTests(IssuerSerialComparisonTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.{nameof(IssuerSerial_HashCodeTests)}", theoryData); @@ -62,7 +62,7 @@ public void IssuerSerial_HashCodeTests(IssuerSerialComparisonTheoryData theoryDa TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(IssuerSerialComparisonData))] + [Theory, MemberData(nameof(IssuerSerialComparisonData), DisableDiscoveryEnumeration = true)] public void IssuerSerial_EqualsTests(IssuerSerialComparisonTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.{nameof(IssuerSerial_EqualsTests)}", theoryData); diff --git a/test/Microsoft.IdentityModel.Xml.Tests/KeyInfoTests.cs b/test/Microsoft.IdentityModel.Xml.Tests/KeyInfoTests.cs index 10351ad66e..8d0a2388d1 100644 --- a/test/Microsoft.IdentityModel.Xml.Tests/KeyInfoTests.cs +++ b/test/Microsoft.IdentityModel.Xml.Tests/KeyInfoTests.cs @@ -78,7 +78,7 @@ public void KeyInfo_HashCodeCollectionTests() #pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant - [Theory, MemberData(nameof(KeyInfoDataComparisonData))] + [Theory, MemberData(nameof(KeyInfoDataComparisonData), DisableDiscoveryEnumeration = true)] public void KeyInfo_HashCodeTests(KeyInfoComparisonTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.${nameof(KeyInfo_HashCodeTests)}", theoryData); @@ -98,7 +98,7 @@ public void KeyInfo_HashCodeTests(KeyInfoComparisonTheoryData theoryData) } - [Theory, MemberData(nameof(KeyInfoDataComparisonData))] + [Theory, MemberData(nameof(KeyInfoDataComparisonData), DisableDiscoveryEnumeration = true)] public void KeyInfo_EqualsTests(KeyInfoComparisonTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.{nameof(KeyInfo_EqualsTests)}", theoryData); diff --git a/test/Microsoft.IdentityModel.Xml.Tests/ReferenceTests.cs b/test/Microsoft.IdentityModel.Xml.Tests/ReferenceTests.cs index 87fb822bcd..693acfa599 100644 --- a/test/Microsoft.IdentityModel.Xml.Tests/ReferenceTests.cs +++ b/test/Microsoft.IdentityModel.Xml.Tests/ReferenceTests.cs @@ -80,7 +80,7 @@ public void VerifyReference() //MIIDCDCCAfCgAwIBAgIQNz4YVbYAIJVFCc47HFD3RzANBgkqhkiG9w0BAQsFADBAMT4wPAYDVQQDEzVBREZTIFNpZ25pbmcgLSBzdHMuc3ViMi5mcmFjYXMzNjUubXNmdG9ubGluZXJlcHJvLmNvbTAeFw0xNTAzMzExMDQyMTNaFw0zNDA1MzAxMDQyMTNaMEAxPjA8BgNVBAMTNUFERlMgU2lnbmluZyAtIHN0cy5zdWIyLmZyYWNhczM2NS5tc2Z0b25saW5lcmVwcm8uY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxdjzB+wGV6hYekOvWwKoL/DFNBiLQsLx6w02FzcFnpGwR38gVTn/glg9CNSsOT0riRM3/MwU8o2fwseQyVtv9Kee/yvia8cB6GD0CARlYizb6GkJJzMvWkPSas1zpn10Bs3SBBgn0pvAKZCWWir5WJ7DRY32X2yo2do8mQftsoLGYsEU8+jj9AMYQWaR3A86AEWjXoQY3AodfMMzdVFX+O/kjsvKcBfPqGRT6jUSGBOOaqzMOJBT39SueD8zePDW7SejBl7fRi4TLx5H6xuMldOAAH6oD70yIrobqosGG9X/LdijHajMSoaYzZIlG7fl4PCVvAjh1Dytw/y8K70flQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQBy08dAsSTKd2YlNE8bM4O5C2bFKR1YakR8L/zLEy8g+RNsKN5V/cIll0b/tf9iQ5464nc+nM///U+UVxqT8ipeR7ThIPwuWX98cFZFQNNGkha4PaYap/osquEpRAJOcTqZf2K95ipeQ+5Hhw00mK0hcV1QT/7maTUqCHDfBCaD+uYAFvaNBXOYpdoIGM9cMk7Qjc/yowLDm+DpmJek54MWmN+iZ0YtDEhMSh//QPFMLPT5Ucat+qRTen1HZNGdxfZ7NIIDL3dNKVDN+vDUbW7rjvPyxA8Rtj4JplI9ENqpzRq4m1sDWUTk2hJYw9Ec1kGo7AFKRmOS6DRbwUn5Ptdc } - [Theory, MemberData(nameof(VerifyTheoryData))] + [Theory, MemberData(nameof(VerifyTheoryData), DisableDiscoveryEnumeration = true)] public void Verify(ReferenceTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.Verify", theoryData); diff --git a/test/Microsoft.IdentityModel.Xml.Tests/RsaKeyValueTests.cs b/test/Microsoft.IdentityModel.Xml.Tests/RsaKeyValueTests.cs index 4bce215215..ea2d3d579b 100644 --- a/test/Microsoft.IdentityModel.Xml.Tests/RsaKeyValueTests.cs +++ b/test/Microsoft.IdentityModel.Xml.Tests/RsaKeyValueTests.cs @@ -42,7 +42,7 @@ public void RsaKeyValue_HashSetCollectionTests() Assert.True(inCollection); } - [Theory, MemberData(nameof(IssuerSerialComparisonData))] + [Theory, MemberData(nameof(IssuerSerialComparisonData), DisableDiscoveryEnumeration = true)] public void RsaKeyValue_HashCodeTests(RsaKeyValueComparisonTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.{nameof(RsaKeyValue_HashCodeTests)}", theoryData); @@ -61,7 +61,7 @@ public void RsaKeyValue_HashCodeTests(RsaKeyValueComparisonTheoryData theoryData TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(IssuerSerialComparisonData))] + [Theory, MemberData(nameof(IssuerSerialComparisonData), DisableDiscoveryEnumeration = true)] public void RsaKeyValue_EqualsTests(RsaKeyValueComparisonTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.{nameof(RsaKeyValue_EqualsTests)}", theoryData); diff --git a/test/Microsoft.IdentityModel.Xml.Tests/SignatureTests.cs b/test/Microsoft.IdentityModel.Xml.Tests/SignatureTests.cs index 59d6fee2e7..cb4fd3e719 100644 --- a/test/Microsoft.IdentityModel.Xml.Tests/SignatureTests.cs +++ b/test/Microsoft.IdentityModel.Xml.Tests/SignatureTests.cs @@ -57,7 +57,7 @@ public void Publics() TestUtilities.AssertFailIfErrors($"{this}.Publics", context.Errors); } - [Theory, MemberData(nameof(ConstructorTheoryData))] + [Theory, MemberData(nameof(ConstructorTheoryData), DisableDiscoveryEnumeration = true)] public void Constructor(SignatureTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.Constructor", theoryData); @@ -97,7 +97,7 @@ public static TheoryData ConstructorTheoryData } } - [Theory, MemberData(nameof(VerifyTheoryData))] + [Theory, MemberData(nameof(VerifyTheoryData), DisableDiscoveryEnumeration = true)] public void Verify(SignatureTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.Verify", theoryData); diff --git a/test/Microsoft.IdentityModel.Xml.Tests/SignedInfoTests.cs b/test/Microsoft.IdentityModel.Xml.Tests/SignedInfoTests.cs index 461bf56085..dbb96f400c 100644 --- a/test/Microsoft.IdentityModel.Xml.Tests/SignedInfoTests.cs +++ b/test/Microsoft.IdentityModel.Xml.Tests/SignedInfoTests.cs @@ -36,7 +36,7 @@ public void GetSets() TestUtilities.AssertFailIfErrors($"{this}.GetSets", context.Errors); } - [Theory, MemberData(nameof(SignedInfoConstructorTheoryData))] + [Theory, MemberData(nameof(SignedInfoConstructorTheoryData), DisableDiscoveryEnumeration = true)] public void SignedInfoConstructor(SignedInfoTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.SignedInfoConstructor", theoryData); diff --git a/test/Microsoft.IdentityModel.Xml.Tests/TransformFactoryTest.cs b/test/Microsoft.IdentityModel.Xml.Tests/TransformFactoryTest.cs index cf4741a45d..1dfdeb46d0 100644 --- a/test/Microsoft.IdentityModel.Xml.Tests/TransformFactoryTest.cs +++ b/test/Microsoft.IdentityModel.Xml.Tests/TransformFactoryTest.cs @@ -12,7 +12,7 @@ namespace Microsoft.IdentityModel.Tokens.Xml.Tests { public class TransformFactoryTest { - [Theory, MemberData(nameof(GetTransformTestTheoryData))] + [Theory, MemberData(nameof(GetTransformTestTheoryData), DisableDiscoveryEnumeration = true)] public void GetTransformTest(TransformTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.GetTransformTest", theoryData); @@ -48,7 +48,7 @@ public static TheoryData GetTransformTestTheoryData() }; } - [Theory, MemberData(nameof(GetCanonicalizingTransformTestTheoryData))] + [Theory, MemberData(nameof(GetCanonicalizingTransformTestTheoryData), DisableDiscoveryEnumeration = true)] public void GetCanonicalizingTransformTest(TransformTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.GetCanonicalizingTransformTest", theoryData); diff --git a/test/Microsoft.IdentityModel.Xml.Tests/X509DataTests.cs b/test/Microsoft.IdentityModel.Xml.Tests/X509DataTests.cs index 3d48e41f45..8abda3189c 100644 --- a/test/Microsoft.IdentityModel.Xml.Tests/X509DataTests.cs +++ b/test/Microsoft.IdentityModel.Xml.Tests/X509DataTests.cs @@ -52,7 +52,7 @@ public void X509Data_HashSetCollectionTests() Assert.True(inCollection); } - [Theory, MemberData(nameof(X509DataComparisonData))] + [Theory, MemberData(nameof(X509DataComparisonData), DisableDiscoveryEnumeration = true)] public void X509Data_HashCodeTests(X509DataComparisonTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.{nameof(X509Data_HashCodeTests)}", theoryData); @@ -72,7 +72,7 @@ public void X509Data_HashCodeTests(X509DataComparisonTheoryData theoryData) } - [Theory, MemberData(nameof(X509DataComparisonData))] + [Theory, MemberData(nameof(X509DataComparisonData), DisableDiscoveryEnumeration = true)] public void X509Data_EqualsTests(X509DataComparisonTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.{nameof(X509Data_EqualsTests)}", theoryData); diff --git a/test/System.IdentityModel.Tokens.Jwt.Tests/CreateAndValidateTokens.cs b/test/System.IdentityModel.Tokens.Jwt.Tests/CreateAndValidateTokens.cs index f34a4d45bb..a5d44aee38 100644 --- a/test/System.IdentityModel.Tokens.Jwt.Tests/CreateAndValidateTokens.cs +++ b/test/System.IdentityModel.Tokens.Jwt.Tests/CreateAndValidateTokens.cs @@ -165,7 +165,7 @@ public void EmptyToken() TestUtilities.AssertFailIfErrors(context.Diffs); } - [Theory, MemberData(nameof(RoundTripTokensUsingCacheTheoryData))] + [Theory, MemberData(nameof(RoundTripTokensUsingCacheTheoryData), DisableDiscoveryEnumeration = true)] public void RoundTripTokensUsingCache(JwtTheoryData theoryData) { var handler = new JwtSecurityTokenHandler(); @@ -390,7 +390,7 @@ public static TheoryData RoundTripTokensUsingCacheTheoryData() } - [Theory, MemberData(nameof(RoundTripTokensTheoryData))] + [Theory, MemberData(nameof(RoundTripTokensTheoryData), DisableDiscoveryEnumeration = true)] public void RoundTripTokens(JwtTheoryData theoryData) { var handler = new JwtSecurityTokenHandler(); @@ -636,7 +636,7 @@ public static TheoryData RoundTripTokensTheoryData() return theoryData; } - [Theory, MemberData(nameof(SerializeDeserializeJwtTokensTheoryData))] + [Theory, MemberData(nameof(SerializeDeserializeJwtTokensTheoryData), DisableDiscoveryEnumeration = true)] public void SerializeDeserializeJwtTokens(JwtTheoryData theoryData) { var handler = new JwtSecurityTokenHandler(); @@ -679,7 +679,7 @@ public static TheoryData SerializeDeserializeJwtTokensTheoryData } } - [Theory, MemberData(nameof(RoundTripJWEParams))] + [Theory, MemberData(nameof(RoundTripJWEParams), DisableDiscoveryEnumeration = true)] public void RoundTripJWETokens(string testId, SecurityTokenDescriptor tokenDescriptor, TokenValidationParameters validationParameters, ExpectedException ee) { var handler = new JwtSecurityTokenHandler(); @@ -875,7 +875,7 @@ public static TheoryData claims, JwtPayload payloadDirect, JwtPayload payloadUsingNewtonsoft) #pragma warning restore xUnit1026 // Theory methods should use all of their parameters diff --git a/test/System.IdentityModel.Tokens.Jwt.Tests/JwtReferenceTests.cs b/test/System.IdentityModel.Tokens.Jwt.Tests/JwtReferenceTests.cs index a7f2bc0c79..65eada6d95 100644 --- a/test/System.IdentityModel.Tokens.Jwt.Tests/JwtReferenceTests.cs +++ b/test/System.IdentityModel.Tokens.Jwt.Tests/JwtReferenceTests.cs @@ -12,7 +12,7 @@ namespace System.IdentityModel.Tokens.Jwt.Tests { public class JwtReferenceTests { - [Theory, MemberData(nameof(Base64UrlEncodingTheoryData))] + [Theory, MemberData(nameof(Base64UrlEncodingTheoryData), DisableDiscoveryEnumeration = true)] public void Base64UrlEncoding(string testId, string dataToEncode, string encodedData) { TestUtilities.WriteHeader($"Base64UrlEncoding - {testId}", true); @@ -35,7 +35,7 @@ public static TheoryData Base64UrlEncodingTheoryData } } - [Theory, MemberData(nameof(JwtEncodingTheoryData))] + [Theory, MemberData(nameof(JwtEncodingTheoryData), DisableDiscoveryEnumeration = true)] public void JwtEncoding(string testId, JwtHeader header, string encodedData) { TestUtilities.WriteHeader($"JwtEncoding - {testId}", true); @@ -56,7 +56,7 @@ public static TheoryData JwtEncodingTheoryData } } - [Theory, MemberData(nameof(JwtSigningTheoryData))] + [Theory, MemberData(nameof(JwtSigningTheoryData), DisableDiscoveryEnumeration = true)] public void JwtSigning(JwtSigningTestParams testParams) { var providerForSigning = CryptoProviderFactory.Default.CreateForSigning(testParams.PrivateKey, testParams.Algorithm); diff --git a/test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenConverterTests.cs b/test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenConverterTests.cs index fd7fddf748..532c4971b5 100644 --- a/test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenConverterTests.cs +++ b/test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenConverterTests.cs @@ -20,7 +20,7 @@ public void JwtSecurityTokenConverter_ThrowsOnNull() Assert.Throws(() => JwtSecurityTokenConverter.Convert(null)); } - [Theory, MemberData(nameof(ConverterTheoryData))] + [Theory, MemberData(nameof(ConverterTheoryData), DisableDiscoveryEnumeration = true)] public void JsonWebTokenToJwtSecurityTokenConversions(JwtSecurityTokenConverterTheoryData theoryData) { var output = JwtSecurityTokenConverter.Convert(theoryData.InputToken); diff --git a/test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenHandlerExtensibilityTests.cs b/test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenHandlerExtensibilityTests.cs index a601b01313..350a5dc271 100644 --- a/test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenHandlerExtensibilityTests.cs +++ b/test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenHandlerExtensibilityTests.cs @@ -11,7 +11,7 @@ namespace System.IdentityModel.Tokens.Jwt.Tests { public class JwtSecurityTokenHandlerExtensibilityTests { - [Theory, MemberData(nameof(DecryptTokenTheoryData))] + [Theory, MemberData(nameof(DecryptTokenTheoryData), DisableDiscoveryEnumeration = true)] public void DecryptToken(TheoryParams theoryParams) { try diff --git a/test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenHandlerTests.cs b/test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenHandlerTests.cs index 8eeefc13c0..1c02e91d48 100644 --- a/test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenHandlerTests.cs +++ b/test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenHandlerTests.cs @@ -56,7 +56,7 @@ public void JwtSecurityTokenHandler_CreateToken_SameTypeMultipleValues() Assert.NotNull(aTypeClaims.SingleOrDefault(c => c.Value == value)); } - [Theory, MemberData(nameof(CreateJWEWithPayloadStringTheoryData))] + [Theory, MemberData(nameof(CreateJWEWithPayloadStringTheoryData), DisableDiscoveryEnumeration = true)] public void CreateJWEWithAdditionalHeaderClaims(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateJWEWithAdditionalHeaderClaims", theoryData); @@ -258,7 +258,7 @@ public static TheoryData CreateJWEWithPayloadStringTheory } // Tests for expected differences between the JwtSecurityTokenHandler and the JsonWebTokenHandler. - [Theory, MemberData(nameof(CreateJWEUsingSecurityTokenDescriptorTheoryData))] + [Theory, MemberData(nameof(CreateJWEUsingSecurityTokenDescriptorTheoryData), DisableDiscoveryEnumeration = true)] public async Task CheckExpectedDifferenceInAudClaimUsingSecurityTokenDescriptor(CreateTokenTheoryData theoryData) { if (theoryData.TokenDescriptor == null) @@ -383,7 +383,7 @@ private static int GetClaimCountFromTokenDescriptorSubject(SecurityTokenDescript // Tests checks to make sure that the token string created by the JwtSecurityTokenHandler is consistent with the // token string created by the JsonWebTokenHandler. - [Theory, MemberData(nameof(CreateJWEUsingSecurityTokenDescriptorTheoryData))] + [Theory, MemberData(nameof(CreateJWEUsingSecurityTokenDescriptorTheoryData), DisableDiscoveryEnumeration = true)] public async Task CreateJWEUsingSecurityTokenDescriptor(CreateTokenTheoryData theoryData) { CompareContext context = TestUtilities.WriteHeader($"{this}.CreateJWEUsingSecurityTokenDescriptor", theoryData); @@ -639,7 +639,7 @@ public static TheoryData CreateJWEUsingSecurityTokenDescr } } - [Theory, MemberData(nameof(ActorTheoryData))] + [Theory, MemberData(nameof(ActorTheoryData), DisableDiscoveryEnumeration = true)] public void Actor(JwtTheoryData theoryData) { var context = new CompareContext(); @@ -798,7 +798,7 @@ public static TheoryData ActorTheoryData } } - [Theory, MemberData(nameof(BootstrapContextTheoryData))] + [Theory, MemberData(nameof(BootstrapContextTheoryData), DisableDiscoveryEnumeration = true)] public void BootstrapContext(JwtTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.BootstrapContext", theoryData); @@ -1158,7 +1158,7 @@ public void MapInboundClaims() Assert.True(JwtSecurityTokenHandler.DefaultMapInboundClaims == false); } - [Theory, MemberData(nameof(ReadTimesExpressedAsDoublesTheoryData))] + [Theory, MemberData(nameof(ReadTimesExpressedAsDoublesTheoryData), DisableDiscoveryEnumeration = true)] public void ReadTimesExpressedAsDoubles(JwtTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReadTimesExpressedAsDoubles", theoryData); @@ -1322,7 +1322,7 @@ public void InstanceClaimMappingAndFiltering() Assert.True(identity.HasClaim("internalClaim", "claimValue")); } - [Theory, MemberData(nameof(JweDecompressSizeTheoryData))] + [Theory, MemberData(nameof(JweDecompressSizeTheoryData), DisableDiscoveryEnumeration = true)] public async Task JWEDecompressionSizeTest(JWEDecompressionTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.JWEDecompressionTest", theoryData); @@ -1387,7 +1387,7 @@ public static TheoryData JweDecompressSizeTheoryData return theoryData; } - [Theory, MemberData(nameof(JWEDecompressionTheoryData))] + [Theory, MemberData(nameof(JWEDecompressionTheoryData), DisableDiscoveryEnumeration = true)] public void JWEDecompressionTest(JWEDecompressionTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.JWEDecompressionTest", theoryData); @@ -1535,7 +1535,7 @@ public void ValidateTokenReplay() TestUtilities.ValidateTokenReplay(Default.AsymmetricJwt, new JwtSecurityTokenHandler(), Default.AsymmetricSignTokenValidationParameters); } - [Theory, MemberData(nameof(SegmentTheoryData))] + [Theory, MemberData(nameof(SegmentTheoryData), DisableDiscoveryEnumeration = true)] public void SegmentRead(JwtTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.SegmentRead", theoryData); @@ -1552,7 +1552,7 @@ public void SegmentRead(JwtTheoryData theoryData) TestUtilities.AssertFailIfErrors(context); } - [Theory, MemberData(nameof(SegmentTheoryData))] + [Theory, MemberData(nameof(SegmentTheoryData), DisableDiscoveryEnumeration = true)] public void SegmentCanRead(JwtTheoryData theoryData) { Assert.Equal(theoryData.CanRead, theoryData.TokenHandler.CanReadToken(theoryData.Token)); @@ -1581,7 +1581,7 @@ public static TheoryData SegmentTheoryData() return theoryData; } - [Theory, MemberData(nameof(ValidateAlgorithmTheoryData))] + [Theory, MemberData(nameof(ValidateAlgorithmTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateAlgorithm(JwtTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ValidateAlgorithm", theoryData); @@ -1789,7 +1789,7 @@ public static TheoryData ValidateAlgorithmTheoryData } } - [Theory, MemberData(nameof(ValidateAudienceTheoryData))] + [Theory, MemberData(nameof(ValidateAudienceTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateAudience(JwtTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ValidateAudience", theoryData); @@ -1949,7 +1949,7 @@ private static TokenValidationParameters ValidateAudienceValidationParameters(st }; } - [Theory, MemberData(nameof(ValidateIssuerTheoryData))] + [Theory, MemberData(nameof(ValidateIssuerTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateIssuer(JwtTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ValidateIssuer", theoryData); @@ -2052,7 +2052,7 @@ public static TheoryData ValidateIssuerTheoryData } } - [Theory, MemberData(nameof(TokenReplayValidationTheoryData))] + [Theory, MemberData(nameof(TokenReplayValidationTheoryData), DisableDiscoveryEnumeration = true)] public void TokenReplayValidation(TokenReplayTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.TokenReplayValidation", theoryData); @@ -2109,7 +2109,7 @@ private static TokenValidationParameters ValidateIssuerValidationParameters(stri }; } - [Theory, MemberData(nameof(ValidateLifetimeTheoryData))] + [Theory, MemberData(nameof(ValidateLifetimeTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateLifetime(JwtTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ValidateLifetime", theoryData); @@ -2167,7 +2167,7 @@ private static TokenValidationParameters ValidateLifetimeValidationParameters(Li }; } - [Theory, MemberData(nameof(ValidateSignatureTheoryData))] + [Theory, MemberData(nameof(ValidateSignatureTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateSignature(JwtTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ValidateSignature", theoryData); @@ -2381,7 +2381,7 @@ private static TokenValidationParameters ValidateSignatureValidationParameters(S }; } - [Theory, MemberData(nameof(ValidateJwsWithConfigTheoryData))] + [Theory, MemberData(nameof(ValidateJwsWithConfigTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateJWSWithConfig(JwtTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateJWSWithConfig", theoryData); @@ -2432,7 +2432,7 @@ public static TheoryData ValidateJwsWithConfigTheoryData } } - [Theory, MemberData(nameof(ValidateJwsWithLastKnownGoodTheoryData))] + [Theory, MemberData(nameof(ValidateJwsWithLastKnownGoodTheoryData), DisableDiscoveryEnumeration = true)] public async Task ValidateJWSWithLastKnownGood(JwtTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateJWSWithLastKnownGood", theoryData); @@ -2483,7 +2483,7 @@ public async Task ValidateJWSWithLastKnownGood(JwtTheoryData theoryData) public static TheoryData ValidateJwsWithLastKnownGoodTheoryData => JwtTestDatasets.ValidateJwsWithLastKnownGoodTheoryData; - [Theory, MemberData(nameof(ValidateJWEWithLastKnownGoodTheoryData))] + [Theory, MemberData(nameof(ValidateJWEWithLastKnownGoodTheoryData), DisableDiscoveryEnumeration = true)] public async Task ValidateJWEWithLastKnownGood(JwtTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ValidateJWEWithLastKnownGood", theoryData); @@ -2534,7 +2534,7 @@ public async Task ValidateJWEWithLastKnownGood(JwtTheoryData theoryData) public static TheoryData ValidateJWEWithLastKnownGoodTheoryData => JwtTestDatasets.ValidateJWEWithLastKnownGoodTheoryData; - [Theory, MemberData(nameof(ValidateTokenTheoryData))] + [Theory, MemberData(nameof(ValidateTokenTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateToken(JwtTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ValidateToken", theoryData); @@ -2673,7 +2673,7 @@ public static TheoryData ValidateTokenTheoryData } - [Theory, MemberData(nameof(ValidateTypeTheoryData))] + [Theory, MemberData(nameof(ValidateTypeTheoryData), DisableDiscoveryEnumeration = true)] public void ValidateType(JwtTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ValidateType", theoryData); @@ -2832,7 +2832,7 @@ public int GetHashCode(Claim obj) } } - [Theory, MemberData(nameof(WriteTokenTheoryData))] + [Theory, MemberData(nameof(WriteTokenTheoryData), DisableDiscoveryEnumeration = true)] public void WriteToken(JwtTheoryData theoryData) { try @@ -2957,7 +2957,7 @@ public static TheoryData WriteTokenTheoryData() return theoryData; } - [Theory, MemberData(nameof(KeyWrapTokenTheoryData))] + [Theory, MemberData(nameof(KeyWrapTokenTheoryData), DisableDiscoveryEnumeration = true)] public void KeyWrapTokenTest(KeyWrapTokenTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.KeyWrapTokenTest", theoryData); @@ -3023,7 +3023,7 @@ public static TheoryData KeyWrapTokenTheoryData() return theoryData; } - [Theory, MemberData(nameof(ParametersCheckTheoryData))] + [Theory, MemberData(nameof(ParametersCheckTheoryData), DisableDiscoveryEnumeration = true)] public void ParametersCheckTest(ParametersCheckTheoryData theoryData) { TestUtilities.WriteHeader($"{this}.ParametersCheckTest", theoryData); @@ -3059,7 +3059,7 @@ public static TheoryData ParametersCheckTheoryData() }; } - [Theory, MemberData(nameof(SecurityTokenDecryptionTheoryData))] + [Theory, MemberData(nameof(SecurityTokenDecryptionTheoryData), DisableDiscoveryEnumeration = true)] public void GetEncryptionKeys(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.EncryptionKeysCheck", theoryData); @@ -3153,7 +3153,7 @@ public static TheoryData SecurityTokenDecryptionTheoryDat } } - [Theory, MemberData(nameof(SecurityKeyNotFoundExceptionTestTheoryData))] + [Theory, MemberData(nameof(SecurityKeyNotFoundExceptionTestTheoryData), DisableDiscoveryEnumeration = true)] public void SecurityKeyNotFoundExceptionTest(CreateTokenTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.SecurityKeyNotFoundExceptionTest", theoryData); diff --git a/test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenTests.cs b/test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenTests.cs index a80ae3397d..f231e27765 100644 --- a/test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenTests.cs +++ b/test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenTests.cs @@ -180,7 +180,7 @@ public void Constructors() }); } - [Theory, MemberData(nameof(EmbeddedTokenConstructorData))] + [Theory, MemberData(nameof(EmbeddedTokenConstructorData), DisableDiscoveryEnumeration = true)] public void EmbeddedTokenConstructor1(string testId, JwtSecurityTokenTestVariation outerTokenVariation, JwtSecurityTokenTestVariation innerTokenVariation, string jwt, ExpectedException ee) { JwtSecurityToken outerJwt = null; @@ -434,7 +434,7 @@ private JwtSecurityToken CreateToken(JwtSecurityTokenTestVariation variation) expires: variation.Expires); } - [Theory, MemberData(nameof(JwtSegmentTheoryData))] + [Theory, MemberData(nameof(JwtSegmentTheoryData), DisableDiscoveryEnumeration = true)] public void JwtSegment(JwtTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.JwtSegment", theoryData); From 9cf0aa4be85b128a5529e01efa7a76edf03f1b62 Mon Sep 17 00:00:00 2001 From: Kelly Song Date: Thu, 26 Sep 2024 12:13:17 -0700 Subject: [PATCH 2/2] fix copy past error --- test/Microsoft.IdentityModel.Tokens.Tests/JweUsingEchdTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/JweUsingEchdTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/JweUsingEchdTests.cs index 50a34a26be..8d6fc03866 100644 --- a/test/Microsoft.IdentityModel.Tokens.Tests/JweUsingEchdTests.cs +++ b/test/Microsoft.IdentityModel.Tokens.Tests/JweUsingEchdTests.cs @@ -16,7 +16,7 @@ namespace Microsoft.IdentityModel.Tokens.Tests { public class JweUsingEcdhEsTests { - [Theory, MemberData(nameof(CreateEcdhEsTestCases), DisableDiscoveryEnumeration = true)] + [Theory, MemberData(nameof(CreateEcdhEsTestcases), DisableDiscoveryEnumeration = true)] public async Task CreateJweEcdhEsTests(CreateEcdhEsTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.CreateJweEcdhEsTests", theoryData);