public void JsonLoginObjectToJsonTest() { TemplateJson tl = new JsonLogin(); var json = tl.GetJson(new Login("*****@*****.**", "Password")); Assert.AreEqual(correctJson, json); }
public void JsonLoginObjectToJsonInvalidTest() { bool exception = false; TemplateJson tl = new JsonLogin(); try { var json = tl.GetJson("I am the wrong object"); } catch (InvalidLoginObjectException) { exception = true; } Assert.IsTrue(exception); }