Ejemplo n.º 1
0
 public void InsertShouldHandleDefitionWithAtributesTile()
 {
     var tag = new Insert
                   {
                       Name = new MockAttribute(new Constant("fileWithTilesAttributes"))
                   };
     Assert.That(tag.Evaluate(_model), Is.EqualTo("aAttributeValue"));
 }
Ejemplo n.º 2
0
 public void InsertShouldHandleSimpleFileTile()
 {
     var tag = new Insert
                   {
                       Name = new MockAttribute(new Constant("file"))
                   };
     Assert.That(tag.Evaluate(_model), Is.EqualTo("aa"));
 }
Ejemplo n.º 3
0
 public void InsertShouldHandleFileWithVarsTile()
 {
     var tag = new Insert
                   {
                       Name = new MockAttribute(new Constant("fileWithVars"))
                   };
     Assert.That(tag.Evaluate(_model), Is.EqualTo("bbAAbb"));
 }
Ejemplo n.º 4
0
 public void OnNonExistingAttributgesTagShouldThrowException()
 {
     var tag = new Insert
                   {
                       Name = new MockAttribute(new Constant("nonexisting"))
                   };
     try
     {
         tag.Evaluate(_model);
         Assert.Fail("Expect exception");
     }
     catch (TileExceptionWithContext Te)
     {
         Assert.That(Te.Message, Is.EqualTo(TileException.AttributeNotFound("nonexisting", "main").Message));
     }
 }
Ejemplo n.º 5
0
 public void InsertShouldHandleSimpleStringTileDefinedByProperty()
 {
     var tag = new Insert
                   {
                       Name = new MockAttribute(new Property("simpleAsProperty"))
                   };
     Assert.That(tag.Evaluate(_model), Is.EqualTo("simpleValue"));
 }