public void ApplyTo_NonSerializable_False() { var nonSerializable = new NonSerializable("s"); var subject = new SerializationConstraint<NonSerializable>(new JsonRoundtripSerializer<NonSerializable>(), Is.Not.Null); Assert.That(matches(subject,nonSerializable), Is.False); }
public void WriteMessageTo_NonSerializable_ExpectedContainsConstraintExpectations_ActualContainsExpectationsErrorPlusObject() { var nonSerializable = new NonSerializable("s"); var subject = new SerializationConstraint<NonSerializable>(new JsonRoundtripSerializer<NonSerializable>(), Is.Not.Null); Assert.That(getMessage(subject, nonSerializable), Does .StartWith(TextMessageWriter.Pfx_Expected + "Deserialized object not null").And .Contains(TextMessageWriter.Pfx_Actual + "Could not serialize/deserialize object")); }