summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Test/OpenId/XriIdentifierTests.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2010-01-31 21:34:41 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2010-01-31 21:34:41 -0800
commit17e1e88e7f75c86a6d4494dd2cb59eb9a7e75280 (patch)
tree27c1e400cdb7712a05b1577d0583cf6d5de49375 /src/DotNetOpenAuth.Test/OpenId/XriIdentifierTests.cs
parent7b741da22d416744bf8f6f75c7a55552d1c1feca (diff)
parent4341ce681fbe4ff9b4a6b80127f495347f647dc7 (diff)
downloadDotNetOpenAuth-17e1e88e7f75c86a6d4494dd2cb59eb9a7e75280.zip
DotNetOpenAuth-17e1e88e7f75c86a6d4494dd2cb59eb9a7e75280.tar.gz
DotNetOpenAuth-17e1e88e7f75c86a6d4494dd2cb59eb9a7e75280.tar.bz2
Upgraded solution to Visual Studio 2010.
Merge branch 'master-Dev10'
Diffstat (limited to 'src/DotNetOpenAuth.Test/OpenId/XriIdentifierTests.cs')
-rw-r--r--src/DotNetOpenAuth.Test/OpenId/XriIdentifierTests.cs30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/DotNetOpenAuth.Test/OpenId/XriIdentifierTests.cs b/src/DotNetOpenAuth.Test/OpenId/XriIdentifierTests.cs
index d5a51cf..0c80821 100644
--- a/src/DotNetOpenAuth.Test/OpenId/XriIdentifierTests.cs
+++ b/src/DotNetOpenAuth.Test/OpenId/XriIdentifierTests.cs
@@ -10,34 +10,34 @@ namespace DotNetOpenAuth.Test.OpenId {
using System.Linq;
using DotNetOpenAuth.OpenId;
using DotNetOpenAuth.OpenId.RelyingParty;
- using Microsoft.VisualStudio.TestTools.UnitTesting;
+ using NUnit.Framework;
- [TestClass]
+ [TestFixture]
public class XriIdentifierTests : OpenIdTestBase {
private string goodXri = "=Andrew*Arnott";
private string badXri = "some\\wacky%^&*()non-XRI";
- [TestInitialize]
+ [SetUp]
public override void SetUp() {
base.SetUp();
}
- [TestMethod, ExpectedException(typeof(ArgumentException))]
+ [TestCase, ExpectedException(typeof(ArgumentException))]
public void CtorNull() {
new XriIdentifier(null);
}
- [TestMethod, ExpectedException(typeof(ArgumentException))]
+ [TestCase, ExpectedException(typeof(ArgumentException))]
public void CtorBlank() {
new XriIdentifier(string.Empty);
}
- [TestMethod, ExpectedException(typeof(FormatException))]
+ [TestCase, ExpectedException(typeof(FormatException))]
public void CtorBadXri() {
new XriIdentifier(this.badXri);
}
- [TestMethod]
+ [TestCase]
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);
}
- [TestMethod]
+ [TestCase]
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);
}
- [TestMethod]
+ [TestCase]
public void IsValid() {
Assert.IsTrue(XriIdentifier.IsValidXri(this.goodXri));
Assert.IsFalse(XriIdentifier.IsValidXri(this.badXri));
@@ -62,33 +62,33 @@ namespace DotNetOpenAuth.Test.OpenId {
/// <summary>
/// Verifies 2.0 spec section 7.2#1
/// </summary>
- [TestMethod]
+ [TestCase]
public void StripXriScheme() {
var xri = new XriIdentifier("xri://" + this.goodXri);
Assert.AreEqual("xri://" + this.goodXri, xri.OriginalXri);
Assert.AreEqual(this.goodXri, xri.CanonicalXri);
}
- [TestMethod]
+ [TestCase]
public void TrimFragment() {
Identifier xri = new XriIdentifier(this.goodXri);
Assert.AreSame(xri, xri.TrimFragment());
}
- [TestMethod]
+ [TestCase]
public void ToStringTest() {
Assert.AreEqual(this.goodXri, new XriIdentifier(this.goodXri).ToString());
}
- [TestMethod]
+ [TestCase]
public void EqualsTest() {
Assert.AreEqual(new XriIdentifier(this.goodXri), new XriIdentifier(this.goodXri));
Assert.AreNotEqual(new XriIdentifier(this.goodXri), new XriIdentifier(this.goodXri + "a"));
Assert.AreNotEqual(null, new XriIdentifier(this.goodXri));
- Assert.AreEqual(this.goodXri, new XriIdentifier(this.goodXri));
+ Assert.IsTrue(new XriIdentifier(this.goodXri).Equals(this.goodXri));
}
- [TestMethod, Ignore] // XRI parsing and normalization is not implemented (yet).
+ [TestCase, Ignore("XRI parsing and normalization is not implemented (yet).")]
public void NormalizeCase() {
Identifier id = "=!9B72.7dd1.50a9.5ccd";
Assert.AreEqual("=!9B72.7DD1.50A9.5CCD", id.ToString());