public void ThenByOrdered_IQueryable_ShouldReturnCorrectResult() { var specification = _orderValue1Asc.ThenBy(_orderValue2Asc); var result = _fixture.Query.ExeSpec(specification).ToList(); result.Count.ShouldBe(4); result[0].Value1.ShouldBe(1); result[1].Value1.ShouldBe(2); result[1].Value2.ShouldBe(1); result[2].Value1.ShouldBe(2); result[2].Value2.ShouldBe(2); result[3].Value1.ShouldBe(3); }
public void ExeSpecMultipleSort_IQueryable_ShouldReturnCorrectResult() { var result = _fixture.Query .ExeSpec(_orderValue1Asc.ThenBy(_orderValue2Asc)) .ToList(); result.Count.Should().Be(4); result[0].Value1.Should().Be(1); result[1].Value1.Should().Be(2); result[1].Value2.Should().Be(1); result[2].Value1.Should().Be(2); result[2].Value2.Should().Be(2); result[3].Value1.Should().Be(3); }