11package com .codedifferently .lesson15 ;
22
33import static org .junit .jupiter .api .Assertions .assertEquals ;
4+
45import org .junit .jupiter .api .Test ;
56
67class EmployeeTest {
@@ -15,97 +16,91 @@ public void getId() {
1516 assertEquals (expectedId , actual );
1617 }
1718
18-
19- @ Test
19+ @ Test
2020 public void setId () {
2121 int expectedId = 7 ;
2222
2323 Employee employee1 = new Employee (7 , null , null , 0 , null );
2424
2525 employee1 .setId (expectedId );
2626
27- assertEquals ( expectedId , employee1 .getId ());
27+ assertEquals (expectedId , employee1 .getId ());
2828 }
2929
30-
31- @ Test
30+ @ Test
3231 public void getName () {
3332 var expectedNameString = "Montez" ;
3433
3534 Employee employee1 = new Employee (0 , "Montez" , "" , 0 , null );
3635
3736 var actual = employee1 .getName ();
3837
39- assertEquals ( expectedNameString , actual );
38+ assertEquals (expectedNameString , actual );
4039 }
4140
42-
43- @ Test
41+ @ Test
4442 public void setName () {
4543 var expectedNameString = "Montez" ;
4644
4745 Employee employee1 = new Employee (0 , "Montez" , "" , 0 , null );
4846
4947 employee1 .setName (expectedNameString );
5048
51- assertEquals ( expectedNameString , employee1 .getName ());
49+ assertEquals (expectedNameString , employee1 .getName ());
5250 }
5351
54- @ Test
52+ @ Test
5553 public void getDepartment () {
5654 var expectedString = "Tech" ;
5755
58- Employee employee1 = new Employee (0 , null , "Tech" , 0 , null );
56+ Employee employee1 = new Employee (0 , null , "Tech" , 0 , null );
5957
6058 var actual = employee1 .getDepartment ();
6159
62- assertEquals ( expectedString , actual );
60+ assertEquals (expectedString , actual );
6361 }
6462
65- @ Test
63+ @ Test
6664 public void setDepartment () {
6765 var expectedDepartment = "Sales" ;
6866
6967 Employee employee1 = new Employee (0 , null , "Tech" , 0 , null );
7068
7169 employee1 .setDepartment ("Sales" );
7270
73- assertEquals ( expectedDepartment , employee1 .getDepartment ());
71+ assertEquals (expectedDepartment , employee1 .getDepartment ());
7472 }
7573
76- @ Test
74+ @ Test
7775 public void getSalary () {
7876 var expectedSalary = 50000 ;
7977
80- Employee employye2 = new Employee ( 0 , null , null , expectedSalary , null );
78+ Employee employye2 = new Employee (0 , null , null , expectedSalary , null );
8179
8280 var actual = employye2 .getSalary ();
8381
84- assertEquals ( expectedSalary , actual );
82+ assertEquals (expectedSalary , actual );
8583 }
8684
87- @ Test
85+ @ Test
8886 public void setSalary () {
8987 int expectedSalary = 4200 ;
9088
9189 Employee employee1 = new Employee (0 , null , null , expectedSalary , null );
9290
9391 employee1 .setSalary (expectedSalary );
9492
95- assertEquals ( expectedSalary , employee1 .getSalary ());
93+ assertEquals (expectedSalary , employee1 .getSalary ());
9694 }
9795
9896 @ Test
99- public void setDetails () {
100- var expectedDetailString = "Non Hipanic Black " ;
97+ public void getDetails () {
98+ var expectedString = "Detail " ;
10199
102- Employee employee = new Employee (0 , null , null , 0 , "Non Hispanic Black " );
100+ Employee employee1 = new Employee (0 , null , null , 0 , "Detail " );
103101
104- var actual = employee .getDetails ();
102+ var actual = employee1 .getDetails ();
105103
106- assertEquals (expectedDetailString , actual );
104+ assertEquals (expectedString , actual );
107105 }
108106}
109-
110-
111-
0 commit comments