/// <summary>
        /// Tests all exceptions.
        /// </summary>
        /// <param name="assembly">The assembly.</param>
        /// <param name="exceptionsToIgnore">The exceptions to ignore.</param>
        /// <returns>
        /// A dictionary containing all the tested exceptions.
        /// </returns>
        /// <exception cref="System.ArgumentNullException">assembly</exception>
        // ReSharper disable once MemberCanBePrivate.Global
        internal IList <ResultMessage> TestExceptions(Assembly assembly, params Type[] exceptionsToIgnore)
        {
            if (assembly == null)
            {
                throw new ArgumentNullException("assembly");
            }

            IList <Type> exceptions = _exceptionResolver.GetExceptions(assembly, exceptionsToIgnore);

            return(TestExceptionTypes(exceptions));
        }
Example #2
0
        public void ShouldFindException()
        {
            IList <Type> exceptions = _exceptionResolver.GetExceptions(Assembly.GetAssembly(typeof(ExceptionTesterTests)));

            Assert.That(exceptions, Has.Count.EqualTo(6));
        }