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 {
3030 void deleteBy ();
3131
3232 @ Query ("WHERE type = :type" )
33- List <Room > findByType (@ Param ("type" ) RoomType type );
33+ List <Room > findByType (@ Param ("type" ) String type );
3434}
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ void cleanUp() {
117117 @ ParameterizedTest (name = "should find rooms by type {0}" )
118118 @ EnumSource (RoomType .class )
119119 void shouldFindRoomByType (RoomType type ) {
120- List <Room > rooms = this .repository .findByType (type );
120+ List <Room > rooms = this .repository .findByType (type . name () );
121121 SoftAssertions .assertSoftly (softly -> softly .assertThat (rooms ).allMatch (room -> room .getType ().equals (type )));
122122 }
123123
You can’t perform that action at this time.
0 commit comments