OpenPojo / openpojo

POJO Testing & Identity Management Made Trivial
http://openpojo.com
Apache License 2.0
156 stars 40 forks source link

Should this work with getters on enums #105

Open simonreye opened 7 years ago

simonreye commented 7 years ago

Occasionally I have enums that have getters. I tried using openpojo to test the enum but it didn't seem to run any tests over the getters.

An example enum is:

public enum EventCategory { ADVISORY( Color.BLACK, Color.BLUE, 1 ), WARNING( Color.BLACK, Color.YELLOW, 2 ), ALARM( Color.WHITE, Color.RED, 3 );

private final int priority;
private final Color foregroundColour;
private final Color backgroundColour;

private EventCategory( Color foregroundColour, Color backgroundColour, int priority )
{
    this.priority = priority;
    this.foregroundColour = foregroundColour;
    this.backgroundColour = backgroundColour;
}

public int getPriority()
{
    return priority;
}

public Color getForegroundColour()
{
    return foregroundColour;
}

public Color getBackgroundColour()
{
    return backgroundColour;
}

}

gongzelong0718 commented 5 years ago

Could you plz reformat your issue?