Пример #1
0
        public void print_deposit()
        {
            var deposit = new Deposit(400m, "20/08/2016");

            _statement.Add(deposit);

            _statement.PrintWith(_statementPrinter);

            _statementPrinter.Received().Visit(deposit);
        }
Пример #2
0
        public Node OneStatement()
        {
            var exprList = new Statement();

            exprList.Add(Expression());
            return(exprList);
        }
Пример #3
0
        public IOrderByState OrderBy(string column)
        {
            Argument.NotWhiteSpace(column, "column");
            var newItem = new ColumnOrder(column);

            return(new OrderByState(Statement.Add(newItem)));
        }
Пример #4
0
        public IOrderByInDirectionState InDirection(OrderDirection direction)
        {
            var replaceItem = Statement.Order.InternalNodes.LastOrDefault();

            if (replaceItem == null)
            {
                throw new Exception();
            }
            var replaceOrderByListItem = replaceItem as ColumnOrder;

            if (replaceOrderByListItem == null)
            {
                throw new Exception();
            }
            var newItem = new ColumnOrder(replaceOrderByListItem.Column, direction);

            return(new OrderByState(Statement.Add(newItem)));
        }
Пример #5
0
 public void Save(Transaction transaction)
 {
     _statement.Add(transaction);
 }