public void Should_make_orderby_with_single_field() { var i = S(SortBuilder.Descending("data/age/iv")); var o = C("{ 'do.4.iv' : -1 }"); Assert.Equal(o, i); }
public void Should_make_orderby_with_multiple_fields() { var i = S(SortBuilder.Ascending("data/age/iv"), SortBuilder.Descending("data/firstName/en")); var o = C("{ 'do.4.iv' : 1, 'do.1.en' : -1 }"); Assert.Equal(o, i); }
public void Should_make_orderby_with_single_field() { var i = S(SortBuilder.Descending("lastModified")); var o = C("{ 'LastModified' : -1 }"); Assert.Equal(o, i); }
public void Should_make_orderby_with_multiple_fields() { var i = S(SortBuilder.Ascending("lastModified"), SortBuilder.Descending("lastModifiedBy")); var o = C("{ 'LastModified' : 1, 'LastModifiedBy' : -1 }"); Assert.Equal(o, i); }
public void Should_make_orderby_with_multiple_fields() { var sorting1 = SortBuilder.Ascending("Number"); var sorting2 = SortBuilder.Descending("Text"); AssertSorting("{ 'Number' : 1, 'Text' : -1 }", sorting1, sorting2); }
public void Should_make_orderby_with_multiple_fields() { var sorting1 = SortBuilder.Ascending("created"); var sorting2 = SortBuilder.Descending("createdBy"); AssertSorting("{ 'ct' : 1, 'cb' : -1 }", sorting1, sorting2); }
public void Should_make_orderby_with_multiple_fields() { var sorting1 = SortBuilder.Ascending("data/age/iv"); var sorting2 = SortBuilder.Descending("data/firstName/en"); AssertSorting("{ 'do.age.iv' : 1, 'do.firstName.en' : -1 }", sorting1, sorting2); }
public void Should_make_orderby_with_single_field() { var sorting = SortBuilder.Descending("Number"); AssertSorting("{ 'Number' : -1 }", sorting); }
public void Should_make_orderby_with_single_field() { var sorting = SortBuilder.Descending("data/age/iv"); AssertSorting("{ 'do.age.iv' : -1 }", sorting); }