Browse souce code repository at: https://github.com/jjYBdx4IL/java-evaluation/blob/master/src/test/java/tests/java/lang/enumeration/ValueOfTest.java
/*
 * #%L
 * Evaluation
 * %%
 * Copyright (C) 2016 Github jjYBdx4IL Projects
 * %%
 * #L%
 */
package tests.java.lang.enumeration;

import static org.junit.Assert.*;

import org.junit.Test;

/**
 *
 * @author Github jjYBdx4IL Projects
 */
public class ValueOfTest {

    @Test
    public void test() {
        assertEquals("1", TestEnum.ONE.toString());
        try {
            TestEnum.valueOf("1");
            fail();
        } catch(IllegalArgumentException ex) {}
        assertEquals(TestEnum.ONE, TestEnum.valueOf("ONE"));
    }
}
-------------------------------------------------------------------------------
Test set: tests.java.lang.enumeration.ValueOfTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in tests.java.lang.enumeration.ValueOfTest
test  Time elapsed: 0 s