Skip to content

Commit 865c989

Browse files
committed
instantiate theory datas w/ testId via ctor
1 parent 418bc45 commit 865c989

File tree

1 file changed

+9
-18
lines changed

1 file changed

+9
-18
lines changed

test/Microsoft.IdentityModel.Protocols.SignedHttpRequest.Tests/PopKeyResolvingTests.cs

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -771,36 +771,32 @@ public static TheoryData<ResolvePopKeyTheoryData> GetPopKeysFromJkuAsyncTheoryDa
771771
{
772772
return new TheoryData<ResolvePopKeyTheoryData>
773773
{
774-
new ResolvePopKeyTheoryData
774+
new ResolvePopKeyTheoryData("InvalidJkuUrlNull")
775775
{
776776
First = true,
777777
JkuSetUrl = null,
778778
ExpectedException = ExpectedException.ArgumentNullException(),
779-
TestId = "InvalidJkuUrlNull",
780779
},
781-
new ResolvePopKeyTheoryData
780+
new ResolvePopKeyTheoryData("InvalidJkuUrlEmptyString")
782781
{
783782
JkuSetUrl = string.Empty,
784783
ExpectedException = ExpectedException.ArgumentNullException(),
785-
TestId = "InvalidJkuUrlEmptyString",
786784
},
787-
new ResolvePopKeyTheoryData
785+
new ResolvePopKeyTheoryData("InvalidHttpsRequired")
788786
{
789787
JkuSetUrl = "http://www.contoso.com",
790788
ExpectedException = new ExpectedException(typeof(SignedHttpRequestInvalidPopKeyException), "IDX23006"),
791-
TestId = "InvalidHttpsRequired",
792789
},
793-
new ResolvePopKeyTheoryData
790+
new ResolvePopKeyTheoryData("InvalidNoContentReturned")
794791
{
795792
JkuSetUrl = "https://www.contoso.com",
796793
SignedHttpRequestValidationParameters = new SignedHttpRequestValidationParameters()
797794
{
798795
HttpClientProvider = () => HttpResponseMessageUtils.SetupHttpClientThatReturns(string.Empty),
799796
},
800797
ExpectedException = new ExpectedException(typeof(SignedHttpRequestInvalidPopKeyException), "IDX23022", null, true),
801-
TestId = "InvalidNoContentReturned",
802798
},
803-
new ResolvePopKeyTheoryData
799+
new ResolvePopKeyTheoryData("InvalidHttpNoContentReturned")
804800
{
805801
JkuSetUrl = "http://www.contoso.com",
806802
SignedHttpRequestValidationParameters = new SignedHttpRequestValidationParameters()
@@ -809,47 +805,42 @@ public static TheoryData<ResolvePopKeyTheoryData> GetPopKeysFromJkuAsyncTheoryDa
809805
HttpClientProvider = () => HttpResponseMessageUtils.SetupHttpClientThatReturns(string.Empty),
810806
},
811807
ExpectedException = new ExpectedException(typeof(SignedHttpRequestInvalidPopKeyException), "IDX23022", null, true),
812-
TestId = "InvalidHttpNoContentReturned",
813808
},
814-
new ResolvePopKeyTheoryData
809+
new ResolvePopKeyTheoryData("Valid0KeysReturnedLive")
815810
{
816811
JkuSetUrl = "http://www.contoso.com",
817812
SignedHttpRequestValidationParameters = new SignedHttpRequestValidationParameters()
818813
{
819814
RequireHttpsForJkuResourceRetrieval = false,
820815
},
821816
ExpectedException = new ExpectedException(typeof(SignedHttpRequestInvalidPopKeyException), "IDX23022", typeof(ArgumentException)),
822-
TestId = "Valid0KeysReturnedLive",
823817
},
824-
new ResolvePopKeyTheoryData
818+
new ResolvePopKeyTheoryData("Valid0KeysReturned")
825819
{
826820
JkuSetUrl = "https://www.contoso.com",
827821
SignedHttpRequestValidationParameters = new SignedHttpRequestValidationParameters()
828822
{
829823
HttpClientProvider = () => HttpResponseMessageUtils.SetupHttpClientThatReturns("{\"test\": 1}"),
830824
},
831825
ExpectedNumberOfPopKeysReturned = 0,
832-
TestId = "Valid0KeysReturned",
833826
},
834-
new ResolvePopKeyTheoryData
827+
new ResolvePopKeyTheoryData("Valid2KeysReturned")
835828
{
836829
JkuSetUrl = "https://www.contoso.com",
837830
SignedHttpRequestValidationParameters = new SignedHttpRequestValidationParameters()
838831
{
839832
HttpClientProvider = () => HttpResponseMessageUtils.SetupHttpClientThatReturns(DataSets.JsonWebKeySetString1),
840833
},
841834
ExpectedNumberOfPopKeysReturned = 2,
842-
TestId = "Valid2KeysReturned",
843835
},
844-
new ResolvePopKeyTheoryData
836+
new ResolvePopKeyTheoryData("Valid3KeysReturned")
845837
{
846838
JkuSetUrl = "https://www.contoso.com",
847839
SignedHttpRequestValidationParameters = new SignedHttpRequestValidationParameters()
848840
{
849841
HttpClientProvider = () => HttpResponseMessageUtils.SetupHttpClientThatReturns(DataSets.JsonWebKeySetECCString),
850842
},
851843
ExpectedNumberOfPopKeysReturned = 3,
852-
TestId = "Valid3KeysReturned",
853844
},
854845
};
855846
}

0 commit comments

Comments
 (0)