public void ThrowIfAnyErrors_WithNoErrors_DoesNotThrow() { var mockOutputter = Substitute.For<IReportOutputter>(); var reporter = new Reporter(mockOutputter); reporter.ThrowIfAnyErrors(); }
public void ThrowIfAnyErrors_WithErrors_ThrowsPactFailureException() { var mockOutputter = Substitute.For<IReportOutputter>(); var reporter = new Reporter(mockOutputter); reporter.ReportError("something broke"); Assert.Throws<PactFailureException>(() => reporter.ThrowIfAnyErrors()); }