private void TestInfo(SearchInfos infos, SearchInfos expected) { Assert.AreEqual(expected.count, infos.count); Assert.AreEqual(expected.orderByClause, infos.orderByClause); Assert.AreEqual(expected.resource, infos.resource); Assert.AreEqual(expected.skip, infos.skip); Assert.AreEqual(expected.take, infos.take); Assert.AreEqual(expected.whereClause.ToString(), infos.whereClause.ToString()); CollectionAssert.AreEqual(expected.whereParameters, infos.whereParameters); }
public AdvancedSearch() { Infos = new SearchInfos(); Infos.skip = 0; Infos.take = 100; count = false; where = false; limit = false; orderby = false; appendHomeCalled = false; dict = new Dictionary <string, Func <int, bool> >() { { keywords[0], new Func <int, bool>(limitFunc) }, { keywords[1], new Func <int, bool>(whereFunc) }, { keywords[2], new Func <int, bool>(andFunc) }, { keywords[3], new Func <int, bool>(orFunc) }, { keywords[4], new Func <int, bool>(countFunc) }, { keywords[5], new Func <int, bool>(orderbyFunc) }, }; }
public AdvancedSearch() { Infos = new SearchInfos(); Infos.skip = 0; Infos.take = 100; count = false; where = false; limit = false; orderby = false; appendHomeCalled = false; dict = new Dictionary<string, Func<int, bool>>() { {keywords[0], new Func<int, bool>(limitFunc)}, {keywords[1], new Func<int, bool>(whereFunc)}, {keywords[2], new Func<int, bool>(andFunc)}, {keywords[3], new Func<int, bool>(orFunc)}, {keywords[4], new Func<int, bool>(countFunc)}, {keywords[5], new Func<int, bool>(orderbyFunc)}, }; }