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