Ejemplo n.º 1
0
        public void ThrowIfAnyErrors_WithNoErrors_DoesNotThrow()
        {
            var mockOutputter = Substitute.For<IReportOutputter>();
            var reporter = new Reporter(mockOutputter);

            reporter.ThrowIfAnyErrors();
        }
Ejemplo n.º 2
0
        public void ThrowIfAnyErrors_WithErrors_ThrowsPactFailureException()
        {
            var mockOutputter = Substitute.For<IReportOutputter>();
            var reporter = new Reporter(mockOutputter);

            reporter.ReportError("something broke");

            Assert.Throws<PactFailureException>(() => reporter.ThrowIfAnyErrors());
        }