예제 #1
0
 public void TestAsyncExceptionFromVoid()
 {
     using (ApprovalTests.Namers.ApprovalResults.UniqueForOs()) {
         AsyncApprovals.VerifyException(ThrowBabyThrow(),
                                        ScrubberUtils.RemoveLinesContaining("System.Linq.Parallel.QueryTask"));
     }
 }
예제 #2
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));
     });
 }
예제 #3
0
        private async Task ThenTheExpectedContentIsReturned(HttpResponseMessage message)
        {
            message.EnsureSuccessStatusCode();
            _random.Received(5).Next(-20, 55);
            _random.Received(5).Next(10);
            var scrubDate = ScrubberUtils.RemoveLinesContaining("\"date\":");

            Approvals.Verify(await message.Content.ReadAsStringAsync(), scrubDate);
        }
 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));
        }
예제 #6
0
 public static void VerifyScrubbed(MailMessage email, params Func <string, string>[] scrubbers)
 {
     VerifyScrubbed(email, ScrubberUtils.Combine(scrubbers));
 }
예제 #7
0
 public static string ScrubStackTrace(this string text)
 {
     return(ScrubberUtils.Combine(ScrubAnonymousIds, ScrubPaths, ScrubLineNumbers)(text));
 }
예제 #8
0
 public void TestAsyncExceptionFromVoid()
 {
     AsyncApprovals.VerifyException(ThrowBabyThrow(),
                                    ScrubberUtils.RemoveLinesContaining("System.Linq.Parallel.QueryTask"));
 }