public void should_render_latex_pdf() { var fileStore = new FileStore(); var renderService = new PresentationService(_batches, _templates, new LatexEngine(), new RazorEngine(), fileStore); Guid id; try { id = renderService.RenderPdf(TemplateId, BatchId); } catch (PresentationService.RenderException exception) { Debug.WriteLine(exception.Details); throw; } var path = fileStore.GetPath(id); Debug.WriteLine(path); File.Exists(path).ShouldBeTrue(); new FileInfo(path).Length.ShouldNotEqual(0); Directory.Delete(Path.GetDirectoryName(path), true); }
public void should_throw_render_exception_when_latex_malformed() { var renderService = new PresentationService(_batches, _templates, new LatexEngine(), new RazorEngine(), new FileStore()); Assert.Throws<PresentationService.RenderException>(() => renderService.RenderPdf(BadLatexTemplateId, BatchId)); }