package app; import app.entities.VipGiveMethod; import org.junit.Test; public class EnumTest { @Test public void check() { assert VipGiveMethod.valueOf("free".toUpperCase()).ordinal() == VipGiveMethod.FREE.ordinal(); assert VipGiveMethod.valueOf("qiwi".toUpperCase()).ordinal() == VipGiveMethod.QIWI.ordinal(); assert VipGiveMethod.valueOf("steam".toUpperCase()).ordinal() == VipGiveMethod.STEAM.ordinal(); assert VipGiveMethod.valueOf("manual".toUpperCase()).ordinal() == VipGiveMethod.MANUAL.ordinal(); } }