@Test public void OnAddExtras_WhenACardIsNotCommon_CountIsSumOfBoth() { CardList listOne = new CardList(); Card c = new CardBuilder().withCode("1234").Build(); listOne.add(c); CardList listTwo = new CardList(); Card c2 = new CardBuilder().withCode("2345").Build(); Card c3 = new CardBuilder().withCode("3456").Build(); listTwo.add(c3); listTwo.add(c2); listOne.addExtras(listTwo); assertEquals(3, listOne.size()); }
public void addExtras(ArrayList<Card> cards) { this.removeAll(cards); this.addAll(cards); }
CardList extends ArrayList<Card> { public void addExtras(ArrayList<Card> cards) { this.removeAll(cards); this.addAll(cards); } }
CardList extends ArrayList<Card> { public void addExtras(ArrayList<Card> cards) { this.removeAll(cards); this.addAll(cards); }  }
CardList extends ArrayList<Card> { public void addExtras(ArrayList<Card> cards) { this.removeAll(cards); this.addAll(cards); }  CardList getIdentities(); CardList getIdentities(String sideCode); ArrayList<String> getFactions(); ArrayList<String> getSide(); ArrayList<String> getCardType(); ArrayList<String> getCardType(String side); Card getCard(String cardCode); CardList getPackCards(ArrayList<Pack> packList); void addExtras(ArrayList<Card> cards); ArrayList<String> getCodes(); }
CardList extends ArrayList<Card> { public void addExtras(ArrayList<Card> cards) { this.removeAll(cards); this.addAll(cards); }  CardList getIdentities(); CardList getIdentities(String sideCode); ArrayList<String> getFactions(); ArrayList<String> getSide(); ArrayList<String> getCardType(); ArrayList<String> getCardType(String side); Card getCard(String cardCode); CardList getPackCards(ArrayList<Pack> packList); void addExtras(ArrayList<Card> cards); ArrayList<String> getCodes();  }