public void GetJourneysAndOvertimesForOneEmpEdit_NotExistingEmployee_EmptyMVcString()
        {
            //Arrange
            JourneyController controller = new JourneyController(mock.Object);

            //Act
            var result   = controller.GetJourneysAndOvertimesForOneEmpEdit(10000, "");
            var expected = new MvcHtmlString("");

            //Assert
            Assert.AreEqual(expected.ToString(), result.ToString());
            Assert.IsInstanceOf(typeof(MvcHtmlString), result);
        }
        public void GetJourneysAndOvertimesForOneEmpEdit_JourneysOfExistingEmployeeDateNull_FormattedString()
        {
            //Arrange
            JourneyController controller = new JourneyController(mock.Object);

            //Act
            DateTime reclaimed = new DateTime(2014, 10, 11);
            var      result    = controller.GetJourneysAndOvertimesForOneEmpEdit(4, null);
            var      expected  = new MvcHtmlString("");

            //Assert
            Assert.AreEqual(expected.ToString(), result.ToString());
            Assert.IsInstanceOf(typeof(MvcHtmlString), result);
        }
        public void GetJourneysAndOvertimesForOneEmpEdit_OvertimesofExistingEmployee_FormattedString()
        {
            //Arrange
            JourneyController controller = new JourneyController(mock.Object);

            //Act
            DateTime reclaimed = new DateTime(2014, 10, 11);
            var      result    = controller.GetJourneysAndOvertimesForOneEmpEdit(4, "02.04.2013");
            var      expected  = new MvcHtmlString("<option value=\"04.01.2013\">04.01.2013</option><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);
        }
        public void GetJourneysAndOvertimesForOneEmpEdit_OvertimesOfExistingEmployee_SortedByDates()
        {
            //Arrange
            JourneyController controller = new JourneyController(mock.Object);

            //Act
            var result = controller.GetJourneysAndOvertimesForOneEmpEdit(1, "02.02.2013");


            var expected = new MvcHtmlString("<option value=\"01.01.2013\">01.01.2013</option><option value=\"17.06.2013\">17.06.2013</option>");

            //Assert
            Assert.AreEqual(expected.ToString(), result.ToString());
            Assert.IsInstanceOf(typeof(MvcHtmlString), result);
        }
        public void GetJourneysAndOvertimesForOneEmpEdit_JourneysAndOvertimesExistingemployee_EmptyString()
        {
            //Arrange
            JourneyController controller = new JourneyController(mock.Object);

            //Act
            string date   = "30.11.2014";
            var    result = controller.GetJourneysAndOvertimesForOneEmpEdit(20, date);

            var expected = new MvcHtmlString("");

            //Assert

            Assert.AreEqual(expected.ToString(), result.ToString());
            Assert.IsInstanceOf(typeof(MvcHtmlString), result);
        }