summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Test
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOpenAuth.Test')
-rw-r--r--src/DotNetOpenAuth.Test/Mocks/InMemoryTokenManager.cs9
-rw-r--r--src/DotNetOpenAuth.Test/OAuth/ServiceProviderTests.cs12
2 files changed, 15 insertions, 6 deletions
diff --git a/src/DotNetOpenAuth.Test/Mocks/InMemoryTokenManager.cs b/src/DotNetOpenAuth.Test/Mocks/InMemoryTokenManager.cs
index 5dd0dbd..f9cf612 100644
--- a/src/DotNetOpenAuth.Test/Mocks/InMemoryTokenManager.cs
+++ b/src/DotNetOpenAuth.Test/Mocks/InMemoryTokenManager.cs
@@ -114,6 +114,14 @@ namespace DotNetOpenAuth.Test.Mocks {
return this.tokens[requestToken].Callback;
}
+ public void SetTokenConsumerVersion(string token, Version version) {
+ this.tokens[token].ConsumerVersion = version;
+ }
+
+ public Version GetTokenConsumerVersion(string token) {
+ return this.tokens[token].ConsumerVersion;
+ }
+
#endregion
/// <summary>
@@ -142,6 +150,7 @@ namespace DotNetOpenAuth.Test.Mocks {
internal string Verifier;
internal string Secret;
internal Uri Callback;
+ internal Version ConsumerVersion;
}
}
}
diff --git a/src/DotNetOpenAuth.Test/OAuth/ServiceProviderTests.cs b/src/DotNetOpenAuth.Test/OAuth/ServiceProviderTests.cs
index 8f6696f..2a443ce 100644
--- a/src/DotNetOpenAuth.Test/OAuth/ServiceProviderTests.cs
+++ b/src/DotNetOpenAuth.Test/OAuth/ServiceProviderTests.cs
@@ -9,9 +9,9 @@ namespace DotNetOpenAuth.Test.OAuth {
using System.Collections.Generic;
using System.Linq;
using System.Text;
- using Microsoft.VisualStudio.TestTools.UnitTesting;
- using DotNetOpenAuth.OAuth;
using DotNetOpenAuth.Messaging;
+ using DotNetOpenAuth.OAuth;
+ using Microsoft.VisualStudio.TestTools.UnitTesting;
[TestClass]
public class ServiceProviderTests : TestBase {
@@ -20,10 +20,10 @@ namespace DotNetOpenAuth.Test.OAuth {
/// </summary>
[TestMethod]
public void CreateVerificationCode() {
- TestCode(VerificationCodeFormat.Numeric, 3, MessagingUtilities.Digits);
- TestCode(VerificationCodeFormat.AlphaLower, 5, MessagingUtilities.LowercaseLetters);
- TestCode(VerificationCodeFormat.AlphaUpper, 5, MessagingUtilities.UppercaseLetters);
- TestCode(VerificationCodeFormat.AlphaNumericNoLookAlikes, 8, MessagingUtilities.AlphaNumericNoLookAlikes);
+ this.TestCode(VerificationCodeFormat.Numeric, 3, MessagingUtilities.Digits);
+ this.TestCode(VerificationCodeFormat.AlphaLower, 5, MessagingUtilities.LowercaseLetters);
+ this.TestCode(VerificationCodeFormat.AlphaUpper, 5, MessagingUtilities.UppercaseLetters);
+ this.TestCode(VerificationCodeFormat.AlphaNumericNoLookAlikes, 8, MessagingUtilities.AlphaNumericNoLookAlikes);
}
private void TestCode(VerificationCodeFormat format, int length, string allowableCharacters) {