コード例 #1
0
        public void GetTotalResultCountForQuery_MockDAOExtensibilityTest_Pass()
        {
            //Arrange
            var actual   = false;
            var expected = true;
            IHouseholdSearchDAO     mockDAO     = new HouseholdSearchTestDAO();
            IHouseholdSearchService mockService = new HouseholdSearchService(mockDAO);
            //Act
            int mockResultListing = mockService.GetTotalResultCountForQuery("Cypress", 0, 1000, "none");

            //Assert
            if (mockResultListing == 4)
            {
                actual = true;
            }
            Assert.AreEqual(expected, actual);
        }
コード例 #2
0
        public void Search_MockDAOExtensibilityTest_Pass()
        {
            //Arrange
            var actual   = false;
            var expected = true;
            IHouseholdSearchDAO     mockDAO     = new HouseholdSearchTestDAO();
            IHouseholdSearchService mockService = new HouseholdSearchService(mockDAO);
            //Act
            ICollection <HouseholdSearchDTO> mockResultListing = mockService.Search("Cypress", 1, 0, 1000, "none");

            //Assert
            if (mockResultListing.Count == 4)
            {
                actual = true;
            }
            Assert.AreEqual(expected, actual);
        }