public void GetDatesToDisplay_Should_Return_Null() { //Arrange _calculateDatesContract.Stub(o => o.GetDatesToDisplay()).Return(null); // Act var result = _calculateDatesService.GetDatesToDisplay(); // Assert _calculateDatesContract.AssertWasCalled(m => m.GetDatesToDisplay()); Assert.IsNull(result); }
public ActionResult Index() { var datesToDisplay = _calculateDatesService.GetDatesToDisplay(); var model = Mapper.Map <DatesToDisplayViewModel>(datesToDisplay); return(View(model)); }