// -------------------------------------------------------------------------
 public void test_builder() {
   BondFutureTrade test = sut();
   assertEquals(test.getInfo(), TRADE_INFO);
   assertEquals(test.getProduct(), FUTURE);
   assertEquals(test.getQuantity(), QUANTITY);
   assertEquals(test.getPrice(), PRICE);
 }
 static BondFutureTrade sut2() {
   return BondFutureTrade.builder()
       .info(TRADE_INFO2)
       .product(FUTURE2)
       .quantity(QUANTITY2)
       .price(PRICE2)
       .build();
 }
Exemple #3
0
 /**
  * Restricted copy constructor.
  *
  * @param beanToCopy the bean to copy from, not null
  */
 private Builder(BondFutureTrade beanToCopy) {
   this.info = beanToCopy.getInfo();
   this.product = beanToCopy.getProduct();
   this.quantity = beanToCopy.getQuantity();
   this.price = beanToCopy.getPrice();
 }