Boolean status = actualValue.stream().allMatch(expectedValue:: contains);
if(status){
Pass
} else {
Fail
List<String> extraValue = actualValue.stream().
filter(val-> ! expectedValue.contains(val)).
Collect(Collectors.toList());
System.out.println(extraValue);
List<String> missingValue = expectedValue.stream().
filter(val1-> ! actualValue.contains(val1)).
Collect(Collectors.toList());
System.out.println(missingValue);
}
No comments:
Post a Comment