public virtual void test_of_2argsAdjustable() { AdjustablePayment test = AdjustablePayment.of(GBP_P1000, DATE_2015_06_28_ADJ); assertEquals(test.Value, GBP_P1000); assertEquals(test.Currency, GBP); assertEquals(test.Amount, 1_000, 0d); assertEquals(test.Date, DATE_2015_06_28_ADJ); }
//------------------------------------------------------------------------- public virtual void test_of_3argsFixed() { AdjustablePayment test = AdjustablePayment.of(GBP, 1000, DATE_2015_06_30); assertEquals(test.Value, GBP_P1000); assertEquals(test.Currency, GBP); assertEquals(test.Amount, 1_000, 0d); assertEquals(test.Date, DATE_2015_06_30_FIX); }
//------------------------------------------------------------------------- public virtual void coverage() { AdjustablePayment test = AdjustablePayment.of(GBP_P1000, DATE_2015_06_30); coverImmutableBean(test); AdjustablePayment test2 = AdjustablePayment.of(EUR_P1600, DATE_2015_06_28_ADJ); coverBeanEquals(test, test2); }
public virtual void test_serialization() { AdjustablePayment test = AdjustablePayment.of(GBP_P1000, DATE_2015_06_30); assertSerialization(test); }
//------------------------------------------------------------------------- public virtual void test_negated() { AdjustablePayment test = AdjustablePayment.ofReceive(GBP_P1000, DATE_2015_06_30); assertEquals(test.negated(), AdjustablePayment.of(GBP_M1000, DATE_2015_06_30)); }
//------------------------------------------------------------------------- /// <summary> /// Returns a copy of this payment with the value negated. /// <para> /// This takes this payment and negates it. /// </para> /// <para> /// This instance is immutable and unaffected by this method. /// /// </para> /// </summary> /// <returns> a payment based on this with the value negated </returns> public AdjustablePayment negated() { return(AdjustablePayment.of(value.negated(), date)); }