public void TestWithEmptyXML() { string[] refCodeFilter = new[] { "" }; IList <string> expectedResponse = new List <string>(); XMLExtractor extractor = new XMLExtractor(); IEnumerable <XElement> result = extractor.ExtracAll("", refCodeFilter); TestResponse(expectedResponse, result); }
public void TestWithWrongTagName() { string[] refCodeFilter = new[] { "BBB" }; IList <string> expectedResponse = new List <string>(); XMLExtractor extractor = new XMLExtractor(); IEnumerable <XElement> result = extractor.ExtracAll(xmlInput, refCodeFilter); TestResponse(expectedResponse, result); }
public void TestWithSingleTag() { string[] refCodeFilter = new[] { "CAR" }; IList <string> expectedResponse = new List <string>() { "71Q0019681", }; XMLExtractor extractor = new XMLExtractor(); IEnumerable <XElement> result = extractor.ExtracAll(xmlInput, refCodeFilter); TestResponse(expectedResponse, result); }
public void TestWithMoreTag() { string[] refCodeFilter = new[] { "MWB", "TRV", "CAR", "HWB", "KEY" }; IList <string> expectedResponse = new List <string>() { "586133622", "1", "71Q0019681", "586133622", "DUB16049" }; XMLExtractor extractor = new XMLExtractor(); IEnumerable <XElement> result = extractor.ExtracAll(xmlInput, refCodeFilter); TestResponse(expectedResponse, result); }