Example #1
0
 private static void VerifyMvcUrl(string clazz, string action, NameValueCollection nvc = null, Func <string, string> scrubber = null)
 {
     VerifyWithException(() =>
     {
         var url = GetURL(clazz, action, nvc);
         AspApprovals.VerifyUrl(url, ScrubberUtils.Combine(HtmlScrubbers.ScrubMvc, scrubber ?? ScrubberUtils.NO_SCRUBBER));
     });
 }
 public void TestAsyncExceptionFromVoid()
 {
     using (Namers.ApprovalResults.UniqueForOs())
     {
         AsyncApprovals.VerifyException(ThrowBabyThrow(),
                                        ScrubberUtils.Combine(
                                            ScrubberUtils.RemoveLinesContaining("System.Linq.Parallel.QueryTask"),
                                            ScrubberUtils.RemoveLinesContaining("System.Threading.Tasks.Task.InnerInvoke"))
                                        );
     }
 }
        public void GenerateOrderedXmlReport()
        {
            var vipCustomers = new VipCustomers();

            vipCustomers.Add(new Customer("Albert", "Thomson"));
            vipCustomers.Add(new Customer("John", "Smith"));
            vipCustomers.Add(new Customer("Mandy", "Harris"));


            var report = vipCustomers.Report();

            var removeCreationTime = ScrubberUtils.RemoveLinesContaining("CreationTime");

            XmlApprovals.VerifyOrderedXml(report, ScrubberUtils.Combine(removeCreationTime));
        }
Example #4
0
 public static void VerifyScrubbed(MailMessage email, params Func <string, string>[] scrubbers)
 {
     VerifyScrubbed(email, ScrubberUtils.Combine(scrubbers));
 }
Example #5
0
 public static string ScrubStackTrace(this string text)
 {
     return(ScrubberUtils.Combine(ScrubAnonymousIds, ScrubPaths, ScrubLineNumbers)(text));
 }