summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Test/OpenId/ChannelElements
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2008-11-18 22:26:32 -0800
committerAndrew <andrewarnott@gmail.com>2008-11-18 22:26:32 -0800
commit9374f87b8e56f17a1b386547faf40ea5e5ffbd7d (patch)
tree902eec70793cc5e5cdf8e1a8120ae7c21ceefbff /src/DotNetOpenAuth.Test/OpenId/ChannelElements
parent881003619a0b2fd3a9d61a7ee9df42d087dfdf27 (diff)
downloadDotNetOpenAuth-9374f87b8e56f17a1b386547faf40ea5e5ffbd7d.zip
DotNetOpenAuth-9374f87b8e56f17a1b386547faf40ea5e5ffbd7d.tar.gz
DotNetOpenAuth-9374f87b8e56f17a1b386547faf40ea5e5ffbd7d.tar.bz2
FxCop message fixes.
Diffstat (limited to 'src/DotNetOpenAuth.Test/OpenId/ChannelElements')
-rw-r--r--src/DotNetOpenAuth.Test/OpenId/ChannelElements/KeyValueFormEncodingTests.cs6
-rw-r--r--src/DotNetOpenAuth.Test/OpenId/ChannelElements/OpenIdChannelTests.cs5
2 files changed, 4 insertions, 7 deletions
diff --git a/src/DotNetOpenAuth.Test/OpenId/ChannelElements/KeyValueFormEncodingTests.cs b/src/DotNetOpenAuth.Test/OpenId/ChannelElements/KeyValueFormEncodingTests.cs
index fff1392..7b98ac2 100644
--- a/src/DotNetOpenAuth.Test/OpenId/ChannelElements/KeyValueFormEncodingTests.cs
+++ b/src/DotNetOpenAuth.Test/OpenId/ChannelElements/KeyValueFormEncodingTests.cs
@@ -35,9 +35,7 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements {
[TestMethod]
public void BasicEncodingTest() {
- var kvf = new KeyValueFormEncoding();
-
- byte[] kvfBytes = kvf.GetBytes(this.sampleData);
+ byte[] kvfBytes = KeyValueFormEncoding.GetBytes(this.sampleData);
string responseString = Encoding.UTF8.GetString(kvfBytes);
Assert.IsFalse(responseString.Contains("\n\n"));
@@ -66,7 +64,7 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements {
}
}
if ((mode & TestMode.Encoder) == TestMode.Encoder) {
- var e = this.keyValueForm.GetBytes(dict);
+ var e = KeyValueFormEncoding.GetBytes(dict);
Assert.IsTrue(MessagingUtilities.AreEquivalent(e, kvform), "Encoder did not produced expected result.");
}
}
diff --git a/src/DotNetOpenAuth.Test/OpenId/ChannelElements/OpenIdChannelTests.cs b/src/DotNetOpenAuth.Test/OpenId/ChannelElements/OpenIdChannelTests.cs
index ef0ec53..cd4b4b6 100644
--- a/src/DotNetOpenAuth.Test/OpenId/ChannelElements/OpenIdChannelTests.cs
+++ b/src/DotNetOpenAuth.Test/OpenId/ChannelElements/OpenIdChannelTests.cs
@@ -60,7 +60,7 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements {
public void DirectResponsesSentUsingKeyValueForm() {
IProtocolMessage message = MessagingTestBase.GetStandardTestMessage(MessagingTestBase.FieldFill.AllRequired);
MessageDictionary messageFields = new MessageDictionary(message);
- byte[] expectedBytes = new KeyValueFormEncoding().GetBytes(messageFields);
+ byte[] expectedBytes = KeyValueFormEncoding.GetBytes(messageFields);
string expectedContentType = OpenIdChannel_Accessor.KeyValueFormContentType;
Response directResponse = this.accessor.SendDirectMessageResponse(message);
@@ -79,9 +79,8 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements {
{ "var1", "value1" },
{ "var2", "value2" },
};
- KeyValueFormEncoding kvf = new KeyValueFormEncoding();
Response response = new Response {
- ResponseStream = new MemoryStream(kvf.GetBytes(fields)),
+ ResponseStream = new MemoryStream(KeyValueFormEncoding.GetBytes(fields)),
};
Assert.IsTrue(MessagingUtilities.AreEquivalent(fields, this.accessor.ReadFromResponseInternal(response)));
}