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