diff options
Diffstat (limited to 'src')
90 files changed, 425 insertions, 425 deletions
diff --git a/src/DotNetOpenAuth.Test/Configuration/SectionTests.cs b/src/DotNetOpenAuth.Test/Configuration/SectionTests.cs index ac98205..3f6d4c9 100644 --- a/src/DotNetOpenAuth.Test/Configuration/SectionTests.cs +++ b/src/DotNetOpenAuth.Test/Configuration/SectionTests.cs @@ -13,7 +13,7 @@ namespace DotNetOpenAuth.Test.Configuration { [TestFixture] public class SectionTests { - [TestCase] + [Test] public void UntrustedWebRequest() { var uwr = DotNetOpenAuthSection.Messaging.UntrustedWebRequest; @@ -29,12 +29,12 @@ namespace DotNetOpenAuth.Test.Configuration { Assert.IsTrue(uwr.WhitelistHostsRegex.KeysAsStrings.Contains(".+trusted.+")); } - [TestCase] + [Test] public void OpenIdMaxAuthenticationTime() { Assert.AreEqual(TimeSpan.Parse("00:08:17"), OpenIdElement.Configuration.MaxAuthenticationTime); } - [TestCase] + [Test] public void OpenIdRelyingParty() { var rp = OpenIdElement.Configuration.RelyingParty; Assert.IsNull(rp.ApplicationStore.CustomType); @@ -45,7 +45,7 @@ namespace DotNetOpenAuth.Test.Configuration { Assert.IsFalse(rp.SecuritySettings.RequireSsl); } - [TestCase] + [Test] public void OpenIdProvider() { var op = OpenIdElement.Configuration.Provider; Assert.IsNull(op.ApplicationStore.CustomType); diff --git a/src/DotNetOpenAuth.Test/Hosting/HostingTests.cs b/src/DotNetOpenAuth.Test/Hosting/HostingTests.cs index 549b742..0f3f6e9 100644 --- a/src/DotNetOpenAuth.Test/Hosting/HostingTests.cs +++ b/src/DotNetOpenAuth.Test/Hosting/HostingTests.cs @@ -16,7 +16,7 @@ namespace DotNetOpenAuth.Test.Hosting { [TestFixture, Category("HostASPNET")] public class HostingTests : TestBase { - [TestCase] + [Test] public void AspHostBasicTest() { try { using (AspNetHost host = AspNetHost.CreateHost(TestWebDirectory)) { diff --git a/src/DotNetOpenAuth.Test/Messaging/Bindings/StandardExpirationBindingElementTests.cs b/src/DotNetOpenAuth.Test/Messaging/Bindings/StandardExpirationBindingElementTests.cs index b6dd02a..acd41bc 100644 --- a/src/DotNetOpenAuth.Test/Messaging/Bindings/StandardExpirationBindingElementTests.cs +++ b/src/DotNetOpenAuth.Test/Messaging/Bindings/StandardExpirationBindingElementTests.cs @@ -15,7 +15,7 @@ namespace DotNetOpenAuth.Test.Messaging.Bindings { [TestFixture] public class StandardExpirationBindingElementTests : MessagingTestBase { - [TestCase] + [Test] public void SendSetsTimestamp() { TestExpiringMessage message = new TestExpiringMessage(MessageTransport.Indirect); message.Recipient = new Uri("http://localtest"); @@ -26,13 +26,13 @@ namespace DotNetOpenAuth.Test.Messaging.Bindings { Assert.IsTrue(DateTime.UtcNow - ((IExpiringProtocolMessage)message).UtcCreationDate < TimeSpan.FromSeconds(3), "The timestamp on the message was not set on send."); } - [TestCase] + [Test] public void VerifyGoodTimestampIsAccepted() { this.Channel = CreateChannel(MessageProtections.Expiration); this.ParameterizedReceiveProtectedTest(DateTime.UtcNow, false); } - [TestCase] + [Test] public void VerifyFutureTimestampWithinClockSkewIsAccepted() { this.Channel = CreateChannel(MessageProtections.Expiration); this.ParameterizedReceiveProtectedTest(DateTime.UtcNow + DotNetOpenAuthSection.Messaging.MaximumClockSkew - TimeSpan.FromSeconds(1), false); diff --git a/src/DotNetOpenAuth.Test/Messaging/Bindings/StandardReplayProtectionBindingElementTests.cs b/src/DotNetOpenAuth.Test/Messaging/Bindings/StandardReplayProtectionBindingElementTests.cs index a429e17..34c3a85 100644 --- a/src/DotNetOpenAuth.Test/Messaging/Bindings/StandardReplayProtectionBindingElementTests.cs +++ b/src/DotNetOpenAuth.Test/Messaging/Bindings/StandardReplayProtectionBindingElementTests.cs @@ -39,7 +39,7 @@ namespace DotNetOpenAuth.Test.Messaging.Bindings { /// <summary> /// Verifies that the generated nonce includes random characters. /// </summary> - [TestCase] + [Test] public void RandomCharactersTest() { Assert.IsNotNull(this.nonceElement.ProcessOutgoingMessage(this.message)); Assert.IsNotNull(this.message.Nonce, "No nonce was set on the message."); @@ -56,7 +56,7 @@ namespace DotNetOpenAuth.Test.Messaging.Bindings { /// <summary> /// Verifies that a message is received correctly. /// </summary> - [TestCase] + [Test] public void ValidMessageReceivedTest() { this.message.Nonce = "a"; Assert.IsNotNull(this.nonceElement.ProcessIncomingMessage(this.message)); @@ -65,7 +65,7 @@ namespace DotNetOpenAuth.Test.Messaging.Bindings { /// <summary> /// Verifies that a message that doesn't have a string of random characters is received correctly. /// </summary> - [TestCase] + [Test] public void ValidMessageNoNonceReceivedTest() { this.message.Nonce = string.Empty; this.nonceElement.AllowZeroLengthNonce = true; diff --git a/src/DotNetOpenAuth.Test/Messaging/ChannelTests.cs b/src/DotNetOpenAuth.Test/Messaging/ChannelTests.cs index 2d103d1..425f5f3 100644 --- a/src/DotNetOpenAuth.Test/Messaging/ChannelTests.cs +++ b/src/DotNetOpenAuth.Test/Messaging/ChannelTests.cs @@ -24,12 +24,12 @@ namespace DotNetOpenAuth.Test.Messaging { new TestBadChannel(true); } - [TestCase] + [Test] public void ReadFromRequestQueryString() { this.ParameterizedReceiveTest("GET"); } - [TestCase] + [Test] public void ReadFromRequestForm() { this.ParameterizedReceiveTest("POST"); } @@ -68,7 +68,7 @@ namespace DotNetOpenAuth.Test.Messaging { this.Channel.PrepareResponse(message); } - [TestCase] + [Test] public void SendIndirectMessage301Get() { TestDirectedMessage message = new TestDirectedMessage(MessageTransport.Indirect); GetStandardTestMessage(FieldFill.CompleteBeforeBindings, message); @@ -109,7 +109,7 @@ namespace DotNetOpenAuth.Test.Messaging { badChannel.Create301RedirectResponse(message, null); } - [TestCase] + [Test] public void SendIndirectMessageFormPost() { // We craft a very large message to force fallback to form POST. // We'll also stick some HTML reserved characters in the string value @@ -183,13 +183,13 @@ namespace DotNetOpenAuth.Test.Messaging { badChannel.Receive(null, null); } - [TestCase] + [Test] public void ReceiveUnrecognizedMessage() { TestBadChannel badChannel = new TestBadChannel(false); Assert.IsNull(badChannel.Receive(new Dictionary<string, string>(), null)); } - [TestCase] + [Test] public void ReadFromRequestWithContext() { var fields = GetStandardTestFields(FieldFill.AllRequired); TestMessage expectedMessage = GetStandardTestMessage(FieldFill.AllRequired); @@ -214,7 +214,7 @@ namespace DotNetOpenAuth.Test.Messaging { badChannel.ReadFromRequest(null); } - [TestCase] + [Test] public void SendReplayProtectedMessageSetsNonce() { TestReplayProtectedMessage message = new TestReplayProtectedMessage(MessageTransport.Indirect); message.Recipient = new Uri("http://localtest"); @@ -230,7 +230,7 @@ namespace DotNetOpenAuth.Test.Messaging { this.ParameterizedReceiveProtectedTest(DateTime.UtcNow, true); } - [TestCase] + [Test] public void ReceivedReplayProtectedMessageJustOnce() { this.Channel = CreateChannel(MessageProtections.ReplayProtection); this.ParameterizedReceiveProtectedTest(DateTime.UtcNow, false); @@ -259,7 +259,7 @@ namespace DotNetOpenAuth.Test.Messaging { channel.ProcessOutgoingMessageTestHook(new TestSignedDirectedMessage()); } - [TestCase] + [Test] public void BindingElementsOrdering() { IChannelBindingElement transformA = new MockTransformationBindingElement("a"); IChannelBindingElement transformB = new MockTransformationBindingElement("b"); diff --git a/src/DotNetOpenAuth.Test/Messaging/EnumerableCacheTests.cs b/src/DotNetOpenAuth.Test/Messaging/EnumerableCacheTests.cs index 6b1caaa..f425563 100644 --- a/src/DotNetOpenAuth.Test/Messaging/EnumerableCacheTests.cs +++ b/src/DotNetOpenAuth.Test/Messaging/EnumerableCacheTests.cs @@ -37,7 +37,7 @@ namespace DotNetOpenAuth.Test.Messaging { this.generatorCompleted = 0; } - [TestCase] + [Test] public void EnumerableCache() { // Baseline var generator = this.NumberGenerator(); @@ -58,7 +58,7 @@ namespace DotNetOpenAuth.Test.Messaging { CollectionAssert.AreEqual(list1, list4); } - [TestCase] + [Test] public void GeneratesOnlyRequiredElements() { var generator = this.NumberGenerator().CacheGeneratedResults(); Assert.AreEqual(0, this.generatorInvocations); @@ -67,28 +67,28 @@ namespace DotNetOpenAuth.Test.Messaging { Assert.AreEqual(0, this.generatorCompleted, "Only taking part of the list should not have completed the generator."); } - [TestCase] + [Test] public void PassThruDoubleCache() { var cache1 = this.NumberGenerator().CacheGeneratedResults(); var cache2 = cache1.CacheGeneratedResults(); Assert.AreSame(cache1, cache2, "Two caches were set up rather than just sharing the first one."); } - [TestCase] + [Test] public void PassThruList() { var list = this.NumberGenerator().ToList(); var cache = list.CacheGeneratedResults(); Assert.AreSame(list, cache); } - [TestCase] + [Test] public void PassThruArray() { var array = this.NumberGenerator().ToArray(); var cache = array.CacheGeneratedResults(); Assert.AreSame(array, cache); } - [TestCase] + [Test] public void PassThruCollection() { var collection = new Collection<int>(); var cache = collection.CacheGeneratedResults(); diff --git a/src/DotNetOpenAuth.Test/Messaging/ErrorUtilitiesTests.cs b/src/DotNetOpenAuth.Test/Messaging/ErrorUtilitiesTests.cs index f58980a..10aeef1 100644 --- a/src/DotNetOpenAuth.Test/Messaging/ErrorUtilitiesTests.cs +++ b/src/DotNetOpenAuth.Test/Messaging/ErrorUtilitiesTests.cs @@ -16,7 +16,7 @@ namespace DotNetOpenAuth.Test.Messaging { ErrorUtilities.VerifyArgumentNotNull(null, "someArg"); } - [TestCase] + [Test] public void VerifyArgumentNotNullDoesNotThrow() { ErrorUtilities.VerifyArgumentNotNull("hi", "someArg"); } @@ -31,7 +31,7 @@ namespace DotNetOpenAuth.Test.Messaging { ErrorUtilities.VerifyNonZeroLength(string.Empty, "someArg"); } - [TestCase] + [Test] public void VerifyNonZeroLengthOnNonEmpty() { ErrorUtilities.VerifyNonZeroLength("some Value", "someArg"); } diff --git a/src/DotNetOpenAuth.Test/Messaging/HttpRequestInfoTests.cs b/src/DotNetOpenAuth.Test/Messaging/HttpRequestInfoTests.cs index dc1f633..b2f2b14 100644 --- a/src/DotNetOpenAuth.Test/Messaging/HttpRequestInfoTests.cs +++ b/src/DotNetOpenAuth.Test/Messaging/HttpRequestInfoTests.cs @@ -13,13 +13,13 @@ namespace DotNetOpenAuth.Test.Messaging { [TestFixture] public class HttpRequestInfoTests : TestBase { - [TestCase] + [Test] public void CtorDefault() { HttpRequestInfo info = new HttpRequestInfo(); Assert.AreEqual("GET", info.HttpMethod); } - [TestCase] + [Test] public void CtorRequest() { HttpRequest request = new HttpRequest("file", "http://someserver?a=b", "a=b"); ////request.Headers["headername"] = "headervalue"; // PlatformNotSupportedException prevents us mocking this up @@ -33,7 +33,7 @@ namespace DotNetOpenAuth.Test.Messaging { } // All these tests are ineffective because ServerVariables[] cannot be set. - ////[TestCase] + ////[Test] ////public void CtorRequestWithDifferentPublicHttpHost() { //// HttpRequest request = new HttpRequest("file", "http://someserver?a=b", "a=b"); //// request.ServerVariables["HTTP_HOST"] = "publichost"; @@ -44,7 +44,7 @@ namespace DotNetOpenAuth.Test.Messaging { //// Assert.AreEqual(request.QueryString["a"], info.QueryString["a"]); ////} - ////[TestCase] + ////[Test] ////public void CtorRequestWithDifferentPublicHttpsHost() { //// HttpRequest request = new HttpRequest("file", "https://someserver?a=b", "a=b"); //// request.ServerVariables["HTTP_HOST"] = "publichost"; @@ -55,7 +55,7 @@ namespace DotNetOpenAuth.Test.Messaging { //// Assert.AreEqual(request.QueryString["a"], info.QueryString["a"]); ////} - ////[TestCase] + ////[Test] ////public void CtorRequestWithDifferentPublicHostNonstandardPort() { //// HttpRequest request = new HttpRequest("file", "http://someserver?a=b", "a=b"); //// request.ServerVariables["HTTP_HOST"] = "publichost:550"; @@ -66,7 +66,7 @@ namespace DotNetOpenAuth.Test.Messaging { //// Assert.AreEqual(request.QueryString["a"], info.QueryString["a"]); ////} - ////[TestCase] + ////[Test] ////public void CtorRequestWithDifferentPublicIPv6Host() { //// HttpRequest request = new HttpRequest("file", "http://[fe80::587e:c6e5:d3aa:657a]:8089/v3.1/", ""); //// request.ServerVariables["HTTP_HOST"] = "[fe80::587e:c6e5:d3aa:657b]:8089"; @@ -80,7 +80,7 @@ namespace DotNetOpenAuth.Test.Messaging { /// Checks that a property dependent on another null property /// doesn't generate a NullReferenceException. /// </summary> - [TestCase] + [Test] public void QueryBeforeSettingUrl() { HttpRequestInfo info = new HttpRequestInfo(); Assert.IsNull(info.Query); @@ -89,7 +89,7 @@ namespace DotNetOpenAuth.Test.Messaging { /// <summary> /// Verifies that looking up a querystring variable is gracefully handled without a query in the URL. /// </summary> - [TestCase] + [Test] public void QueryStringLookupWithoutQuery() { HttpRequestInfo info = new HttpRequestInfo(); Assert.IsNull(info.QueryString["hi"]); @@ -98,7 +98,7 @@ namespace DotNetOpenAuth.Test.Messaging { /// <summary> /// Verifies SSL forwarders are correctly handled when they supply X_FORWARDED_PROTO and HOST /// </summary> - [TestCase] + [Test] public void GetPublicFacingUrlSSLForwarder1() { HttpRequest req = new HttpRequest("a.aspx", "http://someinternalhost/a.aspx?a=b", "a=b"); var serverVariables = new NameValueCollection(); @@ -112,7 +112,7 @@ namespace DotNetOpenAuth.Test.Messaging { /// <summary> /// Verifies SSL forwarders are correctly handled when they supply X_FORWARDED_PROTO and HOST:port /// </summary> - [TestCase] + [Test] public void GetPublicFacingUrlSSLForwarder2() { HttpRequest req = new HttpRequest("a.aspx", "http://someinternalhost/a.aspx?a=b", "a=b"); var serverVariables = new NameValueCollection(); @@ -126,7 +126,7 @@ namespace DotNetOpenAuth.Test.Messaging { /// <summary> /// Verifies SSL forwarders are correctly handled when they supply just HOST /// </summary> - [TestCase] + [Test] public void GetPublicFacingUrlSSLForwarder3() { HttpRequest req = new HttpRequest("a.aspx", "http://someinternalhost/a.aspx?a=b", "a=b"); var serverVariables = new NameValueCollection(); @@ -139,7 +139,7 @@ namespace DotNetOpenAuth.Test.Messaging { /// <summary> /// Verifies SSL forwarders are correctly handled when they supply just HOST:port /// </summary> - [TestCase] + [Test] public void GetPublicFacingUrlSSLForwarder4() { HttpRequest req = new HttpRequest("a.aspx", "http://someinternalhost/a.aspx?a=b", "a=b"); var serverVariables = new NameValueCollection(); diff --git a/src/DotNetOpenAuth.Test/Messaging/MessageSerializerTests.cs b/src/DotNetOpenAuth.Test/Messaging/MessageSerializerTests.cs index f44f94a..cdc2e27 100644 --- a/src/DotNetOpenAuth.Test/Messaging/MessageSerializerTests.cs +++ b/src/DotNetOpenAuth.Test/Messaging/MessageSerializerTests.cs @@ -58,7 +58,7 @@ namespace DotNetOpenAuth.Test.Messaging { /// <summary> /// Verifies JSON serialization /// </summary> - [TestCase] + [Test] public void SerializeDeserializeJson() { var serializer = MessageSerializer.Get(typeof(Mocks.TestMessage)); var message = GetStandardTestMessage(FieldFill.CompleteBeforeBindings); @@ -89,7 +89,7 @@ namespace DotNetOpenAuth.Test.Messaging { MessageSerializer.Deserialize(null, null); } - [TestCase] + [Test] public void DeserializeSimple() { var serializer = MessageSerializer.Get(typeof(Mocks.TestMessage)); Dictionary<string, string> fields = new Dictionary<string, string>(StringComparer.Ordinal); @@ -112,7 +112,7 @@ namespace DotNetOpenAuth.Test.Messaging { /// The element sorting rules are first inheritance order, then alphabetical order. /// This test validates correct behavior on both. /// </remarks> - [TestCase] + [Test] public void DeserializeVerifyElementOrdering() { var serializer = MessageSerializer.Get(typeof(Mocks.TestDerivedMessage)); Dictionary<string, string> fields = new Dictionary<string, string>(StringComparer.Ordinal); @@ -136,7 +136,7 @@ namespace DotNetOpenAuth.Test.Messaging { Assert.AreEqual("privateValue", actual.PrivatePropertyAccessor); } - [TestCase] + [Test] public void DeserializeWithExtraFields() { var serializer = MessageSerializer.Get(typeof(Mocks.TestMessage)); Dictionary<string, string> fields = new Dictionary<string, string>(StringComparer.Ordinal); diff --git a/src/DotNetOpenAuth.Test/Messaging/MessagingUtilitiesTests.cs b/src/DotNetOpenAuth.Test/Messaging/MessagingUtilitiesTests.cs index 0550f9d..1f4b1d0 100644 --- a/src/DotNetOpenAuth.Test/Messaging/MessagingUtilitiesTests.cs +++ b/src/DotNetOpenAuth.Test/Messaging/MessagingUtilitiesTests.cs @@ -19,7 +19,7 @@ namespace DotNetOpenAuth.Test.Messaging { [TestFixture] public class MessagingUtilitiesTests : TestBase { - [TestCase] + [Test] public void CreateQueryString() { var args = new Dictionary<string, string>(); args.Add("a", "b"); @@ -27,7 +27,7 @@ namespace DotNetOpenAuth.Test.Messaging { Assert.AreEqual("a=b&c%2Fd=e%2Ff", MessagingUtilities.CreateQueryString(args)); } - [TestCase] + [Test] public void CreateQueryStringEmptyCollection() { Assert.AreEqual(0, MessagingUtilities.CreateQueryString(new Dictionary<string, string>()).Length); } @@ -37,7 +37,7 @@ namespace DotNetOpenAuth.Test.Messaging { MessagingUtilities.CreateQueryString(null); } - [TestCase] + [Test] public void AppendQueryArgs() { UriBuilder uri = new UriBuilder("http://baseline.org/page"); var args = new Dictionary<string, string>(); @@ -56,12 +56,12 @@ namespace DotNetOpenAuth.Test.Messaging { MessagingUtilities.AppendQueryArgs(null, new Dictionary<string, string>()); } - [TestCase] + [Test] public void AppendQueryArgsNullDictionary() { MessagingUtilities.AppendQueryArgs(new UriBuilder(), null); } - [TestCase] + [Test] public void ToDictionary() { NameValueCollection nvc = new NameValueCollection(); nvc["a"] = "b"; @@ -81,7 +81,7 @@ namespace DotNetOpenAuth.Test.Messaging { nvc.ToDictionary(true); } - [TestCase] + [Test] public void ToDictionaryWithSkippedNullKey() { NameValueCollection nvc = new NameValueCollection(); nvc[null] = "a"; @@ -91,7 +91,7 @@ namespace DotNetOpenAuth.Test.Messaging { Assert.AreEqual(nvc["b"], dictionary["b"]); } - [TestCase] + [Test] public void ToDictionaryNull() { Assert.IsNull(MessagingUtilities.ToDictionary(null)); } @@ -111,7 +111,7 @@ namespace DotNetOpenAuth.Test.Messaging { MessagingUtilities.ApplyHeadersToResponse(null, new HttpResponseWrapper(new HttpResponse(new StringWriter()))); } - [TestCase] + [Test] public void ApplyHeadersToResponse() { var headers = new WebHeaderCollection(); headers[HttpResponseHeader.ContentType] = "application/binary"; @@ -128,7 +128,7 @@ namespace DotNetOpenAuth.Test.Messaging { /// <remarks> /// The tests in this method come from http://wiki.oauth.net/TestCases /// </remarks> - [TestCase] + [Test] public void EscapeUriDataStringRfc3986Tests() { Assert.AreEqual("abcABC123", MessagingUtilities.EscapeUriDataStringRfc3986("abcABC123")); Assert.AreEqual("-._~", MessagingUtilities.EscapeUriDataStringRfc3986("-._~")); @@ -145,7 +145,7 @@ namespace DotNetOpenAuth.Test.Messaging { /// <summary> /// Verifies the overall format of the multipart POST is correct. /// </summary> - [TestCase] + [Test] public void PostMultipart() { var httpHandler = new TestWebRequestHandler(); bool callbackTriggered = false; @@ -174,7 +174,7 @@ namespace DotNetOpenAuth.Test.Messaging { /// <summary> /// Verifies proper behavior of GetHttpVerb /// </summary> - [TestCase] + [Test] public void GetHttpVerbTest() { Assert.AreEqual("GET", MessagingUtilities.GetHttpVerb(HttpDeliveryMethods.GetRequest)); Assert.AreEqual("POST", MessagingUtilities.GetHttpVerb(HttpDeliveryMethods.PostRequest)); @@ -200,7 +200,7 @@ namespace DotNetOpenAuth.Test.Messaging { /// <summary> /// Verifies proper behavior of GetHttpDeliveryMethod /// </summary> - [TestCase] + [Test] public void GetHttpDeliveryMethodTest() { Assert.AreEqual(HttpDeliveryMethods.GetRequest, MessagingUtilities.GetHttpDeliveryMethod("GET")); Assert.AreEqual(HttpDeliveryMethods.PostRequest, MessagingUtilities.GetHttpDeliveryMethod("POST")); @@ -217,7 +217,7 @@ namespace DotNetOpenAuth.Test.Messaging { MessagingUtilities.GetHttpDeliveryMethod("UNRECOGNIZED"); } - [TestCase] + [Test] public void EncryptDecrypt() { const string PlainText = "Hi folks!"; byte[] key = MessagingUtilities.GetCryptoRandomData(128 / 8); @@ -232,7 +232,7 @@ namespace DotNetOpenAuth.Test.Messaging { /// <summary> /// Verifies that the time-independent string equality check works accurately. /// </summary> - [TestCase] + [Test] public void EqualsConstantTime() { this.EqualsConstantTimeHelper(null, null); this.EqualsConstantTimeHelper(null, string.Empty); diff --git a/src/DotNetOpenAuth.Test/Messaging/MultipartPostPartTests.cs b/src/DotNetOpenAuth.Test/Messaging/MultipartPostPartTests.cs index d378692..39267ca 100644 --- a/src/DotNetOpenAuth.Test/Messaging/MultipartPostPartTests.cs +++ b/src/DotNetOpenAuth.Test/Messaging/MultipartPostPartTests.cs @@ -18,7 +18,7 @@ namespace DotNetOpenAuth.Test.Messaging { /// <summary> /// Verifies that the Length property matches the length actually serialized. /// </summary> - [TestCase] + [Test] public void FormDataSerializeMatchesLength() { var part = MultipartPostPart.CreateFormPart("a", "b"); VerifyLength(part); @@ -27,7 +27,7 @@ namespace DotNetOpenAuth.Test.Messaging { /// <summary> /// Verifies that the length property matches the length actually serialized. /// </summary> - [TestCase] + [Test] public void FileSerializeMatchesLength() { using (TempFileCollection tfc = new TempFileCollection()) { string file = tfc.AddExtension(".txt"); @@ -40,7 +40,7 @@ namespace DotNetOpenAuth.Test.Messaging { /// <summary> /// Verifies file multiparts identify themselves as files and not merely form-data. /// </summary> - [TestCase] + [Test] public void FilePartAsFile() { var part = MultipartPostPart.CreateFormFilePart("somename", "somefile", "plain/text", new MemoryStream()); Assert.AreEqual("file", part.ContentDisposition); @@ -49,7 +49,7 @@ namespace DotNetOpenAuth.Test.Messaging { /// <summary> /// Verifies MultiPartPost sends the right number of bytes. /// </summary> - [TestCase] + [Test] public void MultiPartPostAscii() { using (TempFileCollection tfc = new TempFileCollection()) { string file = tfc.AddExtension("txt"); @@ -64,7 +64,7 @@ namespace DotNetOpenAuth.Test.Messaging { /// <summary> /// Verifies MultiPartPost sends the right number of bytes. /// </summary> - [TestCase] + [Test] public void MultiPartPostMultiByteCharacters() { using (TempFileCollection tfc = new TempFileCollection()) { string file = tfc.AddExtension("txt"); diff --git a/src/DotNetOpenAuth.Test/Messaging/OutgoingWebResponseTests.cs b/src/DotNetOpenAuth.Test/Messaging/OutgoingWebResponseTests.cs index 7f8825a..3efc471 100644 --- a/src/DotNetOpenAuth.Test/Messaging/OutgoingWebResponseTests.cs +++ b/src/DotNetOpenAuth.Test/Messaging/OutgoingWebResponseTests.cs @@ -16,7 +16,7 @@ namespace DotNetOpenAuth.Test.Messaging { /// <summary> /// Verifies that setting the Body property correctly converts to a byte stream. /// </summary> - [TestCase] + [Test] public void SetBodyToByteStream() { var response = new OutgoingWebResponse(); string stringValue = "abc"; diff --git a/src/DotNetOpenAuth.Test/Messaging/ProtocolExceptionTests.cs b/src/DotNetOpenAuth.Test/Messaging/ProtocolExceptionTests.cs index 3a2f040..c05f8c3 100644 --- a/src/DotNetOpenAuth.Test/Messaging/ProtocolExceptionTests.cs +++ b/src/DotNetOpenAuth.Test/Messaging/ProtocolExceptionTests.cs @@ -11,18 +11,18 @@ namespace DotNetOpenAuth.Test.Messaging { [TestFixture] public class ProtocolExceptionTests : TestBase { - [TestCase] + [Test] public void CtorDefault() { ProtocolException ex = new ProtocolException(); } - [TestCase] + [Test] public void CtorWithTextMessage() { ProtocolException ex = new ProtocolException("message"); Assert.AreEqual("message", ex.Message); } - [TestCase] + [Test] public void CtorWithTextMessageAndInnerException() { Exception innerException = new Exception(); ProtocolException ex = new ProtocolException("message", innerException); @@ -30,7 +30,7 @@ namespace DotNetOpenAuth.Test.Messaging { Assert.AreSame(innerException, ex.InnerException); } - [TestCase] + [Test] public void CtorWithProtocolMessage() { IProtocolMessage message = new Mocks.TestDirectedMessage(); ProtocolException ex = new ProtocolException("message", message); diff --git a/src/DotNetOpenAuth.Test/Messaging/Reflection/MessageDescriptionTests.cs b/src/DotNetOpenAuth.Test/Messaging/Reflection/MessageDescriptionTests.cs index eea802b..66aef6c 100644 --- a/src/DotNetOpenAuth.Test/Messaging/Reflection/MessageDescriptionTests.cs +++ b/src/DotNetOpenAuth.Test/Messaging/Reflection/MessageDescriptionTests.cs @@ -27,7 +27,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { new MessageDescription(typeof(string), new Version(1, 0)); } - [TestCase] + [Test] public void MultiVersionedMessageTest() { var v10 = new MessageDescription(typeof(MultiVersionMessage), new Version(1, 0)); var v20 = new MessageDescription(typeof(MultiVersionMessage), new Version(2, 0)); @@ -76,7 +76,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { /// <summary> /// Verifies that the constructors cache is properly initialized. /// </summary> - [TestCase] + [Test] public void CtorsCache() { var message = new MessageDescription(typeof(MultiVersionMessage), new Version(1, 0)); Assert.IsNotNull(message.Constructors); diff --git a/src/DotNetOpenAuth.Test/Messaging/Reflection/MessageDictionaryTests.cs b/src/DotNetOpenAuth.Test/Messaging/Reflection/MessageDictionaryTests.cs index b5e32ff..ec21e31 100644 --- a/src/DotNetOpenAuth.Test/Messaging/Reflection/MessageDictionaryTests.cs +++ b/src/DotNetOpenAuth.Test/Messaging/Reflection/MessageDictionaryTests.cs @@ -33,7 +33,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { /// <summary> /// A test for System.Collections.Generic.IDictionary<System.String,System.String>.Values /// </summary> - [TestCase] + [Test] public void Values() { IDictionary<string, string> target = this.MessageDescriptions.GetAccessor(this.message); Collection<string> expected = new Collection<string> { @@ -59,7 +59,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { /// <summary> /// A test for System.Collections.Generic.IDictionary<System.String,System.String>.Keys /// </summary> - [TestCase] + [Test] public void Keys() { // We expect that non-nullable value type fields will automatically have keys // in the dictionary for them. @@ -80,7 +80,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { /// <summary> /// A test for System.Collections.Generic.IDictionary<System.String,System.String>.Item /// </summary> - [TestCase] + [Test] public void Item() { IDictionary<string, string> target = this.MessageDescriptions.GetAccessor(this.message); @@ -103,7 +103,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { /// <summary> /// A test for System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.String<<.IsReadOnly /// </summary> - [TestCase] + [Test] public void IsReadOnly() { ICollection<KeyValuePair<string, string>> target = this.MessageDescriptions.GetAccessor(this.message); Assert.IsFalse(target.IsReadOnly); @@ -112,7 +112,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { /// <summary> /// A test for System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.String<<.Count /// </summary> - [TestCase] + [Test] public void Count() { ICollection<KeyValuePair<string, string>> target = this.MessageDescriptions.GetAccessor(this.message); IDictionary<string, string> targetDictionary = (IDictionary<string, string>)target; @@ -124,7 +124,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { /// <summary> /// A test for System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String,System.String<<.GetEnumerator /// </summary> - [TestCase] + [Test] public void GetEnumerator() { IEnumerable<KeyValuePair<string, string>> target = this.MessageDescriptions.GetAccessor(this.message); IDictionary<string, string> targetDictionary = (IDictionary<string, string>)target; @@ -147,7 +147,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { Assert.IsTrue(keysLast == valuesLast && keysLast == actualLast); } - [TestCase] + [Test] public void GetEnumeratorUntyped() { IEnumerable target = this.MessageDescriptions.GetAccessor(this.message); IDictionary<string, string> targetDictionary = (IDictionary<string, string>)target; @@ -174,7 +174,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { /// <summary> /// A test for System.Collections.Generic.IDictionary<System.String,System.String>.TryGetValue /// </summary> - [TestCase] + [Test] public void TryGetValue() { IDictionary<string, string> target = this.MessageDescriptions.GetAccessor(this.message); this.message.Name = "andrew"; @@ -194,7 +194,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { /// <summary> /// A test for System.Collections.Generic.IDictionary<System.String,System.String>.Remove /// </summary> - [TestCase] + [Test] public void RemoveTest1() { IDictionary<string, string> target = this.MessageDescriptions.GetAccessor(this.message); this.message.Name = "andrew"; @@ -211,7 +211,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { /// <summary> /// A test for System.Collections.Generic.IDictionary<System.String,System.String>.ContainsKey /// </summary> - [TestCase] + [Test] public void ContainsKey() { IDictionary<string, string> target = this.MessageDescriptions.GetAccessor(this.message); Assert.IsTrue(target.ContainsKey("age"), "Value type declared element should have a key."); @@ -225,7 +225,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { /// <summary> /// A test for System.Collections.Generic.IDictionary<System.String,System.String>.Add /// </summary> - [TestCase] + [Test] public void AddByKeyAndValue() { IDictionary<string, string> target = this.MessageDescriptions.GetAccessor(this.message); target.Add("extra", "value"); @@ -243,7 +243,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { /// <summary> /// A test for System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.String<<.Add /// </summary> - [TestCase] + [Test] public void AddByKeyValuePair() { IDictionary<string, string> target = this.MessageDescriptions.GetAccessor(this.message); target.Add(new KeyValuePair<string, string>("extra", "value")); @@ -264,14 +264,14 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { target.Add("Name", "andrew"); } - [TestCase] + [Test] public void DefaultReferenceTypeDeclaredPropertyHasNoKey() { IDictionary<string, string> target = this.MessageDescriptions.GetAccessor(this.message); Assert.IsFalse(target.ContainsKey("Name"), "A null value should result in no key."); Assert.IsFalse(target.Keys.Contains("Name"), "A null value should result in no key."); } - [TestCase] + [Test] public void RemoveStructDeclaredProperty() { IDictionary<string, string> target = this.MessageDescriptions.GetAccessor(this.message); this.message.Age = 5; @@ -284,7 +284,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { /// <summary> /// A test for System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.String<<.Remove /// </summary> - [TestCase] + [Test] public void RemoveByKeyValuePair() { ICollection<KeyValuePair<string, string>> target = this.MessageDescriptions.GetAccessor(this.message); this.message.Name = "Andrew"; @@ -297,7 +297,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { /// <summary> /// A test for System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.String<<.CopyTo /// </summary> - [TestCase] + [Test] public void CopyTo() { ICollection<KeyValuePair<string, string>> target = this.MessageDescriptions.GetAccessor(this.message); IDictionary<string, string> targetAsDictionary = (IDictionary<string, string>)target; @@ -314,7 +314,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { /// <summary> /// A test for System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.String<<.Contains /// </summary> - [TestCase] + [Test] public void ContainsKeyValuePair() { ICollection<KeyValuePair<string, string>> target = this.MessageDescriptions.GetAccessor(this.message); IDictionary<string, string> targetAsDictionary = (IDictionary<string, string>)target; @@ -330,7 +330,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { /// <summary> /// A test for System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.String<<.Clear /// </summary> - [TestCase] + [Test] public void ClearValues() { MessageDictionary target = this.MessageDescriptions.GetAccessor(this.message); IDictionary<string, string> targetAsDictionary = (IDictionary<string, string>)target; diff --git a/src/DotNetOpenAuth.Test/Messaging/Reflection/MessagePartTests.cs b/src/DotNetOpenAuth.Test/Messaging/Reflection/MessagePartTests.cs index 65bb3f2..1d820d4 100644 --- a/src/DotNetOpenAuth.Test/Messaging/Reflection/MessagePartTests.cs +++ b/src/DotNetOpenAuth.Test/Messaging/Reflection/MessagePartTests.cs @@ -21,12 +21,12 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { this.ParameterizedMessageTypeTest(typeof(MessageWithNonNullableOptionalStruct)); } - [TestCase] + [Test] public void RequiredNonNullableStruct() { this.ParameterizedMessageTypeTest(typeof(MessageWithNonNullableRequiredStruct)); } - [TestCase] + [Test] public void OptionalNullableStruct() { var message = new MessageWithNullableOptionalStruct(); var part = this.ParameterizedMessageTypeTest(message.GetType()); @@ -36,7 +36,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { Assert.AreEqual("3", part.GetValue(message)); } - [TestCase] + [Test] public void RequiredNullableStruct() { this.ParameterizedMessageTypeTest(typeof(MessageWithNullableRequiredStruct)); } @@ -52,7 +52,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { new MessagePart(field, null); } - [TestCase] + [Test] public void SetValue() { var message = new MessageWithNonNullableRequiredStruct(); MessagePart part = this.ParameterizedMessageTypeTest(message.GetType()); @@ -60,7 +60,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { Assert.AreEqual(5, message.OptionalInt); } - [TestCase] + [Test] public void GetValue() { var message = new MessageWithNonNullableRequiredStruct(); message.OptionalInt = 8; @@ -68,7 +68,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { Assert.AreEqual("8", part.GetValue(message)); } - [TestCase] + [Test] public void Base64Member() { var message = new MessageWithBase64EncodedString(); message.LastName = "andrew"; @@ -78,7 +78,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { Assert.AreEqual("arnott", message.LastName); } - [TestCase] + [Test] public void ConstantFieldMemberValidValues() { var message = new MessageWithConstantField(); MessagePart part = GetMessagePart(message.GetType(), "ConstantField"); @@ -100,7 +100,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection { new MessagePart(method, new MessagePartAttribute()); } - [TestCase] + [Test] public void RequiredMinAndMaxVersions() { Type messageType = typeof(MessageWithMinAndMaxVersionParts); FieldInfo newIn2Field = messageType.GetField("NewIn2", BindingFlags.Public | BindingFlags.Instance); diff --git a/src/DotNetOpenAuth.Test/Messaging/ResponseTests.cs b/src/DotNetOpenAuth.Test/Messaging/ResponseTests.cs index 05f9c41..63e0d74 100644 --- a/src/DotNetOpenAuth.Test/Messaging/ResponseTests.cs +++ b/src/DotNetOpenAuth.Test/Messaging/ResponseTests.cs @@ -19,7 +19,7 @@ namespace DotNetOpenAuth.Test.Messaging { new OutgoingWebResponse().Respond(); } - [TestCase] + [Test] public void Respond() { StringWriter writer = new StringWriter(); HttpRequest httpRequest = new HttpRequest("file", "http://server", string.Empty); diff --git a/src/DotNetOpenAuth.Test/Messaging/StandardMessageFactoryTests.cs b/src/DotNetOpenAuth.Test/Messaging/StandardMessageFactoryTests.cs index 86bf67e..e3316f1 100644 --- a/src/DotNetOpenAuth.Test/Messaging/StandardMessageFactoryTests.cs +++ b/src/DotNetOpenAuth.Test/Messaging/StandardMessageFactoryTests.cs @@ -46,7 +46,7 @@ namespace DotNetOpenAuth.Test.Messaging { /// <summary> /// Verifies very simple recognition of a single message type /// </summary> - [TestCase] + [Test] public void SingleRequestMessageType() { this.factory.AddMessageTypes(new MessageDescription[] { MessageDescriptions.Get(typeof(RequestMessageMock), V1) }); var fields = new Dictionary<string, string> { @@ -60,7 +60,7 @@ namespace DotNetOpenAuth.Test.Messaging { /// <summary> /// Verifies very simple recognition of a single message type /// </summary> - [TestCase] + [Test] public void SingleResponseMessageType() { this.factory.AddMessageTypes(new MessageDescription[] { MessageDescriptions.Get(typeof(DirectResponseMessageMock), V1) }); var fields = new Dictionary<string, string> { diff --git a/src/DotNetOpenAuth.Test/OAuth/AppendixScenarios.cs b/src/DotNetOpenAuth.Test/OAuth/AppendixScenarios.cs index cae0f87..a295732 100644 --- a/src/DotNetOpenAuth.Test/OAuth/AppendixScenarios.cs +++ b/src/DotNetOpenAuth.Test/OAuth/AppendixScenarios.cs @@ -16,7 +16,7 @@ namespace DotNetOpenAuth.Test.OAuth { [TestFixture] public class AppendixScenarios : TestBase { - [TestCase] + [Test] public void SpecAppendixAExample() { ServiceProviderDescription serviceDescription = new ServiceProviderDescription() { RequestTokenEndpoint = new MessageReceivingEndpoint("https://photos.example.net/request_token", HttpDeliveryMethods.PostRequest), diff --git a/src/DotNetOpenAuth.Test/OAuth/ChannelElements/HmacSha1SigningBindingElementTests.cs b/src/DotNetOpenAuth.Test/OAuth/ChannelElements/HmacSha1SigningBindingElementTests.cs index 6605fad..487ce56 100644 --- a/src/DotNetOpenAuth.Test/OAuth/ChannelElements/HmacSha1SigningBindingElementTests.cs +++ b/src/DotNetOpenAuth.Test/OAuth/ChannelElements/HmacSha1SigningBindingElementTests.cs @@ -12,7 +12,7 @@ namespace DotNetOpenAuth.Test.OAuth.ChannelElements { [TestFixture] public class HmacSha1SigningBindingElementTests : MessagingTestBase { - [TestCase] + [Test] public void SignatureTest() { UnauthorizedTokenRequest message = SigningBindingElementBaseTests.CreateTestRequestTokenMessage(this.MessageDescriptions, null); diff --git a/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs b/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs index 1b9d2eb..dda5452 100644 --- a/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs +++ b/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs @@ -56,17 +56,17 @@ namespace DotNetOpenAuth.Test.OAuth.ChannelElements { new OAuthConsumerChannel(new RsaSha1ServiceProviderSigningBindingElement(new InMemoryTokenManager()), this.nonceStore, null, this.consumerSecuritySettings, new TestMessageFactory()); } - [TestCase] + [Test] public void CtorSimpleConsumer() { new OAuthConsumerChannel(new RsaSha1ServiceProviderSigningBindingElement(new InMemoryTokenManager()), this.nonceStore, (IConsumerTokenManager)new InMemoryTokenManager(), this.consumerSecuritySettings); } - [TestCase] + [Test] public void CtorSimpleServiceProvider() { new OAuthServiceProviderChannel(new RsaSha1ServiceProviderSigningBindingElement(new InMemoryTokenManager()), this.nonceStore, (IServiceProviderTokenManager)new InMemoryTokenManager(), this.serviceProviderSecuritySettings); } - [TestCase] + [Test] public void ReadFromRequestAuthorization() { this.ParameterizedReceiveTest(HttpDeliveryMethods.AuthorizationHeaderRequest); } @@ -75,7 +75,7 @@ namespace DotNetOpenAuth.Test.OAuth.ChannelElements { /// Verifies that the OAuth ReadFromRequest method gathers parameters /// from the Authorization header, the query string and the entity form data. /// </summary> - [TestCase] + [Test] public void ReadFromRequestAuthorizationScattered() { // Start by creating a standard POST HTTP request. var fields = new Dictionary<string, string> { @@ -106,17 +106,17 @@ namespace DotNetOpenAuth.Test.OAuth.ChannelElements { Assert.AreEqual("http://hostb/pathB", testMessage.Location.AbsoluteUri); } - [TestCase] + [Test] public void ReadFromRequestForm() { this.ParameterizedReceiveTest(HttpDeliveryMethods.PostRequest); } - [TestCase] + [Test] public void ReadFromRequestQueryString() { this.ParameterizedReceiveTest(HttpDeliveryMethods.GetRequest); } - [TestCase] + [Test] public void SendDirectMessageResponse() { IProtocolMessage message = new TestDirectedMessage { Age = 15, @@ -135,7 +135,7 @@ namespace DotNetOpenAuth.Test.OAuth.ChannelElements { Assert.AreEqual("http://hostb/pathB", body["Location"]); } - [TestCase] + [Test] public void ReadFromResponse() { var fields = new Dictionary<string, string> { { "age", "15" }, @@ -175,7 +175,7 @@ namespace DotNetOpenAuth.Test.OAuth.ChannelElements { this.channel.Request(message); } - [TestCase] + [Test] public void RequestUsingAuthorizationHeader() { this.ParameterizedRequestTest(HttpDeliveryMethods.AuthorizationHeaderRequest); } @@ -183,7 +183,7 @@ namespace DotNetOpenAuth.Test.OAuth.ChannelElements { /// <summary> /// Verifies that message parts can be distributed to the query, form, and Authorization header. /// </summary> - [TestCase] + [Test] public void RequestUsingAuthorizationHeaderScattered() { TestDirectedMessage request = new TestDirectedMessage(MessageTransport.Direct) { Age = 15, @@ -216,17 +216,17 @@ namespace DotNetOpenAuth.Test.OAuth.ChannelElements { Assert.AreEqual("appearinform=formish", this.webRequestHandler.RequestEntityAsString); } - [TestCase] + [Test] public void RequestUsingGet() { this.ParameterizedRequestTest(HttpDeliveryMethods.GetRequest); } - [TestCase] + [Test] public void RequestUsingPost() { this.ParameterizedRequestTest(HttpDeliveryMethods.PostRequest); } - [TestCase] + [Test] public void RequestUsingHead() { this.ParameterizedRequestTest(HttpDeliveryMethods.HeadRequest); } @@ -234,7 +234,7 @@ namespace DotNetOpenAuth.Test.OAuth.ChannelElements { /// <summary> /// Verifies that messages asking for special HTTP status codes get them. /// </summary> - [TestCase] + [Test] public void SendDirectMessageResponseHonorsHttpStatusCodes() { IProtocolMessage message = MessagingTestBase.GetStandardTestMessage(MessagingTestBase.FieldFill.AllRequired); OutgoingWebResponse directResponse = this.channel.PrepareDirectResponseTestHook(message); diff --git a/src/DotNetOpenAuth.Test/OAuth/ChannelElements/PlaintextSigningBindingElementTest.cs b/src/DotNetOpenAuth.Test/OAuth/ChannelElements/PlaintextSigningBindingElementTest.cs index 8236c21..b3869e7 100644 --- a/src/DotNetOpenAuth.Test/OAuth/ChannelElements/PlaintextSigningBindingElementTest.cs +++ b/src/DotNetOpenAuth.Test/OAuth/ChannelElements/PlaintextSigningBindingElementTest.cs @@ -14,7 +14,7 @@ namespace DotNetOpenAuth.Test.OAuth.ChannelElements { [TestFixture] public class PlaintextSigningBindingElementTest { - [TestCase] + [Test] public void HttpsSignatureGeneration() { SigningBindingElementBase target = new PlaintextSigningBindingElement(); target.Channel = new TestChannel(); @@ -27,7 +27,7 @@ namespace DotNetOpenAuth.Test.OAuth.ChannelElements { Assert.AreEqual("cs&ts", message.Signature); } - [TestCase] + [Test] public void HttpsSignatureVerification() { MessageReceivingEndpoint endpoint = new MessageReceivingEndpoint("https://localtest", HttpDeliveryMethods.GetRequest); ITamperProtectionChannelBindingElement target = new PlaintextSigningBindingElement(); @@ -40,7 +40,7 @@ namespace DotNetOpenAuth.Test.OAuth.ChannelElements { Assert.IsNotNull(target.ProcessIncomingMessage(message)); } - [TestCase] + [Test] public void HttpsSignatureVerificationNotApplicable() { SigningBindingElementBase target = new PlaintextSigningBindingElement(); target.Channel = new TestChannel(); @@ -53,7 +53,7 @@ namespace DotNetOpenAuth.Test.OAuth.ChannelElements { Assert.AreEqual(MessageProtections.None, target.ProcessIncomingMessage(message), "PLAINTEXT binding element should opt-out where it doesn't understand."); } - [TestCase] + [Test] public void HttpSignatureGeneration() { SigningBindingElementBase target = new PlaintextSigningBindingElement(); target.Channel = new TestChannel(); @@ -68,7 +68,7 @@ namespace DotNetOpenAuth.Test.OAuth.ChannelElements { Assert.IsNull(message.Signature); } - [TestCase] + [Test] public void HttpSignatureVerification() { SigningBindingElementBase target = new PlaintextSigningBindingElement(); target.Channel = new TestChannel(); diff --git a/src/DotNetOpenAuth.Test/OAuth/ChannelElements/SigningBindingElementBaseTests.cs b/src/DotNetOpenAuth.Test/OAuth/ChannelElements/SigningBindingElementBaseTests.cs index 85f7130..dffe6c1 100644 --- a/src/DotNetOpenAuth.Test/OAuth/ChannelElements/SigningBindingElementBaseTests.cs +++ b/src/DotNetOpenAuth.Test/OAuth/ChannelElements/SigningBindingElementBaseTests.cs @@ -16,7 +16,7 @@ namespace DotNetOpenAuth.Test.OAuth.ChannelElements { [TestFixture] public class SigningBindingElementBaseTests : MessagingTestBase { - [TestCase] + [Test] public void BaseSignatureStringTest() { // Tests a message sent by HTTP GET, with no query string included in the endpoint. UnauthorizedTokenRequest message = CreateTestRequestTokenMessage( @@ -73,7 +73,7 @@ namespace DotNetOpenAuth.Test.OAuth.ChannelElements { SigningBindingElementBase.ConstructSignatureBaseString(message, this.MessageDescriptions.GetAccessor(message))); } - [TestCase] + [Test] public void BaseSignatureStringResourceRequests() { var message = this.CreateResourceRequest(new MessageReceivingEndpoint("http://tom.test.wishpot.com/restapi/List/Search?List.LastName=ciccotosto", HttpDeliveryMethods.GetRequest)); message.ConsumerKey = "public"; diff --git a/src/DotNetOpenAuth.Test/OAuth/ChannelElements/UriOrOobEncodingTests.cs b/src/DotNetOpenAuth.Test/OAuth/ChannelElements/UriOrOobEncodingTests.cs index 0dc572f..185e75b 100644 --- a/src/DotNetOpenAuth.Test/OAuth/ChannelElements/UriOrOobEncodingTests.cs +++ b/src/DotNetOpenAuth.Test/OAuth/ChannelElements/UriOrOobEncodingTests.cs @@ -24,7 +24,7 @@ namespace DotNetOpenAuth.Test.OAuth.ChannelElements { /// <summary> /// Verifies null value encoding /// </summary> - [TestCase] + [Test] public void NullValueEncoding() { Assert.AreEqual("oob", this.encoding.EncodedNullValue); } @@ -32,7 +32,7 @@ namespace DotNetOpenAuth.Test.OAuth.ChannelElements { /// <summary> /// Verifies decoding "oob" results in a null uri. /// </summary> - [TestCase] + [Test] public void DecodeOobToNullUri() { Assert.IsNull(this.encoding.Decode("oob")); } @@ -48,7 +48,7 @@ namespace DotNetOpenAuth.Test.OAuth.ChannelElements { /// <summary> /// Verifies proper decoding/encoding of a Uri /// </summary> - [TestCase] + [Test] public void UriEncodeDecode() { Uri original = new Uri("http://somehost/p?q=a#frag"); string encodedValue = this.encoding.Encode(original); diff --git a/src/DotNetOpenAuth.Test/OAuth/ProtocolTests.cs b/src/DotNetOpenAuth.Test/OAuth/ProtocolTests.cs index 69ec9da..cd4d8dd 100644 --- a/src/DotNetOpenAuth.Test/OAuth/ProtocolTests.cs +++ b/src/DotNetOpenAuth.Test/OAuth/ProtocolTests.cs @@ -10,23 +10,23 @@ namespace DotNetOpenAuth.Test.OAuth { [TestFixture] public class ProtocolTests { - [TestCase] + [Test] public void Default() { Assert.AreSame(Protocol.V10a, Protocol.Default); } - [TestCase] + [Test] public void DataContractNamespace() { Assert.AreEqual("http://oauth.net/core/1.0/", Protocol.V10.DataContractNamespace); Assert.AreEqual("http://oauth.net/core/1.0/", Protocol.DataContractNamespaceV10); } - [TestCase] + [Test] public void AuthorizationHeaderScheme() { Assert.AreEqual("OAuth", Protocol.AuthorizationHeaderScheme); } - [TestCase] + [Test] public void ParameterPrefix() { Assert.AreEqual("oauth_", Protocol.ParameterPrefix); } diff --git a/src/DotNetOpenAuth.Test/OAuth/ServiceProviderDescriptionTests.cs b/src/DotNetOpenAuth.Test/OAuth/ServiceProviderDescriptionTests.cs index c4afb18..42bb149 100644 --- a/src/DotNetOpenAuth.Test/OAuth/ServiceProviderDescriptionTests.cs +++ b/src/DotNetOpenAuth.Test/OAuth/ServiceProviderDescriptionTests.cs @@ -18,7 +18,7 @@ namespace DotNetOpenAuth.Test.OAuth { /// <summary> /// A test for UserAuthorizationUri /// </summary> - [TestCase] + [Test] public void UserAuthorizationUriTest() { ServiceProviderDescription target = new ServiceProviderDescription(); MessageReceivingEndpoint expected = new MessageReceivingEndpoint("http://localhost/authorization", HttpDeliveryMethods.GetRequest); @@ -34,7 +34,7 @@ namespace DotNetOpenAuth.Test.OAuth { /// <summary> /// A test for RequestTokenUri /// </summary> - [TestCase] + [Test] public void RequestTokenUriTest() { var target = new ServiceProviderDescription(); MessageReceivingEndpoint expected = new MessageReceivingEndpoint("http://localhost/requesttoken", HttpDeliveryMethods.GetRequest); @@ -60,7 +60,7 @@ namespace DotNetOpenAuth.Test.OAuth { /// <summary> /// A test for AccessTokenUri /// </summary> - [TestCase] + [Test] public void AccessTokenUriTest() { var target = new ServiceProviderDescription(); MessageReceivingEndpoint expected = new MessageReceivingEndpoint("http://localhost/accesstoken", HttpDeliveryMethods.GetRequest); diff --git a/src/DotNetOpenAuth.Test/OAuth/ServiceProviderTests.cs b/src/DotNetOpenAuth.Test/OAuth/ServiceProviderTests.cs index ae74376..82e02e7 100644 --- a/src/DotNetOpenAuth.Test/OAuth/ServiceProviderTests.cs +++ b/src/DotNetOpenAuth.Test/OAuth/ServiceProviderTests.cs @@ -18,7 +18,7 @@ namespace DotNetOpenAuth.Test.OAuth { /// <summary> /// Verifies the CreateVerificationCode method. /// </summary> - [TestCase] + [Test] public void CreateVerificationCode() { this.TestCode(VerificationCodeFormat.Numeric, 3, MessagingUtilities.Digits); this.TestCode(VerificationCodeFormat.AlphaLower, 5, MessagingUtilities.LowercaseLetters); diff --git a/src/DotNetOpenAuth.Test/OAuth2/MessageFactoryTests.cs b/src/DotNetOpenAuth.Test/OAuth2/MessageFactoryTests.cs index f46af33..b65f9a6 100644 --- a/src/DotNetOpenAuth.Test/OAuth2/MessageFactoryTests.cs +++ b/src/DotNetOpenAuth.Test/OAuth2/MessageFactoryTests.cs @@ -33,7 +33,7 @@ namespace DotNetOpenAuth.Test.OAuth2 { #region End user authorization messages - [TestCase] + [Test] public void EndUserAuthorizationRequest() { var fields = new Dictionary<string, string> { { Protocol.response_type, "code" }, @@ -44,7 +44,7 @@ namespace DotNetOpenAuth.Test.OAuth2 { Assert.IsInstanceOf(typeof(EndUserAuthorizationRequest), request); } - [TestCase] + [Test] public void EndUserAuthorizationImplicitRequest() { var fields = new Dictionary<string, string> { { Protocol.response_type, "token" }, @@ -55,7 +55,7 @@ namespace DotNetOpenAuth.Test.OAuth2 { Assert.IsInstanceOf(typeof(EndUserAuthorizationImplicitRequest), request); } - [TestCase] + [Test] public void EndUserAuthorizationSuccessResponseWithCode() { var fields = new Dictionary<string, string> { { Protocol.code, "abc" }, @@ -64,7 +64,7 @@ namespace DotNetOpenAuth.Test.OAuth2 { Assert.IsInstanceOf(typeof(EndUserAuthorizationSuccessResponseBase), request); } - [TestCase] + [Test] public void EndUserAuthorizationSuccessResponseWithAccessToken() { var fields = new Dictionary<string, string> { { Protocol.access_token, "abc" }, @@ -74,7 +74,7 @@ namespace DotNetOpenAuth.Test.OAuth2 { Assert.IsInstanceOf(typeof(EndUserAuthorizationSuccessResponseBase), request); } - [TestCase] + [Test] public void EndUserAuthorizationFailedResponse() { var fields = new Dictionary<string, string> { { Protocol.error, "access-denied" }, @@ -87,7 +87,7 @@ namespace DotNetOpenAuth.Test.OAuth2 { #region Access token request messages - [TestCase] + [Test] public void AccessTokenRefreshRequest() { var fields = new Dictionary<string, string> { { Protocol.client_id, "abc" }, @@ -98,7 +98,7 @@ namespace DotNetOpenAuth.Test.OAuth2 { Assert.IsInstanceOf(typeof(AccessTokenRefreshRequest), request); } - [TestCase] + [Test] public void AccessTokenAuthorizationCodeRequest() { var fields = new Dictionary<string, string> { { Protocol.client_id, "abc" }, @@ -110,7 +110,7 @@ namespace DotNetOpenAuth.Test.OAuth2 { Assert.IsInstanceOf(typeof(AccessTokenAuthorizationCodeRequest), request); } - [TestCase] + [Test] public void AccessTokenBasicCredentialsRequest() { var fields = new Dictionary<string, string> { { Protocol.client_id, "abc" }, @@ -123,7 +123,7 @@ namespace DotNetOpenAuth.Test.OAuth2 { Assert.IsInstanceOf(typeof(AccessTokenResourceOwnerPasswordCredentialsRequest), request); } - [TestCase] + [Test] public void AccessTokenClientCredentialsRequest() { var fields = new Dictionary<string, string> { { Protocol.client_id, "abc" }, diff --git a/src/DotNetOpenAuth.Test/OAuth2/UserAgentClientAuthorizeTests.cs b/src/DotNetOpenAuth.Test/OAuth2/UserAgentClientAuthorizeTests.cs index 4e9e984..da42be3 100644 --- a/src/DotNetOpenAuth.Test/OAuth2/UserAgentClientAuthorizeTests.cs +++ b/src/DotNetOpenAuth.Test/OAuth2/UserAgentClientAuthorizeTests.cs @@ -19,7 +19,7 @@ namespace DotNetOpenAuth.Test.OAuth2 { [TestFixture] public class UserAgentClientAuthorizeTests : OAuth2TestBase { - [TestCase] + [Test] public void AuthorizationCodeGrant() { var coordinator = new OAuth2Coordinator<UserAgentClient>( AuthorizationServerDescription, @@ -49,7 +49,7 @@ namespace DotNetOpenAuth.Test.OAuth2 { coordinator.Run(); } - [TestCase] + [Test] public void ImplicitGrant() { var coordinatorClient = new UserAgentClient(AuthorizationServerDescription); var coordinator = new OAuth2Coordinator<UserAgentClient>( diff --git a/src/DotNetOpenAuth.Test/OAuth2/WebServerClientAuthorizeTests.cs b/src/DotNetOpenAuth.Test/OAuth2/WebServerClientAuthorizeTests.cs index df89beb..d9f64bd 100644 --- a/src/DotNetOpenAuth.Test/OAuth2/WebServerClientAuthorizeTests.cs +++ b/src/DotNetOpenAuth.Test/OAuth2/WebServerClientAuthorizeTests.cs @@ -18,7 +18,7 @@ namespace DotNetOpenAuth.Test.OAuth2 { [TestFixture] public class WebServerClientAuthorizeTests : OAuth2TestBase { - [TestCase] + [Test] public void AuthorizationCodeGrant() { var coordinator = new OAuth2Coordinator<WebServerClient>( AuthorizationServerDescription, @@ -45,7 +45,7 @@ namespace DotNetOpenAuth.Test.OAuth2 { coordinator.Run(); } - [TestCase] + [Test] public void ResourceOwnerPasswordCredentialGrant() { var coordinator = new OAuth2Coordinator<WebServerClient>( AuthorizationServerDescription, @@ -64,7 +64,7 @@ namespace DotNetOpenAuth.Test.OAuth2 { coordinator.Run(); } - [TestCase] + [Test] public void ClientCredentialGrant() { var authServer = CreateAuthorizationServerMock(); authServer.Setup( diff --git a/src/DotNetOpenAuth.Test/OpenId/AssociationHandshakeTests.cs b/src/DotNetOpenAuth.Test/OpenId/AssociationHandshakeTests.cs index 6dace64..e8c955e 100644 --- a/src/DotNetOpenAuth.Test/OpenId/AssociationHandshakeTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/AssociationHandshakeTests.cs @@ -21,12 +21,12 @@ namespace DotNetOpenAuth.Test.OpenId { base.SetUp(); } - [TestCase] + [Test] public void AssociateUnencrypted() { this.ParameterizedAssociationTest(new Uri("https://host")); } - [TestCase] + [Test] public void AssociateDiffieHellmanOverHttp() { this.ParameterizedAssociationTest(new Uri("http://host")); } @@ -38,7 +38,7 @@ namespace DotNetOpenAuth.Test.OpenId { /// Some OPs out there flatly refuse to do this, and the spec doesn't forbid /// putting the two together, so we verify that DNOI can handle it. /// </remarks> - [TestCase] + [Test] public void AssociateDiffieHellmanOverHttps() { Protocol protocol = Protocol.V20; OpenIdCoordinator coordinator = new OpenIdCoordinator( @@ -62,7 +62,7 @@ namespace DotNetOpenAuth.Test.OpenId { /// Verifies that the RP and OP can renegotiate an association type if the RP's /// initial request for an association is for a type the OP doesn't support. /// </summary> - [TestCase] + [Test] public void AssociateRenegotiateBitLength() { Protocol protocol = Protocol.V20; @@ -108,7 +108,7 @@ namespace DotNetOpenAuth.Test.OpenId { /// <remarks> /// Verifies OP's compliance with OpenID 2.0 section 8.4.1. /// </remarks> - [TestCase] + [Test] public void OPRejectsHttpNoEncryptionAssociateRequests() { Protocol protocol = Protocol.V20; OpenIdCoordinator coordinator = new OpenIdCoordinator( @@ -129,7 +129,7 @@ namespace DotNetOpenAuth.Test.OpenId { /// Verifies that the OP rejects an associate request /// when the HMAC and DH bit lengths do not match. /// </summary> - [TestCase] + [Test] public void OPRejectsMismatchingAssociationAndSessionTypes() { Protocol protocol = Protocol.V20; OpenIdCoordinator coordinator = new OpenIdCoordinator( @@ -152,7 +152,7 @@ namespace DotNetOpenAuth.Test.OpenId { /// <summary> /// Verifies that the RP quietly rejects an OP that suggests an unknown association type. /// </summary> - [TestCase] + [Test] public void RPRejectsUnrecognizedAssociationType() { Protocol protocol = Protocol.V20; OpenIdCoordinator coordinator = new OpenIdCoordinator( @@ -179,7 +179,7 @@ namespace DotNetOpenAuth.Test.OpenId { /// <remarks> /// Verifies RP's compliance with OpenID 2.0 section 8.4.1. /// </remarks> - [TestCase] + [Test] public void RPRejectsUnencryptedSuggestion() { Protocol protocol = Protocol.V20; OpenIdCoordinator coordinator = new OpenIdCoordinator( @@ -204,7 +204,7 @@ namespace DotNetOpenAuth.Test.OpenId { /// Verifies that the RP rejects an associate renegotiate request /// when the HMAC and DH bit lengths do not match. /// </summary> - [TestCase] + [Test] public void RPRejectsMismatchingAssociationAndSessionBitLengths() { Protocol protocol = Protocol.V20; OpenIdCoordinator coordinator = new OpenIdCoordinator( @@ -229,7 +229,7 @@ namespace DotNetOpenAuth.Test.OpenId { /// Verifies that the RP cannot get caught in an infinite loop if a bad OP /// keeps sending it association retry messages. /// </summary> - [TestCase] + [Test] public void RPOnlyRenegotiatesOnce() { Protocol protocol = Protocol.V20; OpenIdCoordinator coordinator = new OpenIdCoordinator( @@ -262,7 +262,7 @@ namespace DotNetOpenAuth.Test.OpenId { /// <summary> /// Verifies security settings limit RP's acceptance of OP's counter-suggestion /// </summary> - [TestCase] + [Test] public void AssociateRenegotiateLimitedByRPSecuritySettings() { Protocol protocol = Protocol.V20; OpenIdCoordinator coordinator = new OpenIdCoordinator( @@ -282,7 +282,7 @@ namespace DotNetOpenAuth.Test.OpenId { /// Verifies that the RP can recover from an invalid or non-existent /// response from the OP, for example in the HTTP timeout case. /// </summary> - [TestCase] + [Test] public void AssociateQuietlyFailsAfterHttpError() { this.MockResponder.RegisterMockNotFound(OPUri); var rp = this.CreateRelyingParty(); diff --git a/src/DotNetOpenAuth.Test/OpenId/AssociationTests.cs b/src/DotNetOpenAuth.Test/OpenId/AssociationTests.cs index 01b82fa..acc7a5b 100644 --- a/src/DotNetOpenAuth.Test/OpenId/AssociationTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/AssociationTests.cs @@ -35,7 +35,7 @@ namespace DotNetOpenAuth.Test.OpenId { this.sha1Secret2[1] = 0xcc; } - [TestCase] + [Test] public void Properties() { string handle = "somehandle"; TimeSpan lifetime = TimeSpan.FromMinutes(2); @@ -49,7 +49,7 @@ namespace DotNetOpenAuth.Test.OpenId { Assert.AreEqual(0, assoc.Issued.Millisecond, "No milliseconds because this can be cut off in conversions."); } - [TestCase] + [Test] public void Sign() { Association assoc1 = HmacShaAssociation.Create(Protocol.Default, Protocol.Default.Args.SignatureAlgorithm.HMAC_SHA1, "h1", this.sha1Secret, TimeSpan.FromMinutes(2)); Association assoc2 = HmacShaAssociation.Create(Protocol.Default, Protocol.Default.Args.SignatureAlgorithm.HMAC_SHA1, "h2", this.sha1Secret2, TimeSpan.FromMinutes(2)); diff --git a/src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs b/src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs index 7d5a9db..6129ee7 100644 --- a/src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs @@ -23,7 +23,7 @@ namespace DotNetOpenAuth.Test.OpenId { base.SetUp(); } - [TestCase] + [Test] public void SharedAssociationPositive() { this.ParameterizedAuthenticationTest(true, true, false); } @@ -31,17 +31,17 @@ namespace DotNetOpenAuth.Test.OpenId { /// <summary> /// Verifies that a shared association protects against tampering. /// </summary> - [TestCase] + [Test] public void SharedAssociationTampered() { this.ParameterizedAuthenticationTest(true, true, true); } - [TestCase] + [Test] public void SharedAssociationNegative() { this.ParameterizedAuthenticationTest(true, false, false); } - [TestCase] + [Test] public void PrivateAssociationPositive() { this.ParameterizedAuthenticationTest(false, true, false); } @@ -49,17 +49,17 @@ namespace DotNetOpenAuth.Test.OpenId { /// <summary> /// Verifies that a private association protects against tampering. /// </summary> - [TestCase] + [Test] public void PrivateAssociationTampered() { this.ParameterizedAuthenticationTest(false, true, true); } - [TestCase] + [Test] public void NoAssociationNegative() { this.ParameterizedAuthenticationTest(false, false, false); } - [TestCase] + [Test] public void UnsolicitedAssertion() { this.MockResponder.RegisterMockRPDiscovery(); OpenIdCoordinator coordinator = new OpenIdCoordinator( @@ -77,7 +77,7 @@ namespace DotNetOpenAuth.Test.OpenId { coordinator.Run(); } - [TestCase] + [Test] public void UnsolicitedAssertionRejected() { this.MockResponder.RegisterMockRPDiscovery(); OpenIdCoordinator coordinator = new OpenIdCoordinator( @@ -100,7 +100,7 @@ namespace DotNetOpenAuth.Test.OpenId { /// Verifies that delegating identifiers are rejected in unsolicited assertions /// when the appropriate security setting is set. /// </summary> - [TestCase] + [Test] public void UnsolicitedDelegatingIdentifierRejection() { this.MockResponder.RegisterMockRPDiscovery(); OpenIdCoordinator coordinator = new OpenIdCoordinator( diff --git a/src/DotNetOpenAuth.Test/OpenId/ChannelElements/ExtensionsBindingElementTests.cs b/src/DotNetOpenAuth.Test/OpenId/ChannelElements/ExtensionsBindingElementTests.cs index e2a5aef..849c796 100644 --- a/src/DotNetOpenAuth.Test/OpenId/ChannelElements/ExtensionsBindingElementTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/ChannelElements/ExtensionsBindingElementTests.cs @@ -37,7 +37,7 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements { this.request = new SignedResponseRequest(Protocol.Default.Version, OpenIdTestBase.OPUri, AuthenticationRequestMode.Immediate); } - [TestCase] + [Test] public void RoundTripFullStackTest() { IOpenIdMessageExtension request = new MockOpenIdExtension("requestPart", "requestData"); IOpenIdMessageExtension response = new MockOpenIdExtension("responsePart", "responseData"); @@ -47,12 +47,12 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements { new IOpenIdMessageExtension[] { response }); } - [TestCase] + [Test] public void ExtensionFactory() { Assert.AreSame(this.factory, this.rpElement.ExtensionFactory); } - [TestCase] + [Test] public void PrepareMessageForSendingNull() { Assert.IsNull(this.rpElement.ProcessOutgoingMessage(null)); } @@ -60,13 +60,13 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements { /// <summary> /// Verifies that false is returned when a non-extendable message is sent. /// </summary> - [TestCase] + [Test] public void PrepareMessageForSendingNonExtendableMessage() { IProtocolMessage request = new AssociateDiffieHellmanRequest(Protocol.Default.Version, OpenIdTestBase.OPUri); Assert.IsNull(this.rpElement.ProcessOutgoingMessage(request)); } - [TestCase] + [Test] public void PrepareMessageForSending() { this.request.Extensions.Add(new MockOpenIdExtension("part", "extra")); Assert.IsNotNull(this.rpElement.ProcessOutgoingMessage(this.request)); @@ -77,7 +77,7 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements { Assert.AreEqual("extra", this.request.ExtraData["openid." + alias + ".data"]); } - [TestCase] + [Test] public void PrepareMessageForReceiving() { this.request.ExtraData["openid.ns.mock"] = MockOpenIdExtension.MockTypeUri; this.request.ExtraData["openid.mock.Part"] = "part"; @@ -91,7 +91,7 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements { /// <summary> /// Verifies that extension responses are included in the OP's signature. /// </summary> - [TestCase] + [Test] public void ExtensionResponsesAreSigned() { Protocol protocol = Protocol.Default; var op = this.CreateProvider(); @@ -113,7 +113,7 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements { /// <summary> /// Verifies that unsigned extension responses (where any or all fields are unsigned) are ignored. /// </summary> - [TestCase] + [Test] public void ExtensionsAreIdentifiedAsSignedOrUnsigned() { Protocol protocol = Protocol.Default; OpenIdCoordinator coordinator = new OpenIdCoordinator( @@ -144,7 +144,7 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements { /// OpenID Authentication 2.0 section 12 states that /// "A namespace MUST NOT be assigned more than one alias in the same message". /// </remarks> - [TestCase] + [Test] public void TwoExtensionsSameTypeUri() { IOpenIdMessageExtension request1 = new MockOpenIdExtension("requestPart1", "requestData1"); IOpenIdMessageExtension request2 = new MockOpenIdExtension("requestPart2", "requestData2"); diff --git a/src/DotNetOpenAuth.Test/OpenId/ChannelElements/KeyValueFormEncodingTests.cs b/src/DotNetOpenAuth.Test/OpenId/ChannelElements/KeyValueFormEncodingTests.cs index df0664e..bafabe6 100644 --- a/src/DotNetOpenAuth.Test/OpenId/ChannelElements/KeyValueFormEncodingTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/ChannelElements/KeyValueFormEncodingTests.cs @@ -33,7 +33,7 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements { Both = 0x3, } - [TestCase] + [Test] public void BasicEncodingTest() { byte[] kvfBytes = KeyValueFormEncoding.GetBytes(this.sampleData); string responseString = Encoding.UTF8.GetString(kvfBytes); @@ -69,7 +69,7 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements { } } - [TestCase] + [Test] public void EncodeDecode() { this.KVDictTest(UTF8Encoding.UTF8.GetBytes(string.Empty), new Dictionary<string, string>(), TestMode.Both); @@ -133,7 +133,7 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements { this.Illegal("x:b\n\n", KeyValueFormConformanceLevel.OpenId20); } - [TestCase] + [Test] public void EmptyLineLoose() { Dictionary<string, string> d = new Dictionary<string, string>(); d.Add("x", "b"); @@ -145,7 +145,7 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements { this.Illegal("x:y\na:b", KeyValueFormConformanceLevel.OpenId11); } - [TestCase] + [Test] public void LastLineNotTerminatedLoose() { Dictionary<string, string> d = new Dictionary<string, string>(); d.Add("x", "y"); diff --git a/src/DotNetOpenAuth.Test/OpenId/ChannelElements/OpenIdChannelTests.cs b/src/DotNetOpenAuth.Test/OpenId/ChannelElements/OpenIdChannelTests.cs index b767bef..f50137d 100644 --- a/src/DotNetOpenAuth.Test/OpenId/ChannelElements/OpenIdChannelTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/ChannelElements/OpenIdChannelTests.cs @@ -33,7 +33,7 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements { this.channel.WebRequestHandler = this.webHandler; } - [TestCase] + [Test] public void Ctor() { // Verify that the channel stack includes the expected types. // While other binding elements may be substituted for these, we'd then have @@ -51,7 +51,7 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements { /// <summary> /// Verifies that the channel sends direct message requests as HTTP POST requests. /// </summary> - [TestCase] + [Test] public void DirectRequestsUsePost() { IDirectedProtocolMessage requestMessage = new Mocks.TestDirectedMessage(MessageTransport.Direct) { Recipient = new Uri("http://host"), @@ -71,7 +71,7 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements { /// class is verified elsewhere. We're only checking that the KVF class is being used by the /// <see cref="OpenIdChannel.SendDirectMessageResponse"/> method. /// </remarks> - [TestCase] + [Test] public void DirectResponsesSentUsingKeyValueForm() { IProtocolMessage message = MessagingTestBase.GetStandardTestMessage(MessagingTestBase.FieldFill.AllRequired); MessageDictionary messageFields = this.MessageDescriptions.GetAccessor(message); @@ -88,7 +88,7 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements { /// <summary> /// Verifies that direct message responses are read in using the Key Value Form decoder. /// </summary> - [TestCase] + [Test] public void DirectResponsesReceivedAsKeyValueForm() { var fields = new Dictionary<string, string> { { "var1", "value1" }, @@ -103,7 +103,7 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements { /// <summary> /// Verifies that messages asking for special HTTP status codes get them. /// </summary> - [TestCase] + [Test] public void SendDirectMessageResponseHonorsHttpStatusCodes() { IProtocolMessage message = MessagingTestBase.GetStandardTestMessage(MessagingTestBase.FieldFill.AllRequired); OutgoingWebResponse directResponse = this.channel.PrepareDirectResponseTestHook(message); diff --git a/src/DotNetOpenAuth.Test/OpenId/ChannelElements/SigningBindingElementTests.cs b/src/DotNetOpenAuth.Test/OpenId/ChannelElements/SigningBindingElementTests.cs index 7952765..17feaa8 100644 --- a/src/DotNetOpenAuth.Test/OpenId/ChannelElements/SigningBindingElementTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/ChannelElements/SigningBindingElementTests.cs @@ -23,7 +23,7 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements { /// <summary> /// Verifies that the signatures generated match Known Good signatures. /// </summary> - [TestCase] + [Test] public void SignaturesMatchKnownGood() { Protocol protocol = Protocol.V20; var settings = new ProviderSecuritySettings(); @@ -48,7 +48,7 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements { /// <summary> /// Verifies that all parameters in ExtraData in signed responses are signed. /// </summary> - [TestCase] + [Test] public void SignedResponsesIncludeExtraDataInSignature() { Protocol protocol = Protocol.Default; SigningBindingElement sbe = new ProviderSigningBindingElement(new ProviderAssociationHandleEncoder(new MemoryCryptoKeyStore()), new ProviderSecuritySettings()); diff --git a/src/DotNetOpenAuth.Test/OpenId/DiffieHellmanTests.cs b/src/DotNetOpenAuth.Test/OpenId/DiffieHellmanTests.cs index 2a372d9..8512053 100644 --- a/src/DotNetOpenAuth.Test/OpenId/DiffieHellmanTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/DiffieHellmanTests.cs @@ -14,7 +14,7 @@ namespace DotNetOpenAuth.Test.OpenId { [TestFixture] public class DiffieHellmanTests : OpenIdTestBase { - [TestCase] + [Test] public void Test() { string s1 = Test1(); string s2 = Test1(); diff --git a/src/DotNetOpenAuth.Test/OpenId/DiscoveryServices/UriDiscoveryServiceTests.cs b/src/DotNetOpenAuth.Test/OpenId/DiscoveryServices/UriDiscoveryServiceTests.cs index e28fcf6..c145e23 100644 --- a/src/DotNetOpenAuth.Test/OpenId/DiscoveryServices/UriDiscoveryServiceTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/DiscoveryServices/UriDiscoveryServiceTests.cs @@ -19,7 +19,7 @@ namespace DotNetOpenAuth.Test.OpenId.DiscoveryServices { [TestFixture] public class UriDiscoveryServiceTests : OpenIdTestBase { - [TestCase] + [Test] public void DiscoveryWithRedirects() { Identifier claimedId = this.GetMockIdentifier(ProtocolVersion.V20, false); @@ -34,7 +34,7 @@ namespace DotNetOpenAuth.Test.OpenId.DiscoveryServices { Assert.AreEqual(1, this.Discover(userSuppliedIdentifier).Count()); } - [TestCase] + [Test] public void DiscoverRequireSslWithSecureRedirects() { Identifier claimedId = this.GetMockIdentifier(ProtocolVersion.V20, true); @@ -65,7 +65,7 @@ namespace DotNetOpenAuth.Test.OpenId.DiscoveryServices { this.Discover(userSuppliedIdentifier); } - [TestCase] + [Test] public void DiscoveryRequireSslWithInsecureXrdsInSecureHtmlHead() { var insecureXrdsSource = this.GetMockIdentifier(ProtocolVersion.V20, false); Uri secureClaimedUri = new Uri("https://localhost/secureId"); @@ -77,7 +77,7 @@ namespace DotNetOpenAuth.Test.OpenId.DiscoveryServices { Assert.AreEqual(0, this.Discover(userSuppliedIdentifier).Count()); } - [TestCase] + [Test] public void DiscoveryRequireSslWithInsecureXrdsInSecureHttpHeader() { var insecureXrdsSource = this.GetMockIdentifier(ProtocolVersion.V20, false); @@ -91,7 +91,7 @@ namespace DotNetOpenAuth.Test.OpenId.DiscoveryServices { Assert.AreEqual(0, this.Discover(userSuppliedIdentifier).Count()); } - [TestCase] + [Test] public void DiscoveryRequireSslWithInsecureXrdsButSecureLinkTags() { var insecureXrdsSource = this.GetMockIdentifier(ProtocolVersion.V20, false); string html = string.Format( @@ -113,7 +113,7 @@ namespace DotNetOpenAuth.Test.OpenId.DiscoveryServices { Assert.AreEqual(OPLocalIdentifiersSsl[1].AbsoluteUri, this.Discover(userSuppliedIdentifier).Single().ProviderLocalIdentifier.ToString()); } - [TestCase] + [Test] public void DiscoveryRequiresSslIgnoresInsecureEndpointsInXrds() { var insecureEndpoint = GetServiceEndpoint(0, ProtocolVersion.V20, 10, false); var secureEndpoint = GetServiceEndpoint(1, ProtocolVersion.V20, 20, true); @@ -122,7 +122,7 @@ namespace DotNetOpenAuth.Test.OpenId.DiscoveryServices { Assert.AreEqual(secureEndpoint.ProviderLocalIdentifier, this.Discover(secureClaimedId).Single().ProviderLocalIdentifier); } - [TestCase] + [Test] public void XrdsDirectDiscovery_10() { this.FailDiscoverXrds("xrds-irrelevant"); this.DiscoverXrds("xrds10", ProtocolVersion.V10, null, "http://a/b"); @@ -130,14 +130,14 @@ namespace DotNetOpenAuth.Test.OpenId.DiscoveryServices { this.DiscoverXrds("xrds1020", ProtocolVersion.V10, null, "http://a/b"); } - [TestCase] + [Test] public void XrdsDirectDiscovery_20() { this.DiscoverXrds("xrds20", ProtocolVersion.V20, null, "http://a/b"); this.DiscoverXrds("xrds2010a", ProtocolVersion.V20, null, "http://a/b"); this.DiscoverXrds("xrds2010b", ProtocolVersion.V20, null, "http://a/b"); } - [TestCase] + [Test] public void HtmlDiscover_11() { this.DiscoverHtml("html10prov", ProtocolVersion.V11, null, "http://a/b"); this.DiscoverHtml("html10both", ProtocolVersion.V11, "http://c/d", "http://a/b"); @@ -151,7 +151,7 @@ namespace DotNetOpenAuth.Test.OpenId.DiscoveryServices { this.DiscoverHtml("html2010combinedC", ProtocolVersion.V11, "http://c/d", "http://a/b"); } - [TestCase] + [Test] public void HtmlDiscover_20() { this.DiscoverHtml("html20prov", ProtocolVersion.V20, null, "http://a/b"); this.DiscoverHtml("html20both", ProtocolVersion.V20, "http://c/d", "http://a/b"); @@ -164,13 +164,13 @@ namespace DotNetOpenAuth.Test.OpenId.DiscoveryServices { this.FailDiscoverHtml("html20relative"); } - [TestCase] + [Test] public void XrdsDiscoveryFromHead() { this.MockResponder.RegisterMockResponse(new Uri("http://localhost/xrds1020.xml"), "application/xrds+xml", LoadEmbeddedFile("/Discovery/xrdsdiscovery/xrds1020.xml")); this.DiscoverXrds("XrdsReferencedInHead.html", ProtocolVersion.V10, null, "http://a/b"); } - [TestCase] + [Test] public void XrdsDiscoveryFromHttpHeader() { WebHeaderCollection headers = new WebHeaderCollection(); headers.Add("X-XRDS-Location", new Uri("http://localhost/xrds1020.xml").AbsoluteUri); @@ -181,7 +181,7 @@ namespace DotNetOpenAuth.Test.OpenId.DiscoveryServices { /// <summary> /// Verifies HTML discovery proceeds if an XRDS document is referenced that doesn't contain OpenID endpoints. /// </summary> - [TestCase] + [Test] public void HtmlDiscoveryProceedsIfXrdsIsEmpty() { this.MockResponder.RegisterMockResponse(new Uri("http://localhost/xrds-irrelevant.xml"), "application/xrds+xml", LoadEmbeddedFile("/Discovery/xrdsdiscovery/xrds-irrelevant.xml")); this.DiscoverHtml("html20provWithEmptyXrds", ProtocolVersion.V20, null, "http://a/b"); @@ -190,7 +190,7 @@ namespace DotNetOpenAuth.Test.OpenId.DiscoveryServices { /// <summary> /// Verifies HTML discovery proceeds if the XRDS that is referenced cannot be found. /// </summary> - [TestCase] + [Test] public void HtmlDiscoveryProceedsIfXrdsIsBadOrMissing() { this.DiscoverHtml("html20provWithBadXrds", ProtocolVersion.V20, null, "http://a/b"); } @@ -198,7 +198,7 @@ namespace DotNetOpenAuth.Test.OpenId.DiscoveryServices { /// <summary> /// Verifies that a dual identifier yields only one service endpoint by default. /// </summary> - [TestCase] + [Test] public void DualIdentifierOffByDefault() { this.MockResponder.RegisterMockResponse(VanityUri, "application/xrds+xml", LoadEmbeddedFile("/Discovery/xrdsdiscovery/xrds20dual.xml")); var results = this.Discover(VanityUri).ToList(); @@ -209,7 +209,7 @@ namespace DotNetOpenAuth.Test.OpenId.DiscoveryServices { /// <summary> /// Verifies that a dual identifier yields two service endpoints when that feature is turned on. /// </summary> - [TestCase] + [Test] public void DualIdentifier() { this.MockResponder.RegisterMockResponse(VanityUri, "application/xrds+xml", LoadEmbeddedFile("/Discovery/xrdsdiscovery/xrds20dual.xml")); var rp = this.CreateRelyingParty(true); diff --git a/src/DotNetOpenAuth.Test/OpenId/DiscoveryServices/XriDiscoveryProxyServiceTests.cs b/src/DotNetOpenAuth.Test/OpenId/DiscoveryServices/XriDiscoveryProxyServiceTests.cs index 05a54c1..fe767ea 100644 --- a/src/DotNetOpenAuth.Test/OpenId/DiscoveryServices/XriDiscoveryProxyServiceTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/DiscoveryServices/XriDiscoveryProxyServiceTests.cs @@ -15,7 +15,7 @@ namespace DotNetOpenAuth.Test.OpenId.DiscoveryServices { [TestFixture] public class XriDiscoveryProxyServiceTests : OpenIdTestBase { - [TestCase] + [Test] public void Discover() { string xrds = @"<?xml version='1.0' encoding='UTF-8'?> <XRD version='2.0' xmlns='xri://$xrd*($v*2.0)'> @@ -62,7 +62,7 @@ namespace DotNetOpenAuth.Test.OpenId.DiscoveryServices { Assert.AreEqual("=Arnott", se.FriendlyIdentifierForDisplay); } - [TestCase] + [Test] public void DiscoverCommunityInameCanonicalIDs() { string llliResponse = @"<?xml version='1.0' encoding='UTF-8'?> <XRD version='2.0' xmlns='xri://$xrd*($v*2.0)'> @@ -292,7 +292,7 @@ uEyb50RJ7DWmXctSC0b3eymZ2lSXxAWNOsNy this.VerifyCanonicalId("=Web", "=!91F2.8153.F600.AE24"); } - [TestCase] + [Test] public void DiscoveryCommunityInameDelegateWithoutCanonicalID() { this.MockResponder.RegisterMockXrdsResponses(new Dictionary<string, string> { { "https://xri.net/=Web*andrew.arnott?_xrd_r=application/xrd%2Bxml;sep=false", @"<?xml version='1.0' encoding='UTF-8'?> diff --git a/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/AttributeExchangeRoundtripTests.cs b/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/AttributeExchangeRoundtripTests.cs index cb76f95..ab0a10b 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/AttributeExchangeRoundtripTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/AttributeExchangeRoundtripTests.cs @@ -16,7 +16,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { private const string IncrementingAttribute = "http://incatt"; private int incrementingAttributeValue = 1; - [TestCase] + [Test] public void Fetch() { var request = new FetchRequest(); request.Attributes.Add(new AttributeRequest(NicknameTypeUri)); @@ -29,7 +29,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { ExtensionTestUtilities.Roundtrip(Protocol.Default, new[] { request }, new[] { response }); } - [TestCase] + [Test] public void Store() { var request = new StoreRequest(); var newAttribute = new AttributeValues( diff --git a/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/AttributeRequestTests.cs b/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/AttributeRequestTests.cs index 565ff57..337663e 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/AttributeRequestTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/AttributeRequestTests.cs @@ -12,7 +12,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { [TestFixture] public class AttributeRequestTests : OpenIdTestBase { - [TestCase] + [Test] public void CtorDefault() { AttributeRequest req = new AttributeRequest(); Assert.AreEqual(1, req.Count); @@ -40,7 +40,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { new AttributeRequest(WellKnownAttributes.Contact.Email, false, -1); } - [TestCase] + [Test] public void CtorFull() { var req = new AttributeRequest(WellKnownAttributes.Contact.Email, true, 5); Assert.AreEqual(WellKnownAttributes.Contact.Email, req.TypeUri); @@ -60,7 +60,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { req.Count = -1; } - [TestCase] + [Test] public void EqualityTests() { var req1 = new AttributeRequest(); var req2 = new AttributeRequest(); diff --git a/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/AttributeValuesTests.cs b/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/AttributeValuesTests.cs index 5ba90d6..6b6edd8 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/AttributeValuesTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/AttributeValuesTests.cs @@ -14,7 +14,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.AttributeExchange { [TestFixture] public class AttributeValuesTests : OpenIdTestBase { - [TestCase] + [Test] public void Ctor() { var att = new AttributeValues(); Assert.IsNull(att.TypeUri); @@ -37,7 +37,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.AttributeExchange { /// <summary> /// Verifies the Equals method. /// </summary> - [TestCase] + [Test] public void EqualityTests() { var att1 = new AttributeValues(); var att2 = new AttributeValues(); diff --git a/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/FetchRequestTests.cs b/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/FetchRequestTests.cs index 970dae6..62f54a2 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/FetchRequestTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/FetchRequestTests.cs @@ -18,13 +18,13 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { new FetchRequest().Attributes.Add(null); } - [TestCase] + [Test] public void AddAttributeRequest() { var req = new FetchRequest(); req.Attributes.Add(new AttributeRequest() { TypeUri = "http://someUri" }); } - [TestCase] + [Test] public void AddAttributeRequestStrangeUri() { var req = new FetchRequest(); req.Attributes.Add(new AttributeRequest() { TypeUri = "=someUri*who*knows*but*this*is*legal" }); @@ -37,7 +37,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { req.Attributes.Add(new AttributeRequest() { TypeUri = "http://UriTwice" }); } - [TestCase] + [Test] public void RespondSimpleValue() { var req = new AttributeRequest(); req.TypeUri = "http://someType"; @@ -47,7 +47,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { Assert.AreEqual("value", resp.Values[0]); } - [TestCase] + [Test] public void RespondTwoValues() { var req = new AttributeRequest(); req.TypeUri = "http://someType"; @@ -75,7 +75,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { req.Respond(null); } - [TestCase] + [Test] public void EqualityTests() { var req1 = new FetchRequest(); var req2 = new FetchRequest(); @@ -100,7 +100,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { /// <summary> /// Verifies that the class is serializable. /// </summary> - [TestCase] + [Test] public void Serializable() { var fetch = new FetchRequest(); fetch.Attributes.AddRequired("http://someAttribute"); diff --git a/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/FetchResponseTests.cs b/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/FetchResponseTests.cs index b135675..53d1ef4 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/FetchResponseTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/FetchResponseTests.cs @@ -13,13 +13,13 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { [TestFixture] public class FetchResponseTests : OpenIdTestBase { - [TestCase] + [Test] public void AddAttribute() { var response = new FetchResponse(); response.Attributes.Add(new AttributeValues("http://someattribute", "Value1")); } - [TestCase] + [Test] public void AddTwoAttributes() { var response = new FetchResponse(); response.Attributes.Add(new AttributeValues("http://someattribute", "Value1")); @@ -39,7 +39,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { response.Attributes.Add(null); } - [TestCase] + [Test] public void GetAttributeValue() { var response = new FetchResponse(); @@ -55,7 +55,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { Assert.AreEqual("a", response.GetAttributeValue("http://someattribute3")); } - [TestCase] + [Test] public void EqualityTests() { var response1 = new FetchResponse(); var response2 = new FetchResponse(); @@ -80,7 +80,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { /// <summary> /// Verifies that the class is serializable. /// </summary> - [TestCase] + [Test] public void Serializable() { var fetch = new FetchResponse(); fetch.Attributes.Add("http://someAttribute", "val1", "val2"); diff --git a/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/StoreRequestTests.cs b/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/StoreRequestTests.cs index 2a491f6..9741be3 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/StoreRequestTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/StoreRequestTests.cs @@ -19,7 +19,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.AttributeExchange { /// <summary> /// Verifies the constructor behavior. /// </summary> - [TestCase] + [Test] public void Ctor() { var req = new StoreRequest(); Assert.IsFalse(req.Attributes.Any()); @@ -28,7 +28,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.AttributeExchange { /// <summary> /// Verifies the AddAttribute method. /// </summary> - [TestCase] + [Test] public void AddAttributeByValue() { var req = new StoreRequest(); AttributeValues value = new AttributeValues(); @@ -39,7 +39,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.AttributeExchange { /// <summary> /// Verifies the AddAttribute method. /// </summary> - [TestCase] + [Test] public void AddAttributeByPrimitives() { var req = new StoreRequest(); req.Attributes.Add("http://att1", "value1", "value2"); @@ -51,7 +51,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.AttributeExchange { /// <summary> /// Verifies the Equals method. /// </summary> - [TestCase] + [Test] public void EqualityTests() { var req1 = new StoreRequest(); var req2 = new StoreRequest(); @@ -71,7 +71,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.AttributeExchange { /// <summary> /// Verifies that the class is serializable. /// </summary> - [TestCase] + [Test] public void Serializable() { var store = new StoreRequest(); store.Attributes.Add("http://someAttribute", "val1", "val2"); diff --git a/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/StoreResponseTests.cs b/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/StoreResponseTests.cs index d0b4616..32682bd 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/StoreResponseTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/StoreResponseTests.cs @@ -14,7 +14,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.AttributeExchange { /// <summary> /// Verifies the constructor's behavior. /// </summary> - [TestCase] + [Test] public void Ctor() { var response = new StoreResponse(); Assert.IsTrue(response.Succeeded, "The default status should be Succeeded."); @@ -28,7 +28,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.AttributeExchange { /// <summary> /// Verifies the Equals method. /// </summary> - [TestCase] + [Test] public void EqualityTests() { var response1 = new StoreResponse(); var response2 = new StoreResponse(); @@ -51,7 +51,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.AttributeExchange { /// <summary> /// Verifies that the class is serializable. /// </summary> - [TestCase] + [Test] public void Serializable() { var store = new StoreResponse(); store.Succeeded = false; diff --git a/src/DotNetOpenAuth.Test/OpenId/Extensions/ExtensionsInteropHelperOPTests.cs b/src/DotNetOpenAuth.Test/OpenId/Extensions/ExtensionsInteropHelperOPTests.cs index aca1d8e..9592605 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Extensions/ExtensionsInteropHelperOPTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Extensions/ExtensionsInteropHelperOPTests.cs @@ -37,7 +37,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { /// <summary> /// Verifies no extensions appear as no extensions /// </summary> - [TestCase] + [Test] public void NoRequestedExtensions() { var sreg = ExtensionsInteropHelper.UnifyExtensionsAsSreg(this.request); Assert.IsNull(sreg); @@ -52,7 +52,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { Assert.AreSame(sregResponse, extensions.Single()); } - [TestCase] + [Test] public void NegativeResponse() { this.request.IsAuthenticated = false; ExtensionsInteropHelper.ConvertSregToMatchRequest(this.request); @@ -61,7 +61,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { /// <summary> /// Verifies sreg coming in is seen as sreg. /// </summary> - [TestCase] + [Test] public void UnifyExtensionsAsSregWithSreg() { var sregInjected = new ClaimsRequest(DotNetOpenAuth.OpenId.Extensions.SimpleRegistration.Constants.sreg_ns) { Nickname = DemandLevel.Request, @@ -82,7 +82,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { /// <summary> /// Verifies AX coming in looks like sreg. /// </summary> - [TestCase] + [Test] public void UnifyExtensionsAsSregWithAX() { this.ParameterizedAXTest(AXAttributeFormats.AXSchemaOrg); } @@ -90,7 +90,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { /// <summary> /// Verifies AX coming in looks like sreg. /// </summary> - [TestCase] + [Test] public void UnifyExtensionsAsSregWithAXSchemaOpenIdNet() { this.ParameterizedAXTest(AXAttributeFormats.SchemaOpenIdNet); } @@ -98,7 +98,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { /// <summary> /// Verifies sreg and AX in one request has a preserved sreg request. /// </summary> - [TestCase] + [Test] public void UnifyExtensionsAsSregWithBothSregAndAX() { var sregInjected = new ClaimsRequest(DotNetOpenAuth.OpenId.Extensions.SimpleRegistration.Constants.sreg_ns) { Nickname = DemandLevel.Request, diff --git a/src/DotNetOpenAuth.Test/OpenId/Extensions/ExtensionsInteropHelperRPRequestTests.cs b/src/DotNetOpenAuth.Test/OpenId/Extensions/ExtensionsInteropHelperRPRequestTests.cs index 1d40c4a..b5bcd7b 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Extensions/ExtensionsInteropHelperRPRequestTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Extensions/ExtensionsInteropHelperRPRequestTests.cs @@ -44,7 +44,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { /// <summary> /// Verifies that without an Sreg extension to copy from, no AX extension request is added. /// </summary> - [TestCase] + [Test] public void SpreadSregToAXNoExtensions() { ExtensionsInteropHelper.SpreadSregToAX(this.authReq, AXAttributeFormats.AXSchemaOrg); Assert.AreEqual(0, this.authReq.AppliedExtensions.Count()); @@ -53,7 +53,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { /// <summary> /// Verifies that Sreg requests are correctly copied to axschema.org AX requests. /// </summary> - [TestCase] + [Test] public void SpreadSregToAXBasic() { this.authReq.AddExtension(this.sreg); ExtensionsInteropHelper.SpreadSregToAX(this.authReq, AXAttributeFormats.AXSchemaOrg); @@ -72,7 +72,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { /// <summary> /// Verifies that sreg can spread to multiple AX schemas. /// </summary> - [TestCase] + [Test] public void SpreadSregToAxMultipleSchemas() { this.authReq.AddExtension(this.sreg); ExtensionsInteropHelper.SpreadSregToAX(this.authReq, AXAttributeFormats.AXSchemaOrg | AXAttributeFormats.SchemaOpenIdNet); @@ -85,7 +85,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { /// <summary> /// Verifies no spread if the OP advertises sreg support. /// </summary> - [TestCase] + [Test] public void SpreadSregToAxNoOpIfOPSupportsSreg() { this.authReq.AddExtension(this.sreg); this.InjectAdvertisedTypeUri(DotNetOpenAuth.OpenId.Extensions.SimpleRegistration.Constants.sreg_ns); @@ -96,7 +96,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { /// <summary> /// Verifies a targeted AX request if the OP advertises a recognized type URI format. /// </summary> - [TestCase] + [Test] public void SpreadSregToAxTargetedAtOPFormat() { this.authReq.AddExtension(this.sreg); this.InjectAdvertisedTypeUri(WellKnownAttributes.Name.FullName); @@ -109,7 +109,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { /// <summary> /// Verifies that TransformAXFormat correctly translates AX schema Type URIs. /// </summary> - [TestCase] + [Test] public void TransformAXFormatTest() { Assert.AreEqual(WellKnownAttributes.Name.Alias, ExtensionsInteropProviderHelper.TransformAXFormatTestHook(WellKnownAttributes.Name.Alias, AXAttributeFormats.AXSchemaOrg)); Assert.AreEqual("http://schema.openid.net/namePerson/friendly", ExtensionsInteropProviderHelper.TransformAXFormatTestHook(WellKnownAttributes.Name.Alias, AXAttributeFormats.SchemaOpenIdNet)); diff --git a/src/DotNetOpenAuth.Test/OpenId/Extensions/ExtensionsInteropHelperRPResponseTests.cs b/src/DotNetOpenAuth.Test/OpenId/Extensions/ExtensionsInteropHelperRPResponseTests.cs index a5ce44a..b8ae42c 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Extensions/ExtensionsInteropHelperRPResponseTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Extensions/ExtensionsInteropHelperRPResponseTests.cs @@ -34,7 +34,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { /// <summary> /// Verifies that with no extensions present, UnifyExtensionsAsSreg returns an empty ClaimsResponse. /// </summary> - [TestCase] + [Test] public void UnifyExtensionsAsSregNoExtensions() { var sreg = ExtensionsInteropHelper.UnifyExtensionsAsSreg(this.response, true); Assert.IsNotNull(sreg); @@ -44,7 +44,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { /// <summary> /// Verifies that with sreg and AX extensions present, the sreg extension is returned. /// </summary> - [TestCase] + [Test] public void UnifyExtensionsAsSregWithSreg() { var sregInjected = new ClaimsResponse { Nickname = "andy", @@ -61,7 +61,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { /// <summary> /// Verifies UnifyExtensionsAsSreg correctly converts AX to sreg. /// </summary> - [TestCase] + [Test] public void UnifyExtensionsAsSregFromAXSchemaOrg() { var axInjected = new FetchResponse(); axInjected.Attributes.Add(WellKnownAttributes.Name.Alias, "nate"); @@ -73,7 +73,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { /// <summary> /// Verifies UnifyExtensionsAsSreg correctly converts AX in a non-standard format to sreg. /// </summary> - [TestCase] + [Test] public void UnifyExtensionsasSregFromSchemaOpenIdNet() { var axInjected = new FetchResponse(); axInjected.Attributes.Add(ExtensionsInteropProviderHelper.TransformAXFormatTestHook(WellKnownAttributes.Name.Alias, AXAttributeFormats.SchemaOpenIdNet), "nate"); diff --git a/src/DotNetOpenAuth.Test/OpenId/Extensions/ProviderAuthenticationPolicy/PapeRoundTripTests.cs b/src/DotNetOpenAuth.Test/OpenId/Extensions/ProviderAuthenticationPolicy/PapeRoundTripTests.cs index c1b721e..cba54bf 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Extensions/ProviderAuthenticationPolicy/PapeRoundTripTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Extensions/ProviderAuthenticationPolicy/PapeRoundTripTests.cs @@ -13,14 +13,14 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.ProviderAuthenticationPolicy { [TestFixture] public class PapeRoundTripTests : OpenIdTestBase { - [TestCase] + [Test] public void Trivial() { var request = new PolicyRequest(); var response = new PolicyResponse(); ExtensionTestUtilities.Roundtrip(Protocol.Default, new[] { request }, new[] { response }); } - [TestCase] + [Test] public void Full() { var request = new PolicyRequest(); request.MaximumAuthenticationAge = TimeSpan.FromMinutes(10); diff --git a/src/DotNetOpenAuth.Test/OpenId/Extensions/ProviderAuthenticationPolicy/PolicyRequestTests.cs b/src/DotNetOpenAuth.Test/OpenId/Extensions/ProviderAuthenticationPolicy/PolicyRequestTests.cs index b6191e5..0806754 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Extensions/ProviderAuthenticationPolicy/PolicyRequestTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Extensions/ProviderAuthenticationPolicy/PolicyRequestTests.cs @@ -17,7 +17,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.ProviderAuthenticationPolicy { [TestFixture] public class PolicyRequestTests : OpenIdTestBase { - [TestCase] + [Test] public void Ctor() { PolicyRequest req = new PolicyRequest(); Assert.IsNull(req.MaximumAuthenticationAge); @@ -25,7 +25,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.ProviderAuthenticationPolicy { Assert.AreEqual(0, req.PreferredPolicies.Count); } - [TestCase] + [Test] public void MaximumAuthenticationAgeTest() { PolicyRequest req = new PolicyRequest(); req.MaximumAuthenticationAge = TimeSpan.FromHours(1); @@ -35,7 +35,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.ProviderAuthenticationPolicy { Assert.IsNull(req.MaximumAuthenticationAge); } - [TestCase] + [Test] public void AddPolicies() { PolicyRequest resp = new PolicyRequest(); resp.PreferredPolicies.Add(AuthenticationPolicies.MultiFactor); @@ -45,7 +45,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.ProviderAuthenticationPolicy { Assert.AreEqual(AuthenticationPolicies.PhishingResistant, resp.PreferredPolicies[1]); } - [TestCase] + [Test] public void AddPolicyMultipleTimes() { // Although this isn't really the desired behavior (we'd prefer to see an // exception thrown), since we're using a List<string> internally we can't @@ -57,7 +57,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.ProviderAuthenticationPolicy { Assert.AreEqual(2, resp.PreferredPolicies.Count); } - [TestCase] + [Test] public void AddAuthLevelTypes() { PolicyRequest req = new PolicyRequest(); req.PreferredAuthLevelTypes.Add(Constants.AssuranceLevels.NistTypeUri); @@ -65,7 +65,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.ProviderAuthenticationPolicy { Assert.IsTrue(req.PreferredAuthLevelTypes.Contains(Constants.AssuranceLevels.NistTypeUri)); } - [TestCase] + [Test] public void EqualsTest() { PolicyRequest req = new PolicyRequest(); PolicyRequest req2 = new PolicyRequest(); @@ -104,7 +104,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.ProviderAuthenticationPolicy { Assert.AreEqual(req, req2); } - [TestCase] + [Test] public void Serialize() { PolicyRequest req = new PolicyRequest(); IMessageWithEvents reqEvents = req; diff --git a/src/DotNetOpenAuth.Test/OpenId/Extensions/ProviderAuthenticationPolicy/PolicyResponseTests.cs b/src/DotNetOpenAuth.Test/OpenId/Extensions/ProviderAuthenticationPolicy/PolicyResponseTests.cs index be6244a..8126d65 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Extensions/ProviderAuthenticationPolicy/PolicyResponseTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Extensions/ProviderAuthenticationPolicy/PolicyResponseTests.cs @@ -20,7 +20,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.ProviderAuthenticationPolicy { private static readonly DateTime someUtcTime = new DateTime(2008, 1, 1, 1, 1, 1, 0, DateTimeKind.Utc); private static readonly DateTime someUnspecifiedTime = new DateTime(2008, 1, 1, 1, 1, 1, 0, DateTimeKind.Unspecified); - [TestCase] + [Test] public void Ctor() { PolicyResponse resp = new PolicyResponse(); Assert.IsNotNull(resp.ActualPolicies); @@ -29,7 +29,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.ProviderAuthenticationPolicy { Assert.IsNull(resp.NistAssuranceLevel); } - [TestCase] + [Test] public void AddPolicies() { PolicyResponse resp = new PolicyResponse(); resp.ActualPolicies.Add(AuthenticationPolicies.MultiFactor); @@ -39,7 +39,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.ProviderAuthenticationPolicy { Assert.AreEqual(AuthenticationPolicies.PhishingResistant, resp.ActualPolicies[1]); } - [TestCase] + [Test] public void AddPolicyMultipleTimes() { // Although this isn't really the desired behavior (we'd prefer to see an // exception thrown), since we're using a List<string> internally we can't @@ -51,7 +51,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.ProviderAuthenticationPolicy { Assert.AreEqual(2, resp.ActualPolicies.Count); } - [TestCase] + [Test] public void AuthenticationTimeUtcConvertsToUtc() { PolicyResponse resp = new PolicyResponse(); resp.AuthenticationTimeUtc = someLocalTime; @@ -60,7 +60,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.ProviderAuthenticationPolicy { Assert.AreEqual(someLocalTime.ToUniversalTime(), resp.AuthenticationTimeUtc.Value); } - [TestCase] + [Test] public void AuthenticationTimeUtcSetUtc() { PolicyResponse resp = new PolicyResponse(); resp.AuthenticationTimeUtc = someUtcTime; @@ -73,7 +73,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.ProviderAuthenticationPolicy { resp.AuthenticationTimeUtc = someUnspecifiedTime; } - [TestCase] + [Test] public void AuthenticationTimeUtcSetNull() { PolicyResponse resp = new PolicyResponse(); resp.AuthenticationTimeUtc = null; @@ -84,7 +84,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.ProviderAuthenticationPolicy { Assert.IsNull(resp.AuthenticationTimeUtc); } - [TestCase] + [Test] public void NistAssuranceLevelSetVarious() { PolicyResponse resp = new PolicyResponse(); resp.NistAssuranceLevel = NistAssuranceLevel.Level1; @@ -95,7 +95,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.ProviderAuthenticationPolicy { Assert.AreEqual(NistAssuranceLevel.InsufficientForLevel1, resp.NistAssuranceLevel); } - [TestCase] + [Test] public void AssuranceLevels() { PolicyResponse resp = new PolicyResponse(); Assert.AreEqual(0, resp.AssuranceLevels.Count); @@ -108,7 +108,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.ProviderAuthenticationPolicy { Assert.IsNull(resp.NistAssuranceLevel); } - [TestCase] + [Test] public void EqualsTest() { PolicyResponse resp = new PolicyResponse(); PolicyResponse resp2 = new PolicyResponse(); @@ -164,7 +164,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.ProviderAuthenticationPolicy { Assert.AreEqual(resp, resp2); } - [TestCase] + [Test] public void Serialize() { PolicyResponse resp = new PolicyResponse(); IMessageWithEvents respEvents = resp; diff --git a/src/DotNetOpenAuth.Test/OpenId/Extensions/SimpleRegistration/ClaimsRequestTests.cs b/src/DotNetOpenAuth.Test/OpenId/Extensions/SimpleRegistration/ClaimsRequestTests.cs index 69ece9d..6be02e7 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Extensions/SimpleRegistration/ClaimsRequestTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Extensions/SimpleRegistration/ClaimsRequestTests.cs @@ -12,7 +12,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { [TestFixture] public class ClaimsRequestTests : OpenIdTestBase { - [TestCase] + [Test] public void CreateResponse() { // some unofficial type URIs... this.ParameterizedTypeUriPreservedTest("http://openid.net/sreg/1.0"); @@ -21,7 +21,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { this.ParameterizedTypeUriPreservedTest("http://openid.net/extensions/sreg/1.1"); } - [TestCase] + [Test] public void RequiredOptionalLists() { ClaimsRequest req = new ClaimsRequest(); MessageDictionary dictionary = this.MessageDescriptions.GetAccessor(req); @@ -39,7 +39,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { Assert.AreEqual("nickname,postcode", dictionary["required"]); } - [TestCase] + [Test] public void EqualityTests() { ClaimsRequest req1 = new ClaimsRequest(); ClaimsRequest req2 = new ClaimsRequest(); diff --git a/src/DotNetOpenAuth.Test/OpenId/Extensions/SimpleRegistration/ClaimsResponseTests.cs b/src/DotNetOpenAuth.Test/OpenId/Extensions/SimpleRegistration/ClaimsResponseTests.cs index 365ba5d..1b2c2ec 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Extensions/SimpleRegistration/ClaimsResponseTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Extensions/SimpleRegistration/ClaimsResponseTests.cs @@ -17,7 +17,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { [TestFixture] public class ClaimsResponseTests { - [TestCase] + [Test] public void EmptyMailAddress() { ClaimsResponse response = new ClaimsResponse(Constants.sreg_ns); response.Email = string.Empty; @@ -48,7 +48,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { Assert.AreEqual(fields, fields2); } - [TestCase] + [Test] public void EqualityTest() { ClaimsResponse fields1 = this.GetFilledData(); @@ -96,7 +96,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { Assert.AreNotEqual(fields1, fields2); } - [TestCase] + [Test] public void Birthdates() { var response = new ClaimsResponse(); // Verify that they both start out as null @@ -131,7 +131,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions { response.BirthDateRaw = "2008"; } - [TestCase] + [Test] public void ResponseAlternateTypeUriTests() { var request = new ClaimsRequest(Constants.sreg_ns10); request.Email = DemandLevel.Require; diff --git a/src/DotNetOpenAuth.Test/OpenId/Extensions/UI/UIRequestTests.cs b/src/DotNetOpenAuth.Test/OpenId/Extensions/UI/UIRequestTests.cs index a33dc09..97a8545 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Extensions/UI/UIRequestTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Extensions/UI/UIRequestTests.cs @@ -12,7 +12,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.UI { [TestFixture] public class UIRequestTests : OpenIdTestBase { - [TestCase] + [Test] public void Defaults() { var request = new UIRequest(); Assert.AreEqual("popup", request.Mode); @@ -21,7 +21,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.UI { Assert.IsFalse(request.Icon.HasValue); } - [TestCase] + [Test] public void IconEncodingDecoding() { var request = new UIRequest(); @@ -37,7 +37,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.UI { Assert.AreEqual("true", dictionary["icon"]); } - [TestCase] + [Test] public void LanguagePreferenceEncodingDecoding() { var request = new UIRequest(); MessageDictionary dictionary = this.MessageDescriptions.GetAccessor(request); @@ -59,7 +59,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.UI { Assert.AreEqual(new CultureInfo("es-ES"), request.LanguagePreference[1]); } - [TestCase] + [Test] public void ModeEncoding() { var request = new UIRequest(); MessageDictionary dictionary = this.MessageDescriptions.GetAccessor(request); diff --git a/src/DotNetOpenAuth.Test/OpenId/IdentifierTests.cs b/src/DotNetOpenAuth.Test/OpenId/IdentifierTests.cs index f8b05db..ee9ad6b 100644 --- a/src/DotNetOpenAuth.Test/OpenId/IdentifierTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/IdentifierTests.cs @@ -18,14 +18,14 @@ namespace DotNetOpenAuth.Test.OpenId { private string uriHttps = "https://www.yahoo.com/"; private string xri = "=arnott*andrew"; - [TestCase] + [Test] public void TryParseNoThrow() { Identifier id; Assert.IsFalse(Identifier.TryParse(null, out id)); Assert.IsFalse(Identifier.TryParse(string.Empty, out id)); } - [TestCase] + [Test] public void TryParse() { Identifier id; Assert.IsTrue(Identifier.TryParse("http://host/path", out id)); @@ -34,7 +34,7 @@ namespace DotNetOpenAuth.Test.OpenId { Assert.AreEqual("=arnott", id.ToString()); } - [TestCase] + [Test] public void Parse() { Assert.IsInstanceOf<UriIdentifier>(Identifier.Parse(this.uri)); Assert.IsInstanceOf<XriIdentifier>(Identifier.Parse(this.xri)); @@ -43,7 +43,7 @@ namespace DotNetOpenAuth.Test.OpenId { /// <summary> /// Tests conformance with 2.0 spec section 7.2#2 /// </summary> - [TestCase] + [Test] public void ParseEndUserSuppliedXriIdentifer() { List<char> symbols = new List<char>(XriIdentifier.GlobalContextSymbols); symbols.Add('('); @@ -59,7 +59,7 @@ namespace DotNetOpenAuth.Test.OpenId { /// <summary> /// Verifies conformance with 2.0 spec section 7.2#3 /// </summary> - [TestCase] + [Test] public void ParseEndUserSuppliedUriIdentifier() { // verify a fully-qualified Uri var id = Identifier.Parse(this.uri); diff --git a/src/DotNetOpenAuth.Test/OpenId/Messages/AssociateDiffieHellmanRequestTests.cs b/src/DotNetOpenAuth.Test/OpenId/Messages/AssociateDiffieHellmanRequestTests.cs index b97a894..fd10b15 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Messages/AssociateDiffieHellmanRequestTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Messages/AssociateDiffieHellmanRequestTests.cs @@ -20,12 +20,12 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { this.request = new AssociateDiffieHellmanRequest(Protocol.V20.Version, Recipient); } - [TestCase] + [Test] public void Ctor() { Assert.AreEqual(Recipient, this.request.Recipient); } - [TestCase] + [Test] public void Mode() { Assert.AreEqual("associate", this.request.Mode); } diff --git a/src/DotNetOpenAuth.Test/OpenId/Messages/AssociateRequestTests.cs b/src/DotNetOpenAuth.Test/OpenId/Messages/AssociateRequestTests.cs index 0c7a96a..72931c5 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Messages/AssociateRequestTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Messages/AssociateRequestTests.cs @@ -25,17 +25,17 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { this.request = new AssociateUnencryptedRequest(this.protocol.Version, this.secureRecipient); } - [TestCase] + [Test] public void ConstructorTest() { Assert.AreEqual(this.secureRecipient, this.request.Recipient); } - [TestCase] + [Test] public void Mode() { Assert.AreEqual(this.protocol.Args.Mode.associate, this.request.Mode); } - [TestCase] + [Test] public void MessagePartsTest() { this.request.AssociationType = this.protocol.Args.SignatureAlgorithm.HMAC_SHA1; this.request.SessionType = this.protocol.Args.SessionType.NoEncryption; @@ -51,7 +51,7 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { Assert.AreEqual(this.protocol.Args.SessionType.NoEncryption, dict[this.protocol.openid.session_type]); } - [TestCase] + [Test] public void ValidMessageTest() { this.request = new AssociateUnencryptedRequest(Protocol.V20.Version, this.secureRecipient); this.request.AssociationType = this.protocol.Args.SignatureAlgorithm.HMAC_SHA1; @@ -65,12 +65,12 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { this.request.EnsureValidMessage(); // no-encryption only allowed for secure channels. } - [TestCase] + [Test] public void RequiredProtection() { Assert.AreEqual(MessageProtections.None, this.request.RequiredProtection); } - [TestCase] + [Test] public void Transport() { Assert.AreEqual(MessageTransport.Direct, this.request.Transport); } @@ -78,7 +78,7 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { /// <summary> /// Verifies security settings limit RP's initial associate request /// </summary> - [TestCase] + [Test] public void AssociateRequestDeterminedBySecuritySettings() { Protocol protocol = Protocol.V20; SecuritySettings securitySettings = new RelyingPartySecuritySettings(); diff --git a/src/DotNetOpenAuth.Test/OpenId/Messages/AssociateUnencryptedResponseTests.cs b/src/DotNetOpenAuth.Test/OpenId/Messages/AssociateUnencryptedResponseTests.cs index 3668333..99a0ed9 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Messages/AssociateUnencryptedResponseTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Messages/AssociateUnencryptedResponseTests.cs @@ -22,7 +22,7 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { this.response = new AssociateUnencryptedResponse(request.Version, request); } - [TestCase] + [Test] public void ParameterNames() { this.response.AssociationHandle = "HANDLE"; this.response.AssociationType = "HMAC-SHA1"; @@ -38,12 +38,12 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { Assert.AreEqual("50", fields["expires_in"]); } - [TestCase] + [Test] public void RequiredProtection() { Assert.AreEqual(MessageProtections.None, this.response.RequiredProtection); } - [TestCase] + [Test] public void Transport() { Assert.AreEqual(MessageTransport.Direct, this.response.Transport); } diff --git a/src/DotNetOpenAuth.Test/OpenId/Messages/AssociateUnsuccessfulResponseTests.cs b/src/DotNetOpenAuth.Test/OpenId/Messages/AssociateUnsuccessfulResponseTests.cs index f5f5592..6b06dc8 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Messages/AssociateUnsuccessfulResponseTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Messages/AssociateUnsuccessfulResponseTests.cs @@ -22,7 +22,7 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { this.response = new AssociateUnsuccessfulResponse(request.Version, request); } - [TestCase] + [Test] public void ParameterNames() { this.response.ErrorMessage = "Some Error"; this.response.AssociationType = "HMAC-SHA1"; diff --git a/src/DotNetOpenAuth.Test/OpenId/Messages/CheckAuthenticationRequestTests.cs b/src/DotNetOpenAuth.Test/OpenId/Messages/CheckAuthenticationRequestTests.cs index f1bcc57..79723ff 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Messages/CheckAuthenticationRequestTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Messages/CheckAuthenticationRequestTests.cs @@ -22,7 +22,7 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { /// and cause the authentication to inappropriately fail. /// Designed to verify fix to Trac #198. /// </remarks> - [TestCase] + [Test] public void ExactPositiveAssertionPreservation() { var rp = CreateRelyingParty(true); diff --git a/src/DotNetOpenAuth.Test/OpenId/Messages/CheckAuthenticationResponseTests.cs b/src/DotNetOpenAuth.Test/OpenId/Messages/CheckAuthenticationResponseTests.cs index 1ce97fe..b8adc1f 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Messages/CheckAuthenticationResponseTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Messages/CheckAuthenticationResponseTests.cs @@ -21,7 +21,7 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { base.SetUp(); } - [TestCase] + [Test] public void IsValid() { Protocol protocol = Protocol.Default; var request = new CheckAuthenticationRequest(protocol.Version, OPUri); diff --git a/src/DotNetOpenAuth.Test/OpenId/Messages/DirectErrorResponseTests.cs b/src/DotNetOpenAuth.Test/OpenId/Messages/DirectErrorResponseTests.cs index 06ef82d..d5de6b2 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Messages/DirectErrorResponseTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Messages/DirectErrorResponseTests.cs @@ -24,7 +24,7 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { this.response = new DirectErrorResponse(request.Version, request); } - [TestCase] + [Test] public void ParameterNames() { this.response.ErrorMessage = "Some Error"; this.response.Contact = "Andrew Arnott"; @@ -42,7 +42,7 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { /// Verifies that error messages are created as HTTP 400 errors, /// per OpenID 2.0 section 5.1.2.2. /// </summary> - [TestCase] + [Test] public void ErrorMessagesAsHttp400() { var httpStatusMessage = (IHttpDirectResponse)this.response; Assert.AreEqual(HttpStatusCode.BadRequest, httpStatusMessage.HttpStatusCode); diff --git a/src/DotNetOpenAuth.Test/OpenId/Messages/IndirectErrorResponseTests.cs b/src/DotNetOpenAuth.Test/OpenId/Messages/IndirectErrorResponseTests.cs index 0e4ddae..fd4953a 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Messages/IndirectErrorResponseTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Messages/IndirectErrorResponseTests.cs @@ -23,12 +23,12 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { this.response = new IndirectErrorResponse(request); } - [TestCase] + [Test] public void Ctor() { Assert.AreEqual(RPUri, this.response.Recipient); } - [TestCase] + [Test] public void ParameterNames() { this.response.ErrorMessage = "Some Error"; this.response.Contact = "Andrew Arnott"; diff --git a/src/DotNetOpenAuth.Test/OpenId/Messages/IndirectSignedResponseTests.cs b/src/DotNetOpenAuth.Test/OpenId/Messages/IndirectSignedResponseTests.cs index 1aceb17..ac49a14 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Messages/IndirectSignedResponseTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Messages/IndirectSignedResponseTests.cs @@ -39,7 +39,7 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { this.unsolicited = new IndirectSignedResponse(this.protocol.Version, RPUri); } - [TestCase] + [Test] public void CtorFromRequest() { Assert.AreEqual(this.protocol.Args.Mode.id_res, this.response.Mode); Assert.AreEqual(this.request.Version, this.response.Version); @@ -48,7 +48,7 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { Assert.IsTrue(DateTime.UtcNow - ((ITamperResistantOpenIdMessage)this.response).UtcCreationDate < TimeSpan.FromSeconds(5)); } - [TestCase] + [Test] public void CtorUnsolicited() { Assert.AreEqual(this.protocol.Args.Mode.id_res, this.unsolicited.Mode); Assert.AreEqual(this.protocol.Version, this.unsolicited.Version); @@ -60,7 +60,7 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { Assert.AreEqual(OPUri, this.unsolicited.ProviderEndpoint); } - [TestCase] + [Test] public void ResponseNonceSetter() { const string HybridValue = CreationDateString + "UNIQUE"; IReplayProtectedProtocolMessage responseReplay = this.response; @@ -73,7 +73,7 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { Assert.IsNull(responseReplay.Nonce); } - [TestCase] + [Test] public void ResponseNonceGetter() { IReplayProtectedProtocolMessage responseReplay = this.response; responseReplay.Nonce = "UnIqUe"; @@ -84,7 +84,7 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { Assert.AreEqual(this.creationDate, responseReplay.UtcCreationDate); } - [TestCase] + [Test] public void UtcCreationDateConvertsToUniversal() { IReplayProtectedProtocolMessage responseReplay = this.response; DateTime local = DateTime.Parse("1982-01-01", CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal); @@ -107,7 +107,7 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { Assert.AreEqual(this.creationDate.Hour, utcCreationDate.Hour, "The hour should match since both times are UTC time."); } - [TestCase] + [Test] public void ReturnToDoesNotMatchRecipient() { // Make sure its valid first, so we know that when it's invalid // it is due to our tampering. @@ -135,14 +135,14 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { this.response.GetReturnToArgument(string.Empty); } - [TestCase] + [Test] public void GetReturnToArgumentDoesNotReturnExtraArgs() { this.response.ExtraData["a"] = "b"; Assert.IsNull(this.response.GetReturnToArgument("a")); Assert.AreEqual(0, this.response.GetReturnToParameterNames().Count()); } - [TestCase] + [Test] public void GetReturnToArgumentAndNames() { UriBuilder returnToBuilder = new UriBuilder(this.response.ReturnTo); returnToBuilder.AppendQueryArgs(new Dictionary<string, string> { { "a", "b" } }); diff --git a/src/DotNetOpenAuth.Test/OpenId/Messages/NegativeAssertionResponseTests.cs b/src/DotNetOpenAuth.Test/OpenId/Messages/NegativeAssertionResponseTests.cs index 9fe2246..76178b0 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Messages/NegativeAssertionResponseTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Messages/NegativeAssertionResponseTests.cs @@ -22,7 +22,7 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { base.SetUp(); } - [TestCase] + [Test] public void Mode() { var setupRequestV1 = new CheckIdRequest(Protocol.V10.Version, OPUri, AuthenticationRequestMode.Setup); setupRequestV1.ReturnTo = RPUri; @@ -52,7 +52,7 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { new NegativeAssertionResponse(immediateRequestV1).EnsureValidMessage(); } - [TestCase] + [Test] public void UserSetupUrlSetForV1Immediate() { var immediateRequestV1 = new CheckIdRequest(Protocol.V10.Version, OPUri, AuthenticationRequestMode.Immediate); immediateRequestV1.ReturnTo = RPUri; @@ -61,7 +61,7 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { response.EnsureValidMessage(); } - [TestCase] + [Test] public void UserSetupUrlNotRequiredInV1SetupOrV2() { var setupRequestV1 = new CheckIdRequest(Protocol.V10.Version, OPUri, AuthenticationRequestMode.Setup); setupRequestV1.ReturnTo = RPUri; diff --git a/src/DotNetOpenAuth.Test/OpenId/Messages/PositiveAssertionResponseTests.cs b/src/DotNetOpenAuth.Test/OpenId/Messages/PositiveAssertionResponseTests.cs index 3a4cffa..75a5daf 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Messages/PositiveAssertionResponseTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Messages/PositiveAssertionResponseTests.cs @@ -38,7 +38,7 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { this.unsolicited = new PositiveAssertionResponse(this.protocol.Version, RPUri); } - [TestCase] + [Test] public void CtorFromRequest() { Assert.AreEqual(this.protocol.Args.Mode.id_res, this.response.Mode); Assert.AreEqual(this.request.Version, this.response.Version); @@ -46,7 +46,7 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { Assert.AreEqual(OPUri, this.response.ProviderEndpoint); } - [TestCase] + [Test] public void CtorUnsolicited() { Assert.AreEqual(this.protocol.Args.Mode.id_res, this.unsolicited.Mode); Assert.AreEqual(this.protocol.Version, this.unsolicited.Version); @@ -60,7 +60,7 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { /// <summary> /// Verifies that local_id and claimed_id can either be null or specified. /// </summary> - [TestCase] + [Test] public void ClaimedIdAndLocalIdSpecifiedIsValid() { this.response.LocalIdentifier = "http://local"; this.response.ClaimedIdentifier = "http://claimedid"; diff --git a/src/DotNetOpenAuth.Test/OpenId/NonIdentityTests.cs b/src/DotNetOpenAuth.Test/OpenId/NonIdentityTests.cs index a14dd5c..393239b 100644 --- a/src/DotNetOpenAuth.Test/OpenId/NonIdentityTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/NonIdentityTests.cs @@ -13,7 +13,7 @@ namespace DotNetOpenAuth.Test.OpenId { [TestFixture] public class NonIdentityTests : OpenIdTestBase { - [TestCase] + [Test] public void ExtensionOnlyChannelLevel() { Protocol protocol = Protocol.V20; AuthenticationRequestMode mode = AuthenticationRequestMode.Setup; @@ -30,7 +30,7 @@ namespace DotNetOpenAuth.Test.OpenId { coordinator.Run(); } - [TestCase] + [Test] public void ExtensionOnlyFacadeLevel() { Protocol protocol = Protocol.V20; var coordinator = new OpenIdCoordinator( diff --git a/src/DotNetOpenAuth.Test/OpenId/Provider/AnonymousRequestTests.cs b/src/DotNetOpenAuth.Test/OpenId/Provider/AnonymousRequestTests.cs index c6c368b..9b39522 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Provider/AnonymousRequestTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Provider/AnonymousRequestTests.cs @@ -16,7 +16,7 @@ namespace DotNetOpenAuth.Test.OpenId.Provider { /// <summary> /// Verifies that IsApproved controls which response message is returned. /// </summary> - [TestCase] + [Test] public void IsApprovedDeterminesReturnedMessage() { var op = CreateProvider(); Protocol protocol = Protocol.V20; diff --git a/src/DotNetOpenAuth.Test/OpenId/Provider/AuthenticationRequestTest.cs b/src/DotNetOpenAuth.Test/OpenId/Provider/AuthenticationRequestTest.cs index b5cdc84..2819e40 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Provider/AuthenticationRequestTest.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Provider/AuthenticationRequestTest.cs @@ -17,7 +17,7 @@ namespace DotNetOpenAuth.Test.OpenId.Provider { /// <summary> /// Verifies the user_setup_url is set properly for immediate negative responses. /// </summary> - [TestCase] + [Test] public void UserSetupUrl() { // Construct a V1 immediate request Protocol protocol = Protocol.V11; diff --git a/src/DotNetOpenAuth.Test/OpenId/Provider/HostProcessedRequestTests.cs b/src/DotNetOpenAuth.Test/OpenId/Provider/HostProcessedRequestTests.cs index 56ec789..2e3e7ec 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Provider/HostProcessedRequestTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Provider/HostProcessedRequestTests.cs @@ -30,12 +30,12 @@ namespace DotNetOpenAuth.Test.OpenId.Provider { this.request = new AuthenticationRequest(this.provider, this.checkIdRequest); } - [TestCase] + [Test] public void IsReturnUrlDiscoverableNoResponse() { Assert.AreEqual(RelyingPartyDiscoveryResult.NoServiceDocument, this.request.IsReturnUrlDiscoverable(this.provider.Channel.WebRequestHandler)); } - [TestCase] + [Test] public void IsReturnUrlDiscoverableValidResponse() { this.MockResponder.RegisterMockRPDiscovery(); this.request = new AuthenticationRequest(this.provider, this.checkIdRequest); @@ -46,7 +46,7 @@ namespace DotNetOpenAuth.Test.OpenId.Provider { /// Verifies that when discovery would be performed over standard HTTP and RequireSsl /// is set, that discovery fails. /// </summary> - [TestCase] + [Test] public void IsReturnUrlDiscoverableNotSsl() { this.provider.SecuritySettings.RequireSsl = true; this.MockResponder.RegisterMockRPDiscovery(); @@ -56,7 +56,7 @@ namespace DotNetOpenAuth.Test.OpenId.Provider { /// <summary> /// Verifies that when discovery would be performed over HTTPS that discovery succeeds. /// </summary> - [TestCase] + [Test] public void IsReturnUrlDiscoverableRequireSsl() { this.MockResponder.RegisterMockRPDiscovery(); this.checkIdRequest.Realm = RPRealmUriSsl; @@ -73,7 +73,7 @@ namespace DotNetOpenAuth.Test.OpenId.Provider { Assert.AreEqual(RelyingPartyDiscoveryResult.Success, this.request.IsReturnUrlDiscoverable(this.provider.Channel.WebRequestHandler)); } - [TestCase] + [Test] public void IsReturnUrlDiscoverableValidButNoMatch() { this.MockResponder.RegisterMockRPDiscovery(); this.provider.SecuritySettings.RequireSsl = false; // reset for another failure test case diff --git a/src/DotNetOpenAuth.Test/OpenId/Provider/OpenIdProviderTests.cs b/src/DotNetOpenAuth.Test/OpenId/Provider/OpenIdProviderTests.cs index ad37978..d981e71 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Provider/OpenIdProviderTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Provider/OpenIdProviderTests.cs @@ -47,14 +47,14 @@ namespace DotNetOpenAuth.Test.OpenId.Provider { /// <summary> /// Verifies the SecuritySettings property can be set to a new instance. /// </summary> - [TestCase] + [Test] public void SecuritySettings() { var newSettings = new ProviderSecuritySettings(); this.provider.SecuritySettings = newSettings; Assert.AreSame(newSettings, this.provider.SecuritySettings); } - [TestCase] + [Test] public void ExtensionFactories() { var factories = this.provider.ExtensionFactories; Assert.IsNotNull(factories); @@ -65,7 +65,7 @@ namespace DotNetOpenAuth.Test.OpenId.Provider { /// <summary> /// Verifies the Channel property. /// </summary> - [TestCase] + [Test] public void ChannelGetter() { Assert.IsNotNull(this.provider.Channel); } @@ -90,7 +90,7 @@ namespace DotNetOpenAuth.Test.OpenId.Provider { /// <summary> /// Verifies that GetRequest correctly returns the right messages. /// </summary> - [TestCase] + [Test] public void GetRequest() { HttpRequestInfo httpInfo = new HttpRequestInfo(); httpInfo.UrlBeforeRewriting = new Uri("http://someUri"); @@ -110,7 +110,7 @@ namespace DotNetOpenAuth.Test.OpenId.Provider { coordinator.Run(); } - [TestCase] + [Test] public void BadRequestsGenerateValidErrorResponses() { var coordinator = new OpenIdCoordinator( rp => { diff --git a/src/DotNetOpenAuth.Test/OpenId/Provider/PerformanceTests.cs b/src/DotNetOpenAuth.Test/OpenId/Provider/PerformanceTests.cs index 5e8c28a..27e65cc 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Provider/PerformanceTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Provider/PerformanceTests.cs @@ -33,7 +33,7 @@ namespace DotNetOpenAuth.Test.OpenId.Provider { this.provider = CreateProvider(); } - [TestCase] + [Test] public void AssociateDH() { var associateRequest = this.CreateAssociateRequest(OPUri); MeasurePerformance( @@ -46,7 +46,7 @@ namespace DotNetOpenAuth.Test.OpenId.Provider { iterations: 1); } - [TestCase] + [Test] public void AssociateClearText() { var associateRequest = this.CreateAssociateRequest(OPUriSsl); // SSL will cause a plaintext association MeasurePerformance( @@ -59,14 +59,14 @@ namespace DotNetOpenAuth.Test.OpenId.Provider { iterations: 1000); } - [TestCase] + [Test] public void CheckIdSharedHmacSha1Association() { Protocol protocol = Protocol.Default; string assocType = protocol.Args.SignatureAlgorithm.HMAC_SHA1; this.ParameterizedCheckIdTest(protocol, assocType); } - [TestCase] + [Test] public void CheckIdSharedHmacSha256Association() { Protocol protocol = Protocol.Default; string assocType = protocol.Args.SignatureAlgorithm.HMAC_SHA256; diff --git a/src/DotNetOpenAuth.Test/OpenId/ProviderEndpointDescriptionTests.cs b/src/DotNetOpenAuth.Test/OpenId/ProviderEndpointDescriptionTests.cs index 8d328b1..783bf1f 100644 --- a/src/DotNetOpenAuth.Test/OpenId/ProviderEndpointDescriptionTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/ProviderEndpointDescriptionTests.cs @@ -14,7 +14,7 @@ namespace DotNetOpenAuth.Test.OpenId { [TestFixture] public class ProviderEndpointDescriptionTests : OpenIdTestBase { - [TestCase] + [Test] public void NonNullCapabilities() { var epd = new ProviderEndpointDescription(OPUri, Protocol.Default.Version); Assert.IsNotNull(epd.Capabilities); diff --git a/src/DotNetOpenAuth.Test/OpenId/RealmTests.cs b/src/DotNetOpenAuth.Test/OpenId/RealmTests.cs index 65d00ee..20f9fe2 100644 --- a/src/DotNetOpenAuth.Test/OpenId/RealmTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/RealmTests.cs @@ -11,7 +11,7 @@ namespace DotNetOpenAuth.Test { [TestFixture] public class RealmTests { - [TestCase] + [Test] public void ValidRealmsTest() { // Just create these. If any are determined to be invalid, // an exception should be thrown that would fail this test. @@ -26,67 +26,67 @@ namespace DotNetOpenAuth.Test { new Realm("http://*.guest.myopenid.com/"); } - [TestCase] + [Test] [ExpectedException(typeof(ArgumentNullException))] public void InvalidRealmNullString() { new Realm((string)null); } - [TestCase] + [Test] [ExpectedException(typeof(ArgumentNullException))] public void InvalidRealmNullUri() { new Realm((Uri)null); } - [TestCase] + [Test] [ExpectedException(typeof(UriFormatException))] public void InvalidRealmEmpty() { new Realm(string.Empty); } - [TestCase] + [Test] [ExpectedException(typeof(UriFormatException))] public void InvalidRealmBadProtocol() { new Realm("asdf://www.microsoft.com/"); } - [TestCase] + [Test] [ExpectedException(typeof(UriFormatException))] public void InvalidRealmNoScheme() { new Realm("www.guy.com"); } - [TestCase] + [Test] [ExpectedException(typeof(UriFormatException))] public void InvalidRealmBadWildcard1() { new Realm("http://*www.my.com"); } - [TestCase] + [Test] [ExpectedException(typeof(UriFormatException))] public void InvalidRealmBadWildcard2() { new Realm("http://www.*.com"); } - [TestCase] + [Test] [ExpectedException(typeof(UriFormatException))] public void InvalidRealmBadWildcard3() { new Realm("http://www.my.*/"); } - [TestCase] + [Test] [ExpectedException(typeof(UriFormatException))] public void InvalidRealmTwoWildcards1() { new Realm("http://**.my.com"); } - [TestCase] + [Test] [ExpectedException(typeof(UriFormatException))] public void InvalidRealmTwoWildcards2() { new Realm("http://*.*.my.com"); } - [TestCase] + [Test] public void IsSaneTest() { Assert.IsTrue(new Realm("http://www.myopenid.com").IsSane); Assert.IsTrue(new Realm("http://myopenid.com").IsSane); @@ -98,7 +98,7 @@ namespace DotNetOpenAuth.Test { Assert.IsFalse(new Realm("http://*.co.uk").IsSane); } - [TestCase] + [Test] public void IsUrlWithinRealmTests() { /* * The openid.return_to URL MUST descend from the openid.trust_root, or the @@ -166,7 +166,7 @@ namespace DotNetOpenAuth.Test { Assert.IsFalse(new Realm("http://www.my.com/abc").Contains("http://www.my.com/ABC")); } - [TestCase] + [Test] public void ImplicitConversionFromStringTests() { Realm realm = "http://host"; Assert.AreEqual("host", realm.Host); @@ -174,7 +174,7 @@ namespace DotNetOpenAuth.Test { Assert.IsNull(realm); } - [TestCase] + [Test] public void ImplicitConversionToStringTests() { Realm realm = new Realm("http://host/"); string realmString = realm; @@ -184,7 +184,7 @@ namespace DotNetOpenAuth.Test { Assert.IsNull(realmString); } - [TestCase] + [Test] public void ImplicitConverstionFromUriTests() { Uri uri = new Uri("http://host"); Realm realm = uri; @@ -194,7 +194,7 @@ namespace DotNetOpenAuth.Test { Assert.IsNull(realm); } - [TestCase] + [Test] public void EqualsTest() { Realm testRealm1a = new Realm("http://www.yahoo.com"); Realm testRealm1b = new Realm("http://www.yahoo.com"); diff --git a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/AssociationsTests.cs b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/AssociationsTests.cs index 52bbded..b4113a6 100644 --- a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/AssociationsTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/AssociationsTests.cs @@ -26,17 +26,17 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { this.assocs = new Associations(); } - [TestCase] + [Test] public void GetNonexistentHandle() { Assert.IsNull(this.assocs.Get("someinvalidhandle")); } - [TestCase] + [Test] public void RemoveNonexistentHandle() { Assert.IsFalse(this.assocs.Remove("someinvalidhandle")); } - [TestCase] + [Test] public void HandleLifecycle() { Association a = HmacShaAssociation.Create( Protocol.Default, @@ -51,7 +51,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { Assert.IsFalse(this.assocs.Remove(a.Handle)); } - [TestCase] + [Test] public void Best() { Association a = HmacShaAssociation.Create( Protocol.Default, diff --git a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/AuthenticationRequestTests.cs b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/AuthenticationRequestTests.cs index de53a36..a7e9144 100644 --- a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/AuthenticationRequestTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/AuthenticationRequestTests.cs @@ -36,7 +36,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { /// <summary> /// Verifies IsDirectedIdentity returns true when appropriate. /// </summary> - [TestCase] + [Test] public void IsDirectedIdentity() { var iauthRequest = this.CreateAuthenticationRequest(this.claimedId, this.claimedId); Assert.IsFalse(iauthRequest.IsDirectedIdentity); @@ -48,7 +48,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { /// <summary> /// Verifies ClaimedIdentifier behavior. /// </summary> - [TestCase] + [Test] public void ClaimedIdentifier() { var iauthRequest = this.CreateAuthenticationRequest(this.claimedId, this.delegatedLocalId); Assert.AreEqual(this.claimedId, iauthRequest.ClaimedIdentifier); @@ -60,7 +60,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { /// <summary> /// Verifies ProviderVersion behavior. /// </summary> - [TestCase] + [Test] public void ProviderVersion() { var authRequest = this.CreateAuthenticationRequest(this.claimedId, this.claimedId); Assert.AreEqual(this.protocol.Version, authRequest.DiscoveryResult.Version); @@ -69,7 +69,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { /// <summary> /// Verifies RedirectingResponse. /// </summary> - [TestCase] + [Test] public void CreateRequestMessage() { OpenIdCoordinator coordinator = new OpenIdCoordinator( rp => { @@ -107,7 +107,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { /// <summary> /// Verifies that delegating authentication requests are filtered out when configured to do so. /// </summary> - [TestCase] + [Test] public void CreateFiltersDelegatingIdentifiers() { Identifier id = GetMockIdentifier(ProtocolVersion.V20, false, true); var rp = CreateRelyingParty(); @@ -123,7 +123,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { /// <summary> /// Verifies the Provider property returns non-null. /// </summary> - [TestCase] + [Test] public void Provider() { var authRequest = this.CreateAuthenticationRequest(this.claimedId, this.claimedId); Assert.IsNotNull(authRequest.Provider); @@ -134,7 +134,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { /// <summary> /// Verifies that AddCallbackArguments adds query arguments to the return_to URL of the message. /// </summary> - [TestCase] + [Test] public void AddCallbackArgument() { var authRequest = this.CreateAuthenticationRequest(this.claimedId, this.claimedId); Assert.AreEqual(this.returnTo, authRequest.ReturnToUrl); @@ -148,7 +148,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { /// Verifies that AddCallbackArguments replaces pre-existing parameter values /// rather than appending them. /// </summary> - [TestCase] + [Test] public void AddCallbackArgumentClearsPreviousArgument() { UriBuilder returnToWithArgs = new UriBuilder(this.returnTo); returnToWithArgs.AppendQueryArgs(new Dictionary<string, string> { { "p1", "v1" } }); @@ -163,7 +163,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { /// <summary> /// Verifies identity-less checkid_* request behavior. /// </summary> - [TestCase] + [Test] public void NonIdentityRequest() { var authRequest = this.CreateAuthenticationRequest(this.claimedId, this.claimedId); authRequest.IsExtensionOnly = true; @@ -176,7 +176,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { /// Verifies that discovery on identifiers that serve as OP identifiers and claimed identifiers /// only generate OP Identifier auth requests. /// </summary> - [TestCase] + [Test] public void DualIdentifierUsedOnlyAsOPIdentifierForAuthRequest() { var rp = this.CreateRelyingParty(true); var results = AuthenticationRequest.Create(GetMockDualIdentifier(), rp, this.realm, this.returnTo, false).ToList(); diff --git a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/FailedAuthenticationResponseTests.cs b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/FailedAuthenticationResponseTests.cs index d67a124..1b01b7e 100644 --- a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/FailedAuthenticationResponseTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/FailedAuthenticationResponseTests.cs @@ -32,7 +32,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { new FailedAuthenticationResponse(null); } - [TestCase] + [Test] public void CommonProperties() { Assert.AreEqual(AuthenticationStatus.Failed, this.response.Status); Assert.AreSame(this.exception, this.response.Exception); @@ -40,7 +40,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { Assert.IsNull(this.response.FriendlyIdentifierForDisplay); } - [TestCase] + [Test] public void CommonMethods() { Assert.IsNull(this.response.GetExtension<ClaimsRequest>()); Assert.IsNull(this.response.GetExtension(typeof(ClaimsRequest))); diff --git a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/IdentifierDiscoveryResultTests.cs b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/IdentifierDiscoveryResultTests.cs index 8d2309a..929a0fb 100644 --- a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/IdentifierDiscoveryResultTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/IdentifierDiscoveryResultTests.cs @@ -35,7 +35,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { base.SetUp(); } - [TestCase] + [Test] public void Ctor() { IdentifierDiscoveryResult se = IdentifierDiscoveryResult.CreateForClaimedIdentifier(this.claimedId, this.localId, new ProviderEndpointDescription(this.providerEndpoint, this.v20TypeUris), this.servicePriority, this.uriPriority); Assert.AreEqual(this.claimedId, se.ClaimedIdentifier); @@ -45,7 +45,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { Assert.AreEqual(this.servicePriority, se.ServicePriority); } - [TestCase] + [Test] public void CtorImpliedLocalIdentifier() { IdentifierDiscoveryResult se = IdentifierDiscoveryResult.CreateForClaimedIdentifier(this.claimedId, null, new ProviderEndpointDescription(this.providerEndpoint, this.v20TypeUris), this.servicePriority, this.uriPriority); Assert.AreEqual(this.claimedId, se.ClaimedIdentifier); @@ -54,7 +54,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { CollectionAssert<string>.AreEquivalent(this.v20TypeUris, se.Capabilities); } - [TestCase] + [Test] public void ProtocolDetection() { IdentifierDiscoveryResult se = IdentifierDiscoveryResult.CreateForClaimedIdentifier(this.claimedId, this.localId, new ProviderEndpointDescription(this.providerEndpoint, this.v20TypeUris), this.servicePriority, this.uriPriority); Assert.AreSame(Protocol.V20, se.Protocol); @@ -69,7 +69,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { Assert.AreSame(Protocol.V11, se.Protocol); } - [TestCase] + [Test] public void EqualsTests() { IdentifierDiscoveryResult se = IdentifierDiscoveryResult.CreateForClaimedIdentifier(this.claimedId, this.localId, new ProviderEndpointDescription(this.providerEndpoint, this.v20TypeUris), this.servicePriority, this.uriPriority); IdentifierDiscoveryResult se2 = IdentifierDiscoveryResult.CreateForClaimedIdentifier(this.claimedId, this.localId, new ProviderEndpointDescription(this.providerEndpoint, this.v20TypeUris), (int?)null, (int?)null); @@ -92,7 +92,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { Assert.IsTrue(list.Contains(se2)); } - [TestCase] + [Test] public void GetFriendlyIdentifierForDisplay() { Uri providerEndpoint = new Uri("http://someprovider"); Identifier localId = "someuser"; @@ -136,7 +136,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { Assert.AreEqual("=!9B72.7DD1.50A9.5CCD", se.FriendlyIdentifierForDisplay); } - [TestCase] + [Test] public void IsTypeUriPresent() { IdentifierDiscoveryResult se = IdentifierDiscoveryResult.CreateForClaimedIdentifier(this.claimedXri, this.userSuppliedXri, this.localId, new ProviderEndpointDescription(this.providerEndpoint, this.v20TypeUris), this.servicePriority, this.uriPriority); Assert.IsTrue(se.IsTypeUriPresent(Protocol.Default.ClaimedIdentifierServiceTypeURI)); @@ -179,7 +179,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { se.IsExtensionSupported((IOpenIdMessageExtension)null); } - [TestCase] + [Test] public void IsExtensionSupported() { var se = IdentifierDiscoveryResult.CreateForProviderIdentifier(OPUri, new ProviderEndpointDescription(OPUri, this.v20TypeUris), null, null); Assert.IsFalse(se.IsExtensionSupported<ClaimsRequest>()); diff --git a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/NegativeAuthenticationResponseTests.cs b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/NegativeAuthenticationResponseTests.cs index e4e7c8e..60a7318 100644 --- a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/NegativeAuthenticationResponseTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/NegativeAuthenticationResponseTests.cs @@ -40,7 +40,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { /// <summary> /// Verifies that immediate/setup modes are correctly detected. /// </summary> - [TestCase] + [Test] public void ImmediateVsSetupModes() { this.responseMessage = new NegativeAssertionResponse(this.protocol.Version, RPUri, this.protocol.Args.Mode.cancel); this.response = new NegativeAuthenticationResponse(this.responseMessage); @@ -58,14 +58,14 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { Assert.AreEqual(UserSuppliedIdentifier, (string)this.response.UserSuppliedIdentifier); } - [TestCase] + [Test] public void CommonProperties() { Assert.IsNull(this.response.Exception); Assert.IsNull(this.response.ClaimedIdentifier); Assert.IsNull(this.response.FriendlyIdentifierForDisplay); } - [TestCase] + [Test] public void CommonMethods() { Assert.IsNull(this.response.GetExtension<ClaimsRequest>()); Assert.IsNull(this.response.GetExtension(typeof(ClaimsRequest))); diff --git a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/OpenIdRelyingPartyTests.cs b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/OpenIdRelyingPartyTests.cs index 1b03596..86dd68c 100644 --- a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/OpenIdRelyingPartyTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/OpenIdRelyingPartyTests.cs @@ -21,7 +21,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { base.SetUp(); } - [TestCase] + [Test] public void CreateRequestDumbMode() { var rp = this.CreateRelyingParty(true); Identifier id = this.GetMockIdentifier(ProtocolVersion.V20); @@ -36,7 +36,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { rp.SecuritySettings = null; } - [TestCase] + [Test] public void ExtensionFactories() { var rp = new OpenIdRelyingParty(null); var factories = rp.ExtensionFactories; @@ -45,7 +45,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { Assert.IsInstanceOf<StandardOpenIdExtensionFactory>(factories[0]); } - [TestCase] + [Test] public void CreateRequest() { var rp = this.CreateRelyingParty(); StoreAssociation(rp, OPUri, HmacShaAssociation.Create("somehandle", new byte[20], TimeSpan.FromDays(1))); @@ -54,7 +54,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { Assert.IsNotNull(req); } - [TestCase] + [Test] public void CreateRequests() { var rp = this.CreateRelyingParty(); StoreAssociation(rp, OPUri, HmacShaAssociation.Create("somehandle", new byte[20], TimeSpan.FromDays(1))); @@ -63,7 +63,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { Assert.AreEqual(1, requests.Count()); } - [TestCase] + [Test] public void CreateRequestsWithEndpointFilter() { var rp = this.CreateRelyingParty(); StoreAssociation(rp, OPUri, HmacShaAssociation.Create("somehandle", new byte[20], TimeSpan.FromDays(1))); @@ -86,7 +86,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { rp.CreateRequest(nonOpenId, RPRealmUri, RPUri); } - [TestCase] + [Test] public void CreateRequestsOnNonOpenID() { Uri nonOpenId = new Uri("http://www.microsoft.com/"); var rp = this.CreateRelyingParty(); @@ -99,7 +99,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { /// Verifies that incoming positive assertions throw errors if they come from /// OPs that are not approved by <see cref="OpenIdRelyingParty.EndpointFilter"/>. /// </summary> - [TestCase] + [Test] public void AssertionWithEndpointFilter() { var coordinator = new OpenIdCoordinator( rp => { diff --git a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/OpenIdTextBoxTests.cs b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/OpenIdTextBoxTests.cs index 2a4f4c0..3c91b52 100644 --- a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/OpenIdTextBoxTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/OpenIdTextBoxTests.cs @@ -13,7 +13,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { /// <summary> /// Verifies that the Text and Identifier properties interact correctly. /// </summary> - [TestCase] + [Test] public void IdentifierTextInteraction() { var box = new OpenIdTextBox(); Assert.AreEqual(string.Empty, box.Text); diff --git a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/PositiveAnonymousResponseTests.cs b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/PositiveAnonymousResponseTests.cs index 5544bf9..bacd97d 100644 --- a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/PositiveAnonymousResponseTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/PositiveAnonymousResponseTests.cs @@ -25,7 +25,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { /// <summary> /// Verifies that the Status property returns the correct value. /// </summary> - [TestCase] + [Test] public void CtorAndProperties() { var responseMessage = new IndirectSignedResponse(Protocol.V20.Version, this.returnTo); var ext = new ClaimsResponse(); @@ -43,7 +43,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { /// <summary> /// Verifies the Provider property. /// </summary> - [TestCase] + [Test] public void ProviderTest() { var responseMessage = new IndirectSignedResponse(Protocol.V20.Version, this.returnTo); responseMessage.ProviderEndpoint = OPUri; diff --git a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/PositiveAuthenticationResponseTests.cs b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/PositiveAuthenticationResponseTests.cs index fff5f75..f71f4be 100644 --- a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/PositiveAuthenticationResponseTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/PositiveAuthenticationResponseTests.cs @@ -28,7 +28,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { /// <summary> /// Verifies good, positive assertions are accepted. /// </summary> - [TestCase] + [Test] public void Valid() { PositiveAssertionResponse assertion = this.GetPositiveAssertion(); ClaimsResponse extension = new ClaimsResponse(); @@ -48,7 +48,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { /// <summary> /// Verifies that discovery verification of a positive assertion can match a dual identifier. /// </summary> - [TestCase] + [Test] public void DualIdentifierMatchesInAssertionVerification() { PositiveAssertionResponse assertion = this.GetPositiveAssertion(true); ClaimsResponse extension = new ClaimsResponse(); @@ -97,7 +97,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { var authResponse = new PositiveAuthenticationResponse(assertion, rp); } - [TestCase] + [Test] public void GetCallbackArguments() { PositiveAssertionResponse assertion = this.GetPositiveAssertion(); var rp = CreateRelyingParty(); @@ -123,7 +123,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { /// <summary> /// Verifies that certain problematic claimed identifiers pass through to the RP response correctly. /// </summary> - [TestCase] + [Test] public void ProblematicClaimedId() { var providerEndpoint = new ProviderEndpointDescription(OpenIdTestBase.OPUri, Protocol.Default.Version); string claimed_id = BaseMockUri + "a./b."; diff --git a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/RelyingPartySecuritySettingsTests.cs b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/RelyingPartySecuritySettingsTests.cs index e8e0476..75e0607 100644 --- a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/RelyingPartySecuritySettingsTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/RelyingPartySecuritySettingsTests.cs @@ -23,7 +23,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { this.settings = new RelyingPartySecuritySettings(); } - [TestCase] + [Test] public void Defaults() { Assert.IsFalse(this.settings.RejectUnsolicitedAssertions); Assert.IsFalse(this.settings.RequireSsl, "Default should be to not require SSL."); @@ -33,7 +33,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { /// Verifies that the <see cref="RelyingPartySecuritySettings.RequireSsl"/> property /// getter/setter are implemented correctly. /// </summary> - [TestCase] + [Test] public void RequireSsl() { this.settings.RequireSsl = true; Assert.IsTrue(this.settings.RequireSsl); @@ -45,7 +45,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { /// Verifies that the <see cref="RelyingPartySecuritySettings.RequireDirectedIdentity"/> /// property getter/setter are implemented correctly. /// </summary> - [TestCase] + [Test] public void RequireDirectedIdentity() { this.settings.RequireDirectedIdentity = true; Assert.IsTrue(this.settings.RequireDirectedIdentity); @@ -57,7 +57,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { /// Verifies that the <see cref="RelyingPartySecuritySettings.RequireAssociation"/> /// property getter/setter are implemented correctly. /// </summary> - [TestCase] + [Test] public void RequireAssociation() { this.settings.RequireAssociation = true; Assert.IsTrue(this.settings.RequireAssociation); diff --git a/src/DotNetOpenAuth.Test/OpenId/UriIdentifierTests.cs b/src/DotNetOpenAuth.Test/OpenId/UriIdentifierTests.cs index a3b4b9e..0c63113 100644 --- a/src/DotNetOpenAuth.Test/OpenId/UriIdentifierTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/UriIdentifierTests.cs @@ -46,7 +46,7 @@ namespace DotNetOpenAuth.Test.OpenId { new UriIdentifier(this.badUri); } - [TestCase] + [Test] public void CtorGoodUri() { var uri = new UriIdentifier(this.goodUri); Assert.AreEqual(new Uri(this.goodUri), uri.Uri); @@ -54,14 +54,14 @@ namespace DotNetOpenAuth.Test.OpenId { Assert.IsFalse(uri.IsDiscoverySecureEndToEnd); } - [TestCase] + [Test] public void CtorStringNoSchemeSecure() { var uri = new UriIdentifier("host/path", true); Assert.AreEqual("https://host/path", uri.Uri.AbsoluteUri); Assert.IsTrue(uri.IsDiscoverySecureEndToEnd); } - [TestCase] + [Test] public void CtorStringHttpsSchemeSecure() { var uri = new UriIdentifier("https://host/path", true); Assert.AreEqual("https://host/path", uri.Uri.AbsoluteUri); @@ -73,7 +73,7 @@ namespace DotNetOpenAuth.Test.OpenId { new UriIdentifier("http://host/path", true); } - [TestCase] + [Test] public void CtorUriHttpsSchemeSecure() { var uri = new UriIdentifier(new Uri("https://host/path"), true); Assert.AreEqual("https://host/path", uri.Uri.AbsoluteUri); @@ -93,21 +93,21 @@ namespace DotNetOpenAuth.Test.OpenId { /// they should NOT be stripped from claimed identifiers. So the UriIdentifier /// class, which serves both identifier types, must not do the stripping. /// </remarks> - [TestCase] + [Test] public void DoesNotStripFragment() { Uri original = new Uri("http://a/b#c"); UriIdentifier identifier = new UriIdentifier(original); Assert.AreEqual(original.Fragment, identifier.Uri.Fragment); } - [TestCase] + [Test] public void IsValid() { Assert.IsTrue(UriIdentifier.IsValidUri(this.goodUri)); Assert.IsFalse(UriIdentifier.IsValidUri(this.badUri)); Assert.IsTrue(UriIdentifier.IsValidUri(this.relativeUri), "URL lacking http:// prefix should have worked anyway."); } - [TestCase] + [Test] public void TrimFragment() { Identifier noFragment = UriIdentifier.Parse("http://a/b"); Identifier fragment = UriIdentifier.Parse("http://a/b#c"); @@ -123,7 +123,7 @@ namespace DotNetOpenAuth.Test.OpenId { }); } - [TestCase] + [Test] public void ToStringTest() { Assert.AreEqual(this.goodUri, new UriIdentifier(this.goodUri).ToString()); TestAsFullAndPartialTrust(fullTrust => { @@ -140,7 +140,7 @@ namespace DotNetOpenAuth.Test.OpenId { }); } - [TestCase] + [Test] public void EqualsTest() { TestAsFullAndPartialTrust(fulltrust => { Assert.AreEqual(new UriIdentifier(this.goodUri), new UriIdentifier(this.goodUri)); @@ -163,7 +163,7 @@ namespace DotNetOpenAuth.Test.OpenId { }); } - [TestCase] + [Test] public void UnicodeTest() { string unicodeUrl = "http://nerdbank.org/opaffirmative/崎村.aspx"; Assert.IsTrue(UriIdentifier.IsValidUri(unicodeUrl)); @@ -173,7 +173,7 @@ namespace DotNetOpenAuth.Test.OpenId { Assert.AreEqual(Uri.EscapeUriString(unicodeUrl), id.ToString()); } - [TestCase] + [Test] public void NormalizeCase() { // only the host name can be normalized in casing safely. Identifier id = "http://HOST:80/PaTH?KeY=VaLUE#fRag"; @@ -191,7 +191,7 @@ namespace DotNetOpenAuth.Test.OpenId { /// which may end with a period. The default .NET Uri parser trims off /// trailing periods, which breaks OpenID unless special precautions are taken. /// </remarks> - [TestCase] + [Test] public void TrailingPeriodsNotTrimmed() { TestAsFullAndPartialTrust(fullTrust => { string claimedIdentifier = "https://me.yahoo.com/a/AsDf.#asdf"; @@ -228,7 +228,7 @@ namespace DotNetOpenAuth.Test.OpenId { }); } - [TestCase] + [Test] public void HttpSchemePrepended() { UriIdentifier id = new UriIdentifier("www.yahoo.com"); Assert.AreEqual("http://www.yahoo.com/", id.ToString()); @@ -242,7 +242,7 @@ namespace DotNetOpenAuth.Test.OpenId { Assert.IsTrue(id.SchemeImplicitlyPrepended); } - [TestCase] + [Test] public void TryRequireSslAdjustsIdentifier() { Identifier secureId; // Try Parse and ctor without explicit scheme @@ -275,7 +275,7 @@ namespace DotNetOpenAuth.Test.OpenId { /// <summary> /// Verifies that unicode hostnames are handled. /// </summary> - [TestCase] + [Test] public void UnicodeHostSupport() { var id = new UriIdentifier("http://server崎/村"); Assert.AreEqual("server崎", id.Uri.Host); @@ -284,7 +284,7 @@ namespace DotNetOpenAuth.Test.OpenId { /// <summary> /// Verifies SimpleUri behavior /// </summary> - [TestCase] + [Test] public void SimpleUri() { Assert.AreEqual("http://abc/D./e.?Qq#Ff", new UriIdentifier.SimpleUri("HTTP://ABC/D./e.?Qq#Ff").ToString()); Assert.AreEqual("http://abc/D./e.?Qq", new UriIdentifier.SimpleUri("HTTP://ABC/D./e.?Qq").ToString()); diff --git a/src/DotNetOpenAuth.Test/OpenId/XriIdentifierTests.cs b/src/DotNetOpenAuth.Test/OpenId/XriIdentifierTests.cs index 0614f60..e6871f8 100644 --- a/src/DotNetOpenAuth.Test/OpenId/XriIdentifierTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/XriIdentifierTests.cs @@ -37,7 +37,7 @@ namespace DotNetOpenAuth.Test.OpenId { new XriIdentifier(this.badXri); } - [TestCase] + [Test] public void CtorGoodXri() { var xri = new XriIdentifier(this.goodXri); Assert.AreEqual(this.goodXri, xri.OriginalXri); @@ -45,7 +45,7 @@ namespace DotNetOpenAuth.Test.OpenId { Assert.IsFalse(xri.IsDiscoverySecureEndToEnd); } - [TestCase] + [Test] public void CtorGoodXriSecure() { var xri = new XriIdentifier(this.goodXri, true); Assert.AreEqual(this.goodXri, xri.OriginalXri); @@ -53,7 +53,7 @@ namespace DotNetOpenAuth.Test.OpenId { Assert.IsTrue(xri.IsDiscoverySecureEndToEnd); } - [TestCase] + [Test] public void IsValid() { Assert.IsTrue(XriIdentifier.IsValidXri(this.goodXri)); Assert.IsFalse(XriIdentifier.IsValidXri(this.badXri)); @@ -62,25 +62,25 @@ namespace DotNetOpenAuth.Test.OpenId { /// <summary> /// Verifies 2.0 spec section 7.2#1 /// </summary> - [TestCase] + [Test] public void StripXriScheme() { var xri = new XriIdentifier("xri://" + this.goodXri); Assert.AreEqual("xri://" + this.goodXri, xri.OriginalXri); Assert.AreEqual(this.goodXri, xri.CanonicalXri); } - [TestCase] + [Test] public void TrimFragment() { Identifier xri = new XriIdentifier(this.goodXri); Assert.AreSame(xri, xri.TrimFragment()); } - [TestCase] + [Test] public void ToStringTest() { Assert.AreEqual(this.goodXri, new XriIdentifier(this.goodXri).ToString()); } - [TestCase] + [Test] public void EqualsTest() { Assert.AreEqual(new XriIdentifier(this.goodXri), new XriIdentifier(this.goodXri)); Assert.AreNotEqual(new XriIdentifier(this.goodXri), new XriIdentifier(this.goodXri + "a")); diff --git a/src/DotNetOpenAuth.Test/UriUtilTests.cs b/src/DotNetOpenAuth.Test/UriUtilTests.cs index 4aa7cd1..1e5451e 100644 --- a/src/DotNetOpenAuth.Test/UriUtilTests.cs +++ b/src/DotNetOpenAuth.Test/UriUtilTests.cs @@ -13,7 +13,7 @@ namespace DotNetOpenAuth.Test { [TestFixture] public class UriUtilTests { - [TestCase] + [Test] public void QueryStringContainPrefixedParametersNull() { Assert.IsFalse(UriUtil.QueryStringContainPrefixedParameters(null, "prefix.")); } diff --git a/src/DotNetOpenAuth.Test/UtilTests.cs b/src/DotNetOpenAuth.Test/UtilTests.cs index 5f36b83..96fc254 100644 --- a/src/DotNetOpenAuth.Test/UtilTests.cs +++ b/src/DotNetOpenAuth.Test/UtilTests.cs @@ -16,7 +16,7 @@ namespace DotNetOpenAuth.Test { /// <summary> /// Verifies ToStringDeferred generates a reasonable string for an empty, multi-line list. /// </summary> - [TestCase] + [Test] public void ToStringDeferredEmptyMultiLine() { Assert.AreEqual("[]", Util.ToStringDeferred(Enumerable.Empty<string>(), true).ToString()); } |