public ExceptionInfo(Exception exception, AssertionLibraryFilter filter) { Type = exception.GetType().FullName; DisplayName = filter.DisplayName(exception); Message = exception.Message; StackTrace = filter.FilterStackTrace(exception); InnerException = exception.InnerException == null ? null : new ExceptionInfo(exception.InnerException, filter); }
public CompoundException(IEnumerable <Exception> exceptions, AssertionLibraryFilter filter) { var all = exceptions.Select(x => new ExceptionInfo(x, filter)).ToArray(); PrimaryException = all.First(); SecondaryExceptions = all.Skip(1).ToArray(); CompoundStackTrace = GetCompoundStackTrace(all); }
public FailResult(CaseExecution execution, AssertionLibraryFilter filter) { Case = execution.Case; Output = execution.Output; Duration = execution.Duration; Exceptions = execution.Exceptions; ExceptionSummary = new ExceptionInfo(Exceptions, filter); }
public FailResult(Case @case, AssertionLibraryFilter filter) { Name = @case.Name; MethodGroup = @case.MethodGroup; Output = @case.Output; Duration = @case.Duration; Exceptions = new CompoundException(@case.Exceptions, filter); }
public Convention() { Classes = new ClassFilter().Where(type => !type.IsSubclassOf(typeof(Convention))); Methods = new MethodFilter().Where(m => !m.IsDispose()); CaseExecution = new CaseBehaviorBuilder(); InstanceExecution = new InstanceBehaviorBuilder(); ClassExecution = new ClassBehaviorBuilder().CreateInstancePerCase(); HideExceptionDetails = new AssertionLibraryFilter(); MethodCallParameterBuilder = method => new object[][] { }; }
public ExceptionInfo(IEnumerable<Exception> exceptions, AssertionLibraryFilter filter) { var all = exceptions.Select(x => new ExceptionInfo(x, filter)).ToArray(); var primary = all.First(); Type = primary.Type; DisplayName = primary.DisplayName; Message = primary.Message; StackTrace = CompoundStackTrace(all); InnerException = null; }
public ExceptionInfo(IEnumerable <Exception> exceptions, AssertionLibraryFilter filter) { var all = exceptions.Select(x => new ExceptionInfo(x, filter)).ToArray(); var primary = all.First(); Type = primary.Type; DisplayName = primary.DisplayName; Message = primary.Message; StackTrace = CompoundStackTrace(all); InnerException = null; }