public void FillDataSet_WhenProvidedValidXml_ReturnsListOfHorsesWithPrices()
        {
            var mockFileSystem = new Mock <IFileSystem>();

            mockFileSystem.Setup(x => x.ReadAllText(It.IsAny <string>()))
            .Returns(_testData);

            var xmlFeedAdapter = new XmlFeedAdapter(mockFileSystem.Object);

            var dataSet = new DataSet();

            xmlFeedAdapter.Fill(null, dataSet);

            Assert.Equal(2, dataSet.Horses.Count);

            Assert.Equal("Advancing", dataSet.Horses[0].Name);
            Assert.Equal(4.2, dataSet.Horses[0].Price);

            Assert.Equal("Coronel", dataSet.Horses[1].Name);
            Assert.Equal(12, dataSet.Horses[1].Price);
        }
        public void FillDataSet_WhenNoValidPrice_ReturnsListOfHorsesWithPriceSetToZero()
        {
            var mockFileSystem = new Mock <IFileSystem>();

            string testData = File.ReadAllText("../../../TestData/Xml_NoPrice.xml");

            mockFileSystem.Setup(x => x.ReadAllText(It.IsAny <string>()))
            .Returns(testData);

            var xmlFeedAdapter = new XmlFeedAdapter(mockFileSystem.Object);

            var dataSet = new DataSet();

            xmlFeedAdapter.Fill(null, dataSet);

            Assert.Equal(2, dataSet.Horses.Count);

            Assert.Equal("Advancing", dataSet.Horses[0].Name);
            Assert.Equal(4.2, dataSet.Horses[0].Price);

            Assert.Equal("Coronel", dataSet.Horses[1].Name);
            Assert.Equal(0, dataSet.Horses[1].Price);
        }