public void SerializeToVersionedMessage_WhenEntity_ExpectCorrectVersionedMessage()
        {
            // Arrange
            var testEntityOne = new TestEntityOne {
                Value1 = "test1", Value2 = 42
            };

            // Act
            var stopwatch = Stopwatch.StartNew();
            var vm        = testEntityOne.SerializeToVersionedMessage(SerializerType.Json);

            stopwatch.Stop();

            // Assert
            this.WriteTimeElapsed(stopwatch);

            Assert.That(vm, Is.Not.Null);

            Assert.That(vm.Version, Is.EqualTo(new DtoVersion(typeof(TestEntityOne), 1, 0, 0)));
            Assert.That(vm.Data, Is.EqualTo("{\"Value1\":\"test1\",\"Value2\":42}"));
        }
        public void SerializeToVersionedMessage_WhenWhenProtoBuffer_ExpectCorrectValues()
        {
            // Arrange
            var testEntityOne = new TestEntityOne {
                Value1 = "test1", Value2 = 12
            };

            // Act
            var stopwatch = Stopwatch.StartNew();
            var vm        = testEntityOne.SerializeToVersionedMessage();

            stopwatch.Stop();

            // Assert
            this.WriteTimeElapsed(stopwatch);

            Assert.That(vm, Is.Not.Null);

            Assert.That(vm.Version, Is.EqualTo(new DtoVersion(typeof(TestEntityOne), 1, 0, 0)));
            Assert.That(vm.Data, Is.EqualTo("\n\u0005test1\u0010\f"));
        }