File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
main/java/org/soujava/demos/mongodb/document
test/java/org/soujava/demos/mongodb/document Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -30,5 +30,5 @@ public interface RoomRepository {
30
30
void deleteBy ();
31
31
32
32
@ Query ("WHERE type = :type" )
33
- List <Room > findByType (@ Param ("type" ) RoomType type );
33
+ List <Room > findByType (@ Param ("type" ) String type );
34
34
}
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ void cleanUp() {
117
117
@ ParameterizedTest (name = "should find rooms by type {0}" )
118
118
@ EnumSource (RoomType .class )
119
119
void shouldFindRoomByType (RoomType type ) {
120
- List <Room > rooms = this .repository .findByType (type );
120
+ List <Room > rooms = this .repository .findByType (type . name () );
121
121
SoftAssertions .assertSoftly (softly -> softly .assertThat (rooms ).allMatch (room -> room .getType ().equals (type )));
122
122
}
123
123
You can’t perform that action at this time.
0 commit comments