コード例 #1
0
        public void AggregateException_InnerExceptions_are_included()
        {
            var aggregateWithOneInner = new AggregateException("oops", new Exception());
            Assert.That(
                aggregateWithOneInner.InnerExceptions().Count(),
                Is.EqualTo(1));

            var aggregateWithSeveralInners = new AggregateException(new Exception(), new ExecutionEngineException(), new InvalidOperationException());
            Assert.That(
                aggregateWithSeveralInners.InnerExceptions().Count(),
                Is.EqualTo(3));
        }