public void GetAllReturnsAListOfMarkdowns()
        {
            IRepository <Markdown> markdownRepository = new MarkdownRepository();

            var priceList = markdownRepository.GetAll();

            Assert.NotNull(priceList);
        }
        public void SaveAddsMarkdownToList()
        {
            IRepository <Markdown> markdownRepository = new MarkdownRepository();

            markdownRepository.Save(markdown);

            var priceList = markdownRepository.GetAll();

            Assert.AreEqual(priceList.Count, 1);
        }
        public void SaveAddsRightMarkdownToList()
        {
            IRepository <Markdown> markdownRepository = new MarkdownRepository();

            markdownRepository.Save(markdown);

            var markdownList = markdownRepository.GetAll();

            Assert.AreEqual(markdownList[0].ProductName, "Can of soup");
            Assert.AreEqual(markdownList[0].Amount, 0.2f);
        }
        public void UpdateWithExistingMarkdownUpdatesRightMarkdown()
        {
            IRepository <Markdown> markdownRepository = new MarkdownRepository();

            markdownRepository.Save(markdown);
            bool updated      = markdownRepository.Update(updatedMarkdown);
            var  markdownList = markdownRepository.GetAll();

            Assert.IsTrue(updated);
            Assert.AreEqual(markdownList[0].ProductName, "Can of soup");
            Assert.AreEqual(markdownList[0].Amount, 0.45f);
        }