public void TestIfListAllPrimaryCallTypesIsReturningJobRelatedRows() { // Arrange FakeObjectSet<CS_PrimaryCallType> fakePrimaryCallTypeList = new FakeObjectSet<CS_PrimaryCallType>(); fakePrimaryCallTypeList.AddObject( new CS_PrimaryCallType() { ID = 1, Type = "Job Related Primary Call Type", Active = true, JobRelated = true } ); fakePrimaryCallTypeList.AddObject( new CS_PrimaryCallType() { ID = 2, Type = "Non-Job Related Primary Call Type", Active = true, JobRelated = false } ); Mock<IUnitOfWork> mockUnitOfWork = new Mock<IUnitOfWork>(); mockUnitOfWork.Setup(e => e.CreateObjectSet<CS_PrimaryCallType>()).Returns(fakePrimaryCallTypeList); CallLogModel model = new CallLogModel(mockUnitOfWork.Object); // Act IList<CS_PrimaryCallType> primaryCallTypeList = model.ListAllPrimaryCallTypes(true); // Assert Assert.AreEqual(1, primaryCallTypeList.Count); Assert.AreEqual(1, primaryCallTypeList[0].ID); }