File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed
lesson_15/tdd/tdd_app/src
main/java/com/codedifferently/lesson15
test/java/com/codedifferently/lesson15 Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 1
1
package com .codedifferently .lesson15 ;
2
2
3
+ import java .io .Console ;
4
+
3
5
public class Employee {
4
6
private int id ;
5
7
private String name ;
@@ -45,4 +47,10 @@ public double getSalary() {
45
47
public void setSalary (double salary ) {
46
48
this .salary = salary ;
47
49
}
50
+ public String getDetails () {
51
+ return details ;
52
+ }
53
+ public void getDetails (String details ){
54
+ return "The employee, " +name + " in " +department + " with the id of " +id + " has a salary of " +salary + " ." ;
55
+ }
48
56
}
Original file line number Diff line number Diff line change @@ -6,26 +6,29 @@ public class EmployeeManagerTest {
6
6
@ Test
7
7
void testAddEmployee () {
8
8
//employees.put(employee.getId(), employee);
9
- var addEmployee = new ;
9
+ var newEmployee = new employees . put ( employee . getId (), employee ) ;
10
10
}
11
11
12
12
@ Test
13
13
void testUpdateEmployee () {
14
-
14
+ // assertEmployeeInCollection(employee.getId());
15
+ //employees.put(employee.getId(), employee);
15
16
}
16
17
17
18
@ Test
18
19
void testGetEmployee () {
19
-
20
+ //assertEmployeeInCollection(id);
21
+ //return employees.get(id);
20
22
}
21
23
22
24
@ Test
23
25
void testRemoveEmployee () {
24
-
26
+ //assertEmployeeInCollection(id);
27
+ //employees.remove(id);
25
28
}
26
29
27
30
@ Test
28
31
void testGetEmployeeCount () {
29
-
32
+ // return employees.size();
30
33
}
31
34
}
You can’t perform that action at this time.
0 commit comments