Esempio n. 1
0
        public void TestInitialize()
        {
            var mockPrice     = MockDataSetup.SetMockPrices();
            var mockPromotion = MockDataSetup.SetMockPromotions();

            _basketService = new BasketService(mockPrice.Object, mockPromotion.Object);
        }
Esempio n. 2
0
        public void Check_Console_output_Number_Of_Times()
        {
            var writer = new Mock <IOutputWriter>();

            Program.WriteConsoleOutput(new string[] { "Milk,2 |Butter,4" }, writer.Object,
                                       MockDataSetup.SetMockPrices().Object, MockDataSetup.SetMockPromotions().Object);
            writer.Verify(w => w.WriteLine(It.IsAny <string>()), Times.Exactly(2));
        }