public void WhenTestSet_DataFactory_ReturnsTestReader() { StockItem item = new StockItem() { Name = "Factory Test", SellIn = 1, Quality = new StockQuality(1) }; DataAccessFactory.TestItem = item; var reader = DataAccessFactory.CreateReader(); Assert.AreEqual(reader.GetType().ToString(), "GildedRoseAssignment.SingleDataReader"); }
public void WhenTestNotSet_DataFactory_ReturnsFileReader() { var reader = DataAccessFactory.CreateReader(); Assert.AreEqual(reader.GetType().ToString(), "GildedRoseAssignment.FileDataReader"); }