From c38178a6db4104cfc0ca821d0900fce12f73b6c8 Mon Sep 17 00:00:00 2001 From: "Brian J. Miller" Date: Mon, 16 Nov 2015 14:19:19 -0600 Subject: [PATCH] Fix LRS retrieve profile methods * 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 --- TinCan/RemoteLRS.cs | 2 ++ TinCanTests/RemoteLRSResourceTest.cs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/TinCan/RemoteLRS.cs b/TinCan/RemoteLRS.cs index 33cbf11..af04955 100644 --- a/TinCan/RemoteLRS.cs +++ b/TinCan/RemoteLRS.cs @@ -655,6 +655,7 @@ public ActivityProfileLRSResponse RetrieveActivityProfile(String id, Activity ac return r; } r.success = true; + r.content = profile; return r; } @@ -705,6 +706,7 @@ public AgentProfileLRSResponse RetrieveAgentProfile(String id, Agent agent) return r; } r.success = true; + r.content = profile; return r; } diff --git a/TinCanTests/RemoteLRSResourceTest.cs b/TinCanTests/RemoteLRSResourceTest.cs index d6488f5..d6e0f58 100644 --- a/TinCanTests/RemoteLRSResourceTest.cs +++ b/TinCanTests/RemoteLRSResourceTest.cs @@ -229,6 +229,7 @@ public void TestRetrieveState() { StateLRSResponse lrsRes = lrs.RetrieveState("test", Support.activity, Support.agent); Assert.IsTrue(lrsRes.success); + Assert.IsInstanceOf(lrsRes.content); } [Test] @@ -275,6 +276,7 @@ public void TestRetrieveActivityProfile() { ActivityProfileLRSResponse lrsRes = lrs.RetrieveActivityProfile("test", Support.activity); Assert.IsTrue(lrsRes.success); + Assert.IsInstanceOf(lrsRes.content); } [Test] @@ -312,6 +314,7 @@ public void TestRetrieveAgentProfile() { AgentProfileLRSResponse lrsRes = lrs.RetrieveAgentProfile("test", Support.agent); Assert.IsTrue(lrsRes.success); + Assert.IsInstanceOf(lrsRes.content); } [Test]