public void IsStringXml_WithTwoRootNodesInput_ShouldReturnTrue() { string input = "<root><element /><xml>bullshit</xml></root><root><test /></root>"; Assert.IsTrue(MsBuildElementHelpCodeBlockUtility.IsStringXml(input)); }
public void IsStringXml_WithXmlFragmentInput_ShouldReturnTrue() { string input = "<element /><xml>bullshit</xml>"; Assert.IsTrue(MsBuildElementHelpCodeBlockUtility.IsStringXml(input)); }
public void IsStringXml_WithOrdinalStringInputLookingLikeXml_ShouldReturnFalse() { string input = "<xml><xml>bullshit<xml><xml>"; Assert.IsFalse(MsBuildElementHelpCodeBlockUtility.IsStringXml(input)); }
public void IsStringXml_WithLeadingXmlComment_ShouldReturnTrue() { string input = "<!-- This is a decoded comment --><TestValue></TestValue>"; Assert.IsTrue(MsBuildElementHelpCodeBlockUtility.IsStringXml(input)); }
public void IsStringXml_WithNullInput_ShouldReturnFalse() { string input = null; Assert.IsFalse(MsBuildElementHelpCodeBlockUtility.IsStringXml(input)); }
public void IsStringXml_WithOrdinalStringInput_ShouldReturnFalse() { string input = "This is an ordinal string value"; Assert.IsFalse(MsBuildElementHelpCodeBlockUtility.IsStringXml(input)); }