public async Task DownloadGraph_Returns_Stream() { // Act var graph = new Uri("https://pid.bayer.com/resource/1.0"); var result = await _service.DownloadGraph(graph); //Assert Assert.NotNull(result); Assert.True(result.Position == 0); Assert.True(result.Length > 0); }
public async Task <IActionResult> DownloadGraph([FromQuery] Uri graph) { var stream = await _graphService.DownloadGraph(graph); var file = File(stream, _mimetypeOctetStream, GraphUtils.GetFileName(graph)); return(file); }