Ejemplo n.º 1
0
        public void GivenIHaveEnteredCopyOfAHarryPotterBookIntoTheShoppingBasket(int harrypottercopies, int othercopies)
        {
            switch (harrypottercopies + "" + othercopies)
            {
            case "10":
                var book = new HarryPotterBook("Harry Potter and Philosopher's Stone");
                basket.AddItems(book);
                break;

            case "20":
                basket.AddItems(new HarryPotterBook("Harry Potter and Philosopher's Stone"));
                basket.AddItems(new HarryPotterBook("Harry Potter and the Chamber of Secrets"));
                break;

            case "30":
                basket.AddItems(new HarryPotterBook("Harry Potter and Philosopher's Stone"));
                basket.AddItems(new HarryPotterBook("Harry Potter and the Chamber of Secrets"));
                basket.AddItems(new HarryPotterBook("Harry Potter and the Prizoner of Azkaban"));
                break;

            case "40":
                basket.AddItems(new HarryPotterBook("Harry Potter and Philosopher's Stone"));
                basket.AddItems(new HarryPotterBook("Harry Potter and the Chamber of Secrets"));
                basket.AddItems(new HarryPotterBook("Harry Potter and the Prizoner of Azkaban"));
                basket.AddItems(new HarryPotterBook("Harry Potter and the Goblet of Fire"));
                break;

            case "70":
                basket.AddItems(new HarryPotterBook("Harry Potter and Philosopher's Stone"));
                basket.AddItems(new HarryPotterBook("Harry Potter and the Chamber of Secrets"));
                basket.AddItems(new HarryPotterBook("Harry Potter and the Prizoner of Azkaban"));
                basket.AddItems(new HarryPotterBook("Harry Potter and the Order of the Phoenix"));
                basket.AddItems(new HarryPotterBook("Harry Potter and the Goblet of Fire"));
                basket.AddItems(new HarryPotterBook("Harry Potter and the Half-Blood Prince"));
                basket.AddItems(new HarryPotterBook("Harry Potter and the Deathly Hollows"));
                break;

            case "21":
                basket.AddItems(new HarryPotterBook("Harry Potter and Philosopher's Stone"));
                basket.AddItems(new HarryPotterBook("Harry Potter and the Chamber of Secrets"));
                basket.AddItems(new Book("Not a Harry POtter Book"));
                break;

            case "140":
                basket.AddItems(new HarryPotterBook("Harry Potter and Philosopher's Stone"));
                basket.AddItems(new HarryPotterBook("Harry Potter and the Chamber of Secrets"));
                basket.AddItems(new HarryPotterBook("Harry Potter and the Prizoner of Azkaban"));
                basket.AddItems(new HarryPotterBook("Harry Potter and the Order of the Phoenix"));
                basket.AddItems(new HarryPotterBook("Harry Potter and the Goblet of Fire"));
                basket.AddItems(new HarryPotterBook("Harry Potter and the Half-Blood Prince"));
                basket.AddItems(new HarryPotterBook("Harry Potter and the Deathly Hollows"));
                basket.AddItems(new HarryPotterBook("Harry Potter and Philosopher's Stone"));
                basket.AddItems(new HarryPotterBook("Harry Potter and the Chamber of Secrets"));
                basket.AddItems(new HarryPotterBook("Harry Potter and the Prizoner of Azkaban"));
                basket.AddItems(new HarryPotterBook("Harry Potter and the Order of the Phoenix"));
                basket.AddItems(new HarryPotterBook("Harry Potter and the Goblet of Fire"));
                basket.AddItems(new HarryPotterBook("Harry Potter and the Half-Blood Prince"));
                basket.AddItems(new HarryPotterBook("Harry Potter and the Deathly Hollows"));
                break;

            case "03":
                basket.AddItems(new Book("Other Book 1"));
                basket.AddItems(new Book("Other Book 2"));
                basket.AddItems(new Book("Other Book 3"));
                break;

            default:
                break;
            }
        }