diff options
Diffstat (limited to 'sw-server/src/test/kotlin/org')
2 files changed, 8 insertions, 8 deletions
diff --git a/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/repositories/LobbyRepositoryTest.kt b/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/repositories/LobbyRepositoryTest.kt index 8bef7efc..442edac2 100644 --- a/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/repositories/LobbyRepositoryTest.kt +++ b/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/repositories/LobbyRepositoryTest.kt @@ -41,7 +41,7 @@ class LobbyRepositoryTest { @Test fun find_failsOnUnknownId() { assertFailsWith<LobbyNotFoundException> { - repository.find(123) + repository.get(123) } } @@ -49,8 +49,8 @@ class LobbyRepositoryTest { fun find_returnsTheSameObject() { val lobby1 = repository.create("Test Name 1", Player("owner1", "The Owner")) val lobby2 = repository.create("Test Name 2", Player("owner2", "The Owner")) - assertSame(lobby1, repository.find(lobby1.id)) - assertSame(lobby2, repository.find(lobby2.id)) + assertSame(lobby1, repository.get(lobby1.id)) + assertSame(lobby2, repository.get(lobby2.id)) } @Test @@ -64,10 +64,10 @@ class LobbyRepositoryTest { fun remove_succeeds() { val owner = Player("owner", "The Owner") val lobby1 = repository.create("Test Name 1", owner) - assertNotNull(repository.find(lobby1.id)) + assertNotNull(repository.get(lobby1.id)) repository.remove(lobby1.id) try { - repository.find(lobby1.id) + repository.get(lobby1.id) fail() // the call to find() should have failed } catch (e: LobbyNotFoundException) { // the lobby has been properly removed diff --git a/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/repositories/PlayerRepositoryTest.kt b/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/repositories/PlayerRepositoryTest.kt index fc016903..8e554546 100644 --- a/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/repositories/PlayerRepositoryTest.kt +++ b/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/repositories/PlayerRepositoryTest.kt @@ -46,7 +46,7 @@ class PlayerRepositoryTest { @Test fun find_failsOnUnknownUsername() { assertFailsWith<PlayerNotFoundException> { - repository.find("anyUsername") + repository.get("anyUsername") } } @@ -54,8 +54,8 @@ class PlayerRepositoryTest { fun find_returnsTheSameObject() { val player1 = repository.createOrUpdate("player1", "Player 1") val player2 = repository.createOrUpdate("player2", "Player 2") - assertSame(player1, repository.find("player1")) - assertSame(player2, repository.find("player2")) + assertSame(player1, repository.get("player1")) + assertSame(player2, repository.get("player2")) } @Test |