@Test(dataProvider = "name") public void test_of_lookup(EtdOptionType convention, String name) { assertEquals(EtdOptionType.of(name), convention); }
@Test(dataProvider = "name") public void test_toString(EtdOptionType convention, String name) { assertEquals(convention.toString(), name); }
String dateCodeStr = dateCode < 10 ? "0" + dateCode : Integer.toString(dateCode); String settlementCode = settlementType != null ? settlementType.getCode() : ""; String optionCode = optionType != null ? optionType.getCode() : ""; this.code = dateCodeStr + settlementCode + optionCode;
public void test_of_lookup_notFound() { assertThrows(() -> EtdOptionType.of("Rubbish"), IllegalArgumentException.class); }
public void test_of_lookup_null() { assertThrows(() -> EtdOptionType.of(null), IllegalArgumentException.class); }