From e71fb18fc8ba110ef0583dc095433de396f3e995 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Tue, 10 Oct 2023 16:52:19 +0200 Subject: [PATCH] Add ordinary unit test --- .../domain/repositories/FlightRepositoryTest.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/services/src/test/java/eu/profinit/education/flightlog/domain/repositories/FlightRepositoryTest.java b/services/src/test/java/eu/profinit/education/flightlog/domain/repositories/FlightRepositoryTest.java index 00bd379..f758a6f 100644 --- a/services/src/test/java/eu/profinit/education/flightlog/domain/repositories/FlightRepositoryTest.java +++ b/services/src/test/java/eu/profinit/education/flightlog/domain/repositories/FlightRepositoryTest.java @@ -6,7 +6,6 @@ import java.util.List; import javax.transaction.Transactional; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -16,6 +15,7 @@ import org.springframework.test.context.junit4.SpringRunner; import eu.profinit.education.flightlog.IntegrationTestConfig; import eu.profinit.education.flightlog.domain.entities.Flight; +import eu.profinit.education.flightlog.domain.entities.Flight.Type; @RunWith(SpringRunner.class) @SpringBootTest(classes = IntegrationTestConfig.class) @@ -35,10 +35,12 @@ public class FlightRepositoryTest { } - @Ignore("Test is not implemented") @Test public void shouldLoadGliderFlights() { - // TODO tutorial-3.3: Implement a test that checks that there are 2 gliders in a DB + assertEquals( + "There should be 2 glider flights", + 2, + testSubject.findAllByFlightType(Type.GLIDER).size()); } @Test