Esempio n. 1
0
        public void JsonDentistObjectToJsonTest()
        {
            TemplateJson tl   = new JsonDentist();
            var          json = tl.GetJson(new Dentist(id, name, email, phone));

            Assert.AreEqual(correctJson, json);
        }
Esempio n. 2
0
        public void JsonDentistObjectToJsonInvalidTest()
        {
            bool         exception = false;
            TemplateJson tl        = new JsonDentist();

            try
            {
                var json = tl.GetJson("I am the wrong object");
            }
            catch (InvalidLoginObjectException)
            {
                exception = true;
            }

            Assert.IsTrue(exception);
        }