public void ByDescending_WithSingleKey_SetsColumn() { var aliasGenerator = new DefaultAliasGenerator(); var builder = new SortKeyBuilder("products", aliasGenerator); builder.ByDescending("id", typeof(Guid)); builder.SortKey.Should().BeEquivalentTo(new SortKey("products", "id", "id", typeof(Guid), SortDirection.Descending)); }
public void ByDescending_WithThenBy_SetsColumn() { var aliasGenerator = new DefaultAliasGenerator(); var builder = new SortKeyBuilder("products", aliasGenerator); builder.ByDescending("sortOrder", typeof(int)).ThenBy("id", typeof(Guid)); builder.SortKey.Should().BeEquivalentTo(new SortKey("products", "sortOrder", "sortOrder", typeof(int), SortDirection.Descending) { ThenBy = new SortKey("products", "id", "id", typeof(Guid), SortDirection.Ascending) }); }