-
Notifications
You must be signed in to change notification settings - Fork 109
Expand file tree
/
Copy pathBasketTest.java
More file actions
46 lines (29 loc) · 945 Bytes
/
BasketTest.java
File metadata and controls
46 lines (29 loc) · 945 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package com.booleanuk.core;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
class BasketTest {
@Test
public void testAddBagel() {
Basket basket = new Basket();
String bagelType = "Original";
Assertions.assertTrue(basket.addBagel(bagelType));
}
@Test
public void testRemoveBagel() {
Basket basket = new Basket();
basket.addBagel("Special");
String bagelType = "Special";
Assertions.assertTrue(basket.removeBagel(bagelType));
}
@Test
public void testChangeBasketCapacity() {
Basket basket = new Basket();
basket.addBagel("Onion");
basket.addBagel("Cheese");
basket.addBagel("Lettuce");
basket.addBagel("Salt");
Assertions.assertFalse(basket.addBagel("Meat"));
basket.changeBasketCapacity(10);
Assertions.assertTrue(basket.addBagel("Plain"));
}
}