public void TestSummaryTypeMap(string summaryType, string expectedEnumType) { var expectedType = Enum.Parse(typeof(SummaryType), expectedEnumType); var actualType = SummaryTypeParser.Parse(summaryType); Assert.AreEqual(expectedType, actualType); }
public async Task <IActionResult> ReadResourceAsync(string type, string id, [FromQuery(Name = "_summary")] string summaryType) { var response = await this.ReadResourceInteractor.ExecuteAsync(new ReadResourceRequest { ResourceId = id, ResourceType = type }); return(ReadResourcePresenter.Present(response, this.Request.ContentType, this.Response, SummaryTypeParser.Parse(summaryType))); }