@Test public void NoMWLNoRotation_OnlylegalCards_PassesValidation(){ MostWantedList mwl = new MostWantedList(); DeckValidator validator = new DeckValidator(mwl); Card idCard = new CardBuilder("").withCode("idCard").withSetCode(legalSetCode).Build(); Format format = new FormatBuilder().asCoreExperience().Build(); Deck deck = new Deck(idCard, format); Card legalCard = new CardBuilder("").withSetCode(legalSetCode).Build(); assertTrue(format.getPacks().contains(legalSetCode)); deck.updateCardCount(legalCard, 2); assertEquals(1, deck.getCards().size()); boolean valid = validator.validate(deck, packs); assertTrue(valid); }
public boolean validate(Deck deck, ArrayList<Pack> packs) { boolean mwlValid = mMostWantedList == null || CheckMwl(deck); boolean cardPoolValid = CheckCardPool(deck, packs); return mwlValid && cardPoolValid; }
DeckValidator { public boolean validate(Deck deck, ArrayList<Pack> packs) { boolean mwlValid = mMostWantedList == null || CheckMwl(deck); boolean cardPoolValid = CheckCardPool(deck, packs); return mwlValid && cardPoolValid; } }
DeckValidator { public boolean validate(Deck deck, ArrayList<Pack> packs) { boolean mwlValid = mMostWantedList == null || CheckMwl(deck); boolean cardPoolValid = CheckCardPool(deck, packs); return mwlValid && cardPoolValid; } DeckValidator(MostWantedList mwl); }
DeckValidator { public boolean validate(Deck deck, ArrayList<Pack> packs) { boolean mwlValid = mMostWantedList == null || CheckMwl(deck); boolean cardPoolValid = CheckCardPool(deck, packs); return mwlValid && cardPoolValid; } DeckValidator(MostWantedList mwl); boolean validate(Deck deck, ArrayList<Pack> packs); }
DeckValidator { public boolean validate(Deck deck, ArrayList<Pack> packs) { boolean mwlValid = mMostWantedList == null || CheckMwl(deck); boolean cardPoolValid = CheckCardPool(deck, packs); return mwlValid && cardPoolValid; } DeckValidator(MostWantedList mwl); boolean validate(Deck deck, ArrayList<Pack> packs);  }