Example #1
0
        public void JsonAddBookingObjectToJsonTest()
        {
            TemplateJson tl       = new JsonAddBooking();
            var          dentists = new Booking(sesseionID, apt, den, day, time);
            var          json     = tl.GetJson(dentists);

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

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

            Assert.IsTrue(exception);
        }