public void TestFindJobSummaryInitialCallDate()
 {
     // Arrange
     JobModel model = new JobModel(new FakeUnitOfWork());
     // Act
     IList<CS_SP_GetJobSummary_Result> result = model.FindJobSummary(null, null, null, null, Globals.Dashboard.DateFilterType.InitialCallDate, new DateTime(2011, 1, 1), new DateTime(2011, 1, 31), "");
     // Assert
     Assert.IsNotNull(result);
     Assert.AreEqual(3, result.Count);
 }
 public void TestFindJobSummaryPresetDate()
 {
     // Arrange
     JobModel model = new JobModel(new FakeUnitOfWork());
     // Act
     IList<CS_SP_GetJobSummary_Result> result = model.FindJobSummary(null, null, null, null, Globals.Dashboard.DateFilterType.PresetDate, DateTime.MinValue, DateTime.Now, "");
     // Assert
     Assert.IsNotNull(result);
     Assert.AreEqual(1, result.Count);
 }
        public void TestFindJobSummaryByJobIds()
        {
            // Arrange
            FakeObjectSet<CS_SP_GetJobSummary_Result> fakeObjectSet = new FakeObjectSet<CS_SP_GetJobSummary_Result>();
            fakeObjectSet.AddObject(
                new CS_SP_GetJobSummary_Result()
                {
                    JobID = 1
                });
            fakeObjectSet.AddObject(
                new CS_SP_GetJobSummary_Result()
                {
                    JobID = 2
                });
            fakeObjectSet.AddObject(
                new CS_SP_GetJobSummary_Result()
                {
                    JobID = 3
                });
            Mock<IUnitOfWork> mockUnitOfWork = new Mock<IUnitOfWork>();
            mockUnitOfWork.Setup(w => w.CreateObjectSet<CS_SP_GetJobSummary_Result>()).Returns(fakeObjectSet);

            // Act
            JobModel jobModel = new JobModel(mockUnitOfWork.Object);
            IList<CS_View_JobSummary> returnList = jobModel.FindJobSummary(new List<int> { 1, 2 });

            // Assert
            Assert.AreEqual(2, returnList.Count);
        }