コード例 #1
0
        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");
        }
コード例 #2
0
        public void WhenTestNotSet_DataFactory_ReturnsFileWriter()
        {
            var writer = DataAccessFactory.CreateWriter();

            Assert.AreEqual(writer.GetType().ToString(), "GildedRoseAssignment.FileDataWriter");
        }