Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 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);
 }
Ejemplo n.º 4
0
        public FailResult(CaseExecution execution, AssertionLibraryFilter filter)
        {
            Case = execution.Case;
            Output = execution.Output;
            Duration = execution.Duration;
            Exceptions = execution.Exceptions;

            ExceptionSummary = new ExceptionInfo(Exceptions, filter);
        }
Ejemplo n.º 5
0
        public FailResult(CaseExecution execution, AssertionLibraryFilter filter)
        {
            Case       = execution.Case;
            Output     = execution.Output;
            Duration   = execution.Duration;
            Exceptions = execution.Exceptions;

            ExceptionSummary = new ExceptionInfo(Exceptions, filter);
        }
Ejemplo n.º 6
0
        public FailResult(Case @case, AssertionLibraryFilter filter)
        {
            Name        = @case.Name;
            MethodGroup = @case.MethodGroup;
            Output      = @case.Output;
            Duration    = @case.Duration;

            Exceptions = new CompoundException(@case.Exceptions, filter);
        }
Ejemplo n.º 7
0
        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[][] { };
        }
Ejemplo n.º 8
0
        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;
        }
Ejemplo n.º 9
0
        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;
        }