public void ObjectSerializationShouldThrow() { var unknownTypeClass = new UnknownTypeClass { Field = new object() }; Roundtrip(unknownTypeClass); }
public void UnknownTypeSerializationTest() { var unknownTypeClass = new UnknownTypeClass {Field = "hello"}; var serializer = new BinarySerialization.BinarySerializer(); var stream = new MemoryStream(); serializer.Serialize(stream, unknownTypeClass); }
public void UnknownTypeSerializationTest() { var unknownTypeClass = new UnknownTypeClass { Field = "hello" }; var serializer = new BinarySerializer(); var stream = new MemoryStream(); serializer.Serialize(stream, unknownTypeClass); }
public void ObjectSerializationShouldThrow() { var unknownTypeClass = new UnknownTypeClass { Field = new object() }; #if TESTASYNC Assert.Throws <AggregateException>(() => Roundtrip(unknownTypeClass)); #else Assert.Throws <InvalidOperationException>(() => Roundtrip(unknownTypeClass)); #endif }