private async Task AssertSinglePageSvgResultsAsync(IEnumerable <ConversionResult> results, Action <string> customAssertions = null) { for (int i = 0; i < results.Count(); i++) { ConversionResult result = results.ElementAt(i); Assert.IsTrue(result.IsSuccess); Assert.AreEqual(1, result.PageCount, "Wrong page count for result"); ConversionSourceDocument resultSourceDocument = result.Sources.ToList()[0]; Assert.IsNotNull(resultSourceDocument.RemoteWorkFile); Assert.IsNull(resultSourceDocument.Password); Assert.AreEqual((i + 1).ToString(), resultSourceDocument.Pages, "Wrong source page range for result"); string filename = $"page-{i}.svg"; await result.RemoteWorkFile.SaveAsync(filename); FileAssert.IsSvg(filename); customAssertions?.Invoke(filename); } }