@Test public void testIsNameUniqueSpecialCharacters() { groceryCartService.addToShoppingList("Ham", 32); assertTrue("isNameUnique should not honor wildcards", groceryCartService.isNameUnique(".*")); }
@Test public void testIsNameUniqueWildCard() { groceryCartService.addToShoppingList("Ham", 32); assertTrue( "isNameUnique should not honor db wildcards", groceryCartService.isNameUnique("%a%")); }
@Test public void testIsNameUniqueFalsePositive() { groceryCartService.addToShoppingList("Ham", 32); assertTrue( "False positive when checking for unique name", groceryCartService.isNameUnique("Eggs")); }
@Test public void testIsNameUniqueDuplicate() { groceryCartService.addToShoppingList("Ham", 32); assertFalse( "Failed to identify existing name as not unique", groceryCartService.isNameUnique("Ham")); }
@Test public void testIsNameUniqueEmpty() { groceryCartService.addToShoppingList("Ham", 32); assertTrue("isNameUnique should not match empty searches", groceryCartService.isNameUnique("")); }
@Test public void testIsNameUniqueNull() { groceryCartService.addToShoppingList("Ham", 32); assertTrue("isNameUnique should not match null", groceryCartService.isNameUnique(null)); }