Esempio n. 1
0
 public void Cost_2Books(int book1, int book2)
 {
     var set = new BookSet();
     set.Add(book1);
     set.Add(book2);
     Assert.AreEqual(8 * 2 * 0.95, set.Cost());
 }
Esempio n. 2
0
 public void Cost_3Books(int book1, int book2, int book3)
 {
     var set = new BookSet();
     set.Add(book1);
     set.Add(book2);
     set.Add(book3);
     Assert.AreEqual(8 * 3 * 0.90, set.Cost());
 }
Esempio n. 3
0
 public void Cost_4Books(int book1, int book2, int book3, int book4)
 {
     var set = new BookSet();
     set.Add(book1);
     set.Add(book2);
     set.Add(book3);
     set.Add(book4);
     Assert.AreEqual(8 * 4 * 0.80, set.Cost());
 }
Esempio n. 4
0
 public void Cost_Empty()
 {
     var set = new BookSet();
     Assert.AreEqual(0, set.Cost());
 }
Esempio n. 5
0
 public void Cost_4Books()
 {
     var set = new BookSet();
     set.Add(1);
     set.Add(2);
     set.Add(3);
     set.Add(4);
     set.Add(5);
     Assert.AreEqual(8 * 5 * 0.75, set.Cost());
 }
Esempio n. 6
0
 public void Cost_1Book(int book)
 {
     var set = new BookSet();
     set.Add(book);
     Assert.AreEqual(8, set.Cost());
 }