Example #1
0
        public void JsonAppointmentObjectToJsonTest()
        {
            TemplateJson tl   = new JsonAppointmentType();
            var          json = tl.GetJson(new AppointmentType(id, desc, cost));

            Assert.AreEqual(correctJson, json);
        }
Example #2
0
        public void JsonAppointmentObjectToJsonInvalidTest()
        {
            bool         exception = false;
            TemplateJson tl        = new JsonAppointmentType();

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

            Assert.IsTrue(exception);
        }