Example #1
0
        public void ShouldGetLeaveForGivenEmployeeIdTest()
        {
            uowMock.Setup(x => x.Leaves.GetAllIncluding(It.IsAny <Expression <Func <Leave, bool> > >(), It.IsAny <Expression <Func <Leave, object> > >()))
            .Returns(DataUtilities.GetListOfMockedLeaves().AsQueryable());
            var manager         = new LeaveManager(uowMock.Object, publicHolidaysManager.Object);
            var results         = manager.GetLeaveByEmployeeId(DataUtilities.id);
            var expectedResults = DataUtilities.GetListOfMockedLeaves();

            Assert.AreEqual(expectedResults.Count(), results.Count());
        }