public void AddSelect_PassesTableAndColumnToNameMethods()
        {
            _sut.AddSelect(Column, Table);

            Assert.Single(PassedTableNames.Where(t => t == Table.Name));
            Assert.Single(PassedColumnNames.Where(t => t == Column.Name));
        }
        public void AddWhere_PassesTableAndColumnToNameMethods()
        {
            _sut.AddWhere(Column, Table, "", Operator.And);

            Assert.Single(PassedTableNames.Where(t => t == Table.Name));
            Assert.Single(PassedColumnNames.Where(t => t == Column.Name));
        }
        public void AddJoinWithStringColumn_PassesTableToNameMethods()
        {
            _sut.AddJoin(Column.Name, Table, JoinType.Inner);

            Assert.Empty(PassedColumnNames.Where(c => c == Column.Name));
            Assert.Single(PassedTableNames.Where(t => t == Table.Name));
        }
        public void AddJoin_PassesTableAndColumnToNameMethods()
        {
            _sut.AddJoin(Column, Table, JoinType.Inner);

            Assert.Single(PassedColumnNames.Where(c => c == Column.Name));
            Assert.Single(PassedTableNames.Where(t => t == Table.Name));
        }
        public void AddOrderBy_PassesTableAndColumnToNameMethods()
        {
            _sut.AddOrderBy(Column, Table, Order.ASC);

            Assert.Single(PassedTableNames.Where(t => t == Table.Name));
            Assert.Single(PassedColumnNames.Where(t => t == Column.Name));
        }
        public void AddJoinLeftAndRightWithStringColumns_PassesTablesToNameMethods()
        {
            _sut.AddJoin(Column.Name, Table, LeftColumn.Name, LeftTable, JoinType.Inner);

            Assert.Empty(PassedColumnNames.Where(c => c == Column.Name || c == LeftColumn.Name));
            Assert.Single(PassedTableNames.Where(t => t == Table.Name));
            Assert.Single(PassedTableNames.Where(t => t == LeftTable.Name));
        }
        public void AddSelectWithStringColumn_PassesTableToNameMethods()
        {
            var column = "column";

            _sut.AddSelect(column, Table);

            Assert.Empty(PassedColumnNames.Where(t => t == column));
            Assert.Single(PassedTableNames.Where(t => t == Table.Name));
        }
 public void Constructor_StartTableStringPassedToTableNameMethod()
 {
     Query.FromTable <Table>();
     Assert.NotNull(PassedTableNames.Single(t => t == nameof(Table)));
 }