Exemplo n.º 1
0
        public void Get_WhenCalled_ReturnsOkResult()
        {
            //Act
            var OkResult = _controller.Get();

            //Assert
            Assert.IsType <OkObjectResult>(OkResult.Result);
        }
Exemplo n.º 2
0
        public void GetAllPPassengersTestPass()
        {
            //Arrange
            var result = mockData.Setup(x => x.GetAllPassenger()).Returns(GetPassenger());

            //Act
            var actualResult = _passengerController.Get();

            //Assert
            Assert.Equal(2, actualResult.Count);
        }
        public void Test_GetPassenger()
        {
            // Arrange
            var resultObj = mockDataRepository.Setup(x => x.getPassengersList()).Returns(GetPassengers());

            // Act
            var response = _passengerController.Get();

            // Asert
            Assert.Equals(3, response.Count);
        }