Example #1
0
        private void TestRoundtripSerialization(ITagContext expected)
        {
            var bytes  = serializer.ToByteArray(expected);
            var actual = serializer.FromByteArray(bytes);

            Assert.Equal(expected, actual);
        }
Example #2
0
        public void TestDeserializeNoTags()
        {
            var expected = tagger.Empty;
            var actual   = serializer.FromByteArray(new byte[] { SerializationUtils.VersionId }); // One byte that represents Version ID.

            Assert.Equal(expected, actual);
        }
Example #3
0
        public void NoopTagContextBinarySerializer_FromByteArray_DisallowsNull()
        {
            ITagContextBinarySerializer noopSerializer = NoopTags.NoopTagContextBinarySerializer;

            Assert.Throws <ArgumentNullException>(() => noopSerializer.FromByteArray(null));
        }
Example #4
0
        public void TestDeserializeNoTags()
        {
            ITagContext expected = tagger.Empty;
            ITagContext actual   = serializer.FromByteArray(new byte[] { SerializationUtils.VERSION_ID }); // One byte that represents Version ID.

            Assert.Equal(expected, actual);
        }