public void 買0本書_合計_0元()
        {
            var target   = new BookStoreCart();
            var expected = 0m;
            var books    = new List <Book>();

            var actual = target.CalculateDealPrice(books);

            Assert.AreEqual(expected, actual);
        }
        public void 只買1本第1集_合計_100元()
        {
            var target   = new BookStoreCart();
            var expected = 100m;

            var books = new List <Book>();

            books.AddRange(Book.GetList(new BookHarryPotter(1), 1));

            var actual = target.CalculateDealPrice(books);

            Assert.AreEqual(expected, actual);
        }
        public void 買第1集_第2集_第3集_第4集_各1本_合計_320元()
        {
            var target   = new BookStoreCart();
            var expected = 320m;

            var books = new List <Book>();

            books.AddRange(Book.GetList(new BookHarryPotter(1), 1));
            books.AddRange(Book.GetList(new BookHarryPotter(2), 1));
            books.AddRange(Book.GetList(new BookHarryPotter(3), 1));
            books.AddRange(Book.GetList(new BookHarryPotter(4), 1));

            var actual = target.CalculateDealPrice(books);

            Assert.AreEqual(expected, actual);
        }