Esempio n. 1
0
        public void JsonAddBookingJsonToObjectTest()
        {
            TemplateJson tl = new JsonAddBooking();
            var          o  = tl.GetObject(correctJson) as Booking;

            Assert.AreEqual(sesseionID, o.GetSessionID());
            Assert.AreEqual(apt, o.GetAppointmentType());
            Assert.AreEqual(den, o.GetDentist());
            Assert.AreEqual(day, o.GetDay());
            Assert.AreEqual(time, o.GetTime());
        }
Esempio n. 2
0
        public void JsonAddBookingJsonToObjectInvalidTest()
        {
            bool         exception = false;
            var          incorrect = "{\"emails\":\"[email protected]\",\"password\":\"Password\"}";
            TemplateJson tl        = new JsonAddBooking();

            try
            {
                var o = tl.GetObject(incorrect) as Booking;
            }
            catch (Exception)
            {
                exception = true;
            }

            Assert.IsTrue(exception);
        }