示例#1
0
        public void TestGetRoadStatus_When_InValidRoadId_Then_Return_Expected_LastExitCode(int expectedLastExitCode)
        {
            //Arrange
            var statusTracker = new Mock <IStatusTracker>();

            statusTracker.Setup(x => x.GetRoadStatus(It.IsAny <string>())).Returns(new RoadInfo {
                Valid = false
            });

            var application = new StatusReporter(statusTracker.Object);
            //Act
            var result = application.GetRoadStatus("Invalid_Road");

            //Assert
            Assert.AreEqual(expectedLastExitCode, result);
        }