public void SubtypesOnUnknownTypeFieldShouldThrowBindingException() { var unknownTypeClass = new InvalidUnknownTypeClass { Field = "hello" }; var serializer = new BinarySerialization.BinarySerializer(); var stream = new MemoryStream(); serializer.Serialize(stream, unknownTypeClass); }
public void SubtypesOnUnknownTypeFieldShouldThrowBindingException() { var unknownTypeClass = new InvalidUnknownTypeClass { Field = "hello" }; var serializer = new BinarySerializer(); var stream = new MemoryStream(); Assert.Throws <BindingException>(() => serializer.Serialize(stream, unknownTypeClass)); }