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/MessageStreamIteratorTest.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/MessageStreamIteratorTest.cs')
-rw-r--r-- | csharp/src/ProtocolBuffers.Test/MessageStreamIteratorTest.cs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/csharp/src/ProtocolBuffers.Test/MessageStreamIteratorTest.cs b/csharp/src/ProtocolBuffers.Test/MessageStreamIteratorTest.cs index 78f059f7..7304861a 100644 --- a/csharp/src/ProtocolBuffers.Test/MessageStreamIteratorTest.cs +++ b/csharp/src/ProtocolBuffers.Test/MessageStreamIteratorTest.cs @@ -37,28 +37,27 @@ using System.Collections.Generic;
using System.IO;
using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
using NestedMessage = Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class MessageStreamIteratorTest
{
- [TestMethod]
+ [Fact]
public void ThreeMessagesInMemory()
{
MemoryStream stream = new MemoryStream(MessageStreamWriterTest.ThreeMessageData);
IEnumerable<NestedMessage> iterator = MessageStreamIterator<NestedMessage>.FromStreamProvider(() => stream);
List<NestedMessage> messages = new List<NestedMessage>(iterator);
- Assert.AreEqual(3, messages.Count);
- Assert.AreEqual(5, messages[0].Bb);
- Assert.AreEqual(1500, messages[1].Bb);
- Assert.IsFalse(messages[2].HasBb);
+ Assert.Equal(3, messages.Count);
+ Assert.Equal(5, messages[0].Bb);
+ Assert.Equal(1500, messages[1].Bb);
+ Assert.False(messages[2].HasBb);
}
- [TestMethod]
+ [Fact]
public void ManyMessagesShouldNotTriggerSizeAlert()
{
int messageSize = TestUtil.GetAllSet().SerializedSize;
@@ -84,7 +83,7 @@ namespace Google.ProtocolBuffers count++;
TestUtil.AssertAllFieldsSet(message);
}
- Assert.AreEqual(correctCount, count);
+ Assert.Equal(correctCount, count);
}
}
}
|