mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
Fixed magic "error switch" for unit tests
This commit is contained in:
parent
531b5bc569
commit
75cec526dc
1 changed files with 24 additions and 3 deletions
|
|
@ -27,17 +27,22 @@
|
|||
*/
|
||||
package mage.choices;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import mage.MageObject;
|
||||
import mage.Mana;
|
||||
import mage.ObjectColor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class ChoiceColor extends ChoiceImpl {
|
||||
|
||||
public static final ArrayList<String> colorChoices = new ArrayList<>();
|
||||
//public static final Set<String> colorChoices = new HashSet<>(); // JayDi85: uncomment 1 of 2 to broke unit tests find wrong tests (?)
|
||||
public static final ArrayList<String> colorChoices = new ArrayList<>();
|
||||
|
||||
static {
|
||||
colorChoices.add("Green");
|
||||
|
|
@ -52,9 +57,25 @@ public class ChoiceColor extends ChoiceImpl {
|
|||
}
|
||||
|
||||
public ChoiceColor(boolean required) {
|
||||
this(required, "Choose color");
|
||||
}
|
||||
|
||||
public ChoiceColor(boolean required, String chooseMessage){
|
||||
this(required, chooseMessage, "");
|
||||
}
|
||||
|
||||
public ChoiceColor(boolean required, String chooseMessage, MageObject source){
|
||||
this(required, chooseMessage, source.getIdName());
|
||||
}
|
||||
|
||||
public ChoiceColor(boolean required, String chooseMessage, String chooseSubMessage){
|
||||
super(required);
|
||||
|
||||
this.choices.addAll(colorChoices);
|
||||
this.message = "Choose color";
|
||||
//this.setChoices(colorChoices); // JayDi85: uncomment 2 of 2 to broke unit tests find wrong tests (?)
|
||||
|
||||
this.setMessage(chooseMessage);
|
||||
this.setSubMessage(chooseSubMessage);
|
||||
}
|
||||
|
||||
public ChoiceColor(final ChoiceColor choice) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue