protected override void BecauseOf()
        {
            base.BecauseOf();

            _lineItemToAdd = ExpenseLineItem.create()
                .complete();

            Expense.AddLineItem(_lineItemToAdd);

            _expenseDto = Expense.ToDto();
            _expenseLineItemDto = _lineItemToAdd.ToDto(_expenseDto);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Adds a line item to this expense.
 /// </summary>
 /// <param name="item">The item.</param>
 /// <returns></returns>
 public Expense AddLineItem(ExpenseLineItem item)
 {
     LineItems.Add(item);
     return this;
 }