private void TestSort(IMember member, JobAdSearchSortCriteria criteria, params JobAd[] expectedResults)
        {
            var execution = _executeJobAdSortCommand.SortFlagged(member, criteria, new Range(0, expectedResults.Length + 1));

            Assert.AreEqual(expectedResults.Length, execution.Results.TotalMatches);
            Assert.AreEqual(expectedResults.Length, execution.Results.JobAdIds.Count);
            for (var index = 0; index < expectedResults.Length; index++)
            {
                Assert.AreEqual(expectedResults[index].Id, execution.Results.JobAdIds[index], string.Format("Result {0} did not match", index));
            }
        }
示例#2
0
 private ICollection <Guid> Sort(IMember member, JobAdSearchSortCriteria criteria)
 {
     return(_executeJobAdSortCommand.SortFlagged(member, criteria, new Range(0, 10)).Results.JobAdIds);
 }