public virtual void test_ofPayAdjustable()
        {
            AdjustablePayment test = AdjustablePayment.ofPay(GBP_P1000, DATE_2015_06_28_ADJ);

            assertEquals(test.Value, GBP_M1000);
            assertEquals(test.Currency, GBP);
            assertEquals(test.Amount, -1_000, 0d);
            assertEquals(test.Date, DATE_2015_06_28_ADJ);
        }
        //-------------------------------------------------------------------------
        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_of_2argsFixed()
        {
            AdjustablePayment test = AdjustablePayment.of(GBP_P1000, 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);
        }
Exemple #4
0
 //-----------------------------------------------------------------------
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj != null && obj.GetType() == this.GetType())
     {
         AdjustablePayment other = (AdjustablePayment)obj;
         return(JodaBeanUtils.equal(value, other.value) && JodaBeanUtils.equal(date, other.date));
     }
     return(false);
 }
        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));
        }
        //-------------------------------------------------------------------------
        public virtual void test_resolve()
        {
            AdjustablePayment test = AdjustablePayment.ofReceive(GBP_P1000, DATE_2015_06_28_ADJ);

            assertEquals(test.resolve(REF_DATA), Payment.of(GBP_P1000, DATE_2015_06_29));
        }
Exemple #8
0
 //-------------------------------------------------------------------------
 /// <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));
 }