public async Task TestQueryStatements()
        {
            var query = new TinCan.StatementsQuery();

            query.agent             = Support.agent;
            query.verbId            = Support.verb.id;
            query.activityId        = Support.parent.id;
            query.relatedActivities = true;
            query.relatedAgents     = true;
            query.format            = StatementsQueryResultFormat.IDS;
            query.limit             = 10;

            StatementsResultLRSResponse lrsRes = await lrs.QueryStatements(query);

            Assert.True(lrsRes.success);
            Console.WriteLine("TestQueryStatements - statement count: " + lrsRes.content.statements.Count);
        }
示例#2
0
        public void TestMoreStatements()
        {
            var query = new StatementsQuery
            {
                Format = StatementsQueryResultFormat.IDS,
                Limit  = 2
            };

            var queryRes = _lrs.QueryStatements(query);

            if (queryRes.Success && queryRes.Content.More != null)
            {
                var moreRes = _lrs.MoreStatements(queryRes.Content);
                Assert.IsTrue(moreRes.Success);
                Console.WriteLine("TestMoreStatements - statement count: " + moreRes.Content.Statements.Count);
            }
        }