/// <summary> ///A test for GetStatements ///</summary> //[TestMethod()] public void GetStatementsTest() { TinCanJsonConverter converter = new TinCanJsonConverter(); TCAPI target = new TCAPI("http://cloud.scorm.com/ScormEngineInterface/TCAPI/public", new BasicHTTPAuth("test", "password"), TCAPIVersion.TinCan090); StatementQueryObject queryObject = new StatementQueryObject(); queryObject.Actor = new Actor("Example", "mailto:[email protected]"); StatementResult actual; actual = target.GetStatements(queryObject); Console.Write(converter.SerializeToJSON(actual)); while (!String.IsNullOrEmpty(actual.More)) { actual = target.GetStatements(actual.More); Console.Write(converter.SerializeToJSON(actual)); //break; } Assert.Inconclusive(INCONCLUSIVE_CONSOLE); }
public void GetStatementsTest() { TinCanJsonConverter converter = new TinCanJsonConverter(); TCAPI target = new TCAPI(new Uri("http://cloud.scorm.com/tc/public"), new BasicHTTPAuth("test", "password"), TCAPIVersion.TinCan095); StatementQueryObject queryObject = new StatementQueryObject(); queryObject.Actor = new Actor("Example", "mailto:[email protected]"); queryObject.Since = new DateTime(2013, 6, 1); queryObject.Limit = 50; int limit = 0; StatementResult actual; actual = target.GetStatements(queryObject); limit = actual.Statements.Length; Console.Write(converter.SerializeToJSON(actual)); while (limit <= 50 && !string.IsNullOrEmpty(actual.More)) { actual = target.GetStatements(actual.More); Console.Write(converter.SerializeToJSON(actual)); limit += actual.Statements.Length; //break; } Assert.Inconclusive(INCONCLUSIVE_CONSOLE); }