public void JsonAppointmentObjectToJsonTest() { TemplateJson tl = new JsonAppointmentType(); var json = tl.GetJson(new AppointmentType(id, desc, cost)); Assert.AreEqual(correctJson, json); }
public void JsonAppointmentObjectToJsonInvalidTest() { bool exception = false; TemplateJson tl = new JsonAppointmentType(); try { var json = tl.GetJson("I am the wrong object"); } catch (InvalidLoginObjectException) { exception = true; } Assert.IsTrue(exception); }