From 0c4b5e359333e95e9fd04e3257db35e93c6c1d89 Mon Sep 17 00:00:00 2001
From: Betty Becuwe <77614323+BettyB979@users.noreply.github.com>
Date: Mon, 11 Dec 2023 11:11:38 +0100
Subject: [PATCH 1/5] build: version 1.0.28
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index fca5b5b1..d831f12d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
fr.insee.survey
platine-management
- 1.0.28-rc
+ 1.0.28
platine-management
REST API for communication between DB and Platine-Management UI and Platine-My-Surveys UI
From 70dce6c09311428e3b842b327efa0020e895efc5 Mon Sep 17 00:00:00 2001
From: y72wvh
Date: Mon, 11 Dec 2023 12:05:35 +0100
Subject: [PATCH 2/5] fix: tests in error
---
.../controller/ContactEventControllerTest.java | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/test/java/fr/insee/survey/datacollectionmanagement/contacts/controller/ContactEventControllerTest.java b/src/test/java/fr/insee/survey/datacollectionmanagement/contacts/controller/ContactEventControllerTest.java
index 91abaef8..f40c4d55 100644
--- a/src/test/java/fr/insee/survey/datacollectionmanagement/contacts/controller/ContactEventControllerTest.java
+++ b/src/test/java/fr/insee/survey/datacollectionmanagement/contacts/controller/ContactEventControllerTest.java
@@ -1,10 +1,6 @@
package fr.insee.survey.datacollectionmanagement.contacts.controller;
-import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
-import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
-import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
-import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
-
+import fr.insee.survey.datacollectionmanagement.constants.Constants;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@@ -13,14 +9,19 @@
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.HttpStatus;
+import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.web.servlet.MockMvc;
-import fr.insee.survey.datacollectionmanagement.constants.Constants;
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
+import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@AutoConfigureMockMvc
@SpringBootTest
@ActiveProfiles("test")
+@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_EACH_TEST_METHOD)
public class ContactEventControllerTest {
@Autowired
From b3c10c8c1eeaf04e6bc85a20dec007f9cfd2c3b1 Mon Sep 17 00:00:00 2001
From: y72wvh
Date: Mon, 11 Dec 2023 12:09:16 +0100
Subject: [PATCH 3/5] fix: tests
---
.../controller/AddressControllerTest.java | 25 ++++++------
.../controller/ContactControllerTest.java | 40 +++++++++----------
2 files changed, 31 insertions(+), 34 deletions(-)
diff --git a/src/test/java/fr/insee/survey/datacollectionmanagement/contacts/controller/AddressControllerTest.java b/src/test/java/fr/insee/survey/datacollectionmanagement/contacts/controller/AddressControllerTest.java
index 4402285e..9548866c 100644
--- a/src/test/java/fr/insee/survey/datacollectionmanagement/contacts/controller/AddressControllerTest.java
+++ b/src/test/java/fr/insee/survey/datacollectionmanagement/contacts/controller/AddressControllerTest.java
@@ -1,12 +1,10 @@
package fr.insee.survey.datacollectionmanagement.contacts.controller;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
-import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put;
-import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
-import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
-import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
-
+import fr.insee.survey.datacollectionmanagement.constants.Constants;
+import fr.insee.survey.datacollectionmanagement.contact.domain.Address;
+import fr.insee.survey.datacollectionmanagement.contact.domain.Contact;
+import fr.insee.survey.datacollectionmanagement.contact.service.AddressService;
+import fr.insee.survey.datacollectionmanagement.contact.service.ContactService;
import org.json.JSONException;
import org.json.JSONObject;
import org.junit.jupiter.api.Test;
@@ -15,18 +13,21 @@
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
+import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.web.servlet.MockMvc;
-import fr.insee.survey.datacollectionmanagement.constants.Constants;
-import fr.insee.survey.datacollectionmanagement.contact.domain.Address;
-import fr.insee.survey.datacollectionmanagement.contact.domain.Contact;
-import fr.insee.survey.datacollectionmanagement.contact.service.AddressService;
-import fr.insee.survey.datacollectionmanagement.contact.service.ContactService;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put;
+import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@AutoConfigureMockMvc
@SpringBootTest
@ActiveProfiles("test")
+@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_EACH_TEST_METHOD)
public class AddressControllerTest {
@Autowired
diff --git a/src/test/java/fr/insee/survey/datacollectionmanagement/contacts/controller/ContactControllerTest.java b/src/test/java/fr/insee/survey/datacollectionmanagement/contacts/controller/ContactControllerTest.java
index cb116e31..c9c1c370 100644
--- a/src/test/java/fr/insee/survey/datacollectionmanagement/contacts/controller/ContactControllerTest.java
+++ b/src/test/java/fr/insee/survey/datacollectionmanagement/contacts/controller/ContactControllerTest.java
@@ -1,18 +1,13 @@
package fr.insee.survey.datacollectionmanagement.contacts.controller;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete;
-import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
-import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put;
-import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
-import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
-import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
-
-import java.util.ArrayList;
-import java.util.List;
-
+import fr.insee.survey.datacollectionmanagement.constants.Constants;
+import fr.insee.survey.datacollectionmanagement.contact.domain.Address;
+import fr.insee.survey.datacollectionmanagement.contact.domain.Contact;
+import fr.insee.survey.datacollectionmanagement.contact.domain.ContactEvent;
+import fr.insee.survey.datacollectionmanagement.contact.domain.ContactEvent.ContactEventType;
+import fr.insee.survey.datacollectionmanagement.contact.repository.ContactRepository;
+import fr.insee.survey.datacollectionmanagement.contact.service.ContactEventService;
+import fr.insee.survey.datacollectionmanagement.contact.service.ContactService;
import org.json.JSONException;
import org.json.JSONObject;
import org.junit.jupiter.api.Test;
@@ -21,22 +16,23 @@
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
+import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.web.servlet.MockMvc;
-import fr.insee.survey.datacollectionmanagement.constants.Constants;
-import fr.insee.survey.datacollectionmanagement.contact.domain.Address;
-import fr.insee.survey.datacollectionmanagement.contact.domain.Contact;
-import fr.insee.survey.datacollectionmanagement.contact.domain.Contact.Gender;
-import fr.insee.survey.datacollectionmanagement.contact.domain.ContactEvent;
-import fr.insee.survey.datacollectionmanagement.contact.domain.ContactEvent.ContactEventType;
-import fr.insee.survey.datacollectionmanagement.contact.repository.ContactRepository;
-import fr.insee.survey.datacollectionmanagement.contact.service.ContactEventService;
-import fr.insee.survey.datacollectionmanagement.contact.service.ContactService;
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.junit.Assert.*;
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
+import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@AutoConfigureMockMvc
@SpringBootTest
@ActiveProfiles("test")
+@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_EACH_TEST_METHOD)
public class ContactControllerTest {
@Autowired
From 141b7ad48ba34be37e193dbf8c317bbf359c6b06 Mon Sep 17 00:00:00 2001
From: y72wvh
Date: Mon, 11 Dec 2023 12:10:03 +0100
Subject: [PATCH 4/5] buld: version 1.0.29-rc (fix tests)
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index d831f12d..569081ea 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
fr.insee.survey
platine-management
- 1.0.28
+ 1.0.29-rc
platine-management
REST API for communication between DB and Platine-Management UI and Platine-My-Surveys UI
From aff2bdc046060f5b78e6191c902cbbb0fbfc92c1 Mon Sep 17 00:00:00 2001
From: Betty Becuwe <77614323+BettyB979@users.noreply.github.com>
Date: Mon, 11 Dec 2023 12:37:08 +0100
Subject: [PATCH 5/5] Update pom.xml
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 569081ea..511dd43d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
fr.insee.survey
platine-management
- 1.0.29-rc
+ 1.0.29
platine-management
REST API for communication between DB and Platine-Management UI and Platine-My-Surveys UI