コード例 #1
0
        public void VendorSearcherSearchVendorsByStringReturnsPartialMatchForProduct()
        {
            IList <Vendor> testListPartial = VendorSearcher.SearchVendorsByString(vendors, "prod abd");

            bool validMatch = testListPartial.Count == 1 && testListPartial[0].ProductCategories[0].ProductCategory.ToLower().Contains("prod");

            Assert.True(validMatch, "vendor searcher search vendor by string should return a valid match according to product");
        }
コード例 #2
0
        public void VendorSearcherSearchVendorsByStringReturnsFullMatchForName()
        {
            IList <Vendor> testListPartial = VendorSearcher.SearchVendorsByString(vendors, "vendor one abcdefg");

            bool validMatch = testListPartial.Count == 1 && testListPartial[0].Name.ToLower().Equals("vendor one");

            Assert.True(validMatch, "vendor searcher search vendor by string should return a valid full-match according to name");
        }
コード例 #3
0
        public void VendorSearcherSearchVendorsByStringReturnsPartialMatchForKeyword()
        {
            IList <Vendor> testListPartial = VendorSearcher.SearchVendorsByString(vendors, "key abcdefg");

            bool validMatch = testListPartial.Count == 1 && testListPartial[0].KeyWords[0].Keyword.ToLower().Contains("key");

            Assert.True(validMatch, "vendor searcher search vendor by string should return a valid match according to keyword");
        }