public void InsertShouldHandleDefitionWithAtributesTile() { var tag = new Insert { Name = new MockAttribute(new Constant("fileWithTilesAttributes")) }; Assert.That(tag.Evaluate(_model), Is.EqualTo("aAttributeValue")); }
public void InsertShouldHandleSimpleFileTile() { var tag = new Insert { Name = new MockAttribute(new Constant("file")) }; Assert.That(tag.Evaluate(_model), Is.EqualTo("aa")); }
public void InsertShouldHandleFileWithVarsTile() { var tag = new Insert { Name = new MockAttribute(new Constant("fileWithVars")) }; Assert.That(tag.Evaluate(_model), Is.EqualTo("bbAAbb")); }
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)); } }
public void InsertShouldHandleSimpleStringTileDefinedByProperty() { var tag = new Insert { Name = new MockAttribute(new Property("simpleAsProperty")) }; Assert.That(tag.Evaluate(_model), Is.EqualTo("simpleValue")); }