public void CreatesWherePartFromEqualsExpression() { var criteriaHelper = new CriteriaHelper(); var criteria = SimpleExpression.Equal(new Column("Name", new Table("Spaceship", new Container("db"))), "Heart of Gold"); var wherePart = criteriaHelper.ToWherePart(criteria); Assert.Equal("Spaceship.Name", $"{wherePart.Column.Table.Name}.{wherePart.Column.Name}"); }
public void CreatesWherePartFromEqualsExpression() { var criteriaHelper = new CriteriaHelper(); var criteria = SimpleExpression.Equal(new Column("Name", new Table("Spaceship", null)), "Heart of Gold"); var wherePart = criteriaHelper.ToWherePart(criteria); var actual = Postgres.SqlFormatter.FormatWherePart(wherePart); Assert.Equal("Spaceship.Name = @Name", actual); }