public void EncodeUnserializable() { UnserializableObject pre = new UnserializableObject(); try { NetworkManager.Encode(pre); } catch (Exception e) { Assert.That(e is SerializationException, "Wrong exception type thrown, was {0}", e.GetType()); return; } Assert.Fail("No exception thrown on unserializable obj argument"); }
public void EncodeUnserializable() { UnserializableObject pre = new UnserializableObject(); try { NetworkManager.Encode(pre); } catch(Exception e) { Assert.That(e is SerializationException, "Wrong exception type thrown, was {0}", e.GetType()); return; } Assert.Fail("No exception thrown on unserializable obj argument"); }