Ejemplo n.º 1
0
        public void ShouldReturnANewTemplateWhenParsingAString()
        {
            var jadeParser = new JadeParser();
            var template   = jadeParser.Parse(".aString");

            Assert.IsNotNull(template);
        }
Ejemplo n.º 2
0
        public void ShouldReturnATemplateWithADocTypeAndElementsWhenParsingAStringWithADocTypeAndElements()
        {
            var jadeParser = new JadeParser();
            var template   = jadeParser.Parse("doctype hello\nhello");

            Assert.IsNotNull(template.DocType);
            Assert.AreEqual(1, template.Elements.Count);
        }
Ejemplo n.º 3
0
        public void ShouldReturnATemplateWithNoDocTypeOrElementsWhenParsingAnEmptyString()
        {
            var jadeParser = new JadeParser();
            var template   = jadeParser.Parse(string.Empty);

            Assert.IsNull(template.DocType);
            Assert.AreEqual(0, template.Elements.Count);
        }
Ejemplo n.º 4
0
        public void ShouldthrowAnArgumentNullExceptionWhenParsingAStringAndTheStringIsNull()
        {
            var jadeParser = new JadeParser();

            jadeParser.Parse(null);
        }