public void ParseAsXmlTest() { NSubstituteAutoMocker.NSubstituteAutoMocker <HtmlParserUtility> util = new NSubstituteAutoMocker.NSubstituteAutoMocker <HtmlParserUtility>(new Type[] { typeof(ILogger) }); var dictionary = new Dictionary <string, string>(); dictionary.Add("script", "/script"); var output = util.ClassUnderTest.ParseAsXml("<html><script></script></html>", dictionary); Assert.IsNotNull(output); Assert.IsFalse(output.Contains("script")); }
public void ParseAsXmlTest_Fail() { NSubstituteAutoMocker.NSubstituteAutoMocker <HtmlParserUtility> util = new NSubstituteAutoMocker.NSubstituteAutoMocker <HtmlParserUtility>(new Type[] { typeof(ILogger) }); var dictionary = new Dictionary <string, string>(); dictionary.Add("script", "/script"); var output = util.ClassUnderTest.ParseAsXml(string.Empty, dictionary); Assert.IsEmpty(output); output = util.ClassUnderTest.ParseAsXml("<html><script></script></html>", null); Assert.IsEmpty(output); }