public void react_to_null_argument_properly() { Assert.Throws <ArgumentNullException>(() => PdfApprovals.Verify(null as Stream) ); Assert.Throws <ArgumentNullException>(() => PdfApprovals.Verify(null as string) ); }
public void GeneratePdfWithEmailsAndPhones() { // Arrange var memoryStream = new System.IO.MemoryStream(); // Act _engine.CreatePdf(_testCard, memoryStream); // Assert memoryStream.Position = 0; PdfApprovals.VerifyVisually(memoryStream); }
public void GeneratePdfWithoutEmailAddressesIfTheyWereNotProvided() { // Arrange _testCard.Emails = null; var memoryStream = new System.IO.MemoryStream(); // Act _engine.CreatePdf(_testCard, memoryStream); // Assert memoryStream.Position = 0; PdfApprovals.VerifyVisually(memoryStream); }
public void can_use_image_approval_mode_with_multipage() { PdfApprovals.VerifyVisually(createSamplePdf("Page 1", "Page 2")); }
public void can_use_image_approval_mode() { PdfApprovals.VerifyVisually(createSamplePdf()); }
public void will_normalize_different_timezones() { //Note if you are in Central Time (CTZ) this test isn't very meaningful as thats what the approval is currently tuned to. Sorry. PdfApprovals.Verify(PathUtilities.GetAdjacentFile("pdf-created-in-odessa-timezone.pdf")); }
public void react_to_nonexistant_file_properly() { Assert.Throws <ArgumentException>(() => PdfApprovals.Verify(new FileInfo(PathUtilities.GetAdjacentFile("this-file-does-not-exist.pdf"))) ); }
public void react_to_empty_stream_properly() { Assert.Throws <ArgumentException>(() => PdfApprovals.Verify(new MemoryStream(0)) ); }
public void can_verify_pdfs_created_with_pdfsharp() { var pdf = createSamplePdf(); PdfApprovals.Verify(pdf); }