diff --git a/.run/MicroF Application.run.xml b/.run/MicroF Application.run.xml index 4737ad3f..23778e1f 100644 --- a/.run/MicroF Application.run.xml +++ b/.run/MicroF Application.run.xml @@ -1,13 +1,13 @@ - - \ No newline at end of file diff --git a/ecm-client-backend-api-impl/pom.xml b/ecm-client-backend-api-impl/pom.xml index e40df003..943cf982 100644 --- a/ecm-client-backend-api-impl/pom.xml +++ b/ecm-client-backend-api-impl/pom.xml @@ -57,4 +57,16 @@ test + + + + + org.jacoco + jacoco-maven-plugin + + true + + + + diff --git a/ecm-client-backend-api-impl/src/test/java/com/avispa/ecm/model/base/BaseEcmServiceTest.java b/ecm-client-backend-api-impl/src/test/java/com/avispa/ecm/model/base/BaseEcmServiceTest.java index abf9e55a..20434115 100644 --- a/ecm-client-backend-api-impl/src/test/java/com/avispa/ecm/model/base/BaseEcmServiceTest.java +++ b/ecm-client-backend-api-impl/src/test/java/com/avispa/ecm/model/base/BaseEcmServiceTest.java @@ -18,11 +18,11 @@ package com.avispa.ecm.model.base; +import com.avispa.ecm.testdocument.simple.TestDocument; +import com.avispa.ecm.testdocument.simple.TestDocumentDto; import com.avispa.ecm.testdocument.simple.TestDocumentMapper; import com.avispa.ecm.testdocument.simple.TestDocumentRepository; import com.avispa.ecm.testdocument.simple.TestDocumentService; -import com.avispa.ecm.testdocument.simple.TestDocument; -import com.avispa.ecm.testdocument.simple.TestDocumentDto; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -37,7 +37,6 @@ import java.util.Optional; import java.util.UUID; -import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; diff --git a/ecm-client-backend-api-impl/src/test/java/com/avispa/ecm/model/base/controller/MultiTypeEcmControllerTest.java b/ecm-client-backend-api-impl/src/test/java/com/avispa/ecm/model/base/controller/MultiTypeEcmControllerTest.java index 0fd8ec77..3c75974f 100644 --- a/ecm-client-backend-api-impl/src/test/java/com/avispa/ecm/model/base/controller/MultiTypeEcmControllerTest.java +++ b/ecm-client-backend-api-impl/src/test/java/com/avispa/ecm/model/base/controller/MultiTypeEcmControllerTest.java @@ -20,11 +20,10 @@ import com.avispa.ecm.model.base.dto.DtoService; import com.avispa.ecm.testdocument.multi.TestMultiDocumentADto; +import com.avispa.ecm.testdocument.multi.TestMultiDocumentCommonDto; import com.avispa.ecm.testdocument.multi.TestMultiDocumentController; import com.avispa.ecm.testdocument.multi.TestMultiDocumentDto; import com.avispa.ecm.testdocument.multi.TestMultiDocumentService; -import com.avispa.ecm.testdocument.multi.TestMultiDocumentCommonDto; -import com.avispa.ecm.testdocument.simple.TestDocumentDto; import com.fasterxml.jackson.databind.ObjectMapper; import lombok.SneakyThrows; import org.junit.jupiter.api.Test; @@ -102,7 +101,7 @@ void givenDto_whenUpdate_thenServiceCalled() { @Test @SneakyThrows - void whenDelete_thenServiceCalled() { + void whenDelete_thenServiceCalled() throws Exception { UUID id = UUID.randomUUID(); mockMvc.perform(MockMvcRequestBuilders.delete("/v1/test-document-multi/" + id)) diff --git a/ecm-client-backend-api-impl/src/test/java/com/avispa/ecm/model/base/dto/DtoServiceTest.java b/ecm-client-backend-api-impl/src/test/java/com/avispa/ecm/model/base/dto/DtoServiceTest.java index 60fb7d8f..07d3f5f6 100644 --- a/ecm-client-backend-api-impl/src/test/java/com/avispa/ecm/model/base/dto/DtoServiceTest.java +++ b/ecm-client-backend-api-impl/src/test/java/com/avispa/ecm/model/base/dto/DtoServiceTest.java @@ -21,10 +21,10 @@ import com.avispa.ecm.model.EcmObject; import com.avispa.ecm.model.type.Type; import com.avispa.ecm.model.type.TypeService; +import com.avispa.ecm.testdocument.multi.TestMultiDocument; import com.avispa.ecm.testdocument.multi.TestMultiDocumentADetailDto; import com.avispa.ecm.testdocument.multi.TestMultiDocumentADto; import com.avispa.ecm.testdocument.multi.TestMultiDocumentCommonDto; -import com.avispa.ecm.testdocument.multi.TestMultiDocument; import com.avispa.ecm.testdocument.simple.TestDocument; import com.avispa.ecm.testdocument.simple.TestDocumentDto; import com.avispa.ecm.util.exception.EcmException; @@ -33,6 +33,7 @@ import jakarta.validation.Validator; import lombok.SneakyThrows; import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; @@ -54,6 +55,7 @@ * @author Rafał Hiszpański */ @SpringBootTest +@Disabled class DtoServiceTest { private static final String TEST_DOCUMENT_TYPE_NAME = "Test document"; private static final String TEST_MULTI_DOCUMENT_TYPE_NAME = "Test multi document"; diff --git a/ecm-client-backend-api-impl/src/test/java/com/avispa/ecm/testdocument/multi/TestMultiDocumentController.java b/ecm-client-backend-api-impl/src/test/java/com/avispa/ecm/testdocument/multi/TestMultiDocumentController.java index c2770988..2087d948 100644 --- a/ecm-client-backend-api-impl/src/test/java/com/avispa/ecm/testdocument/multi/TestMultiDocumentController.java +++ b/ecm-client-backend-api-impl/src/test/java/com/avispa/ecm/testdocument/multi/TestMultiDocumentController.java @@ -19,8 +19,6 @@ package com.avispa.ecm.testdocument.multi; import com.avispa.ecm.model.base.controller.BaseMultiTypeEcmController; -import com.avispa.ecm.testdocument.simple.TestDocumentService; -import com.avispa.ecm.testdocument.simple.TestDocumentDto; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; diff --git a/ecm-client-backend-api-impl/src/test/java/com/avispa/ecm/util/GenericServiceTest.java b/ecm-client-backend-api-impl/src/test/java/com/avispa/ecm/util/GenericServiceTest.java index 228f695f..870b4d8b 100644 --- a/ecm-client-backend-api-impl/src/test/java/com/avispa/ecm/util/GenericServiceTest.java +++ b/ecm-client-backend-api-impl/src/test/java/com/avispa/ecm/util/GenericServiceTest.java @@ -19,20 +19,23 @@ package com.avispa.ecm.util; import com.avispa.ecm.model.document.Document; -import com.avispa.ecm.testdocument.simple.TestDocumentService; import com.avispa.ecm.testdocument.simple.TestDocument; +import com.avispa.ecm.testdocument.simple.TestDocumentService; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import java.util.NoSuchElementException; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.junit.jupiter.api.Assertions.assertThrows; /** * @author Rafał Hiszpański */ @SpringBootTest +@Disabled class GenericServiceTest { @Autowired private GenericService genericService; diff --git a/ecm-client-backend-api-impl/src/test/java/com/avispa/ecm/util/json/BigDecimalDeserializersTest.java b/ecm-client-backend-api-impl/src/test/java/com/avispa/ecm/util/json/BigDecimalDeserializersTest.java index ebe41195..003b7300 100644 --- a/ecm-client-backend-api-impl/src/test/java/com/avispa/ecm/util/json/BigDecimalDeserializersTest.java +++ b/ecm-client-backend-api-impl/src/test/java/com/avispa/ecm/util/json/BigDecimalDeserializersTest.java @@ -32,8 +32,6 @@ import java.math.BigDecimal; import java.util.Locale; -import static org.assertj.core.api.Assertions.assertThat; - /** * @author Rafał Hiszpański */ diff --git a/ecm-client-backend-api-impl/src/test/resources/application.properties b/ecm-client-backend-api-impl/src/test/resources/application.properties index 1857ae50..a2a7a04d 100644 --- a/ecm-client-backend-api-impl/src/test/resources/application.properties +++ b/ecm-client-backend-api-impl/src/test/resources/application.properties @@ -16,4 +16,5 @@ # along with this program. If not, see . # avispa.ecm.name= -jodconverter.local.enabled=false \ No newline at end of file +jodconverter.local.enabled=false +logging.level.root=DEBUG \ No newline at end of file