diff --git a/What_The_Fantasy/app/src/test/java/com/example/what_the_fantasy/UnitTestQuote.kt b/What_The_Fantasy/app/src/test/java/com/example/what_the_fantasy/UnitTestQuote.kt index c4552b8..5d00730 100644 --- a/What_The_Fantasy/app/src/test/java/com/example/what_the_fantasy/UnitTestQuote.kt +++ b/What_The_Fantasy/app/src/test/java/com/example/what_the_fantasy/UnitTestQuote.kt @@ -125,4 +125,6 @@ class UnitTestQuote { val quote = services.search("titre","Star Wars bad",1) assertEquals(0,quote.size) } + + } \ No newline at end of file diff --git a/What_The_Fantasy/app/src/test/java/com/example/what_the_fantasy/UnitTestUser.kt b/What_The_Fantasy/app/src/test/java/com/example/what_the_fantasy/UnitTestUser.kt index 6ba9d5d..1bcf454 100644 --- a/What_The_Fantasy/app/src/test/java/com/example/what_the_fantasy/UnitTestUser.kt +++ b/What_The_Fantasy/app/src/test/java/com/example/what_the_fantasy/UnitTestUser.kt @@ -124,4 +124,18 @@ class UnitTestUser { assertFalse(services.validLogin("dev", "5678", navControllerMock, initialiserCurrentUserMock)) } + + @Test + fun testGetUserById(){ + val user = services.getUserById(10) + assertEquals("dev", user?.username) + } + + @Test + fun testGetFavorite_User_Dev(){ + val user = services.getAllUsers()[10] + val quotes = services.getFavorite(user) + assertEquals(3, quotes.size) + } + } \ No newline at end of file