public void CriteriaFactory_SetSearchCriteria_LessThan_AreObjectChangedCorrectly()
        {
            var expectedState = new Criteria
            {
                Value = "1990",
                ComparisonType = Criteria.Operation.Less,
                Name = "Year-isLessThan-1990",
                Description = "Used to find books released before 1990",
                Tag = "ReleaseYear"
            };

            //Act
            criteria = criteriaFactory.CreateEmptyCriteria("Year-isLessThan-1990",
                "Used to find books released before 1990");
            criteriaFactory.SetSearchCriteria_LessThan(criteria, "ReleaseYear", 1990);

            //Test
            Assert.IsTrue(criteria.Equals(expectedState));
        }
        public void CriteriaFactory_SetSearchCriteria_ContainsString_AreObjectChangedCorrectly()
        {
            // Arrange 
            var criteria = new Criteria
            {
                Value = "Computer science",
                ComparisonType = Criteria.Operation.Contains,
                Name = "Summary-Contians-Computer science",
                Tag = "Summary",
                Description = "Used to find usage of the word 'Computer science'"
            };

            //Act
            criteria = criteriaFactory.CreateEmptyCriteria("Summary-Contians-Computer science",
                "Used to find usage of the word 'Computer science'");
            criteriaFactory.SetSearchCriteria_ContainsString(criteria, "Summary", "Computer Science");

            //Test

            Assert.IsTrue(criteria.Equals(criteria));
        }
        public void CriteriaFactory_SetSearchCriteria_Equals_AreObjectChangedCorrectly_TestedWithAStringInsteadOfInt()
        {
            var expectedState = new Criteria
            {
                Value = "1990",
                ComparisonType = Criteria.Operation.Equals,
                Name = "Year-Equals-1990",
                Description = "Used to find books released in 1990",
                Tag = "ReleaseYear"
            };

            //Act
            criteria = criteriaFactory.CreateEmptyCriteria("Year-Equals-1990", "Used to find books released in 1990");
            criteriaFactory.SetSearchCriteria_Equals(criteria, "ReleaseYear", "1990");

            //Test
            Assert.IsTrue(criteria.Equals(expectedState));
        }