Пример #1
0
        public void ShouldReturnANewTemplateWhenParsingAString()
        {
            var jadeParser = new JadeParser();
            var template   = jadeParser.Parse(".aString");

            Assert.IsNotNull(template);
        }
Пример #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);
        }
Пример #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);
        }
Пример #4
0
        public void ShouldthrowAnArgumentNullExceptionWhenParsingAStringAndTheStringIsNull()
        {
            var jadeParser = new JadeParser();

            jadeParser.Parse(null);
        }