コード例 #1
0
        public void GetRaceDetails()
        {
            //Races details id cannot be null, if this test fails,
            //it means that that the method Details() doesn't work or the races table is empty (or no conn to database)
            RacesController races  = new RacesController();
            ActionResult    result = races.Details(1);

            Assert.IsInstanceOfType(result, typeof(ViewResult));
        }
コード例 #2
0
 public RacesControllerTests()
 {
     serviceMock = new Mock <IRacesService>();
     loggerMock  = new Mock <ILoggingService>();
     controller  = new RacesController(serviceMock.Object, loggerMock.Object);
 }
コード例 #3
0
 public void Initialize()
 {
     this._racesController = new RacesController(this._raceServiceMock.Object);
 }