public void GetJourneysAndOvertimesForOneEmp_NotExistingEmployee_EmptyMVcString() { //Arrange JourneyController controller = new JourneyController(mock.Object); //Act var result = controller.GetJourneysAndOvertimesForOneEmp(10000); var expected = new MvcHtmlString(""); //Assert Assert.AreEqual(expected.ToString(), result.ToString()); Assert.IsInstanceOf(typeof(MvcHtmlString), result); }
public void GetJourneysAndOvertimesForOneEmp_JourneysAndOvertimesNotEmptyListsExistingEmployee_FormattedString() { //Arrange JourneyController controller = new JourneyController(mock.Object); //Act var result = controller.GetJourneysAndOvertimesForOneEmp(4); var expected = new MvcHtmlString("<option value=\"31.08.2013\">31.08.2013</option><option value=\"11.10.2014\">11.10.2014</option><option value=\"30.11.2014\">30.11.2014</option>"); //Assert Assert.AreEqual(expected.ToString(), result.ToString()); Assert.IsInstanceOf(typeof(MvcHtmlString), result); }