public void JsonAppointmentJsonToObjectTest() { TemplateJson tl = new JsonEveryTimeSlot(); var o = tl.GetObject(correctJson) as TimeSlot; Assert.AreEqual(id, o.GetID()); var od = o.GetDentist(); Assert.AreEqual(dentist.GetEmail(), od.GetEmail()); Assert.AreEqual(dentist.GetID(), od.GetID()); //Will fail if email and phone not included Assert.AreEqual(dentist.GetName(), od.GetName()); Assert.AreEqual(dentist.GetPhone(), od.GetPhone()); Assert.AreEqual(hour, o.GetHour()); Assert.AreEqual(min, o.GetMin()); Assert.AreEqual(day, o.GetDay()); }