Exemple #1
0
 public void WriteRespectsTransformationIndentationForSingleLineText()
 {
     using (var transformation = new FakeTransformation())
         using (var context = new TransformationContext(transformation, transformation.GenerationEnvironment))
         {
             transformation.PushIndent("\t");
             context.Write(new OutputItem(), TestText);
             Assert.AreEqual("\t" + TestText, transformation.TransformText());
         }
 }
Exemple #2
0
 public void WriteAppendsToTransformationWhenOutputFileIsNotSpecified()
 {
     using (var transformation = new FakeTransformation())
         using (var context = new TransformationContext(transformation, transformation.GenerationEnvironment))
         {
             transformation.Write("TransformationOutput");
             context.Write(new OutputItem(), "TemplateOutput");
             Assert.AreEqual("TransformationOutput" + "TemplateOutput", transformation.TransformText());
         }
 }
Exemple #3
0
 public void WriteAppendsToPreviousTemplateOutput()
 {
     using (var transformation = new FakeTransformation())
         using (var context = new TransformationContext(transformation, transformation.GenerationEnvironment))
         {
             context.Write(new OutputItem(), "TemplateOutput");
             transformation.Write("TransformationOutput");
             Assert.AreEqual("TemplateOutput" + "TransformationOutput", transformation.TransformText());
         }
 }
Exemple #4
0
 public void WriteRespectsTransformationIndentationForMultilineText()
 {
     using (var transformation = new FakeTransformation())
         using (var context = new TransformationContext(transformation, transformation.GenerationEnvironment))
         {
             transformation.PushIndent("\t");
             string text = TestText + Environment.NewLine + TestText;
             context.Write(new OutputItem(), text);
             string expectedOutput = "\t" + TestText + Environment.NewLine + "\t" + TestText;
             Assert.AreEqual(expectedOutput, transformation.TransformText());
         }
 }
 public void WriteRespectsTransformationIndentationForSingleLineText()
 {
     using (var transformation = new FakeTransformation())
     using (var context = new TransformationContext(transformation, transformation.GenerationEnvironment))
     {
         transformation.PushIndent("\t");
         context.Write(new OutputItem(), TestText);
         Assert.AreEqual("\t" + TestText, transformation.TransformText());
     }
 }
 public void WriteRespectsTransformationIndentationForMultilineText()
 {
     using (var transformation = new FakeTransformation())
     using (var context = new TransformationContext(transformation, transformation.GenerationEnvironment))
     {
         transformation.PushIndent("\t");
         string text = TestText + Environment.NewLine + TestText;
         context.Write(new OutputItem(), text);
         string expectedOutput = "\t" + TestText + Environment.NewLine + "\t" + TestText;
         Assert.AreEqual(expectedOutput, transformation.TransformText());
     }
 }
 public void WriteAppendsToTransformationWhenOutputFileIsNotSpecified()
 {
     using (var transformation = new FakeTransformation())
     using (var context = new TransformationContext(transformation, transformation.GenerationEnvironment))
     {
         transformation.Write("TransformationOutput");
         context.Write(new OutputItem(), "TemplateOutput");
         Assert.AreEqual("TransformationOutput" + "TemplateOutput", transformation.TransformText());
     }
 }
 public void WriteAppendsToPreviousTemplateOutput()
 {
     using (var transformation = new FakeTransformation())
     using (var context = new TransformationContext(transformation, transformation.GenerationEnvironment))
     {
         context.Write(new OutputItem(), "TemplateOutput");
         transformation.Write("TransformationOutput");
         Assert.AreEqual("TemplateOutput" + "TransformationOutput", transformation.TransformText());
     }
 }