Skip to content

Commit

Permalink
One more rename for methods retrieveActivity and retrievePerson
Browse files Browse the repository at this point in the history
  • Loading branch information
dacdave authored and brianjmiller committed Dec 30, 2015
1 parent 3f95430 commit 9c8ba97
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/rusticisoftware/tincan/LRS.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ public interface LRS {
LRSResponse deleteState(StateDocument state);
LRSResponse clearState(Activity activity, Agent agent, UUID registration);

ActivityProfileLRSResponse retrieveFullActivity(Activity activity);
ActivityProfileLRSResponse retrieveActivity(Activity activity);
ProfileKeysLRSResponse retrieveActivityProfileIds(Activity activity);
ActivityProfileLRSResponse retrieveActivityProfile(String id, Activity activity);
LRSResponse saveActivityProfile(ActivityProfileDocument profile);
LRSResponse updateActivityProfile(ActivityProfileDocument profile);
LRSResponse deleteActivityProfile(ActivityProfileDocument profile);

AgentProfileLRSResponse retrieveCombinedPerson(Agent agent);
AgentProfileLRSResponse retrievePerson(Agent agent);
ProfileKeysLRSResponse retrieveAgentProfileIds(Agent agent);
AgentProfileLRSResponse retrieveAgentProfile(String id, Agent agent);
LRSResponse saveAgentProfile(AgentProfileDocument profile);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/rusticisoftware/tincan/RemoteLRS.java
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ public LRSResponse clearState(Activity activity, Agent agent, UUID registration)
}

@Override
public ActivityProfileLRSResponse retrieveFullActivity(Activity activity) {
public ActivityProfileLRSResponse retrieveActivity(Activity activity) {
HashMap<String, String> queryParams = new HashMap<String, String>();
queryParams.put("activityId", activity.getId().toString());
ActivityProfileDocument profileDocument = new ActivityProfileDocument();
Expand Down Expand Up @@ -776,7 +776,7 @@ public LRSResponse deleteActivityProfile(ActivityProfileDocument profile) {
}

@Override
public AgentProfileLRSResponse retrieveCombinedPerson(Agent agent) {
public AgentProfileLRSResponse retrievePerson(Agent agent) {
HashMap<String, String> queryParams = new HashMap<String, String>();
queryParams.put("agent", agent.toJSON(TCAPIVersion.V100));
AgentProfileDocument profileDocument = new AgentProfileDocument();
Expand Down
12 changes: 6 additions & 6 deletions src/test/java/com/rusticisoftware/tincan/RemoteLRSTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,8 @@ public void testClearState() throws Exception {
}

@Test
public void testRetrieveFullActivity() throws Exception {
ActivityProfileLRSResponse lrsResponse = lrs.retrieveFullActivity(activity);
public void testRetrieveActivity() throws Exception {
ActivityProfileLRSResponse lrsResponse = lrs.retrieveActivity(activity);
Assert.assertTrue(lrsResponse.getSuccess());

ActivityProfileDocument returnedDoc = lrsResponse.getContent();
Expand All @@ -536,7 +536,7 @@ public void testRetrieveFullActivity() throws Exception {
Activity noActivity = new Activity();
noActivity.setId("https://brindlewaye.com/xAPITerms/Activity/NeverGonnaHappen/");

ActivityProfileLRSResponse lrsResponse2 = lrs.retrieveFullActivity(noActivity);
ActivityProfileLRSResponse lrsResponse2 = lrs.retrieveActivity(noActivity);
// Report success even though response status was 404
Assert.assertTrue(lrsResponse2.getSuccess());
Assert.assertTrue(lrsResponse2.getResponse().getStatus() == 404);
Expand Down Expand Up @@ -695,8 +695,8 @@ public void testDeleteActivityProfile() throws Exception {
}

@Test
public void testRetrieveCombinedPerson() throws Exception {
AgentProfileLRSResponse lrsResponse = lrs.retrieveCombinedPerson(agent);
public void testRetrievePerson() throws Exception {
AgentProfileLRSResponse lrsResponse = lrs.retrievePerson(agent);
Assert.assertTrue(lrsResponse.getSuccess());

AgentProfileDocument returnedDoc = lrsResponse.getContent();
Expand All @@ -709,7 +709,7 @@ public void testRetrieveCombinedPerson() throws Exception {
noAgent.setMbox("mailto:[email protected]");
noAgent.setName("No One");

AgentProfileLRSResponse lrsResponse2 = lrs.retrieveCombinedPerson(noAgent);
AgentProfileLRSResponse lrsResponse2 = lrs.retrievePerson(noAgent);
Assert.assertTrue(lrsResponse2.getSuccess());
Assert.assertTrue(lrsResponse2.getResponse().getStatus() == 200);

Expand Down

0 comments on commit 9c8ba97

Please sign in to comment.