summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMicrosoft <aspnet@microsoft.com>2012-10-02 16:19:21 -0700
committerMicrosoft <aspnet@microsoft.com>2012-10-02 16:19:21 -0700
commit43fdb336c0a78c8444fa277e7dd702a187120796 (patch)
tree3743f48a0918c0bf782279cbdd777e684c4a8ac3 /src
parent0f8d3a8bca07c6bdf96be29c884061cd3c79a758 (diff)
downloadDotNetOpenAuth-43fdb336c0a78c8444fa277e7dd702a187120796.zip
DotNetOpenAuth-43fdb336c0a78c8444fa277e7dd702a187120796.tar.gz
DotNetOpenAuth-43fdb336c0a78c8444fa277e7dd702a187120796.tar.bz2
Fix some unit tests failing.
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth.AspNet.Test/OAuth2ClientTest.cs17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/DotNetOpenAuth.AspNet.Test/OAuth2ClientTest.cs b/src/DotNetOpenAuth.AspNet.Test/OAuth2ClientTest.cs
index 89a483c..f8d11a0 100644
--- a/src/DotNetOpenAuth.AspNet.Test/OAuth2ClientTest.cs
+++ b/src/DotNetOpenAuth.AspNet.Test/OAuth2ClientTest.cs
@@ -47,7 +47,16 @@ namespace DotNetOpenAuth.AspNet.Test {
var client = new MockOAuth2Client();
// Act && Assert
- Assert.Throws<ArgumentNullException>(() => client.VerifyAuthentication(null));
+ Assert.Throws<ArgumentNullException>(() => client.VerifyAuthentication(null, new Uri("http://me.com")));
+ }
+
+ [TestCase]
+ public void VerifyAuthenticationWithoutReturnUrlThrows() {
+ // Arrange
+ var client = new MockOAuth2Client();
+
+ // Act && Assert
+ Assert.Throws<InvalidOperationException>(() => client.VerifyAuthentication(new Mock<HttpContextBase>().Object));
}
[TestCase]
@@ -59,7 +68,7 @@ namespace DotNetOpenAuth.AspNet.Test {
context.Setup(c => c.Request.QueryString).Returns(queryStrings);
// Act
- AuthenticationResult result = client.VerifyAuthentication(context.Object);
+ AuthenticationResult result = client.VerifyAuthentication(context.Object, new Uri("http://me.com"));
// Assert
Assert.IsFalse(result.IsSuccessful);
@@ -75,7 +84,7 @@ namespace DotNetOpenAuth.AspNet.Test {
context.Setup(c => c.Request.QueryString).Returns(queryStrings);
// Act
- AuthenticationResult result = client.VerifyAuthentication(context.Object);
+ AuthenticationResult result = client.VerifyAuthentication(context.Object, new Uri("http://me.com"));
// Assert
Assert.IsFalse(result.IsSuccessful);
@@ -91,7 +100,7 @@ namespace DotNetOpenAuth.AspNet.Test {
context.Setup(c => c.Request.QueryString).Returns(queryStrings);
// Act
- AuthenticationResult result = client.VerifyAuthentication(context.Object);
+ AuthenticationResult result = client.VerifyAuthentication(context.Object, new Uri("http://me.com"));
// Assert
Assert.True(result.IsSuccessful);