aboutsummaryrefslogtreecommitdiff
path: root/src/ProtocolBuffers.Test/WireFormatTest.cs
diff options
context:
space:
mode:
authorcsharptest <roger@csharptest.net>2011-10-04 13:43:26 -0500
committerrogerk <devnull@localhost>2011-10-04 13:43:26 -0500
commiteac64a5f7afdfca32476534fd8d0bf69d77002ca (patch)
tree03a38e9992afd1ffb929f3f830d6054009a9cba2 /src/ProtocolBuffers.Test/WireFormatTest.cs
parent5e48fef659b571db38be18afb61bea0cffcdfdca (diff)
downloadprotobuf-eac64a5f7afdfca32476534fd8d0bf69d77002ca.tar.gz
protobuf-eac64a5f7afdfca32476534fd8d0bf69d77002ca.tar.bz2
protobuf-eac64a5f7afdfca32476534fd8d0bf69d77002ca.zip
- Upgraded NUnit
- Added StatLight and Silverlight unit testing - Added copies of all projects for Silverlight - Integrated Silverlight unit tests in build
Diffstat (limited to 'src/ProtocolBuffers.Test/WireFormatTest.cs')
-rw-r--r--src/ProtocolBuffers.Test/WireFormatTest.cs28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/ProtocolBuffers.Test/WireFormatTest.cs b/src/ProtocolBuffers.Test/WireFormatTest.cs
index e390ce0d..415624e5 100644
--- a/src/ProtocolBuffers.Test/WireFormatTest.cs
+++ b/src/ProtocolBuffers.Test/WireFormatTest.cs
@@ -38,17 +38,17 @@ using System.IO;
using System.Reflection;
using Google.ProtocolBuffers.Descriptors;
using Google.ProtocolBuffers.TestProtos;
-using NUnit.Framework;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Google.ProtocolBuffers
{
- [TestFixture]
+ [TestClass]
public class WireFormatTest
{
/// <summary>
/// Keeps the attributes on FieldType and the switch statement in WireFormat in sync.
/// </summary>
- [Test]
+ [TestMethod]
public void FieldTypeToWireTypeMapping()
{
foreach (FieldInfo field in typeof (FieldType).GetFields(BindingFlags.Static | BindingFlags.Public))
@@ -60,7 +60,7 @@ namespace Google.ProtocolBuffers
}
}
- [Test]
+ [TestMethod]
public void Serialization()
{
TestAllTypes message = TestUtil.GetAllSet();
@@ -73,7 +73,7 @@ namespace Google.ProtocolBuffers
TestUtil.AssertAllFieldsSet(message2);
}
- [Test]
+ [TestMethod]
public void SerializationPacked()
{
TestPackedTypes message = TestUtil.GetPackedSet();
@@ -83,7 +83,7 @@ namespace Google.ProtocolBuffers
TestUtil.AssertPackedFieldsSet(message2);
}
- [Test]
+ [TestMethod]
public void SerializeExtensions()
{
// TestAllTypes and TestAllExtensions should have compatible wire formats,
@@ -98,7 +98,7 @@ namespace Google.ProtocolBuffers
TestUtil.AssertAllFieldsSet(message2);
}
- [Test]
+ [TestMethod]
public void SerializePackedExtensions()
{
// TestPackedTypes and TestPackedExtensions should have compatible wire
@@ -112,7 +112,7 @@ namespace Google.ProtocolBuffers
Assert.AreEqual(rawBytes, rawBytes2);
}
- [Test]
+ [TestMethod]
public void SerializeDelimited()
{
MemoryStream stream = new MemoryStream();
@@ -130,7 +130,7 @@ namespace Google.ProtocolBuffers
Assert.AreEqual(-1, stream.ReadByte());
}
- [Test]
+ [TestMethod]
public void ParseExtensions()
{
// TestAllTypes and TestAllExtensions should have compatible wire formats,
@@ -149,7 +149,7 @@ namespace Google.ProtocolBuffers
TestUtil.AssertAllExtensionsSet(message2);
}
- [Test]
+ [TestMethod]
public void ParsePackedExtensions()
{
// Ensure that packed extensions can be properly parsed.
@@ -162,7 +162,7 @@ namespace Google.ProtocolBuffers
TestUtil.AssertPackedExtensionsSet(message2);
}
- [Test]
+ [TestMethod]
public void ExtensionsSerializedSize()
{
Assert.AreEqual(TestUtil.GetAllSet().SerializedSize, TestUtil.GetAllExtensionsSet().SerializedSize);
@@ -183,7 +183,7 @@ namespace Google.ProtocolBuffers
}
}
- [Test]
+ [TestMethod]
public void InterleavedFieldsAndExtensions()
{
// Tests that fields are written in order even when extension ranges
@@ -214,7 +214,7 @@ namespace Google.ProtocolBuffers
private static readonly int TypeId1 = TestMessageSetExtension1.Descriptor.Extensions[0].FieldNumber;
private static readonly int TypeId2 = TestMessageSetExtension2.Descriptor.Extensions[0].FieldNumber;
- [Test]
+ [TestMethod]
public void SerializeMessageSet()
{
// Set up a TestMessageSet with two known messages and an unknown one.
@@ -256,7 +256,7 @@ namespace Google.ProtocolBuffers
Assert.AreEqual("bar", raw.GetItem(2).Message.ToStringUtf8());
}
- [Test]
+ [TestMethod]
public void ParseMessageSet()
{
ExtensionRegistry extensionRegistry = ExtensionRegistry.CreateInstance();