Skip to content

Commit 0cc213a

Browse files
author
Dennis Labordus
committed
Fix namespace on all objects from service.
Signed-off-by: Dennis Labordus <[email protected]>
1 parent 67cf424 commit 0cc213a

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

app/src/test/java/org/lfenergy/compas/scl/data/rest/v1/CompasSclDataResourceTest.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
import org.junit.jupiter.api.Test;
1111
import org.lfenergy.compas.commons.MarshallerWrapper;
1212
import org.lfenergy.compas.scl.SCL;
13-
import org.lfenergy.compas.scl.data.model.*;
13+
import org.lfenergy.compas.scl.data.model.ChangeSetType;
14+
import org.lfenergy.compas.scl.data.model.Item;
15+
import org.lfenergy.compas.scl.data.model.SclType;
16+
import org.lfenergy.compas.scl.data.model.Version;
1417
import org.lfenergy.compas.scl.data.rest.model.CreateRequest;
1518
import org.lfenergy.compas.scl.data.rest.model.UpdateRequest;
1619
import org.lfenergy.compas.scl.data.service.CompasSclDataService;
@@ -21,6 +24,7 @@
2124
import static io.restassured.RestAssured.given;
2225
import static io.restassured.path.xml.config.XmlPathConfig.xmlPathConfig;
2326
import static org.junit.jupiter.api.Assertions.assertEquals;
27+
import static org.lfenergy.compas.scl.data.model.Constants.SCL_NAMESPACE;
2428
import static org.lfenergy.compas.scl.data.rest.Constants.*;
2529
import static org.mockito.Mockito.*;
2630

@@ -99,7 +103,7 @@ void findByUUID_WhenCalled_ThenSCLResponseRetrieved() throws Exception {
99103
.response();
100104

101105
var xmlPath = response.xmlPath()
102-
.using(xmlPathConfig().declaredNamespace("scl", Constants.SCL_NAMESPACE));
106+
.using(xmlPathConfig().declaredNamespace("scl", SCL_NAMESPACE));
103107
assertEquals("HeaderID", xmlPath.get("GetResponse.scl:SCL.scl:Header.@id"));
104108
verify(compasSclDataService, times(1)).findByUUID(type, uuid);
105109
}
@@ -124,7 +128,7 @@ void findByUUIDAndVersion_WhenCalled_ThenSCLResponseRetrieved() throws Exception
124128
.response();
125129

126130
var xmlPath = response.xmlPath()
127-
.using(xmlPathConfig().declaredNamespace("scl", Constants.SCL_NAMESPACE));
131+
.using(xmlPathConfig().declaredNamespace("scl", SCL_NAMESPACE));
128132
assertEquals("HeaderID", xmlPath.get("GetResponse.scl:SCL.scl:Header.@id"));
129133
verify(compasSclDataService, times(1)).findByUUID(type, uuid, version);
130134
}
@@ -147,7 +151,7 @@ void findRawSCLByUUID_WhenCalledOnlySCL_ThenSCLRetrieved() throws Exception {
147151
.response();
148152

149153
var xmlPath = response.xmlPath()
150-
.using(xmlPathConfig().declaredNamespace("scl", Constants.SCL_NAMESPACE));
154+
.using(xmlPathConfig().declaredNamespace("scl", SCL_NAMESPACE));
151155
assertEquals("HeaderID", xmlPath.get("scl:SCL.scl:Header.@id"));
152156
verify(compasSclDataService, times(1)).findByUUID(type, uuid);
153157
}
@@ -172,7 +176,7 @@ void findRawSCLByUUIDAndVersion_WhenCalled_ThenSCLRetrieved() throws Exception {
172176
.response();
173177

174178
var xmlPath = response.xmlPath()
175-
.using(xmlPathConfig().declaredNamespace("scl", Constants.SCL_NAMESPACE));
179+
.using(xmlPathConfig().declaredNamespace("scl", SCL_NAMESPACE));
176180
assertEquals("HeaderID", xmlPath.get("scl:SCL.scl:Header.@id"));
177181
verify(compasSclDataService, times(1)).findByUUID(type, uuid, version);
178182
}

0 commit comments

Comments
 (0)