public void ValidateAndReturnXmlDocument_ExpectedXml_ShouldReturnXmlDocument(TestXmlParser service) { var validateAndReturnXmlDocument = service.ValidateAndReturnXmlDocument("<image/>"); validateAndReturnXmlDocument.Should().NotBeNull(); validateAndReturnXmlDocument.DocumentElement.Name.Should().Be("image"); }
public void ValidateAndReturnXmlDocument_NotExpectedXml_ShouldThrowException(TestXmlParser service) { Action a = () => service.ValidateAndReturnXmlDocument("<data/>"); a.ShouldThrow <ArgumentException>().WithMessage("Xml is not a valid image"); }
public void ValidateAndReturnXmlDocument_EmptyString_ShouldReturnNull(TestXmlParser service) { service.ValidateAndReturnXmlDocument(string.Empty).Should().BeNull(); }
public void ValidateAndReturnXmlDocument_ExpectedXml_ShouldReturnXmlDocument(TestXmlParser service) { var validateAndReturnXmlDocument = service.ValidateAndReturnXmlDocument("<image/>"); validateAndReturnXmlDocument.Should().NotBeNull(); validateAndReturnXmlDocument.DocumentElement.Name.Should().Be("image"); }
public void ValidateAndReturnXmlDocument_NotExpectedXml_ShouldThrowException(TestXmlParser service) { Action a = () => service.ValidateAndReturnXmlDocument("<data/>"); a.ShouldThrow<ArgumentException>().WithMessage("Xml is not a valid image"); }
public void ValidateAndReturnXmlDocument_EmptyString_ShouldReturnNull(TestXmlParser service) { service.ValidateAndReturnXmlDocument(string.Empty).Should().BeNull(); }