public void ReceiptHtmlTest() { // Arrange var receipt = new Receipt(); // Act receipt.AddItem("Mjölk", 10.95M, 2); receipt.AddItem("Bröd", 18.5M, 1); receipt.AddItem("Smör", 45.50M, 1); // Assert Approvals.VerifyHtml(receipt.ToHtml()); }
public void ContentApproval_SubfolderIndex() { // Arrange WebRequest request = WebRequest.Create(Localhost + "subfolder/index.html"); // Act WebResponse response = request.GetResponse(); Stream receiveStream = response.GetResponseStream(); StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8); var requestContent = readStream.ReadToEnd(); // Assert Approvals.VerifyHtml(requestContent); }
public async Task Format(NotificationType notificationType) { using (ApprovalResults.ForScenario(notificationType.ToString())) { // Arrange var receiver = CreateDefaultReceiver(); var notifications = CreateDefaultNotifications(notificationType); // Act var result = await formatter.FormatAsync(receiver, notifications); // Assert Approvals.VerifyHtml(result); } }
public void TableNoWide3Rows4Columns() { // Arrange var editor = new TestHtmlEditor(); TableProperties tableProperties = new TableProperties(); tableProperties.Width = new PixelPercent(0, PixelPercentUnits.Undefined); int rows = 3; int columns = 4; TableCreationParameters tableCreationParamters = new TableCreationParameters(rows, columns, tableProperties); // Act TableEditor.InsertTable(editor, null, tableCreationParamters); // Assert Approvals.VerifyHtml(editor.Html); }
public void Example() { var engine = new ComparerEngine(); var diff = engine.CreateDiff("ExampleV1.dll", "ExampleV2.dll"); var writer = new StringWriter(); var formatter = new APIUpgradeToHtmlFormatter(); var packageDescription = new PackageDescription { PackageId = "Example", Versions = new VersionPair("1.0.0", "2.0.0") }; var diffedCompareSet = new DiffedCompareSet { Diff = diff, Set = new CompareSet() }; formatter.Render(writer, packageDescription, new [] { diffedCompareSet }); Approvals.VerifyHtml(writer.ToString()); }
public static void TestHtml() { Approvals.VerifyHtml("<html><body><div style='font-family:Broadway;font-size:18px'> Web Page from ApprovalTests</div></body></html>"); }
public void TestLambdas() { string html = "<html><body><h1>Hello World</h1><table><tr><td>1 </td><td colspan=2>5</td></tr><tr><td colspan=3>Hello</td></tr></table></body></html>".Replace(">", ">\r\n"); Approvals.VerifyHtml(html); }
public void TestComplianceLibGit2SharpNativeBinaries() { Approvals.VerifyHtml(HtmlDiff("LibGit2Sharp.NativeBinaries", "1.0.72", "1.0.81")); }
public void TestComplianceLibGit2SharpNativeBinariesWithRightMissingNativeAssemblies() { Approvals.VerifyHtml(HtmlDiff("LibGit2Sharp", "0.21.0.176", "0.22.0-pre20150716071016")); }
public void AppccelerateEventBrokerNoChanges() { Approvals.VerifyHtml(HtmlDiff("Appccelerate.EventBroker", "3.1.0", "3.15.0")); }
public void TestComplianceLibGit2SharpPackageEmbeddingNativeBinaries() { Approvals.VerifyHtml(HtmlDiff("LibGit2Sharp", "0.20.0", "0.20.1")); }
public void TestComplianceAutoMapper() { Approvals.VerifyHtml(HtmlDiff("AutoMapper", "4.2.1", "5.0.0")); }
public void TestComplianceLibLog() { Approvals.VerifyHtml(HtmlDiff("LibLog", "3.0.0", "4.1.1")); }
public void TestComplianceAzureSelfDestruct() { Approvals.VerifyHtml(HtmlDiff("Two10.Azure.SelfDestruct", "1.0.0", "1.0.5")); }
public void TestComplianceNServiceBus() { Approvals.VerifyHtml(HtmlDiff("nservicebus", "5.0.0", "5.1.3")); }
public void TestComplianceNewtonsoftJson() { Approvals.VerifyHtml(HtmlDiff("newtonsoft.json", "5.0.8", "6.0.8")); }