diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/DotNetOpenAuth.Test/OAuthWrap/MessageFactoryTests.cs | 40 |
1 files changed, 2 insertions, 38 deletions
diff --git a/src/DotNetOpenAuth.Test/OAuthWrap/MessageFactoryTests.cs b/src/DotNetOpenAuth.Test/OAuthWrap/MessageFactoryTests.cs index 0733600..414afba 100644 --- a/src/DotNetOpenAuth.Test/OAuthWrap/MessageFactoryTests.cs +++ b/src/DotNetOpenAuth.Test/OAuthWrap/MessageFactoryTests.cs @@ -251,37 +251,13 @@ namespace DotNetOpenAuth.Test.OAuthWrap { #region Client Account and Password profile messages [TestCase] - public void ClientAccountUsernamePasswordRequest() { + public void ClientCredentialsRequest() { var fields = new Dictionary<string, string> { { Protocol.wrap_name, "abc" }, { Protocol.wrap_password, "abc" }, }; IDirectedProtocolMessage request = this.messageFactory.GetNewRequestMessage(this.recipient, fields); - Assert.IsInstanceOf(typeof(ClientAccountUsernamePasswordRequest), request); - } - - [TestCase] - public void ClientAccountUsernamePasswordSuccessResponse() { - var fields = new Dictionary<string, string> { - { Protocol.refresh_token, "abc" }, - { Protocol.access_token, "abc" }, - }; - var request = new ClientAccountUsernamePasswordRequest(this.recipient.Location, Protocol.Default.Version); - Assert.IsInstanceOf( - typeof(ClientAccountUsernamePasswordSuccessResponse), - this.messageFactory.GetNewResponseMessage(request, fields)); - } - - [TestCase] - public void ClientAccountUsernamePasswordFailedResponse() { - // HTTP 401 Unauthorized - // WWW-Authenticate: WRAP - var fields = new Dictionary<string, string> { - }; - var request = new ClientAccountUsernamePasswordRequest(this.recipient.Location, Protocol.Default.Version); - Assert.IsInstanceOf( - typeof(ClientAccountUsernamePasswordFailedResponse), - this.messageFactory.GetNewResponseMessage(request, fields)); + Assert.IsInstanceOf(typeof(ClientCredentialsRequest), request); } #endregion @@ -309,18 +285,6 @@ namespace DotNetOpenAuth.Test.OAuthWrap { this.messageFactory.GetNewResponseMessage(request, fields)); } - [TestCase] - public void AssertionFailedResponse() { - // HTTP 401 Unauthorized - // WWW-Authenticate: WRAP - var fields = new Dictionary<string, string> { - }; - var request = new AssertionRequest(this.recipient.Location, Protocol.Default.Version); - Assert.IsInstanceOf( - typeof(AssertionFailedResponse), - this.messageFactory.GetNewResponseMessage(request, fields)); - } - #endregion } } |