diff options
author | Jon Skeet <skeet@pobox.com> | 2015-04-30 14:51:42 +0100 |
---|---|---|
committer | Jon Skeet <skeet@pobox.com> | 2015-04-30 14:51:42 +0100 |
commit | 0884b77975146be5d0557b254fbeab940cda641a (patch) | |
tree | eee4106598d0faf92b566f7e03930f25df38a56c /csharp/src/ProtocolBuffers.Test/TestCornerCases.cs | |
parent | 151018e888927f4e89e325af013613cc1b08196c (diff) | |
parent | c56475088d2d36d29a2640f35b9a8621796c051c (diff) | |
download | protobuf-0884b77975146be5d0557b254fbeab940cda641a.tar.gz protobuf-0884b77975146be5d0557b254fbeab940cda641a.tar.bz2 protobuf-0884b77975146be5d0557b254fbeab940cda641a.zip |
Merge pull request #324 from jskeet/csharp
Change to using xUnit for all unit tests, and fetch that via NuGet.
Diffstat (limited to 'csharp/src/ProtocolBuffers.Test/TestCornerCases.cs')
-rw-r--r-- | csharp/src/ProtocolBuffers.Test/TestCornerCases.cs | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/csharp/src/ProtocolBuffers.Test/TestCornerCases.cs b/csharp/src/ProtocolBuffers.Test/TestCornerCases.cs index 0be4e1d4..5bec24f1 100644 --- a/csharp/src/ProtocolBuffers.Test/TestCornerCases.cs +++ b/csharp/src/ProtocolBuffers.Test/TestCornerCases.cs @@ -1,15 +1,11 @@ -using System;
-using System.Collections.Generic;
-using System.Text;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using UnitTest.Issues.TestProtos;
+using UnitTest.Issues.TestProtos;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class TestCornerCases
{
- [TestMethod]
+ [Fact]
public void TestRoundTripNegativeEnums()
{
NegativeEnumMessage msg = NegativeEnumMessage.CreateBuilder()
@@ -23,16 +19,16 @@ namespace Google.ProtocolBuffers .AddPackedValues(NegativeEnum.FiveBelow) //10
.Build();
- Assert.AreEqual(58, msg.SerializedSize);
+ Assert.Equal(58, msg.SerializedSize);
byte[] bytes = new byte[58];
CodedOutputStream output = CodedOutputStream.CreateInstance(bytes);
msg.WriteTo(output);
- Assert.AreEqual(0, output.SpaceLeft);
+ Assert.Equal(0, output.SpaceLeft);
NegativeEnumMessage copy = NegativeEnumMessage.ParseFrom(bytes);
- Assert.AreEqual(msg, copy);
+ Assert.Equal(msg, copy);
}
}
}
|