public void WhenTestSet_DataFactory_ReturnsTestWriter() { StockItem item = new StockItem() { Name = "Factory Test", SellIn = 1, Quality = new StockQuality(1) }; DataAccessFactory.TestItem = item; var writer = DataAccessFactory.CreateWriter(); Assert.AreEqual(writer.GetType().ToString(), "GildedRoseAssignment.SingleDataWriter"); }
public void WhenTestNotSet_DataFactory_ReturnsFileWriter() { var writer = DataAccessFactory.CreateWriter(); Assert.AreEqual(writer.GetType().ToString(), "GildedRoseAssignment.FileDataWriter"); }