diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2010-01-06 19:30:01 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2010-01-06 19:30:01 -0800 |
commit | b4f047fc7af40f40149a84b58d8f3ad1632a48d5 (patch) | |
tree | 78ff419559a0496dbce02dc0140bd230218b79f8 /src/DotNetOpenAuth.Test/OpenId/ChannelElements/KeyValueFormEncodingTests.cs | |
parent | 408d636335d73d5520bc1f9fbfdab224d492b7cf (diff) | |
download | DotNetOpenAuth-b4f047fc7af40f40149a84b58d8f3ad1632a48d5.zip DotNetOpenAuth-b4f047fc7af40f40149a84b58d8f3ad1632a48d5.tar.gz DotNetOpenAuth-b4f047fc7af40f40149a84b58d8f3ad1632a48d5.tar.bz2 |
Converted all the rest of the tests over to NUnit.
Diffstat (limited to 'src/DotNetOpenAuth.Test/OpenId/ChannelElements/KeyValueFormEncodingTests.cs')
-rw-r--r-- | src/DotNetOpenAuth.Test/OpenId/ChannelElements/KeyValueFormEncodingTests.cs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/DotNetOpenAuth.Test/OpenId/ChannelElements/KeyValueFormEncodingTests.cs b/src/DotNetOpenAuth.Test/OpenId/ChannelElements/KeyValueFormEncodingTests.cs index 92170c4..75ac503 100644 --- a/src/DotNetOpenAuth.Test/OpenId/ChannelElements/KeyValueFormEncodingTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/ChannelElements/KeyValueFormEncodingTests.cs @@ -14,9 +14,9 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements { using DotNetOpenAuth.Messaging; using DotNetOpenAuth.Messaging.Reflection; using DotNetOpenAuth.OpenId.ChannelElements; - using Microsoft.VisualStudio.TestTools.UnitTesting; + using NUnit.Framework; - [TestClass] + [TestFixture] public class KeyValueFormEncodingTests : TestBase { private Dictionary<string, string> sampleData = new Dictionary<string, string> { { "key1", "value1" }, @@ -33,7 +33,7 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements { Both = 0x3, } - [TestMethod] + [TestCase] public void BasicEncodingTest() { byte[] kvfBytes = KeyValueFormEncoding.GetBytes(this.sampleData); string responseString = Encoding.UTF8.GetString(kvfBytes); @@ -69,7 +69,7 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements { } } - [TestMethod] + [TestCase] public void EncodeDecode() { this.KVDictTest(UTF8Encoding.UTF8.GetBytes(string.Empty), new Dictionary<string, string>(), TestMode.Both); @@ -117,35 +117,35 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements { this.KVDictTest(UTF8Encoding.UTF8.GetBytes("east:west\nnorth:south"), d10, TestMode.Decoder); } - [TestMethod, ExpectedException(typeof(FormatException))] + [TestCase, ExpectedException(typeof(FormatException))] public void NoValue() { this.Illegal("x\n", KeyValueFormConformanceLevel.OpenId11); } - [TestMethod, ExpectedException(typeof(FormatException))] + [TestCase, ExpectedException(typeof(FormatException))] public void NoValueLoose() { Dictionary<string, string> d = new Dictionary<string, string>(); this.KVDictTest(Encoding.UTF8.GetBytes("x\n"), d, TestMode.Decoder); } - [TestMethod, ExpectedException(typeof(FormatException))] + [TestCase, ExpectedException(typeof(FormatException))] public void EmptyLine() { this.Illegal("x:b\n\n", KeyValueFormConformanceLevel.OpenId20); } - [TestMethod] + [TestCase] public void EmptyLineLoose() { Dictionary<string, string> d = new Dictionary<string, string>(); d.Add("x", "b"); this.KVDictTest(Encoding.UTF8.GetBytes("x:b\n\n"), d, TestMode.Decoder); } - [TestMethod, ExpectedException(typeof(FormatException))] + [TestCase, ExpectedException(typeof(FormatException))] public void LastLineNotTerminated() { this.Illegal("x:y\na:b", KeyValueFormConformanceLevel.OpenId11); } - [TestMethod] + [TestCase] public void LastLineNotTerminatedLoose() { Dictionary<string, string> d = new Dictionary<string, string>(); d.Add("x", "y"); |