public void PersonShouldSerializeUnformattedToJson() { var obj = new TestPerson { Name = "MyName", Age = 200 }; var result = obj.SerializeToJson(false); result.Should().Be("{\"Name\":\"MyName\",\"Age\":200}"); }
public void PersonShouldSerializeToJson() { var obj = new TestPerson { Name = "MyName", Age = 200 }; var result = obj.SerializeToJson(); Approvals.Verify(result); }