コード例 #1
0
 public void WarningFormatThrowsArgumentNullExceptionWhenFormatIsNull()
 {
     using (var template = new FakeTemplate())
     {
         template.Warning(null, null);
     }
 }
コード例 #2
0
 public void WarningThrowsArgumentNullExceptionWhenMessageIsNull()
 {
     using (var template = new FakeTemplate())
     {
         template.Warning(null);
     }
 }
コード例 #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());
     }
 }
コード例 #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);
     }
 }
コード例 #5
0
ファイル: TemplateTest.cs プロジェクト: icool123/T4Toolbox
 public void WarningFormatThrowsArgumentNullExceptionWhenFormatIsNull()
 {
     using (var template = new FakeTemplate())
     {
         template.Warning(null, null);                
     }
 }
コード例 #6
0
ファイル: TemplateTest.cs プロジェクト: icool123/T4Toolbox
 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);                
     }
 }
コード例 #7
0
ファイル: TemplateTest.cs プロジェクト: icool123/T4Toolbox
 public void WarningThrowsArgumentNullExceptionWhenMessageIsNull()
 {
     using (var template = new FakeTemplate())
     {
         template.Warning(null);                
     }
 }
コード例 #8
0
ファイル: TemplateTest.cs プロジェクト: icool123/T4Toolbox
 public void TransformGeneratesOutputWhenValidateReportsWarnings()
 {
     using (var template = new FakeTemplate())
     {
         template.TransformedText = () => template.Write(TestOutput);
         template.Validated = () => template.Warning(TestMessage);
         Assert.AreEqual(TestOutput, template.Transform());
     }
 }