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); }
public void OrWhereThrowsArgumentNullExceptionForEmptyArgs() { var sqlBuilder = new SelectSqlBuilder(SqlCharacters.Empty); var exception = Assert.Throws<ArgumentNullException>( () => sqlBuilder.OrWhere("x = ?", null)); Assert.Equal("args", exception.ParamName); }
public void OrWhereThrowsArgumentExceptionForEmptyColumn() { var sqlBuilder = new SelectSqlBuilder(SqlCharacters.Empty); var exception = Assert.Throws<ArgumentException>( () => sqlBuilder.OrWhere("")); Assert.Equal(ExceptionMessages.ArgumentNullOrEmpty.FormatWith("column"), exception.Message); }