Пример #1
0
        public void GET_NewOvertime_Return_ViewName_AreEqual_NewOvertime_Test()
        {
            BuilderController traget = new BuilderController();

            ViewResult actual = (ViewResult)traget.NewOvertime();

            const string expected = "NewOvertime";

            Assert.AreEqual(expected, actual.ViewName);
        }
Пример #2
0
        public void PSOT_NewOvertime_ViewModel_AreEqual_Expected_Test()
        {
            NewOverTimeViewModel vm = new NewOverTimeViewModel
            {
                Applier       = "Rex",
                ApplyDateTime = DateTime.Now.Date,
                OverTimeHour  = 3,
            };

            BuilderController traget = new BuilderController();

            ViewResult actual = (ViewResult)traget.NewOvertime(vm);

            var expected = new
            {
                Applier       = "Rex",
                ApplyDateTime = DateTime.Now.Date,
                OverTimeHour  = 3,
            }.ToExpectedObject();

            expected.ShouldMatch(actual.Model);
        }