// ------------------------------------------------------------------------- public void coverage() { FxReset test = FxReset.of(FxIndexObservation.of(EUR_GBP_ECB, DATE_2014_06_30, REF_DATA), GBP); coverImmutableBean(test); FxReset test2 = FxReset.of(FxIndexObservation.of(EUR_USD_ECB, date(2014, 1, 15), REF_DATA), USD); coverBeanEquals(test, test2); FxReset test3 = FxReset.of(FxIndexObservation.of(EUR_USD_ECB, date(2014, 1, 15), REF_DATA), EUR); coverBeanEquals(test2, test3); }
public void test_invalidCurrency() { assertThrowsIllegalArg( () -> FxReset.meta() .builder() .set( FxReset.meta().observation(), FxIndexObservation.of(EUR_USD_ECB, DATE_2014_06_30, REF_DATA)) .set(FxReset.meta().referenceCurrency(), GBP) .build()); assertThrowsIllegalArg( () -> FxReset.of(FxIndexObservation.of(EUR_USD_ECB, DATE_2014_06_30, REF_DATA), GBP)); }
public void test_serialization() { FxReset test = FxReset.of(FxIndexObservation.of(EUR_GBP_ECB, DATE_2014_06_30, REF_DATA), GBP); assertSerialization(test); }
public void test_of() { FxReset test = FxReset.of(FxIndexObservation.of(EUR_GBP_ECB, DATE_2014_06_30, REF_DATA), GBP); assertEquals(test.getIndex(), EUR_GBP_ECB); assertEquals(test.getReferenceCurrency(), GBP); }