From 4a9149e41eec4197678c64b10a7f8ef2c2a2ec60 Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 11 Apr 2024 00:24:03 +0100 Subject: [PATCH] add username to uuid lookup test --- .../cc/fascinated/tests/PlayerControllerTests.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/java/cc/fascinated/tests/PlayerControllerTests.java b/src/test/java/cc/fascinated/tests/PlayerControllerTests.java index 3df704a..2e1d977 100644 --- a/src/test/java/cc/fascinated/tests/PlayerControllerTests.java +++ b/src/test/java/cc/fascinated/tests/PlayerControllerTests.java @@ -42,6 +42,16 @@ class PlayerControllerTests { .andExpect(jsonPath("$.username").value(testPlayer)); } + @Test + public void ensurePlayerUsernameToUuidLookupSuccess() throws Exception { + mockMvc.perform(get("/player/uuid/" + testPlayer) + .accept(MediaType.APPLICATION_JSON) + .contentType(MediaType.APPLICATION_JSON)) + .andExpect(status().isOk()) + .andExpect(jsonPath("$.username").value(testPlayer)) + .andExpect(jsonPath("$.uuid").value(testPlayerUuid)); + } + @Test public void ensurePlayerLookupFailure() throws Exception { mockMvc.perform(get("/player/" + testInvalidPlayer)