public void DateTimeBeforeTest()
        {
            var searchCriteria = new TestClassSearchCriteria
            {
                TestDateTimeFilter = new DateTimeSearchCriteria { SearchType = DateTimeSearchType.Before, Value = DateTime.MaxValue }
            };

            var searchResults = _testClassEnumeration.Search(searchCriteria);
            Assert.AreEqual(1, searchResults.Count());
            Assert.AreEqual(DateTime.MinValue, searchResults.First().TestDateTime);
        }
        public void DateTimeBeforeOrEqualsTest()
        {
            var searchCriteria = new TestClassSearchCriteria
            {
                TestDateTimeFilter = new DateTimeSearchCriteria { SearchType = DateTimeSearchType.BeforeOrEquals, Value = DateTime.MaxValue }
            };

            var searchResults = _testClassEnumeration.Search(searchCriteria);
            Assert.AreEqual(2, searchResults.Count());
            Assert.IsTrue(searchResults.Any(result => result.TestDateTime == DateTime.MinValue));
            Assert.IsTrue(searchResults.Any(result => result.TestDateTime == DateTime.MaxValue));
        }
        public void StringStartsWithTest()
        {
            var searchCriteria = new TestClassSearchCriteria
            {
                TestStringFilter = new StringSearchCriteria { SearchType = StringSearchType.StartsWith, Value = "A" }
            };

            var searchResults = _testClassEnumeration.Search(searchCriteria);
            Assert.AreEqual(1, searchResults.Count());
            Assert.AreEqual("AString", searchResults.First().TestString);
        }
        public void StringSearchTypeDoesNotExist()
        {
            var searchCriteria = new TestClassSearchCriteria
            {
                TestStringFilter = new StringSearchCriteria { SearchType = (StringSearchType) 613 }
            };

            try
            {
                _testClassEnumeration.Search(searchCriteria);
            }
            catch (ArgumentOutOfRangeException ex)
            {
                Assert.AreEqual("Specified argument was out of the range of valid values.\r\nParameter name: StringSearchType with value 613 hasn't been implemented.", ex.Message);
            }
        }
        public void StringNoneTest()
        {
            var searchCriteria = new TestClassSearchCriteria
            {
                TestStringFilter = new StringSearchCriteria { SearchType = StringSearchType.None }
            };

            var searchResults = _testClassEnumeration.Search(searchCriteria);
            Assert.AreEqual(26, searchResults.Count());
        }
        public void StringDoesNotEqualTest()
        {
            var searchCriteria = new TestClassSearchCriteria
            {
                TestStringFilter = new StringSearchCriteria { SearchType = StringSearchType.DoesNotEqual, Value = "DString" }
            };

            var searchResults = _testClassEnumeration.Search(searchCriteria);
            Assert.AreEqual(25, searchResults.Count());
        }