示例#1
0
        public void Report(string approved, string received)
        {
            reporter.Report(approved, received);
            var r = RunQueryAndGetPath(received);
            var a = RunQueryAndGetPath(approved);

            reporter.Report(a, r);
        }
示例#2
0
        public void Report(string approved, string received)
        {
            reporter.Report(approved, received);

            var receivedResult = ExecuteQuery(received);
            var approvedResult = ExecuteQuery(approved);

            if (string.IsNullOrEmpty(approvedResult.Result) && string.IsNullOrEmpty(receivedResult.Result))
            {
                return;
            }

            var r = RunQueryAndGetPath(received, receivedResult);
            var a = RunQueryAndGetPath(approved, approvedResult);

            reporter.Report(a, r);
        }
示例#3
0
        public static void AssertEqual(string expected, string actual, IApprovalFailureReporter reporter)
        {
            if (expected != actual)
            {
                var expectedFile = Path.GetTempPath() + "Expected.Approvals.Temp.txt";
                var actualFile   = Path.GetTempPath() + "Actual.Approvals.Temp.txt";

                File.WriteAllText(expectedFile, expected);
                File.WriteAllText(actualFile, actual);

                reporter.Report(expectedFile, actualFile);
                throw new Exception($"<{expected}> != <{actual}>");
            }
        }
        public static void AssertEqual(string expected, string actual, IApprovalFailureReporter reporter)
        {
            if (expected != actual)
            {
                var expectedFile = Path.GetTempPath() + "Expected.Approvals.Temp.txt";
                var actualFile = Path.GetTempPath() + "Actual.Approvals.Temp.txt";

                File.WriteAllText(expectedFile, expected);
                File.WriteAllText(actualFile, actual);

                reporter.Report(expectedFile, actualFile);
                throw new Exception($"<{expected}> != <{actual}>");
            }
        }
 public void ReportFailure(IApprovalFailureReporter reporter)
 {
     reporter.Report(approved, received);
 }
示例#6
0
 public void ReportFailure(IApprovalFailureReporter reporter)
 {
     reporter.Report(this.approved, this.received);
 }
 public void Report(string approved, string received)
 {
     reporter.Report(approved, received);
 }
 public void ReportFailure(IApprovalFailureReporter reporter)
 {
     reporter.Report(_approved, _received);
 }