private void TestRoundtripSerialization(ITagContext expected) { var bytes = serializer.ToByteArray(expected); var actual = serializer.FromByteArray(bytes); Assert.Equal(expected, actual); }
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); }
public void NoopTagContextBinarySerializer_FromByteArray_DisallowsNull() { ITagContextBinarySerializer noopSerializer = NoopTags.NoopTagContextBinarySerializer; Assert.Throws <ArgumentNullException>(() => noopSerializer.FromByteArray(null)); }
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); }