summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange')
-rw-r--r--src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/AttributeExchangeRoundtripTests.cs8
-rw-r--r--src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/AttributeRequestTests.cs22
-rw-r--r--src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/AttributeValuesTests.cs8
-rw-r--r--src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/FetchRequestTests.cs24
-rw-r--r--src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/FetchResponseTests.cs18
-rw-r--r--src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/StoreRequestTests.cs14
-rw-r--r--src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/StoreResponseTests.cs10
7 files changed, 52 insertions, 52 deletions
diff --git a/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/AttributeExchangeRoundtripTests.cs b/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/AttributeExchangeRoundtripTests.cs
index fa05e94..3433cfa 100644
--- a/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/AttributeExchangeRoundtripTests.cs
+++ b/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/AttributeExchangeRoundtripTests.cs
@@ -7,16 +7,16 @@
namespace DotNetOpenAuth.Test.OpenId.Extensions {
using DotNetOpenAuth.OpenId;
using DotNetOpenAuth.OpenId.Extensions.AttributeExchange;
- using Microsoft.VisualStudio.TestTools.UnitTesting;
+ using NUnit.Framework;
- [TestClass]
+ [TestFixture]
public class AttributeExchangeRoundtripTests : OpenIdTestBase {
private const string NicknameTypeUri = WellKnownAttributes.Name.Alias;
private const string EmailTypeUri = WellKnownAttributes.Contact.Email;
private const string IncrementingAttribute = "http://incatt";
private int incrementingAttributeValue = 1;
- [TestMethod]
+ [TestCase]
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 });
}
- [TestMethod]
+ [TestCase]
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 48b5727..5cc8ec1 100644
--- a/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/AttributeRequestTests.cs
+++ b/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/AttributeRequestTests.cs
@@ -8,11 +8,11 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions {
using System;
using DotNetOpenAuth.OpenId.Extensions.AttributeExchange;
using DotNetOpenAuth.Test.OpenId;
- using Microsoft.VisualStudio.TestTools.UnitTesting;
+ using NUnit.Framework;
- [TestClass]
+ [TestFixture]
public class AttributeRequestTests : OpenIdTestBase {
- [TestMethod]
+ [TestCase]
public void CtorDefault() {
AttributeRequest req = new AttributeRequest();
Assert.AreEqual(1, req.Count);
@@ -20,27 +20,27 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions {
Assert.IsFalse(req.IsRequired);
}
- [TestMethod, ExpectedException(typeof(ArgumentException))]
+ [TestCase, ExpectedException(typeof(ArgumentException))]
public void CtorEmptyTypeUri() {
new AttributeRequest(string.Empty);
}
- [TestMethod, ExpectedException(typeof(ArgumentException))]
+ [TestCase, ExpectedException(typeof(ArgumentException))]
public void CtorNullTypeUri() {
new AttributeRequest(null);
}
- [TestMethod, ExpectedException(typeof(ArgumentOutOfRangeException))]
+ [TestCase, ExpectedException(typeof(ArgumentOutOfRangeException))]
public void CtorCountZero() {
new AttributeRequest(WellKnownAttributes.Contact.Email, false, 0);
}
- [TestMethod, ExpectedException(typeof(ArgumentOutOfRangeException))]
+ [TestCase, ExpectedException(typeof(ArgumentOutOfRangeException))]
public void CtorCountNegative() {
new AttributeRequest(WellKnownAttributes.Contact.Email, false, -1);
}
- [TestMethod]
+ [TestCase]
public void CtorFull() {
var req = new AttributeRequest(WellKnownAttributes.Contact.Email, true, 5);
Assert.AreEqual(WellKnownAttributes.Contact.Email, req.TypeUri);
@@ -48,19 +48,19 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions {
Assert.AreEqual(5, req.Count);
}
- [TestMethod, ExpectedException(typeof(ArgumentOutOfRangeException))]
+ [TestCase, ExpectedException(typeof(ArgumentOutOfRangeException))]
public void SetCountZero() {
var req = new AttributeRequest();
req.Count = 0;
}
- [TestMethod, ExpectedException(typeof(ArgumentOutOfRangeException))]
+ [TestCase, ExpectedException(typeof(ArgumentOutOfRangeException))]
public void SetCountNegative() {
var req = new AttributeRequest();
req.Count = -1;
}
- [TestMethod]
+ [TestCase]
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 1f7e17c..6c28461 100644
--- a/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/AttributeValuesTests.cs
+++ b/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/AttributeValuesTests.cs
@@ -10,11 +10,11 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.AttributeExchange {
using System.Linq;
using System.Text;
using DotNetOpenAuth.OpenId.Extensions.AttributeExchange;
- using Microsoft.VisualStudio.TestTools.UnitTesting;
+ using NUnit.Framework;
- [TestClass]
+ [TestFixture]
public class AttributeValuesTests : OpenIdTestBase {
- [TestMethod]
+ [TestCase]
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>
- [TestMethod]
+ [TestCase]
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 43eba3f..2388798 100644
--- a/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/FetchRequestTests.cs
+++ b/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/FetchRequestTests.cs
@@ -9,35 +9,35 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions {
using System.IO;
using DotNetOpenAuth.OpenId.Extensions.AttributeExchange;
using DotNetOpenAuth.Test.OpenId;
- using Microsoft.VisualStudio.TestTools.UnitTesting;
+ using NUnit.Framework;
- [TestClass]
+ [TestFixture]
public class FetchRequestTests : OpenIdTestBase {
- [TestMethod, ExpectedException(typeof(ArgumentNullException))]
+ [TestCase, ExpectedException(typeof(ArgumentNullException))]
public void AddAttributeRequestNull() {
new FetchRequest().Attributes.Add(null);
}
- [TestMethod]
+ [TestCase]
public void AddAttributeRequest() {
var req = new FetchRequest();
req.Attributes.Add(new AttributeRequest() { TypeUri = "http://someUri" });
}
- [TestMethod]
+ [TestCase]
public void AddAttributeRequestStrangeUri() {
var req = new FetchRequest();
req.Attributes.Add(new AttributeRequest() { TypeUri = "=someUri*who*knows*but*this*is*legal" });
}
- [TestMethod, ExpectedException(typeof(ArgumentException))]
+ [TestCase, ExpectedException(typeof(ArgumentException))]
public void AddAttributeRequestAgain() {
var req = new FetchRequest();
req.Attributes.Add(new AttributeRequest() { TypeUri = "http://UriTwice" });
req.Attributes.Add(new AttributeRequest() { TypeUri = "http://UriTwice" });
}
- [TestMethod]
+ [TestCase]
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]);
}
- [TestMethod]
+ [TestCase]
public void RespondTwoValues() {
var req = new AttributeRequest();
req.TypeUri = "http://someType";
@@ -59,7 +59,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions {
Assert.AreEqual("value2", resp.Values[1]);
}
- [TestMethod, ExpectedException(typeof(ArgumentException))]
+ [TestCase, ExpectedException(typeof(ArgumentException))]
public void RespondTooManyValues() {
var req = new AttributeRequest();
req.TypeUri = "http://someType";
@@ -67,7 +67,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions {
req.Respond("value1", "value2");
}
- [TestMethod, ExpectedException(typeof(ArgumentNullException))]
+ [TestCase, ExpectedException(typeof(ArgumentNullException))]
public void RespondNull() {
var req = new AttributeRequest();
req.TypeUri = "http://someType";
@@ -75,7 +75,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions {
req.Respond(null);
}
- [TestMethod]
+ [TestCase]
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>
- [TestMethod]
+ [TestCase]
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 d7082c3..c545a46 100644
--- a/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/FetchResponseTests.cs
+++ b/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/FetchResponseTests.cs
@@ -9,37 +9,37 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions {
using System.IO;
using DotNetOpenAuth.OpenId.Extensions.AttributeExchange;
using DotNetOpenAuth.Test.OpenId;
- using Microsoft.VisualStudio.TestTools.UnitTesting;
+ using NUnit.Framework;
- [TestClass]
+ [TestFixture]
public class FetchResponseTests : OpenIdTestBase {
- [TestMethod]
+ [TestCase]
public void AddAttribute() {
var response = new FetchResponse();
response.Attributes.Add(new AttributeValues("http://someattribute", "Value1"));
}
- [TestMethod]
+ [TestCase]
public void AddTwoAttributes() {
var response = new FetchResponse();
response.Attributes.Add(new AttributeValues("http://someattribute", "Value1"));
response.Attributes.Add(new AttributeValues("http://someOtherAttribute", "Value2"));
}
- [TestMethod, ExpectedException(typeof(ArgumentException))]
+ [TestCase, ExpectedException(typeof(ArgumentException))]
public void AddAttributeTwice() {
var response = new FetchResponse();
response.Attributes.Add(new AttributeValues("http://someattribute", "Value1"));
response.Attributes.Add(new AttributeValues("http://someattribute", "Value1"));
}
- [TestMethod, ExpectedException(typeof(ArgumentNullException))]
+ [TestCase, ExpectedException(typeof(ArgumentNullException))]
public void AddAttributeNull() {
var response = new FetchResponse();
response.Attributes.Add(null);
}
- [TestMethod]
+ [TestCase]
public void GetAttributeValue() {
var response = new FetchResponse();
@@ -55,7 +55,7 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions {
Assert.AreEqual("a", response.GetAttributeValue("http://someattribute3"));
}
- [TestMethod]
+ [TestCase]
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>
- [TestMethod]
+ [TestCase]
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 b11c469..fc486aa 100644
--- a/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/StoreRequestTests.cs
+++ b/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/StoreRequestTests.cs
@@ -12,14 +12,14 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions.AttributeExchange {
using System.Text;
using DotNetOpenAuth.Messaging;
using DotNetOpenAuth.OpenId.Extensions.AttributeExchange;
- using Microsoft.VisualStudio.TestTools.UnitTesting;
+ using NUnit.Framework;
- [TestClass]
+ [TestFixture]
public class StoreRequestTests {
/// <summary>
/// Verifies the constructor behavior.
/// </summary>
- [TestMethod]
+ [TestCase]
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>
- [TestMethod]
+ [TestCase]
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>
- [TestMethod]
+ [TestCase]
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>
- [TestMethod]
+ [TestCase]
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>
- [TestMethod]
+ [TestCase]
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 4e432e1..564ef7f 100644
--- a/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/StoreResponseTests.cs
+++ b/src/DotNetOpenAuth.Test/OpenId/Extensions/AttributeExchange/StoreResponseTests.cs
@@ -7,14 +7,14 @@
namespace DotNetOpenAuth.Test.OpenId.Extensions.AttributeExchange {
using System.IO;
using DotNetOpenAuth.OpenId.Extensions.AttributeExchange;
- using Microsoft.VisualStudio.TestTools.UnitTesting;
+ using NUnit.Framework;
- [TestClass]
+ [TestFixture]
public class StoreResponseTests {
/// <summary>
/// Verifies the constructor's behavior.
/// </summary>
- [TestMethod]
+ [TestCase]
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>
- [TestMethod]
+ [TestCase]
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>
- [TestMethod]
+ [TestCase]
public void Serializable() {
var store = new StoreResponse();
store.Succeeded = false;