Esempio n. 1
0
        public void InsertShouldHandleSimpleStringTileDefinedByProperty()
        {
            var tag = new Insert
            {
                Name = new MockAttribute(new Property("simpleAsProperty"))
            };

            Assert.That(tag.Evaluate(_model), Is.EqualTo("simpleValue"));
        }
Esempio n. 2
0
        public void InsertShouldHandleFileWithVarsTile()
        {
            var tag = new Insert
            {
                Name = new MockAttribute(new Constant("fileWithVars"))
            };

            Assert.That(tag.Evaluate(_model), Is.EqualTo("bbAAbb"));
        }
Esempio n. 3
0
        public void InsertShouldHandleSimpleFileTile()
        {
            var tag = new Insert
            {
                Name = new MockAttribute(new Constant("file"))
            };

            Assert.That(tag.Evaluate(_model), Is.EqualTo("aa"));
        }
Esempio n. 4
0
        public void InsertShouldHandleDefitionWithAtributesTile()
        {
            var tag = new Insert
            {
                Name = new MockAttribute(new Constant("fileWithTilesAttributes"))
            };

            Assert.That(tag.Evaluate(_model), Is.EqualTo("aAttributeValue"));
        }
Esempio n. 5
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));
            }
        }