diff options
author | Jie Luo <jieluo@google.com> | 2015-04-30 11:23:09 -0700 |
---|---|---|
committer | Jie Luo <jieluo@google.com> | 2015-04-30 11:23:09 -0700 |
commit | 24ae5105f3bd44d39303d7e76edb659cca01f97b (patch) | |
tree | beb5264eca24e47d4912f35a8b4b12b8978c07f6 /csharp/src/ProtocolBuffers.Test/MessageStreamIteratorTest.cs | |
parent | 954bc834133289cd7c844ab4195f574223a0e593 (diff) | |
parent | 0884b77975146be5d0557b254fbeab940cda641a (diff) | |
download | protobuf-24ae5105f3bd44d39303d7e76edb659cca01f97b.tar.gz protobuf-24ae5105f3bd44d39303d7e76edb659cca01f97b.tar.bz2 protobuf-24ae5105f3bd44d39303d7e76edb659cca01f97b.zip |
Merge branch 'csharp' of git://github.com/google/protobuf into google-csharp
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);
}
}
}
|