Пример #1
0
        public void ValidateThrowsWhenInvalid()
        {
            var request = new CreateBookingRequest
            {
                Booking = new Booking
                {
                    Pax = new List <Pax>()
                }
            };

            Assert.Throws <InvalidBookingInformationException>(() => request.Validate());
        }
Пример #2
0
        public void ValidateDoesNotThrowWhenValid()
        {
            var request = new CreateBookingRequest
            {
                Booking = new Booking
                {
                    Pax = new List <Pax>
                    {
                        new Pax()
                    }
                }
            };

            Assert.DoesNotThrow(() => request.Validate());
        }