public void ShouldStripAllButBodyElementFromEmailHtml() { var engine = new RemoveAllButBodyStrategy(); var result = engine.SanitiseContent(_emailHtmlContent); Assert.True(result.IndexOf("<body") == 0); }
public void ShouldStripAllButBodyElementFromBasicHtml() { var content = "<html><head><title>test data</title></head><body><p>this is my body</p></body></html>"; var engine = new RemoveAllButBodyStrategy(); var result = engine.SanitiseContent(content); Assert.Equal("<body><p>this is my body</p></body>", result); }