Esempio n. 1
0
        public async Task <ActivityProfileLRSResponse> RetrieveActivityProfile(string id, Activity activity)
        {
            var r = new ActivityProfileLRSResponse();

            var queryParams = new Dictionary <string, string>();

            queryParams.Add("profileId", id);
            queryParams.Add("activityId", activity.id);

            var profile = new ActivityProfileDocument();

            profile.id       = id;
            profile.activity = activity;

            var resp = await GetDocument("activities/profile", queryParams, profile);

            if (resp.status != HttpStatusCode.OK && resp.status != HttpStatusCode.NotFound)
            {
                r.success       = false;
                r.httpException = resp.ex;
                r.SetErrMsgFromBytes(resp.content);
                return(r);
            }
            r.success = true;
            r.content = profile;

            return(r);
        }
Esempio n. 2
0
        public void TestRetrieveActivityProfile()
        {
            ActivityProfileLRSResponse lrsRes = lrs.RetrieveActivityProfile("test", Support.activity);

            Assert.IsTrue(lrsRes.success);
            Assert.IsInstanceOf <TinCan.Documents.ActivityProfileDocument>(lrsRes.content);
        }
        public async Task TestRetrieveActivityProfile()
        {
            ActivityProfileLRSResponse lrsRes = await lrs.RetrieveActivityProfile("test", Support.activity);

            Assert.True(lrsRes.success);
            Assert.IsType <ActivityProfileDocument>(lrsRes.content);
        }
Esempio n. 4
0
        public void TestRetrieveActivityProfile()
        {
            ActivityProfileLRSResponse lrsRes = lrs.RetrieveActivityProfile("test", Support.activity);

            Assert.IsTrue(lrsRes.success);
        }