Exemple #1
0
        public void Test_For_Valid_BookTicket()
        {
            //Arrange
            Ticket ticket = new Ticket()
            {
                CustomerId   = "c1",
                FromLocation = "Bangalore",
                ToLocation   = "Delhi",
                BusId        = "B1",
                TicketCharge = 1600
            };
            var customer = new Customer()
            {
                CustomerId      = "1234",
                Name            = "Rose",
                Address         = "Bangalore",
                City            = "Bangalore",
                State           = "Karnataka",
                Country         = "India",
                PinCode         = 600867,
                Email           = "*****@*****.**",
                Gender          = "Female",
                DateOfBirth     = new DateTime(1990, 04, 12),
                CustomerType    = "Normal",
                Password        = "******",
                ConfirmPassword = "******",
            };
            //Action
            var IsBooked = _services.BookTicket(ticket, customer);

            //Assert
            Assert.True(IsBooked);
        }