public void ShouldWriteTheXmlPreprocessingInstructionWhenCallingRenderAndTheDocTypeIsXml() { var docType = new DocType("xml"); var xmlWriter = Mock.Of <IXmlWriter>(); docType.Render(xmlWriter); Mock.Get(xmlWriter).Verify(w => w.WriteString("<?xml version=\"1.0\" encoding=\"utf-8\" ?>")); }
public void ShouldWriteTheDoctypeWhenCallingRenderAndTheDocTypeIsStrict() { var docType = new DocType("strict"); var xmlWriter = Mock.Of <IXmlWriter>(); docType.Render(xmlWriter); Mock.Get(xmlWriter).Verify(w => w.WriteString(It.Is <string>(s => s.Contains("xhtml1-strict.dtd")))); }
public void ShouldWriteTheDocTypeWhenCallingRenderAndTheDocTypeIsNotAKnowValue() { var docType = new DocType("hello"); var xmlWriter = Mock.Of <IXmlWriter>(); docType.Render(xmlWriter); Mock.Get(xmlWriter).Verify(w => w.WriteString("<!DOCTYPE hello>")); }