Пример #1
0
        public void ShouldUpdateLeaveTest()
        {
            uowMock.Setup(x => x.Leaves.Update(It.IsAny <Leave>()));
            uowMock.Setup(x => x.PublicHolidays.GetWhere(It.IsAny <Expression <Func <PublicHoliday, bool> > >()))
            .Returns(new List <PublicHoliday>().AsQueryable());
            uowMock.Setup(x => x.Save()).Returns(1);
            var manager = new LeaveManager(uowMock.Object, publicHolidaysManager.Object);
            var results = manager.UpdateLeave(DataUtilities.GetListOfMockedLeaves().First());

            Assert.AreEqual(results, 1);
        }