public void ShouldReturnANewTemplateWhenParsingAString() { var jadeParser = new JadeParser(); var template = jadeParser.Parse(".aString"); Assert.IsNotNull(template); }
public void ShouldReturnATemplateWithADocTypeAndElementsWhenParsingAStringWithADocTypeAndElements() { var jadeParser = new JadeParser(); var template = jadeParser.Parse("doctype hello\nhello"); Assert.IsNotNull(template.DocType); Assert.AreEqual(1, template.Elements.Count); }
public void ShouldReturnATemplateWithNoDocTypeOrElementsWhenParsingAnEmptyString() { var jadeParser = new JadeParser(); var template = jadeParser.Parse(string.Empty); Assert.IsNull(template.DocType); Assert.AreEqual(0, template.Elements.Count); }
public void ShouldthrowAnArgumentNullExceptionWhenParsingAStringAndTheStringIsNull() { var jadeParser = new JadeParser(); jadeParser.Parse(null); }