public async void ReturnAToolConsumerProfile_FromGetToolConsumerProfileAsync() { var clientResponse = await ToolConsumerProfileClient.GetToolConsumerProfileAsync(_client, "/ims/toolconsumerprofile"); Assert.Equal(HttpStatusCode.OK, clientResponse.StatusCode); JsonAssertions.AssertSameObjectJson(clientResponse.Response, "ToolConsumerProfile"); }
// LTI Tool Consumer Profiles allow the Tool Provider to ask the Tool Consumer what // services it provides. #region LTI 1.2 Tool Consumer Profile /// <summary> /// Return a ToolConsumerProfile. /// </summary> /// <param name="url">The ToolConsumerProfileUrl.</param> /// <remarks> /// The Tool Provider requests the ToolConsumerProfile. The Tool Consumer responds with a ToolConsumerProfile. /// LtiLibrary will return the ToolConsumerProfile in the appropriate format based on the Accept header. /// Tool Providers should specify the appropriate Accept header. /// </remarks> public async Task <ActionResult> GetToolConsumerProfile(string url) { var toolConsumerProfileResponse = await ToolConsumerProfileClient.GetToolConsumerProfile(url); return(View(toolConsumerProfileResponse)); //return Content(@"<table><tr><td><pre>" + toolConsumerProfileResponse.HttpRequest+ "</pre>"); }
public async void ReturnAToolConsumerProfile_FromGetToolConsumerProfileAsync() { var uri = new Uri(_client.BaseAddress, "ims/toolconsumerprofile"); var clientResponse = await ToolConsumerProfileClient.GetToolConsumerProfileAsync(_client, uri.AbsoluteUri); Assert.Equal(HttpStatusCode.OK, clientResponse.StatusCode); JsonAssertions.AssertSameObjectJson(clientResponse.Response, "ToolConsumerProfile"); }