public void GetHorses_FromXmlFile_FileNotFoundException() { var fileParser = new XmlFileParser(); string path = "TestData/DoesNotExist.xml"; Assert.Throws <FileNotFoundException>(() => fileParser.GetHorseDetails(path)); }
public void GetHorseDetails_Fail_Case1() { var fileParser = new XmlFileParser(); string path = "TestData/DoesNotExist.json"; Assert.Throws <FileNotFoundException>(() => fileParser.GetHorseDetails(path)); }
public void GetHorseDetails_Success_Case1() { var fileParser = new XmlFileParser(); string path = "TestData/Caulfield_Race1.xml"; var horses = fileParser.GetHorseDetails(path); Assert.NotNull(horses); Assert.True(horses.Count > 0); }
public void GetHorseDetails_Fail_Case1() { var fileParser = new XmlFileParser(); string path = "TestData/IncompleXml.xml"; var horses = fileParser.GetHorseDetails(path); Assert.NotNull(horses); Assert.True(horses.Count == 0); }