public void AJson_JsonHelper_BuildJsonForObject_ComplexObject() { Json json = JsonHelper.BuildJsonForObject(ComplexGuy.MakeOne()); Assert.IsNotNull(json); Assert.IsFalse(json.HasErrors, "Json parse errors:\n" + String.Join("\n\t", json.Errors)); json.AssertSourceIsValid(); }
public void AJson_JsonHelper_BuildObjectForJson_ComplexObject() { ComplexGuy theDudeGoinIn = ComplexGuy.MakeOne(); Json json = JsonHelper.BuildJsonForObject(theDudeGoinIn); ComplexGuy theDude = JsonHelper.BuildObjectForJson <ComplexGuy>(json); Assert.IsTrue(theDudeGoinIn.Equals(theDude)); json.AssertSourceIsValid(); }