//------------------------------------------------------------------------- public virtual void test_withQuantity() { FixedCouponBondTrade @base = sut(); double quantity = 75343d; FixedCouponBondTrade computed = @base.withQuantity(quantity); FixedCouponBondTrade expected = FixedCouponBondTrade.builder().info(TRADE_INFO).product(PRODUCT).quantity(quantity).price(PRICE).build(); assertEquals(computed, expected); }
//------------------------------------------------------------------------- public virtual void test_builder_resolved() { FixedCouponBondTrade test = sut(); assertEquals(test.Product, PRODUCT); assertEquals(test.Info, TRADE_INFO); assertEquals(test.Quantity, QUANTITY); assertEquals(test.Price, PRICE); assertEquals(test.withInfo(TRADE_INFO).Info, TRADE_INFO); assertEquals(test.withQuantity(129).Quantity, 129d, 0d); assertEquals(test.withPrice(129).Price, 129d, 0d); }