public void JsonAddBookingObjectToJsonTest() { TemplateJson tl = new JsonAddBooking(); var dentists = new Booking(sesseionID, apt, den, day, time); var json = tl.GetJson(dentists); Assert.AreEqual(correctJson, json); }
public void JsonAddBookingObjectToJsonInvalidTest() { bool exception = false; TemplateJson tl = new JsonAddBooking(); try { var json = tl.GetJson("I am the wrong object"); } catch (InvalidLoginObjectException) { exception = true; } Assert.IsTrue(exception); }