/** * Checks to see if any {@link ObjectCreator} has and additional invalid permutations that can be outputed. * * @return true if more invalid items are available from any creator, false otherwise. */ public boolean hasInvalidPermutations() { for (ObjectCreator<?> creator : creators) { if (creator.hasInvalidNext()) { return true; } } return false; }
/** * Checks to see if any {@link ObjectCreator} has and additional invalid permutations that can be outputed. * * @return true if more invalid items are available from any creator, false otherwise. */ public boolean hasInvalidPermutations() { for (ObjectCreator<?> creator : creators) { if (creator.hasInvalidNext()) { return true; } } return false; }
private void advanceToNextCreator() { creators[creatorIndex].setReturnOnlyValidItems(true); creatorIndex++; if (creators[creatorIndex].hasInvalidNext()) { creators[creatorIndex].setReturnOnlyValidItems(false); } else { advanceToNextCreator(); } } }
private void advanceToNextCreator() { creators[creatorIndex].setReturnOnlyValidItems(true); creatorIndex++; if (creators[creatorIndex].hasInvalidNext()) { creators[creatorIndex].setReturnOnlyValidItems(false); } else { advanceToNextCreator(); } } }
/** * Increment one of the invalid creators to the next valid item. This is different from the valid incrementor method * because for invalid items you want to get only one invalid object at a time to ensure that you test each invalid * item independently. This method also sets all other creators in the list to return valid items even if the * {@link ObjectCreator#getInvalidItem()} is called. */ public void incrementInvalidCreators() { if (creatorIndex >= creators.length) { return; } creators[creatorIndex].setReturnOnlyValidItems(false); if (creators[creatorIndex].hasInvalidNext()) { creators[creatorIndex].incrementInvalidNext(); } else { advanceToNextCreator(); } }
/** * Increment one of the invalid creators to the next valid item. This is different from the valid incrementor method * because for invalid items you want to get only one invalid object at a time to ensure that you test each invalid * item independently. This method also sets all other creators in the list to return valid items even if the * {@link ObjectCreator#getInvalidItem()} is called. */ public void incrementInvalidCreators() { if (creatorIndex >= creators.length) { return; } creators[creatorIndex].setReturnOnlyValidItems(false); if (creators[creatorIndex].hasInvalidNext()) { creators[creatorIndex].incrementInvalidNext(); } else { advanceToNextCreator(); } }
if (itemCreator.hasInvalidNext()) { addInvalidType(createInvalidArrayOfSize(maxSize, itemCreator)); addInvalidType(createInvalidArrayOfSize(minSize, itemCreator));
if (itemCreator.hasInvalidNext()) { addInvalidType(createInvalidArrayOfSize(maxSize, itemCreator)); addInvalidType(createInvalidArrayOfSize(minSize, itemCreator));
if (itemCreator.hasInvalidNext()) { addInvalidType(createInvalidCollectionOfSize(maxSize, itemCreator)); addInvalidType(createInvalidCollectionOfSize(minSize, itemCreator));
if (itemCreator.hasInvalidNext()) { addInvalidType(createInvalidCollectionOfSize(maxSize, itemCreator)); addInvalidType(createInvalidCollectionOfSize(minSize, itemCreator));