summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Test/OAuth2/ResourceServerTests.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2013-03-22 06:22:36 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2013-03-22 06:22:36 -0700
commit4c432c1278f301c3c80097866accca679e929fed (patch)
treed21dc94faeca5b600460abac10bd5080935cd12a /src/DotNetOpenAuth.Test/OAuth2/ResourceServerTests.cs
parent579703ee02408e7d3cdd604aa263e95a6f1e49c3 (diff)
downloadDotNetOpenAuth-4c432c1278f301c3c80097866accca679e929fed.zip
DotNetOpenAuth-4c432c1278f301c3c80097866accca679e929fed.tar.gz
DotNetOpenAuth-4c432c1278f301c3c80097866accca679e929fed.tar.bz2
Fixes remaining build breaks.
Diffstat (limited to 'src/DotNetOpenAuth.Test/OAuth2/ResourceServerTests.cs')
-rw-r--r--src/DotNetOpenAuth.Test/OAuth2/ResourceServerTests.cs21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/DotNetOpenAuth.Test/OAuth2/ResourceServerTests.cs b/src/DotNetOpenAuth.Test/OAuth2/ResourceServerTests.cs
index d4618cf..55b333d 100644
--- a/src/DotNetOpenAuth.Test/OAuth2/ResourceServerTests.cs
+++ b/src/DotNetOpenAuth.Test/OAuth2/ResourceServerTests.cs
@@ -91,19 +91,18 @@ namespace DotNetOpenAuth.Test.OAuth2 {
authServer.Setup(
a => a.CheckAuthorizeClientCredentialsGrant(It.Is<IAccessTokenRequest>(d => d.ClientIdentifier == ClientId && MessagingUtilities.AreEquivalent(d.Scope, TestScopes))))
.Returns<IAccessTokenRequest>(req => new AutomatedAuthorizationCheckResponse(req, true));
- var coordinator = new CoordinatorBase(
- async (hostFactories, ct) => {
- var client = new WebServerClient(AuthorizationServerDescription);
- var authState = await client.GetClientAccessTokenAsync(TestScopes, ct);
- Assert.That(authState.AccessToken, Is.Not.Null.And.Not.Empty);
- Assert.That(authState.RefreshToken, Is.Null);
- accessToken = authState.AccessToken;
- },
- Handle(AuthorizationServerDescription.TokenEndpoint).By(async (req, ct) => {
+
+ Handle(AuthorizationServerDescription.TokenEndpoint).By(
+ async (req, ct) => {
var server = new AuthorizationServer(authServer.Object);
return await server.HandleTokenRequestAsync(req, ct);
- }));
- await coordinator.RunAsync();
+ });
+
+ var client = new WebServerClient(AuthorizationServerDescription, hostFactories: this.HostFactories);
+ var authState = await client.GetClientAccessTokenAsync(TestScopes);
+ Assert.That(authState.AccessToken, Is.Not.Null.And.Not.Empty);
+ Assert.That(authState.RefreshToken, Is.Null);
+ accessToken = authState.AccessToken;
return accessToken;
}