public void JsonAllDentistsObjectToJsonTest() { TemplateJson tl = new JsonAllDentists(); var dentists = new List <Dentist>(); dentists.Add(new Dentist(id1, name1, email1, phone1)); dentists.Add(new Dentist(id2, name2, email2, phone2)); var json = tl.GetJson(dentists); Assert.AreEqual(correctJson, json); }
public void JsonAllDentistsObjectToJsonInvalidTest() { bool exception = false; TemplateJson tl = new JsonAllDentists(); try { var json = tl.GetJson("I am the wrong object"); } catch (InvalidLoginObjectException) { exception = true; } Assert.IsTrue(exception); }