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"); }
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"); }
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"); }