Skip to content

Commit 1db7614

Browse files
committed
Add documentation to B_MaxSalaryInEachDept.java
1 parent fe7f130 commit 1db7614

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

src/test/java/com/github/streams/interview/problems/employee/A_MinSalaryInEachDept.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ void testMinSalaryInEachDepartment() {
3030
final var employees = DummyEmployees.randomEmployees();
3131

3232
final var mySolution = InterviewProblemSolutions.getMinSalaryInEachDepartment(employees);
33-
final var yourSolution = Map.of();
33+
final var yourSolution = Map.<String, Long>of();
3434

3535
Assertions.assertEquals(mySolution, yourSolution);
3636
}

src/test/java/com/github/streams/interview/problems/employee/B_MaxSalaryInEachDept.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void testMaxSalaryInEachDept() {
3232
final var employees = DummyEmployees.randomEmployees();
3333

3434
final var mySolution = InterviewProblemSolutions.getHighestSalaryInEachDepartment(employees);
35-
final var yourSolution = Map.of();
35+
final var yourSolution = Map.<String, Long>of();
3636

3737
Assertions.assertEquals(mySolution, yourSolution);
3838
}

src/test/java/com/github/streams/interview/problems/employee/C_SumOfSalaryInEachDept.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class C_SumOfSalaryInEachDept {
3131
void sumOfSalariesInEachDepartment() {
3232
final var employees = DummyEmployees.randomEmployees();
3333
final var mySolution = InterviewProblemSolutions.getSumOfSalariesOnEachDepartment(employees);
34-
final var yourSolution = Map.of();
34+
final var yourSolution = Map.<String, Long>of();
3535

3636
Assertions.assertEquals(mySolution, yourSolution);
3737
}

src/test/java/com/github/streams/interview/problems/employee/D_NumberOfEmployeeInEachDept.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void countNumberOfEmployeeBelongToEachDept() {
3535
employees.stream()
3636
.collect(Collectors.groupingBy(e -> e.department().name(), Collectors.counting()));
3737

38-
final var yourSolution = Map.of();
38+
final var yourSolution = Map.<String, Long>of();
3939
Assertions.assertEquals(mySolution, yourSolution);
4040
}
4141
}

src/test/java/com/github/streams/interview/problems/employee/E_EmployeesBelongToEachDept.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package com.github.streams.interview.problems.employee;
22

33
import com.github.streams.interview.InterviewProblemSolutions;
4+
import com.github.streams.interview.problems.employee.ignore.domain_related.Department;
45
import com.github.streams.interview.problems.employee.ignore.domain_related.dummy_data.DummyEmployees;
6+
import java.util.List;
57
import java.util.Map;
68
import org.junit.jupiter.api.Assertions;
79
import org.junit.jupiter.api.Disabled;
@@ -13,7 +15,7 @@ class E_EmployeesBelongToEachDept {
1315
void employeesBelongToEachDept() {
1416
final var employees = DummyEmployees.randomEmployees();
1517
final var mySolution = InterviewProblemSolutions.getEmployeesBelongToEachDepartment(employees);
16-
final var yourSolution = Map.of();
18+
final var yourSolution = Map.<Department, List<String>>of();
1719

1820
Assertions.assertEquals(yourSolution, mySolution);
1921
}

0 commit comments

Comments
 (0)