public void LoginTest() { Login loginDetails = new Login(); loginDetails.Email = "*****@*****.**"; loginDetails.Password = "******"; MockDALLayer dllLayer = new MockDALLayer(); var controller = new LoginController(dllLayer); //Response result = controller.UserLogin(loginDetails); //Response expectedResult =new Response { Status = "Success", Message = "Login Successfully" }; //Assert.AreEqual<Response>(result,expectedResult); }
public void CheckAvalibilityTestForWrongMovie() { CheckAvalibilityRequest avalibityRequest = new CheckAvalibilityRequest() { MovieName = "KGF456", Cinema = "Mega Multiplex", Location = "Marthalli", City = "Banglore", ShowTime = "11:00 AM", }; MockDALLayer dllLayer = new MockDALLayer(); var controller = new BookingController(dllLayer); CheckAvalibilityResponse result = controller.CheckAvalibility(avalibityRequest); Assert.IsNull(result); }
public void RegisterTest() { Register details = new Register(); details.Name = "admin1"; details.Email = "*****@*****.**"; details.Password = "******"; MockDALLayer dllLayer = new MockDALLayer(); var controller = new UserController(dllLayer); Response result = controller.UserRegistration(details); Response expectedResult = new Response { Status = "Success", Message = "Record SuccessFully Saved." }; Assert.AreSame(result, expectedResult); }
public void BookingTestFroNumberOfTickets() { BookingRequest request = new BookingRequest() { MovieName = "KGF", Cinema = "Mega Multiplex", Location = "Marthalli", City = "Banglore", ShowTime = "11:00 AM", NumberOfTickets = 1000, Class = "GoldClass" }; MockDALLayer dllLayer = new MockDALLayer(); var controller = new BookingController(dllLayer); var response = controller.Booking(request); Response expected = new Response { Status = "Fail", Message = "Select proper seating class" }; Assert.AreEqual(response, expected); }