public void GetMarkdownAmountWithNonExistentMarkdownReturnsZero()
        {
            Mock <IRepository <Markdown> > mockMarkdownRepository = new Mock <IRepository <Markdown> >();

            mockMarkdownRepository.Setup(x => x.GetByProductName("Bananas")).Returns((Markdown)null);

            Mock <IRepository <Product> > mockPriceRepository = new Mock <IRepository <Product> >();

            mockPriceRepository.Setup(x => x.GetAll()).Returns(productList);

            MarkdownDataAccessor markdownDataAccessor = new MarkdownDataAccessor(mockMarkdownRepository.Object,
                                                                                 mockPriceRepository.Object);
            var markdownAmount = markdownDataAccessor.GetAmountByProductName("Bananas");

            Assert.AreEqual(markdownAmount, 0);
        }
        public void GetMarkdownAmountWithExistingMarkdownReturnsRightMarkdownAmount()
        {
            Mock <IRepository <Markdown> > mockMarkdownRepository = new Mock <IRepository <Markdown> >();

            mockMarkdownRepository.Setup(x => x.GetByProductName("Can of soup")).Returns(validMarkdown);

            Mock <IRepository <Product> > mockPriceRepository = new Mock <IRepository <Product> >();

            mockPriceRepository.Setup(x => x.GetAll()).Returns(productList);

            MarkdownDataAccessor markdownDataAccessor = new MarkdownDataAccessor(mockMarkdownRepository.Object,
                                                                                 mockPriceRepository.Object);
            var markdownAmount = markdownDataAccessor.GetAmountByProductName("Can of soup");

            Assert.AreEqual(markdownAmount, validMarkdown.Amount);
        }