aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/ProtocolBuffersLite.Test/LiteTest.cs
diff options
context:
space:
mode:
authorJon Skeet <jonskeet@google.com>2015-05-12 09:47:19 +0100
committerJon Skeet <jonskeet@google.com>2015-05-12 09:48:02 +0100
commit90c8932fc7316b5afaae350395624b6fd2e73a97 (patch)
tree080924d0a9fd8f52d88b1ee4fb76f9aa3bd802cd /csharp/src/ProtocolBuffersLite.Test/LiteTest.cs
parentc58b2c66448f83c25da0251fe6cf5b12299fa581 (diff)
downloadprotobuf-90c8932fc7316b5afaae350395624b6fd2e73a97.tar.gz
protobuf-90c8932fc7316b5afaae350395624b6fd2e73a97.tar.bz2
protobuf-90c8932fc7316b5afaae350395624b6fd2e73a97.zip
Convert back to using NUnit, which is now loaded via NuGet.
This includes the NUnit test adapter which allows NUnit tests to be run under VS without any extra plugins. Unfortunate the compatibility tests using the abstract test fixture class show up as "external" tests, and aren't well presented - but they do run.
Diffstat (limited to 'csharp/src/ProtocolBuffersLite.Test/LiteTest.cs')
-rw-r--r--csharp/src/ProtocolBuffersLite.Test/LiteTest.cs26
1 files changed, 13 insertions, 13 deletions
diff --git a/csharp/src/ProtocolBuffersLite.Test/LiteTest.cs b/csharp/src/ProtocolBuffersLite.Test/LiteTest.cs
index 8ffd3ee2..5defc26e 100644
--- a/csharp/src/ProtocolBuffersLite.Test/LiteTest.cs
+++ b/csharp/src/ProtocolBuffersLite.Test/LiteTest.cs
@@ -35,7 +35,7 @@
#endregion
using Google.ProtocolBuffers.TestProtos;
-using Xunit;
+using NUnit.Framework;
namespace Google.ProtocolBuffers
{
@@ -45,7 +45,7 @@ namespace Google.ProtocolBuffers
/// </summary>
public class LiteTest
{
- [Fact]
+ [Test]
public void TestLite()
{
// Since lite messages are a subset of regular messages, we can mostly
@@ -68,13 +68,13 @@ namespace Google.ProtocolBuffers
TestAllTypesLite message2 = TestAllTypesLite.ParseFrom(data);
- Assert.Equal(123, message2.OptionalInt32);
- Assert.Equal(1, message2.RepeatedStringCount);
- Assert.Equal("hello", message2.RepeatedStringList[0]);
- Assert.Equal(7, message2.OptionalNestedMessage.Bb);
+ Assert.AreEqual(123, message2.OptionalInt32);
+ Assert.AreEqual(1, message2.RepeatedStringCount);
+ Assert.AreEqual("hello", message2.RepeatedStringList[0]);
+ Assert.AreEqual(7, message2.OptionalNestedMessage.Bb);
}
- [Fact]
+ [Test]
public void TestLiteExtensions()
{
// TODO(kenton): Unlike other features of the lite library, extensions are
@@ -96,17 +96,17 @@ namespace Google.ProtocolBuffers
// writing, parsing hasn't been implemented yet.
TestAllExtensionsLite message2 = message.ToBuilder().Build();
- Assert.Equal(123, (int) message2.GetExtension(
+ Assert.AreEqual(123, (int) message2.GetExtension(
UnittestLite.OptionalInt32ExtensionLite));
- Assert.Equal(1, message2.GetExtensionCount(
+ Assert.AreEqual(1, message2.GetExtensionCount(
UnittestLite.RepeatedStringExtensionLite));
- Assert.Equal(1, message2.GetExtension(
+ Assert.AreEqual(1, message2.GetExtension(
UnittestLite.RepeatedStringExtensionLite).Count);
- Assert.Equal("hello", message2.GetExtension(
+ Assert.AreEqual("hello", message2.GetExtension(
UnittestLite.RepeatedStringExtensionLite, 0));
- Assert.Equal(TestAllTypesLite.Types.NestedEnum.BAZ, message2.GetExtension(
+ Assert.AreEqual(TestAllTypesLite.Types.NestedEnum.BAZ, message2.GetExtension(
UnittestLite.OptionalNestedEnumExtensionLite));
- Assert.Equal(7, message2.GetExtension(
+ Assert.AreEqual(7, message2.GetExtension(
UnittestLite.OptionalNestedMessageExtensionLite).Bb);
}
}