Checkpoint: ExchangeServiceTest
Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
buisnesslogic/src
main
java
com
plannaplan
test
java
com
plannaplan
services
@ -1,10 +1,13 @@
|
||||
package com.plannaplan.services;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.plannaplan.entities.Assignment;
|
||||
@ -116,9 +119,11 @@ public class ExchangeService {
|
||||
final Exchange exchangeOne = (Exchange) m[0];
|
||||
final Exchange exchangeTwo = (Exchange) m[1];
|
||||
return new MatchData(exchangeOne, exchangeTwo);
|
||||
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
final Set<MatchData> filterMatches = new HashSet<>(matches);
|
||||
Set<MatchData> filterMatches = new TreeSet<>((m1, m2) -> m1.compare(m2));
|
||||
filterMatches.addAll(matches);
|
||||
return filterMatches;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user