public virtual void test_ofLongShort_withInfo() { SecurityPosition test = SecurityPosition.ofLongShort(POSITION_INFO, SECURITY_ID, LONG_QUANTITY, SHORT_QUANTITY); assertEquals(test.Info, POSITION_INFO); assertEquals(test.SecurityId, SECURITY_ID); assertEquals(test.LongQuantity, LONG_QUANTITY); assertEquals(test.ShortQuantity, SHORT_QUANTITY); assertEquals(test.Quantity, QUANTITY); }
public virtual void test_ofLongShort_noInfo() { SecurityPosition test = SecurityPosition.ofLongShort(SECURITY_ID, LONG_QUANTITY, SHORT_QUANTITY); assertEquals(test.Info, PositionInfo.empty()); assertEquals(test.SecurityId, SECURITY_ID); assertEquals(test.LongQuantity, LONG_QUANTITY); assertEquals(test.ShortQuantity, SHORT_QUANTITY); assertEquals(test.Quantity, QUANTITY); }