public void AddPassenger1() { var newPassenger = new PassengerView(); newPassenger.P_No = 4; newPassenger.F_Name = "Raj"; newPassenger.L_Name = "shah"; newPassenger.Phone = 123456789; // Act var response = mockDtaRepository.Setup(x => x.CreateNewPassenger(newPassenger)).Returns("Added succeffuly"); var result = _passengerController.PostPassenger(newPassenger); // Assert Assert.NotNull(result); }
public void AddPassenger() { // Arrange var newPassenger = new PassengerView(); newPassenger.P_No = 4; newPassenger.F_Name = "Atul"; newPassenger.L_Name = "Bavaria"; newPassenger.Phone = 86950498; // Act var response = mockDtaRepository.Setup(x => x.CreateNewPassenger(newPassenger)).Returns("Added succeffuly"); var result = _passengerController.PostPassenger(newPassenger); // Assert Assert.NotNull(result); }