Skip to content

Commit

Permalink
Fix LRS retrieve profile methods
Browse files Browse the repository at this point in the history
* Similar fix to previous one for State where the profile itself wasn't
  attached to the LRS response object in the content
* Added unit test assertion to confirm LRS response content is correct
  kind of requested document
  • Loading branch information
brianjmiller committed Nov 16, 2015
1 parent 9ad2c6d commit c38178a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions TinCan/RemoteLRS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@ public ActivityProfileLRSResponse RetrieveActivityProfile(String id, Activity ac
return r;
}
r.success = true;
r.content = profile;

return r;
}
Expand Down Expand Up @@ -705,6 +706,7 @@ public AgentProfileLRSResponse RetrieveAgentProfile(String id, Agent agent)
return r;
}
r.success = true;
r.content = profile;

return r;
}
Expand Down
3 changes: 3 additions & 0 deletions TinCanTests/RemoteLRSResourceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ public void TestRetrieveState()
{
StateLRSResponse lrsRes = lrs.RetrieveState("test", Support.activity, Support.agent);
Assert.IsTrue(lrsRes.success);
Assert.IsInstanceOf<TinCan.Documents.StateDocument>(lrsRes.content);
}

[Test]
Expand Down Expand Up @@ -275,6 +276,7 @@ public void TestRetrieveActivityProfile()
{
ActivityProfileLRSResponse lrsRes = lrs.RetrieveActivityProfile("test", Support.activity);
Assert.IsTrue(lrsRes.success);
Assert.IsInstanceOf<TinCan.Documents.ActivityProfileDocument>(lrsRes.content);
}

[Test]
Expand Down Expand Up @@ -312,6 +314,7 @@ public void TestRetrieveAgentProfile()
{
AgentProfileLRSResponse lrsRes = lrs.RetrieveAgentProfile("test", Support.agent);
Assert.IsTrue(lrsRes.success);
Assert.IsInstanceOf<TinCan.Documents.AgentProfileDocument>(lrsRes.content);
}

[Test]
Expand Down

0 comments on commit c38178a

Please sign in to comment.