|
@@ -11,19 +11,33 @@ public class ProductTest {
|
11
|
11
|
Product product = new Product();
|
12
|
12
|
}
|
13
|
13
|
|
14
|
|
-// @Test
|
15
|
|
-// public void testConstruction_WithName(){
|
16
|
|
-// //Given
|
17
|
|
-// String expectedName = "T-Shirt";
|
18
|
|
-//
|
19
|
|
-// //When
|
20
|
|
-// Product product = new Product(expectedName);
|
21
|
|
-//
|
22
|
|
-// //Then
|
23
|
|
-// String actualName = product.getName();
|
24
|
|
-// Assert.assertEquals(expectedName, actualName);
|
25
|
|
-// }
|
26
|
|
-//
|
|
14
|
+ @Test
|
|
15
|
+ public void testConstruction_WithName(){
|
|
16
|
+ //Given
|
|
17
|
+ String expectedName = "T-Shirt";
|
|
18
|
+
|
|
19
|
+ //When
|
|
20
|
+ Product product = new Product(expectedName);
|
|
21
|
+
|
|
22
|
+ //Then
|
|
23
|
+ String actualName = product.getName();
|
|
24
|
+ Assert.assertEquals(expectedName, actualName);
|
|
25
|
+ }
|
|
26
|
+
|
|
27
|
+ @Test
|
|
28
|
+ public void testGetSetName(){
|
|
29
|
+ //Given
|
|
30
|
+ String expectedName = "Pants";
|
|
31
|
+ Product product = new Product();
|
|
32
|
+
|
|
33
|
+ //When
|
|
34
|
+ product.setName(expectedName);
|
|
35
|
+
|
|
36
|
+ //Then
|
|
37
|
+ String actualName = product.getName();
|
|
38
|
+ Assert.assertEquals(expectedName, actualName);
|
|
39
|
+ }
|
|
40
|
+
|
27
|
41
|
// @Test
|
28
|
42
|
// public void testConstruction_WithNameAndPrice(){
|
29
|
43
|
// //Given
|
|
@@ -42,20 +56,6 @@ public class ProductTest {
|
42
|
56
|
// }
|
43
|
57
|
//
|
44
|
58
|
// @Test
|
45
|
|
-// public void testGetSetName(){
|
46
|
|
-// //Given
|
47
|
|
-// String expectedName = "Pants";
|
48
|
|
-// Product product = new Product();
|
49
|
|
-//
|
50
|
|
-// //When
|
51
|
|
-// product.setName(expectedName);
|
52
|
|
-//
|
53
|
|
-// //Then
|
54
|
|
-// String actualName = product.getName();
|
55
|
|
-// Assert.assertEquals(expectedName, actualName);
|
56
|
|
-// }
|
57
|
|
-//
|
58
|
|
-// @Test
|
59
|
59
|
// public void testGetSetPrice(){
|
60
|
60
|
// //Given
|
61
|
61
|
// double expectedPrice = 15.39;
|