Example #1
0
 public void WarningFormatThrowsArgumentNullExceptionWhenFormatIsNull()
 {
     using (var template = new FakeTemplate())
     {
         template.Warning(null, null);
     }
 }
Example #2
0
 public void WarningThrowsArgumentNullExceptionWhenMessageIsNull()
 {
     using (var template = new FakeTemplate())
     {
         template.Warning(null);
     }
 }
Example #3
0
 public void TransformGeneratesOutputWhenValidateReportsWarnings()
 {
     using (var template = new FakeTemplate())
     {
         template.TransformedText = () => template.Write(TestOutput);
         template.Validated       = () => template.Warning(TestMessage);
         Assert.AreEqual(TestOutput, template.Transform());
     }
 }
Example #4
0
 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);
     }
 }
Example #5
0
 public void WarningFormatThrowsArgumentNullExceptionWhenFormatIsNull()
 {
     using (var template = new FakeTemplate())
     {
         template.Warning(null, null);                
     }
 }
Example #6
0
 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);                
     }
 }
Example #7
0
 public void WarningThrowsArgumentNullExceptionWhenMessageIsNull()
 {
     using (var template = new FakeTemplate())
     {
         template.Warning(null);                
     }
 }
Example #8
0
 public void TransformGeneratesOutputWhenValidateReportsWarnings()
 {
     using (var template = new FakeTemplate())
     {
         template.TransformedText = () => template.Write(TestOutput);
         template.Validated = () => template.Warning(TestMessage);
         Assert.AreEqual(TestOutput, template.Transform());
     }
 }