/** * Sets amount_total. * @param option the value, or <code>null</code> to set this property to <code>null</code> */ @SuppressWarnings("deprecation") public void setAmountTotalOption(LongOption option) { this.amountTotal.copyFrom(option); } /**
/** * Sets selling_price_total. * @param option the value, or <code>null</code> to set this property to <code>null</code> */ @SuppressWarnings("deprecation") public void setSellingPriceTotalOption(LongOption option) { this.sellingPriceTotal.copyFrom(option); } @Override
/** * test for copyFrom w/ null. */ @Test public void copyNull() { LongOption option = new LongOption(); option.modify(100); LongOption other = new LongOption(); option.copyFrom(other); assertThat(option.isNull(), is(true)); option.modify(100); option.copyFrom(null); assertThat(option.isNull(), is(true)); }
/** * test for copyFrom. */ @Test public void copy() { LongOption option = new LongOption(); LongOption other = new LongOption(); other.modify(50); option.copyFrom(other); assertThat(option.get(), is(50L)); option.modify(0); assertThat(other.get(), is(50L)); }