summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Test/Messaging/Reflection
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2012-02-25 16:24:04 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2012-02-25 16:24:04 -0800
commit22b1c05a964a5bded9d0d3de0792acbc02aa0b25 (patch)
treeea23dcf32e008612a70aa8af9c78dc490f1dcb38 /src/DotNetOpenAuth.Test/Messaging/Reflection
parent7da4839c2a16e8b7c30e9545941a06853938ccee (diff)
downloadDotNetOpenAuth-22b1c05a964a5bded9d0d3de0792acbc02aa0b25.zip
DotNetOpenAuth-22b1c05a964a5bded9d0d3de0792acbc02aa0b25.tar.gz
DotNetOpenAuth-22b1c05a964a5bded9d0d3de0792acbc02aa0b25.tar.bz2
Changed all uses of [TestCase] to [Test] to better emulate recommended NUnit patterns.
Diffstat (limited to 'src/DotNetOpenAuth.Test/Messaging/Reflection')
-rw-r--r--src/DotNetOpenAuth.Test/Messaging/Reflection/MessageDescriptionTests.cs4
-rw-r--r--src/DotNetOpenAuth.Test/Messaging/Reflection/MessageDictionaryTests.cs36
-rw-r--r--src/DotNetOpenAuth.Test/Messaging/Reflection/MessagePartTests.cs16
3 files changed, 28 insertions, 28 deletions
diff --git a/src/DotNetOpenAuth.Test/Messaging/Reflection/MessageDescriptionTests.cs b/src/DotNetOpenAuth.Test/Messaging/Reflection/MessageDescriptionTests.cs
index eea802b..66aef6c 100644
--- a/src/DotNetOpenAuth.Test/Messaging/Reflection/MessageDescriptionTests.cs
+++ b/src/DotNetOpenAuth.Test/Messaging/Reflection/MessageDescriptionTests.cs
@@ -27,7 +27,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
new MessageDescription(typeof(string), new Version(1, 0));
}
- [TestCase]
+ [Test]
public void MultiVersionedMessageTest() {
var v10 = new MessageDescription(typeof(MultiVersionMessage), new Version(1, 0));
var v20 = new MessageDescription(typeof(MultiVersionMessage), new Version(2, 0));
@@ -76,7 +76,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
/// <summary>
/// Verifies that the constructors cache is properly initialized.
/// </summary>
- [TestCase]
+ [Test]
public void CtorsCache() {
var message = new MessageDescription(typeof(MultiVersionMessage), new Version(1, 0));
Assert.IsNotNull(message.Constructors);
diff --git a/src/DotNetOpenAuth.Test/Messaging/Reflection/MessageDictionaryTests.cs b/src/DotNetOpenAuth.Test/Messaging/Reflection/MessageDictionaryTests.cs
index b5e32ff..ec21e31 100644
--- a/src/DotNetOpenAuth.Test/Messaging/Reflection/MessageDictionaryTests.cs
+++ b/src/DotNetOpenAuth.Test/Messaging/Reflection/MessageDictionaryTests.cs
@@ -33,7 +33,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
/// <summary>
/// A test for System.Collections.Generic.IDictionary&lt;System.String,System.String>.Values
/// </summary>
- [TestCase]
+ [Test]
public void Values() {
IDictionary<string, string> target = this.MessageDescriptions.GetAccessor(this.message);
Collection<string> expected = new Collection<string> {
@@ -59,7 +59,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
/// <summary>
/// A test for System.Collections.Generic.IDictionary&lt;System.String,System.String>.Keys
/// </summary>
- [TestCase]
+ [Test]
public void Keys() {
// We expect that non-nullable value type fields will automatically have keys
// in the dictionary for them.
@@ -80,7 +80,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
/// <summary>
/// A test for System.Collections.Generic.IDictionary&lt;System.String,System.String>.Item
/// </summary>
- [TestCase]
+ [Test]
public void Item() {
IDictionary<string, string> target = this.MessageDescriptions.GetAccessor(this.message);
@@ -103,7 +103,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
/// <summary>
/// A test for System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;System.String,System.String&lt;&lt;.IsReadOnly
/// </summary>
- [TestCase]
+ [Test]
public void IsReadOnly() {
ICollection<KeyValuePair<string, string>> target = this.MessageDescriptions.GetAccessor(this.message);
Assert.IsFalse(target.IsReadOnly);
@@ -112,7 +112,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
/// <summary>
/// A test for System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;System.String,System.String&lt;&lt;.Count
/// </summary>
- [TestCase]
+ [Test]
public void Count() {
ICollection<KeyValuePair<string, string>> target = this.MessageDescriptions.GetAccessor(this.message);
IDictionary<string, string> targetDictionary = (IDictionary<string, string>)target;
@@ -124,7 +124,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
/// <summary>
/// A test for System.Collections.Generic.IEnumerable&lt;System.Collections.Generic.KeyValuePair&lt;System.String,System.String&lt;&lt;.GetEnumerator
/// </summary>
- [TestCase]
+ [Test]
public void GetEnumerator() {
IEnumerable<KeyValuePair<string, string>> target = this.MessageDescriptions.GetAccessor(this.message);
IDictionary<string, string> targetDictionary = (IDictionary<string, string>)target;
@@ -147,7 +147,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
Assert.IsTrue(keysLast == valuesLast && keysLast == actualLast);
}
- [TestCase]
+ [Test]
public void GetEnumeratorUntyped() {
IEnumerable target = this.MessageDescriptions.GetAccessor(this.message);
IDictionary<string, string> targetDictionary = (IDictionary<string, string>)target;
@@ -174,7 +174,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
/// <summary>
/// A test for System.Collections.Generic.IDictionary&lt;System.String,System.String>.TryGetValue
/// </summary>
- [TestCase]
+ [Test]
public void TryGetValue() {
IDictionary<string, string> target = this.MessageDescriptions.GetAccessor(this.message);
this.message.Name = "andrew";
@@ -194,7 +194,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
/// <summary>
/// A test for System.Collections.Generic.IDictionary&lt;System.String,System.String>.Remove
/// </summary>
- [TestCase]
+ [Test]
public void RemoveTest1() {
IDictionary<string, string> target = this.MessageDescriptions.GetAccessor(this.message);
this.message.Name = "andrew";
@@ -211,7 +211,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
/// <summary>
/// A test for System.Collections.Generic.IDictionary&lt;System.String,System.String>.ContainsKey
/// </summary>
- [TestCase]
+ [Test]
public void ContainsKey() {
IDictionary<string, string> target = this.MessageDescriptions.GetAccessor(this.message);
Assert.IsTrue(target.ContainsKey("age"), "Value type declared element should have a key.");
@@ -225,7 +225,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
/// <summary>
/// A test for System.Collections.Generic.IDictionary&lt;System.String,System.String&gt;.Add
/// </summary>
- [TestCase]
+ [Test]
public void AddByKeyAndValue() {
IDictionary<string, string> target = this.MessageDescriptions.GetAccessor(this.message);
target.Add("extra", "value");
@@ -243,7 +243,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
/// <summary>
/// A test for System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;System.String,System.String&lt;&lt;.Add
/// </summary>
- [TestCase]
+ [Test]
public void AddByKeyValuePair() {
IDictionary<string, string> target = this.MessageDescriptions.GetAccessor(this.message);
target.Add(new KeyValuePair<string, string>("extra", "value"));
@@ -264,14 +264,14 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
target.Add("Name", "andrew");
}
- [TestCase]
+ [Test]
public void DefaultReferenceTypeDeclaredPropertyHasNoKey() {
IDictionary<string, string> target = this.MessageDescriptions.GetAccessor(this.message);
Assert.IsFalse(target.ContainsKey("Name"), "A null value should result in no key.");
Assert.IsFalse(target.Keys.Contains("Name"), "A null value should result in no key.");
}
- [TestCase]
+ [Test]
public void RemoveStructDeclaredProperty() {
IDictionary<string, string> target = this.MessageDescriptions.GetAccessor(this.message);
this.message.Age = 5;
@@ -284,7 +284,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
/// <summary>
/// A test for System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;System.String,System.String&lt;&lt;.Remove
/// </summary>
- [TestCase]
+ [Test]
public void RemoveByKeyValuePair() {
ICollection<KeyValuePair<string, string>> target = this.MessageDescriptions.GetAccessor(this.message);
this.message.Name = "Andrew";
@@ -297,7 +297,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
/// <summary>
/// A test for System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;System.String,System.String&lt;&lt;.CopyTo
/// </summary>
- [TestCase]
+ [Test]
public void CopyTo() {
ICollection<KeyValuePair<string, string>> target = this.MessageDescriptions.GetAccessor(this.message);
IDictionary<string, string> targetAsDictionary = (IDictionary<string, string>)target;
@@ -314,7 +314,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
/// <summary>
/// A test for System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;System.String,System.String&lt;&lt;.Contains
/// </summary>
- [TestCase]
+ [Test]
public void ContainsKeyValuePair() {
ICollection<KeyValuePair<string, string>> target = this.MessageDescriptions.GetAccessor(this.message);
IDictionary<string, string> targetAsDictionary = (IDictionary<string, string>)target;
@@ -330,7 +330,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
/// <summary>
/// A test for System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;System.String,System.String&lt;&lt;.Clear
/// </summary>
- [TestCase]
+ [Test]
public void ClearValues() {
MessageDictionary target = this.MessageDescriptions.GetAccessor(this.message);
IDictionary<string, string> targetAsDictionary = (IDictionary<string, string>)target;
diff --git a/src/DotNetOpenAuth.Test/Messaging/Reflection/MessagePartTests.cs b/src/DotNetOpenAuth.Test/Messaging/Reflection/MessagePartTests.cs
index 65bb3f2..1d820d4 100644
--- a/src/DotNetOpenAuth.Test/Messaging/Reflection/MessagePartTests.cs
+++ b/src/DotNetOpenAuth.Test/Messaging/Reflection/MessagePartTests.cs
@@ -21,12 +21,12 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
this.ParameterizedMessageTypeTest(typeof(MessageWithNonNullableOptionalStruct));
}
- [TestCase]
+ [Test]
public void RequiredNonNullableStruct() {
this.ParameterizedMessageTypeTest(typeof(MessageWithNonNullableRequiredStruct));
}
- [TestCase]
+ [Test]
public void OptionalNullableStruct() {
var message = new MessageWithNullableOptionalStruct();
var part = this.ParameterizedMessageTypeTest(message.GetType());
@@ -36,7 +36,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
Assert.AreEqual("3", part.GetValue(message));
}
- [TestCase]
+ [Test]
public void RequiredNullableStruct() {
this.ParameterizedMessageTypeTest(typeof(MessageWithNullableRequiredStruct));
}
@@ -52,7 +52,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
new MessagePart(field, null);
}
- [TestCase]
+ [Test]
public void SetValue() {
var message = new MessageWithNonNullableRequiredStruct();
MessagePart part = this.ParameterizedMessageTypeTest(message.GetType());
@@ -60,7 +60,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
Assert.AreEqual(5, message.OptionalInt);
}
- [TestCase]
+ [Test]
public void GetValue() {
var message = new MessageWithNonNullableRequiredStruct();
message.OptionalInt = 8;
@@ -68,7 +68,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
Assert.AreEqual("8", part.GetValue(message));
}
- [TestCase]
+ [Test]
public void Base64Member() {
var message = new MessageWithBase64EncodedString();
message.LastName = "andrew";
@@ -78,7 +78,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
Assert.AreEqual("arnott", message.LastName);
}
- [TestCase]
+ [Test]
public void ConstantFieldMemberValidValues() {
var message = new MessageWithConstantField();
MessagePart part = GetMessagePart(message.GetType(), "ConstantField");
@@ -100,7 +100,7 @@ namespace DotNetOpenAuth.Test.Messaging.Reflection {
new MessagePart(method, new MessagePartAttribute());
}
- [TestCase]
+ [Test]
public void RequiredMinAndMaxVersions() {
Type messageType = typeof(MessageWithMinAndMaxVersionParts);
FieldInfo newIn2Field = messageType.GetField("NewIn2", BindingFlags.Public | BindingFlags.Instance);