public IWhereSingleColumn OrWhere(string column) { if (string.IsNullOrEmpty(column)) { throw new ArgumentException(ExceptionMessages.ArgumentNullOrEmpty.FormatWith("column")); } this.Operand = " OR"; this.WhereColumnName = this.SqlCharacters.EscapeSql(column); return this; }
public void OrWhereThrowsArgumentExceptionForNullPredicate() { var sqlBuilder = new SelectSqlBuilder(SqlCharacters.Empty); var exception = Assert.Throws<ArgumentException>( () => sqlBuilder.OrWhere(null, new object())); Assert.Equal(ExceptionMessages.ArgumentNullOrEmpty.FormatWith("predicate"), exception.Message); }