예제 #1
0
        public void CanSerializeAndBack()
        {
            var message = new MessageWithArray(Guid.NewGuid(), new int[] { 1234, 5323 });

            var result = ExecuteSerializer.ForMessage<MessageWithArray>(message);

            Assert.IsNotNull(result.SomeInts);
            Assert.That(result.SomeInts, Has.Length.EqualTo(2));
            Assert.AreEqual(1234, result.SomeInts[0]);
            Assert.AreEqual(5323, result.SomeInts[1]);
        }
예제 #2
0
        public void CanSerializeAndBack()
        {
            var message = new MessageWithArray(Guid.NewGuid(), new int[] { 1234, 5323 });

            var result = ExecuteSerializer.ForMessage <MessageWithArray>(message);

            Assert.IsNotNull(result.SomeInts);
            Assert.That(result.SomeInts, Has.Length.EqualTo(2));
            Assert.AreEqual(1234, result.SomeInts[0]);
            Assert.AreEqual(5323, result.SomeInts[1]);
        }