22
33import static org .assertj .core .api .Assertions .assertThat ;
44import static org .junit .jupiter .api .Assertions .assertEquals ;
5+
56import org .junit .jupiter .api .Test ;
67
78class Lesson15Test {
@@ -18,52 +19,58 @@ public void testGetGreeting() {
1819 }
1920
2021 @ Test
21- public void testEmployeeId_Exists (){
22+ public void testEmployeeId_Exists () {
2223 Employee employee = new Employee (0 , null , null , 0 );
2324 assertEquals (0 , employee .getId ());
2425 }
2526
2627 @ Test
27- public void testEmployeeName_Exists (){
28+ public void testEmployeeName_Exists () {
2829 Employee employee = new Employee (0 , "dave" , null , 0 );
2930 assertEquals ("dave" , employee .getName ());
3031 }
31- @ Test
32- public void testEmployeeDepartment_Exists (){
32+
33+ @ Test
34+ public void testEmployeeDepartment_Exists () {
3335 Employee employee = new Employee (0 , "dave" , "IT" , 0 );
3436 assertEquals ("IT" , employee .getDepartment ());
3537 }
38+
3639 @ Test
37- public void testEmployeeSalary_Exists (){
40+ public void testEmployeeSalary_Exists () {
3841 Employee employee = new Employee (0 , "dave" , "IT" , 10000 );
3942 assertEquals (10000 , employee .getSalary ());
4043 }
44+
4145 @ Test
42- public void testGetEmployee (){
46+ public void testGetEmployee () {
4347 Employee employee = new Employee (10 , null , null , 0 );
4448 EmployeeManager manager = new EmployeeManager ();
4549 manager .addEmployee (employee );
4650 assertEquals (employee , manager .getEmployee (10 ));
4751 }
52+
4853 @ Test
49- public void testGetEmployeeCount (){
54+ public void testGetEmployeeCount () {
5055 Employee employee = new Employee (10 , null , null , 0 );
5156 EmployeeManager manager = new EmployeeManager ();
5257 manager .addEmployee (employee );
5358 assertEquals (1 , manager .getEmployeeCount ());
54- }
55- @ Test
56- public void testGetEmployeeUpate (){
59+ }
60+
61+ @ Test
62+ public void testGetEmployeeUpate () {
5763 Employee employee2 = new Employee (10 , "BillyBobJenkins" , null , 0 );
5864 Employee employee = new Employee (10 , "Dave" , null , 0 );
5965 EmployeeManager manager = new EmployeeManager ();
6066 manager .addEmployee (employee );
6167 manager .updateEmployee (employee2 );
6268
6369 assertEquals (employee2 , manager .getEmployee (10 ));
64- }
65- @ Test
66- public void testGetEmployeeRemove (){
70+ }
71+
72+ @ Test
73+ public void testGetEmployeeRemove () {
6774 Employee employee2 = new Employee (10 , "BillyBobJenkins" , null , 0 );
6875 Employee employee = new Employee (11 , "Dave" , null , 0 );
6976 EmployeeManager manager = new EmployeeManager ();
@@ -72,11 +79,12 @@ public void testGetEmployeeRemove(){
7279 manager .removeEmployee (10 );
7380
7481 assertEquals (1 , manager .getEmployeeCount ());
75- }
82+ }
83+
7684 @ Test
77- public void testGetDetails (){
85+ public void testGetDetails () {
7886 Employee employee2 = new Employee (10 , "BillyBobJenkins" , "IT" , 10 );
79- assertEquals ("ID: 10, Name: BillyBobJenkins, Department: IT, Salary: 10.0" , employee2 . getDetails ());
80-
87+ assertEquals (
88+ "ID: 10, Name: BillyBobJenkins, Department: IT, Salary: 10.0" , employee2 . getDetails ());
8189 }
82- }
90+ }
0 commit comments