Просмотр исходного кода

Merge pull request #514 from Smarticles101/ignore-bookstore

book-store: add hint to @Ignore annotation
FridaTveit 9 лет назад
Родитель
Сommit
6856b78827
1 измененных файлов: 12 добавлений и 12 удалений
  1. 12
    12
      exercises/book-store/src/test/java/BookstoreTest.java

+ 12
- 12
exercises/book-store/src/test/java/BookstoreTest.java Просмотреть файл

20
     assertEquals(8, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
20
     assertEquals(8, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
21
   }
21
   }
22
 
22
 
23
-  @Ignore
23
+  @Ignore("Remove to run test")
24
   @Test
24
   @Test
25
   public void twoOfSameBook() {
25
   public void twoOfSameBook() {
26
     List<Integer> books = new ArrayList<>(Arrays.asList(1, 1));
26
     List<Integer> books = new ArrayList<>(Arrays.asList(1, 1));
28
     assertEquals(16, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
28
     assertEquals(16, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
29
   }
29
   }
30
 
30
 
31
-  @Ignore
31
+  @Ignore("Remove to run test")
32
   @Test
32
   @Test
33
   public void emptyBasket() {
33
   public void emptyBasket() {
34
     List<Integer> books = new ArrayList<>();
34
     List<Integer> books = new ArrayList<>();
36
     assertEquals(0, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
36
     assertEquals(0, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
37
   }
37
   }
38
 
38
 
39
-  @Ignore
39
+  @Ignore("Remove to run test")
40
   @Test
40
   @Test
41
   public void twoDifferentBooks() {
41
   public void twoDifferentBooks() {
42
     List<Integer> books = new ArrayList<>(Arrays.asList(1, 2));
42
     List<Integer> books = new ArrayList<>(Arrays.asList(1, 2));
44
     assertEquals(15.20, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
44
     assertEquals(15.20, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
45
   }
45
   }
46
 
46
 
47
-  @Ignore
47
+  @Ignore("Remove to run test")
48
   @Test
48
   @Test
49
   public void threeDifferentBooks() {
49
   public void threeDifferentBooks() {
50
     List<Integer> books = new ArrayList<>(Arrays.asList(1, 2, 3));
50
     List<Integer> books = new ArrayList<>(Arrays.asList(1, 2, 3));
52
     assertEquals(21.6, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
52
     assertEquals(21.6, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
53
   }
53
   }
54
 
54
 
55
-  @Ignore
55
+  @Ignore("Remove to run test")
56
   @Test
56
   @Test
57
   public void fourDifferentBooks() {
57
   public void fourDifferentBooks() {
58
     List<Integer> books = new ArrayList<>(Arrays.asList(1, 2, 3, 4));
58
     List<Integer> books = new ArrayList<>(Arrays.asList(1, 2, 3, 4));
60
     assertEquals(25.6, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
60
     assertEquals(25.6, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
61
   }
61
   }
62
 
62
 
63
-  @Ignore
63
+  @Ignore("Remove to run test")
64
   @Test
64
   @Test
65
   public void fiveDifferentBooks() {
65
   public void fiveDifferentBooks() {
66
     List<Integer> books = new ArrayList<>(Arrays.asList(1, 2, 3, 4, 5));
66
     List<Integer> books = new ArrayList<>(Arrays.asList(1, 2, 3, 4, 5));
68
     assertEquals(30, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
68
     assertEquals(30, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
69
   }
69
   }
70
 
70
 
71
-  @Ignore
71
+  @Ignore("Remove to run test")
72
   @Test
72
   @Test
73
   public void twoGroupsOfFourIsCheaperThanGroupOfFivePlusGroupOfThree() {
73
   public void twoGroupsOfFourIsCheaperThanGroupOfFivePlusGroupOfThree() {
74
     List<Integer> books = new ArrayList<>(Arrays.asList(1, 1, 2, 2, 3, 3, 4, 5));
74
     List<Integer> books = new ArrayList<>(Arrays.asList(1, 1, 2, 2, 3, 3, 4, 5));
76
     assertEquals(51.20, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
76
     assertEquals(51.20, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
77
   }
77
   }
78
 
78
 
79
-  @Ignore
79
+  @Ignore("Remove to run test")
80
   @Test
80
   @Test
81
   public void groupOfFourPlusGroupOfTwoIsCheaperThanTwoGroupsOfThree() {
81
   public void groupOfFourPlusGroupOfTwoIsCheaperThanTwoGroupsOfThree() {
82
     List<Integer> books = new ArrayList<>(Arrays.asList(1, 1, 2, 2, 3, 4));
82
     List<Integer> books = new ArrayList<>(Arrays.asList(1, 1, 2, 2, 3, 4));
84
     assertEquals(40.8, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
84
     assertEquals(40.8, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
85
   }
85
   }
86
 
86
 
87
-  @Ignore
87
+  @Ignore("Remove to run test")
88
   @Test
88
   @Test
89
   public void twoEachOfFirst4BooksAnd1CopyEachOfRest() {
89
   public void twoEachOfFirst4BooksAnd1CopyEachOfRest() {
90
     List<Integer> books = new ArrayList<>(Arrays.asList(1, 1, 2, 2, 3, 3, 4, 4, 5));
90
     List<Integer> books = new ArrayList<>(Arrays.asList(1, 1, 2, 2, 3, 3, 4, 4, 5));
92
     assertEquals(55.60, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
92
     assertEquals(55.60, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
93
   }
93
   }
94
 
94
 
95
-  @Ignore
95
+  @Ignore("Remove to run test")
96
   @Test
96
   @Test
97
   public void twoCopiesOfEachBook() {
97
   public void twoCopiesOfEachBook() {
98
     List<Integer> books = new ArrayList<>(Arrays.asList(1, 1, 2, 2, 3, 3, 4, 4, 5, 5));
98
     List<Integer> books = new ArrayList<>(Arrays.asList(1, 1, 2, 2, 3, 3, 4, 4, 5, 5));
100
     assertEquals(60.00, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
100
     assertEquals(60.00, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
101
   }
101
   }
102
 
102
 
103
-  @Ignore
103
+  @Ignore("Remove to run test")
104
   @Test
104
   @Test
105
   public void threeCopiesOfFirstBookAnd2EachOfRemaining() {
105
   public void threeCopiesOfFirstBookAnd2EachOfRemaining() {
106
     List<Integer> books = new ArrayList<>(Arrays.asList(1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 1));
106
     List<Integer> books = new ArrayList<>(Arrays.asList(1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 1));
108
     assertEquals(68.00, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
108
     assertEquals(68.00, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
109
   }
109
   }
110
 
110
 
111
-  @Ignore
111
+  @Ignore("Remove to run test")
112
   @Test
112
   @Test
113
   public void threeEachOFirst2BooksAnd2EachOfRemainingBooks() {
113
   public void threeEachOFirst2BooksAnd2EachOfRemainingBooks() {
114
     List<Integer> books = new ArrayList<>(Arrays.asList(1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 1, 2));
114
     List<Integer> books = new ArrayList<>(Arrays.asList(1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 1, 2));