public void CanAddExceptions() { AssertionFailureBuilder builder = new AssertionFailureBuilder("Description"); builder.AddException(new InvalidOperationException("Boom 1")); builder.AddException(new InvalidOperationException("Boom 2")); Assert.Over.Pairs(new[] { "Boom 1", "Boom 2" }, builder.ToAssertionFailure().Exceptions, (expectedSubstring, actual) => Assert.Contains(actual.ToString(), expectedSubstring)); }
public void AddExceptionDataThrowsIfArgumentIsNull() { AssertionFailureBuilder builder = new AssertionFailureBuilder("Description"); Assert.Throws <ArgumentNullException>(() => builder.AddException((ExceptionData)null)); }