Skip to content

Commit

Permalink
Merge branch 'main' into completed
Browse files Browse the repository at this point in the history
  • Loading branch information
tboychuk committed Feb 6, 2023
2 parents c36f3db + 1444c25 commit 6ab2baa
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,14 +288,11 @@ void strictProcessorTypeParameterIsCalledT() {
void strictProcessorTypeParameterIsBoundBySerializableAndComparable() {
var typeParameters = StrictProcessor.class.getTypeParameters();
var typeParam = typeParameters[0];
assert (typeParam.getBounds().length == 2);
var serializableBoundType = typeParam.getBounds()[0];
var comparableBoundType = typeParam.getBounds()[1];

assertThat(serializableBoundType.getTypeName())
.isEqualTo(Serializable.class.getTypeName());
assertThat(comparableBoundType.getTypeName())
.isEqualTo(String.format("%s<? super %s>", Comparable.class.getTypeName(), TYPE_PARAMETER_NAME));
assertThat(typeParam.getBounds())
.hasSize(2)
.extracting(Type::getTypeName)
.containsExactlyInAnyOrder(Serializable.class.getTypeName(),
String.format("%s<? super %s>", Comparable.class.getTypeName(), TYPE_PARAMETER_NAME));
}

@Test
Expand Down

0 comments on commit 6ab2baa

Please sign in to comment.