/** * Tests the behavior of the {@link DifferenceSource#get(java.lang.String)} method. * * @generated */ @Test public void testGetString() { for (DifferenceSource value : DifferenceSource.VALUES) { assertSame(DifferenceSource.get(value.getLiteral()), value); } assertNull(DifferenceSource.get("ThisIsNotAValueOfTheTestedEnum")); }
/** * Tests the behavior of the {@link DifferenceSource#get(int)} method. * * @generated */ @Test public void testGetInt() { int highestValue = -1; for (DifferenceSource value : DifferenceSource.VALUES) { assertSame(DifferenceSource.get(value.getValue()), value); if (value.getValue() > highestValue) { highestValue = value.getValue(); } } assertNull(DifferenceSource.get(++highestValue)); }