Esempio n. 1
0
        public void HistoryForWholeSystem()
        {
            if (CreateDate == null)
            {
                TestResult.Skip();
            }
            var    before = CreateDate.Value.AddMinutes(-1);
            Bundle history;


            history = client.WholeSystemHistory(before);
            HttpTests.AssertEntryIdsArePresentAndAbsoluteUrls(history);

            HttpTests.AssertHasAllForwardNavigationLinks(history); // Assumption: system has more history than pagesize
            systemHistory = history;
            checkSortOrder(history);

            var historyLinks = history.Entries.Select(be => be.SelfLink).ToArray();

            if (!Versions.All(sl => historyLinks.Contains(sl)))
            {
                TestResult.Fail("history with _since does not contain all versions of instance");
            }

            history = client.History(location, DateTimeOffset.Now.AddMinutes(1));

            if (history.Entries.Count != 0)
            {
                TestResult.Fail("Setting since to a future moment still returns history");
            }
        }