//------------------------------------------------------------------------- public virtual void test_withQuantity() { DsfPosition @base = sut(); double quantity = 75343d; DsfPosition computed = @base.withQuantity(quantity); DsfPosition expected = DsfPosition.builder().info(POSITION_INFO).product(PRODUCT).longQuantity(quantity).build(); assertEquals(computed, expected); }
//------------------------------------------------------------------------- public virtual void test_builder_resolved() { DsfPosition test = sut(); assertEquals(test.Product, PRODUCT); assertEquals(test.Info, POSITION_INFO); assertEquals(test.LongQuantity, QUANTITY, 0d); assertEquals(test.ShortQuantity, 0d, 0d); assertEquals(test.Quantity, QUANTITY, 0d); assertEquals(test.withInfo(POSITION_INFO).Info, POSITION_INFO); assertEquals(test.withQuantity(129).Quantity, 129d, 0d); }