public void Should_be_able_to_handle_extended_marker_interfaces() { var original = new UsesMarker { AnId = Guid.NewGuid(), AnotherThing = "hello" }; var frozen = Json.Freeze(original); var defrosted = Json.Defrost<IExtendedMarker>(frozen); Assert.That(defrosted.AnId, Is.EqualTo(original.AnId)); Assert.That(defrosted.AnotherThing, Is.EqualTo(original.AnotherThing)); }
public void Should_be_able_to_handler_marker_interfaces() { var original = new UsesMarker { AnId = Guid.NewGuid(), AnotherThing = "hello" }; var frozen = Json.Freeze(original); var defrosted_marker = Json.Defrost<IMarkerInterface>(frozen); Console.WriteLine(frozen); var defrosted_anon = Json.Defrost(frozen); Assert.That(defrosted_marker.AnId, Is.EqualTo(original.AnId)); Assert.That(defrosted_anon, Is.InstanceOf<IMarkerInterface>()); }