예제 #1
0
        public virtual void test_currentCash_zero()
        {
            ImmutableRatesProvider            prov = ImmutableRatesProvider.builder(VAL_DATE).discountCurve(GBP, DISCOUNT_CURVE_GBP).build();
            DiscountingNotionalExchangePricer test = DiscountingNotionalExchangePricer.DEFAULT;
            double computed = test.currentCash(NOTIONAL_EXCHANGE_REC_GBP, prov);

            assertEquals(computed, 0d);
        }
예제 #2
0
        public virtual void test_currentCash_onPayment()
        {
            ImmutableRatesProvider            prov = ImmutableRatesProvider.builder(NOTIONAL_EXCHANGE_REC_GBP.PaymentDate).discountCurve(GBP, DISCOUNT_CURVE_GBP).build();
            DiscountingNotionalExchangePricer test = DiscountingNotionalExchangePricer.DEFAULT;
            double notional = NOTIONAL_EXCHANGE_REC_GBP.PaymentAmount.Amount;
            double computed = test.currentCash(NOTIONAL_EXCHANGE_REC_GBP, prov);

            assertEquals(computed, notional);
        }