Behavioral.Iterator.IteratorTest.setUp()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
dl 0
loc 3
rs 10
1
/*
2
 * @author  : Jagepard <[email protected]>
3
 * @license https://mit-license.org/ MIT
4
 */
5
6
package Behavioral.Iterator;
7
8
import org.junit.jupiter.api.BeforeEach;
9
import org.junit.jupiter.api.Test;
10
11
import static org.junit.jupiter.api.Assertions.*;
12
13
class IteratorTest {
14
15
    private ClientInterface client;
16
17
    @BeforeEach
18
    void setUp() {
19
        this.client = new Client();
20
    }
21
22
    @Test
23
    void testAggregatesItems() {
24
        this.client.addItemToTheBucket(new Item("Tights", 150, "darned"));
25
        IteratorInterface employee = new Iterator(this.client.getBucket());
26
27
        assertEquals("Tights 150 darned\n", employee.iterateItems());
28
    }
29
}