diff --git a/pom.xml b/pom.xml index 298f383d..65f9bebe 100644 --- a/pom.xml +++ b/pom.xml @@ -147,7 +147,6 @@ verify merge - report-aggregate diff --git a/src/test/java/com/uniovi/Wiq_UnitTests.java b/src/test/java/com/uniovi/Wiq_UnitTests.java index 40f97bff..5488f13d 100644 --- a/src/test/java/com/uniovi/Wiq_UnitTests.java +++ b/src/test/java/com/uniovi/Wiq_UnitTests.java @@ -1,13 +1,15 @@ package com.uniovi; -import org.junit.jupiter.api.MethodOrderer; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestMethodOrder; +import com.uniovi.entities.Player; +import com.uniovi.services.PlayerService; +import org.junit.jupiter.api.*; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ActiveProfiles; +import java.util.Optional; + @SpringBootTest @Tag("unit") @DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_EACH_TEST_METHOD) @@ -15,9 +17,13 @@ @ActiveProfiles("test") public class Wiq_UnitTests { - @Test - public void contextLoads() { + @Autowired + private PlayerService playerService; + @Test + public void testPlayerService() { + Optional player = playerService.getUser(1L); + Assertions.assertTrue(player.isPresent()); } }