public void WarningFormatThrowsArgumentNullExceptionWhenFormatIsNull() { using (var template = new FakeTemplate()) { template.Warning(null, null); } }
public void WarningThrowsArgumentNullExceptionWhenMessageIsNull() { using (var template = new FakeTemplate()) { template.Warning(null); } }
public void TransformGeneratesOutputWhenValidateReportsWarnings() { using (var template = new FakeTemplate()) { template.TransformedText = () => template.Write(TestOutput); template.Validated = () => template.Warning(TestMessage); Assert.AreEqual(TestOutput, template.Transform()); } }
public void WarningFormatAddsNewWarningToErrorsCollection() { using (var template = new FakeTemplate()) { template.Warning("{0}", TestMessage); Assert.AreEqual(1, template.Errors.Count); Assert.AreEqual(TestMessage, template.Errors[0].ErrorText); Assert.AreEqual(true, template.Errors[0].IsWarning); } }