public void ByDescending_WithColumnName_SetsOrderByProperty() { var builder = new OrderByBuilder("products"); builder.ByDescending("id"); builder.OrderBy.Should().BeEquivalentTo(new OrderBy("products", "id", SortDirection.Descending)); }
public void ByDescending_WhenColumnIsNull_ThrowsException() { var builder = new OrderByBuilder("table"); Action action = () => builder.ByDescending(null); action.Should() .Throw <ArgumentNullException>() .Which.ParamName.Should() .Be("column"); }