|
1 | 1 |
|
2 | 2 | package com.baeldung.hibernate.oneToMany.model; |
3 | 3 |
|
| 4 | +import static org.junit.Assert.assertEquals; |
| 5 | +import static org.junit.Assert.fail; |
| 6 | + |
4 | 7 | import org.junit.After; |
5 | 8 | import org.junit.AfterClass; |
6 | 9 | import org.junit.Before; |
7 | 10 | import org.junit.BeforeClass; |
8 | 11 | import org.junit.Test; |
9 | | -import static org.junit.Assert.*; |
10 | | - |
11 | 12 |
|
12 | 13 | public class ItemsTest { |
13 | | - |
14 | | - public ItemsTest() { |
15 | | - } |
16 | | - |
17 | | - @BeforeClass |
18 | | - public static void setUpClass() { |
19 | | - } |
20 | | - |
21 | | - @AfterClass |
22 | | - public static void tearDownClass() { |
23 | | - } |
24 | | - |
25 | | - @Before |
26 | | - public void setUp() { |
27 | | - } |
28 | | - |
29 | | - @After |
30 | | - public void tearDown() { |
31 | | - } |
32 | | - |
33 | | - @Test |
34 | | - public void testGetItemId() { |
35 | | - System.out.println("getItemId"); |
36 | | - Items instance = new Items(); |
37 | | - String expResult = ""; |
38 | | - String result = instance.getItemId(); |
39 | | - assertEquals(expResult, result); |
40 | | - fail("The test failed."); |
41 | | - } |
42 | | - |
43 | | - @Test |
44 | | - public void testSetItemId() { |
45 | | - System.out.println("setItemId"); |
46 | | - String itemId = ""; |
47 | | - Items instance = new Items(); |
48 | | - instance.setItemId(itemId); |
49 | | - fail("The test failed."); |
50 | | - } |
51 | | - |
52 | | - @Test |
53 | | - public void testGetItemTotal() { |
54 | | - System.out.println("getItemTotal"); |
55 | | - Items instance = new Items(); |
56 | | - double expResult = 0.0; |
57 | | - double result = instance.getItemTotal(); |
58 | | - assertEquals(expResult, result, 0.0); |
59 | | - fail("The test failed."); |
60 | | - } |
61 | | - |
62 | | - @Test |
63 | | - public void testSetItemTotal() { |
64 | | - System.out.println("setItemTotal"); |
65 | | - double itemTotal = 0.0; |
66 | | - Items instance = new Items(); |
67 | | - instance.setItemTotal(itemTotal); |
68 | | - fail("The test failed."); |
69 | | - } |
70 | | - |
71 | | - @Test |
72 | | - public void testGetQuantity() { |
73 | | - System.out.println("getQuantity"); |
74 | | - Items instance = new Items(); |
75 | | - int expResult = 0; |
76 | | - int result = instance.getQuantity(); |
77 | | - assertEquals(expResult, result); |
78 | | - fail("The test failed."); |
79 | | - } |
80 | | - |
81 | | - @Test |
82 | | - public void testSetQuantity() { |
83 | | - System.out.println("setQuantity"); |
84 | | - int quantity = 0; |
85 | | - Items instance = new Items(); |
86 | | - instance.setQuantity(quantity); |
87 | | - fail("The test failed."); |
88 | | - } |
89 | | - |
90 | | - @Test |
91 | | - public void testGetCart() { |
92 | | - System.out.println("getCart"); |
93 | | - Items instance = new Items(); |
94 | | - Cart expResult = null; |
95 | | - Cart result = instance.getCart(); |
96 | | - assertEquals(expResult, result); |
97 | | - fail("The test failed."); |
98 | | - } |
99 | | - |
100 | | - @Test |
101 | | - public void testSetCart() { |
102 | | - System.out.println("setCart"); |
103 | | - Cart cart = null; |
104 | | - Items instance = new Items(); |
105 | | - instance.setCart1(cart); |
106 | | - fail("The test failed."); |
107 | | - } |
108 | | - |
109 | | - @Test |
110 | | - public void testGetId() { |
111 | | - System.out.println("getId"); |
112 | | - Items instance = new Items(); |
113 | | - long expResult = 0L; |
114 | | - long result = instance.getId(); |
115 | | - assertEquals(expResult, result); |
116 | | - fail("The test failed."); |
117 | | - } |
118 | | - |
119 | | - @Test |
120 | | - public void testSetId() { |
121 | | - System.out.println("setId"); |
122 | | - long id = 0L; |
123 | | - Items instance = new Items(); |
124 | | - instance.setId(id); |
125 | | - fail("The test failed."); |
126 | | - } |
127 | | - |
128 | | -} |
129 | 14 |
|
130 | | - |
| 15 | + public ItemsTest() { |
| 16 | + } |
| 17 | + |
| 18 | + @BeforeClass |
| 19 | + public static void setUpClass() { |
| 20 | + } |
| 21 | + |
| 22 | + @AfterClass |
| 23 | + public static void tearDownClass() { |
| 24 | + } |
| 25 | + |
| 26 | + @Before |
| 27 | + public void setUp() { |
| 28 | + } |
| 29 | + |
| 30 | + @After |
| 31 | + public void tearDown() { |
| 32 | + } |
| 33 | + |
| 34 | + @Test |
| 35 | + public void testGetItemId() { |
| 36 | + System.out.println("getItemId"); |
| 37 | + Items instance = new Items(); |
| 38 | + String expResult = ""; |
| 39 | + String result = instance.getItemId(); |
| 40 | + assertEquals(expResult, result); |
| 41 | + fail("The test failed."); |
| 42 | + } |
| 43 | + |
| 44 | + @Test |
| 45 | + public void testSetItemId() { |
| 46 | + System.out.println("setItemId"); |
| 47 | + String itemId = ""; |
| 48 | + Items instance = new Items(); |
| 49 | + instance.setItemId(itemId); |
| 50 | + fail("The test failed."); |
| 51 | + } |
| 52 | + |
| 53 | + @Test |
| 54 | + public void testGetItemTotal() { |
| 55 | + System.out.println("getItemTotal"); |
| 56 | + Items instance = new Items(); |
| 57 | + double expResult = 0.0; |
| 58 | + double result = instance.getItemTotal(); |
| 59 | + assertEquals(expResult, result, 0.0); |
| 60 | + fail("The test failed."); |
| 61 | + } |
| 62 | + |
| 63 | + @Test |
| 64 | + public void testSetItemTotal() { |
| 65 | + System.out.println("setItemTotal"); |
| 66 | + double itemTotal = 0.0; |
| 67 | + Items instance = new Items(); |
| 68 | + instance.setItemTotal(itemTotal); |
| 69 | + fail("The test failed."); |
| 70 | + } |
| 71 | + |
| 72 | + @Test |
| 73 | + public void testGetQuantity() { |
| 74 | + System.out.println("getQuantity"); |
| 75 | + Items instance = new Items(); |
| 76 | + int expResult = 0; |
| 77 | + int result = instance.getQuantity(); |
| 78 | + assertEquals(expResult, result); |
| 79 | + fail("The test failed."); |
| 80 | + } |
| 81 | + |
| 82 | + @Test |
| 83 | + public void testSetQuantity() { |
| 84 | + System.out.println("setQuantity"); |
| 85 | + int quantity = 0; |
| 86 | + Items instance = new Items(); |
| 87 | + instance.setQuantity(quantity); |
| 88 | + fail("The test failed."); |
| 89 | + } |
| 90 | + |
| 91 | + @Test |
| 92 | + public void testGetCart() { |
| 93 | + System.out.println("getCart"); |
| 94 | + Items instance = new Items(); |
| 95 | + Cart expResult = null; |
| 96 | + Cart result = instance.getCart(); |
| 97 | + assertEquals(expResult, result); |
| 98 | + fail("The test failed."); |
| 99 | + } |
| 100 | + |
| 101 | + @Test |
| 102 | + public void testSetCart() { |
| 103 | + System.out.println("setCart"); |
| 104 | + Cart cart = null; |
| 105 | + Items instance = new Items(); |
| 106 | + instance.setCart(cart); |
| 107 | + fail("The test failed."); |
| 108 | + } |
| 109 | + |
| 110 | + @Test |
| 111 | + public void testGetId() { |
| 112 | + System.out.println("getId"); |
| 113 | + Items instance = new Items(); |
| 114 | + long expResult = 0L; |
| 115 | + long result = instance.getId(); |
| 116 | + assertEquals(expResult, result); |
| 117 | + fail("The test failed."); |
| 118 | + } |
| 119 | + |
| 120 | + @Test |
| 121 | + public void testSetId() { |
| 122 | + System.out.println("setId"); |
| 123 | + long id = 0L; |
| 124 | + Items instance = new Items(); |
| 125 | + instance.setId(id); |
| 126 | + fail("The test failed."); |
| 127 | + } |
| 128 | + |
131 | 129 | } |
0 commit comments