diff options
| author | Szymon Szukalski <szymon@skas.io> | 2024-07-25 21:07:10 +1000 |
|---|---|---|
| committer | Szymon Szukalski <szymon@skas.io> | 2024-07-25 21:07:10 +1000 |
| commit | b610eda6dd82f39bcc33ccc54d9ed6e262773ce1 (patch) | |
| tree | c5c9e490bb17109c345353e375697748386d55dd /src/test/java/com/stileeducation/markr/dto/MCQTestResultsDTOTests.java | |
| parent | 23505c2c9d510da3fb13d54c3fbcea81eb50dee9 (diff) | |
Remove redundant DTO test
Diffstat (limited to 'src/test/java/com/stileeducation/markr/dto/MCQTestResultsDTOTests.java')
| -rw-r--r-- | src/test/java/com/stileeducation/markr/dto/MCQTestResultsDTOTests.java | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/test/java/com/stileeducation/markr/dto/MCQTestResultsDTOTests.java b/src/test/java/com/stileeducation/markr/dto/MCQTestResultsDTOTests.java deleted file mode 100644 index cceec51..0000000 --- a/src/test/java/com/stileeducation/markr/dto/MCQTestResultsDTOTests.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.stileeducation.markr.dto; - -import com.stileeducation.markr.MarkrApplication; -import jakarta.xml.bind.JAXBContext; -import jakarta.xml.bind.JAXBException; -import jakarta.xml.bind.Unmarshaller; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.core.io.ClassPathResource; -import org.springframework.test.context.ActiveProfiles; - -import java.io.IOException; -import java.io.InputStream; - -import static org.assertj.core.api.Assertions.assertThat; - -@SpringBootTest(classes = MarkrApplication.class) -@ActiveProfiles("test") -public class MCQTestResultsDTOTests { - - private static MCQTestResultsDTO sampleResults; - - @BeforeAll - static void setup() throws JAXBException, IOException { - ClassPathResource resource = new ClassPathResource("sample-results.xml"); - try (InputStream inputStream = resource.getInputStream()) { - JAXBContext jaxbContext = JAXBContext.newInstance(MCQTestResultsDTO.class); - Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); - sampleResults = (MCQTestResultsDTO) unmarshaller.unmarshal(inputStream); - } - } - - @Test - void givenSampleResultsXMLShouldUnmarshall() throws IOException { - assertThat(sampleResults).isNotNull(); - } - -} |
