public void TestPdf_ScrubberDateMatch() { var cases = new[] { "xxx(D:20191230235959+23'59')xxx", "xxx(D:20191231235959+23'59)xxx", "xxx(D:20191231235959+23')xxx", "xxx(D:20191231235959+23)xxx", "xxx(D:20191231235959+)xxx", "xxx(D:20191231235959)xxx", "xxx(D:201912312359)xxx", "xxx(D:2019123123)xxx", "xxx(D:20191231)xxx", "xxx(D:201912)xxx", "xxx(D:2019)xxx" }; cases = cases.Reverse().ToArray(); Approvals.VerifyAll("PDF Dates", cases, c => $@"{PdfScrubber.FindDates(c).ToList().ToReadableString()} For {c}"); }
public void TestPdf_ScrubberDateNotMatch() { var cases = new[] { "xxx(D:)xxx", "xxx(D:20)xxx", "xxx(D:201)xxx", "xxx(D:20191)xxx", "xxx(D:2019123)xxx", "xxx(D:201912312)xxx", "xxx(D:20191231235)xxx", "xxx(D:2019123123595)xxx", "xxx(D:20191231235959+2)xxx", "xxx(D:20191231235959+23'5)xxx", "xxx(D:20191230235959+23'59'59)xxx" }; Approvals.VerifyAll("Dates", cases, c => $"{PdfScrubber.FindDates(c).ToReadableString()} for {c}"); }