-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
95a67a9
commit f12a6e2
Showing
4 changed files
with
60 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...a/es/upm/miw/apaw_practice/adapters/mongodb/basketball/daos/BasketSeasonRepositoryIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package es.upm.miw.apaw_practice.adapters.mongodb.basketball.daos; | ||
|
||
import es.upm.miw.apaw_practice.TestConfig; | ||
import es.upm.miw.apaw_practice.adapters.mongodb.basketball.entities.BasketSeasonEntity; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
@TestConfig | ||
public class BasketSeasonRepositoryIT { | ||
|
||
@Autowired | ||
private BasketSeasonRepository basketSeasonRepository; | ||
|
||
@Test | ||
void testFindByLeague(){ | ||
assertTrue(this.basketSeasonRepository.findByLeague("NBA").isPresent()); | ||
BasketSeasonEntity basketSeasonEntity = this.basketSeasonRepository.findByLeague("NBA").get(); | ||
assertEquals("NBA", basketSeasonEntity.getLeague()); | ||
assertEquals(2022, basketSeasonEntity.getStartYear()); | ||
assertEquals(2023, basketSeasonEntity.getEndYear()); | ||
assertNotNull(basketSeasonEntity.getBasketMatchEntities()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters