|
@@ -6,7 +6,60 @@ import org.junit.Test;
|
6
|
6
|
public class InventoryTest {
|
7
|
7
|
@Test
|
8
|
8
|
public void updateQuantityTest(){
|
|
9
|
+ Item item = new Item("Sulfuras", 1, 1);
|
9
|
10
|
Assert.assertEquals(1, 1);
|
10
|
11
|
}
|
|
12
|
+
|
|
13
|
+ @Test
|
|
14
|
+ public void getNameTest(){
|
|
15
|
+ Item tape = new Item("Some new tape",47,55);
|
|
16
|
+ String expectedTapeName = "Some new tape";
|
|
17
|
+ String actualTapeName = tape.getName();
|
|
18
|
+ Assert.assertEquals(expectedTapeName, actualTapeName);
|
|
19
|
+ }
|
|
20
|
+
|
|
21
|
+ @Test
|
|
22
|
+ public void setNameTest(){
|
|
23
|
+ Item tape = new Item("Some new tape", 47,55);
|
|
24
|
+ String expectedTapeName = "New Tape";
|
|
25
|
+ tape.setName("New Tape");
|
|
26
|
+ String actualTapeName = tape.getName();
|
|
27
|
+ Assert.assertEquals(expectedTapeName, actualTapeName);
|
|
28
|
+ }
|
|
29
|
+
|
|
30
|
+ @Test
|
|
31
|
+ public void getSellInTest(){
|
|
32
|
+ Item tape = new Item("Some new tape", 47,55);
|
|
33
|
+ int expectedSellIn = 47;
|
|
34
|
+ int actualSellIn = tape.getSellIn();
|
|
35
|
+ Assert.assertEquals(expectedSellIn, actualSellIn);
|
|
36
|
+ }
|
|
37
|
+
|
|
38
|
+ @Test
|
|
39
|
+ public void setSellInTest(){
|
|
40
|
+ Item tape = new Item("Some new tape", 47,55);
|
|
41
|
+ int expectedSellIn = 47;
|
|
42
|
+ tape.setSellIn(47);
|
|
43
|
+ int actualSellIn = tape.getSellIn();
|
|
44
|
+ Assert.assertEquals(expectedSellIn, actualSellIn);
|
|
45
|
+ }
|
|
46
|
+
|
|
47
|
+ @Test
|
|
48
|
+ public void getQualityTest(){
|
|
49
|
+ Item tape = new Item("Some new tape", 47,55);
|
|
50
|
+ int expectedQuality = 55;
|
|
51
|
+ int actualQuality = tape.getQuality();
|
|
52
|
+ Assert.assertEquals(expectedQuality, actualQuality);
|
|
53
|
+ }
|
|
54
|
+
|
|
55
|
+ @Test
|
|
56
|
+ public void setQualityTest(){
|
|
57
|
+ Item tape = new Item("Some new tape", 47,55);
|
|
58
|
+ int expectedQuality = 55;
|
|
59
|
+ tape.setQuality(55);
|
|
60
|
+ int actualQuality = tape.getQuality();
|
|
61
|
+ Assert.assertEquals(expectedQuality, actualQuality);
|
|
62
|
+ }
|
|
63
|
+
|
11
|
64
|
}
|
12
|
65
|
|