/// <summary>
        /// Verifies that specified <paramref name="generator"/> produced a specific
        /// error during transformation.
        /// </summary>
        /// <param name="generator">
        /// A <see cref="Generator"/> that has already ran.
        /// </param>
        /// <param name="errorText">
        /// A <see cref="string"/> that contains expected error text.
        /// </param>
        /// <exception cref="System.ArgumentNullException">
        /// <paramref name="generator"/> or <paramref name="errorText"/> is null.
        /// </exception>
        /// <exception cref="AssertFailedException">
        /// No references to <paramref name="errorText"/> could be found among
        /// <see cref="Generator.Errors"/>.
        /// </exception>
        public static void HasError(Generator generator, string errorText)
        {
            if (generator == null)
            {
                throw new ArgumentNullException("generator");
            }

            if (errorText == null)
            {
                throw new ArgumentNullException("errorText");
            }

            HasError(generator.Errors, errorText);
        }
        /// <summary>
        /// Verifies that specified <paramref name="generator"/> produced no <see cref="Template.Errors"/>
        /// during transformation.
        /// </summary>
        /// <param name="generator">
        /// A <see cref="Generator"/> that has already ran.
        /// </param>
        /// <exception cref="System.ArgumentNullException">
        /// <paramref name="generator"/> is null.
        /// </exception>
        /// <exception cref="AssertFailedException">
        /// <see cref="Generator.Errors"/> is not empty.
        /// </exception>
        public static void NoErrors(Generator generator)
        {
            if (generator == null)
            {
                throw new ArgumentNullException("generator");
            }

            NoErrors(generator.Errors);
        }