コード例 #1
0
        public void TestGetDetails()
        {
            // Arrange
            var controller = new StationsController(new StationLogic(new StationRepositoryStub()));
            var OneStation = new Station {
                StationID = 3, StationName = "Lysaker"
            };

            // ACt
            var result        = (ViewResult)controller.Details(3);
            var resultStation = (Station)result.Model;

            // Assert
            Assert.AreEqual("", result.ViewName);
            Assert.AreEqual(OneStation.StationID, resultStation.StationID);
            Assert.AreEqual(OneStation.StationName, resultStation.StationName);
        }