예제 #1
0
        public void Should_be_able_to_Encode_and_Decode_an_instance()
        {
            var testItem = EncodingTestItem.Create();

            var encoded = UnitUnderTest.Encode(testItem);

            encoded.Should().NotBeNullOrEmpty();

            var decoded = UnitUnderTest.Decode(encoded.GetBytes().ToArray(), testItem.GetType());

            decoded.Should().BeEquivalentTo(testItem);
        }