public List <Guid> GetSessionList() { int page = QueryParameters.GetPage(1); int rpp = QueryParameters.GetPageSize(1000); return(DataMarshal.GetSessions(page, rpp)); }
public void SessionCreateOrder() { int rpp = 100; HashSet <Guid> s = new HashSet <Guid>(); for (int page = 1; page <= 10; page++) { List <Guid> sessionList = DataMarshal.GetSessions(page, rpp); Turbine.Data.Session entity = null; DateTime dt = DateTime.Now; foreach (Guid guid in sessionList) { Assert.IsFalse(s.Contains <Guid>(guid)); s.Add(guid); entity = DataMarshal.GetSessionMeta(guid); Debug.WriteLine(entity.Id); // test Create Timestamp Assert.IsTrue(DateTime.Compare(dt, entity.Create) <= 0, "Session '" + guid + "'Out of Order"); dt = entity.Create; } Assert.IsTrue(sessionList.Count() == 100); } }
public void SessionPageLargeRppLast() { int page = -1; int rpp = 10000; List <Guid> sessionList = DataMarshal.GetSessions(page, rpp); Assert.IsTrue(sessionList.Count() == 1001, "Count was " + sessionList.Count()); }
public void SessionPageLargeRppZeroResults() { int page = 2; int rpp = 10000; List <Guid> sessionList = DataMarshal.GetSessions(page, rpp); Assert.IsTrue(sessionList.Count() == 0, "Count was " + sessionList.Count()); }
public List <Guid> GetSessionList() { int page = QueryParameters_GetPage(1); int rpp = QueryParameters_GetPageSize(1000); Debug.WriteLine("GET Session List"); return(DataMarshal.GetSessions(page, rpp)); }
public void SessionCreateOrderLastPage() { int page = -1; int rpp = 100; List <Guid> sessionList = DataMarshal.GetSessions(page, rpp); Assert.IsTrue(sessionList.Count() == 1, "Count was " + sessionList.Count()); List <Guid> sessionList2 = DataMarshal.GetSessions(11, rpp); Assert.IsTrue(sessionList.Count() == 1); for (int i = 0; i < sessionList.Count(); i++) { Assert.AreEqual(sessionList.ElementAt <Guid>(i), sessionList2.ElementAt <Guid>(i)); } }