@Test(dataProvider = "name") public void test_extendedEnum(CurveInterpolator convention, String name) { ImmutableMap<String, CurveInterpolator> map = CurveInterpolator.extendedEnum().lookupAll(); assertEquals(map.get(name), convention); }
/** * Obtains an instance from the specified unique name. * * @param uniqueName the unique name * @return the index * @throws IllegalArgumentException if the name is not known */ @FromString public static CurveInterpolator of(String uniqueName) { ArgChecker.notNull(uniqueName, "uniqueName"); return extendedEnum().lookup(uniqueName); }