@@ -203,7 +203,7 @@ void deleteByTypeAndName_WhenNoEntriesExist_ThenThrowsCompasNoDataFoundException
203203 void upload_WhenCalledWithExplicitVersion_ThenPersistsEntity () {
204204 when (repository .countDuplicate ("xml" , "default" , "name" , "2.0.0" )).thenReturn (0L );
205205
206- var result = service .upload (new UploadCustomPluginsResourceData ("xml" , "name" , "application/xml" , "<root/>" ,
206+ var result = service .upload (new org . lfenergy . compas . scl . data . util . UploadCustomPluginsResourceData ("xml" , "name" , "application/xml" , "<root/>" ,
207207 "1.0.0" , "desc" , "2.0.0" , null ));
208208
209209 verify (repository ).persist (any (PluginsCustomResource .class ));
@@ -221,7 +221,7 @@ void upload_WhenCalledWithExplicitVersion_ThenPersistsEntity() {
221221 void upload_WhenDuplicateVersionExists_ThenThrowsCompasDuplicateVersionException () {
222222 when (repository .countDuplicate ("xml" , "default" , "name" , "2.0.0" )).thenReturn (1L );
223223
224- var request = new UploadCustomPluginsResourceData ("xml" , "name" , "application/xml" , "<root/>" ,
224+ var request = new org . lfenergy . compas . scl . data . util . UploadCustomPluginsResourceData ("xml" , "name" , "application/xml" , "<root/>" ,
225225 "1.0.0" , "desc" , "2.0.0" , null );
226226 assertThrows (CompasDuplicateVersionException .class , () -> service .upload (request ));
227227 }
@@ -234,7 +234,7 @@ void upload_WhenNextVersionType_ThenIncrementsVersion(String nextVersionType, St
234234 when (repository .list ("type = ?1 and tenant = ?2 and name = ?3" , "xml" , "default" , "name" )).thenReturn (List .of (existing ));
235235 when (repository .countDuplicate ("xml" , "default" , "name" , expectedVersion )).thenReturn (0L );
236236
237- var result = service .upload (new UploadCustomPluginsResourceData ("xml" , "name" , "application/json" , "{}" ,
237+ var result = service .upload (new org . lfenergy . compas . scl . data . util . UploadCustomPluginsResourceData ("xml" , "name" , "application/json" , "{}" ,
238238 "1.0.0" , "desc" , null , nextVersionType ));
239239
240240 assertEquals (expectedVersion , result .version );
@@ -245,29 +245,29 @@ void upload_WhenNextVersionTypeWithNoExistingVersions_ThenReturns100() {
245245 when (repository .list ("type = ?1 and tenant = ?2 and name = ?3" , "xml" , "default" , "name" )).thenReturn (List .of ());
246246 when (repository .countDuplicate ("xml" , "default" , "name" , "1.0.0" )).thenReturn (0L );
247247
248- var result = service .upload (new UploadCustomPluginsResourceData ("xml" , "name" , "application/json" , "{}" ,
248+ var result = service .upload (new org . lfenergy . compas . scl . data . util . UploadCustomPluginsResourceData ("xml" , "name" , "application/json" , "{}" ,
249249 "1.0.0" , "desc" , null , "MAJOR" ));
250250
251251 assertEquals ("1.0.0" , result .version );
252252 }
253253
254254 @ Test
255255 void upload_WhenInvalidNextVersionType_ThenThrowsCompasInvalidInputException () {
256- var request = new UploadCustomPluginsResourceData ("xml" , "name" , "application/xml" , "<root/>" ,
256+ var request = new org . lfenergy . compas . scl . data . util . UploadCustomPluginsResourceData ("xml" , "name" , "application/xml" , "<root/>" ,
257257 "1.0.0" , "desc" , null , "INVALID" );
258258 assertThrows (CompasInvalidInputException .class , () -> service .upload (request ));
259259 }
260260
261261 @ Test
262262 void upload_WhenNoVersionAndNoNextVersionType_ThenThrowsCompasInvalidInputException () {
263- var request = new UploadCustomPluginsResourceData ("xml" , "name" , "application/xml" , "<root/>" ,
263+ var request = new org . lfenergy . compas . scl . data . util . UploadCustomPluginsResourceData ("xml" , "name" , "application/xml" , "<root/>" ,
264264 "1.0.0" , "desc" , null , null );
265265 assertThrows (CompasInvalidInputException .class , () -> service .upload (request ));
266266 }
267267
268268 @ Test
269269 void upload_WhenBlankVersionAndBlankNextVersionType_ThenThrowsCompasInvalidInputException () {
270- var request = new UploadCustomPluginsResourceData ("xml" , "name" , "application/xml" , "<root/>" ,
270+ var request = new org . lfenergy . compas . scl . data . util . UploadCustomPluginsResourceData ("xml" , "name" , "application/xml" , "<root/>" ,
271271 "1.0.0" , "desc" , " " , " " );
272272 assertThrows (CompasInvalidInputException .class , () -> service .upload (request ));
273273 }
@@ -276,28 +276,28 @@ void upload_WhenBlankVersionAndBlankNextVersionType_ThenThrowsCompasInvalidInput
276276
277277 @ Test
278278 void upload_WhenInvalidContentType_ThenThrowsCompasInvalidInputException () {
279- var request = new UploadCustomPluginsResourceData ("xml" , "name" , "text/plain" , "<root/>" ,
279+ var request = new org . lfenergy . compas . scl . data . util . UploadCustomPluginsResourceData ("xml" , "name" , "text/plain" , "<root/>" ,
280280 "1.0.0" , "desc" , "1.0.0" , null );
281281 assertThrows (CompasInvalidInputException .class , () -> service .upload (request ));
282282 }
283283
284284 @ Test
285285 void upload_WhenNullContentType_ThenThrowsCompasInvalidInputException () {
286- var request = new UploadCustomPluginsResourceData ("xml" , "name" , null , "<root/>" ,
286+ var request = new org . lfenergy . compas . scl . data . util . UploadCustomPluginsResourceData ("xml" , "name" , null , "<root/>" ,
287287 "1.0.0" , "desc" , "1.0.0" , null );
288288 assertThrows (CompasInvalidInputException .class , () -> service .upload (request ));
289289 }
290290
291291 @ Test
292292 void upload_WhenInvalidSemverForDataCompatibilityVersion_ThenThrowsCompasInvalidInputException () {
293- var request = new UploadCustomPluginsResourceData ("xml" , "name" , "application/xml" , "<root/>" ,
293+ var request = new org . lfenergy . compas . scl . data . util . UploadCustomPluginsResourceData ("xml" , "name" , "application/xml" , "<root/>" ,
294294 "not-a-version" , "desc" , "1.0.0" , null );
295295 assertThrows (CompasInvalidInputException .class , () -> service .upload (request ));
296296 }
297297
298298 @ Test
299299 void upload_WhenInvalidSemverForExplicitVersion_ThenThrowsCompasInvalidInputException () {
300- var request = new UploadCustomPluginsResourceData ("xml" , "name" , "application/xml" , "<root/>" ,
300+ var request = new org . lfenergy . compas . scl . data . util . UploadCustomPluginsResourceData ("xml" , "name" , "application/xml" , "<root/>" ,
301301 "1.0.0" , "desc" , "bad" , null );
302302 assertThrows (CompasInvalidInputException .class , () -> service .upload (request ));
303303 }
0 commit comments