Suppression du code commenté mais present en double hors commentaires.
Showing
1 changed file
with
0 additions
and
87 deletions
... | @@ -267,91 +267,4 @@ public class PublisherVersionViewTest { | ... | @@ -267,91 +267,4 @@ public class PublisherVersionViewTest { |
267 | 267 | ||
268 | } | 268 | } |
269 | 269 | ||
270 | - // J'ai l'impression qu'on pourrait utiliser de l'imbrication ici | ||
271 | - /* | ||
272 | - @DisplayName("Annulation de saisie de nouvelle version de saisie d'un éditeur existant") | ||
273 | - @Test | ||
274 | - public void testCancelNewVersionOfPublisher() { | ||
275 | - publisherVersionView.setNewPublisher(false); | ||
276 | - publisherVersionView.setPublisherVersionId(1); | ||
277 | - | ||
278 | - publisherVersionView.setPublisherName("1"); | ||
279 | - publisherVersionView.setPublisherStreetAddress("2"); | ||
280 | - publisherVersionView.setPublisherPostalCode("3"); | ||
281 | - publisherVersionView.setPublisherPostOfficeBoxNumber("4"); | ||
282 | - publisherVersionView.setPublisherAddressRegion("5"); | ||
283 | - publisherVersionView.setPublisherAddressLocality("6"); | ||
284 | - publisherVersionView.setPublisherAddressCountry(new Country()); | ||
285 | - publisherVersionView.setPublisherTelephone("7"); | ||
286 | - publisherVersionView.setPublisherEmail("8"); | ||
287 | - publisherVersionView.setPublisherURL("9"); | ||
288 | - publisherVersionView.setPublisherActive(false); | ||
289 | - publisherVersionView.setPublisherHistory("10"); | ||
290 | - | ||
291 | - publisherVersionView.cancel(); | ||
292 | - | ||
293 | - assertThat(publisherVersionView.getPublisherName()).isEqualTo("A"); | ||
294 | - assertThat(publisherVersionView.getPublisherStreetAddress()).isEqualTo("B"); | ||
295 | - assertThat(publisherVersionView.getPublisherPostalCode()).isEqualTo("C"); | ||
296 | - assertThat(publisherVersionView.getPublisherPostOfficeBoxNumber()).isEqualTo("D"); | ||
297 | - assertThat(publisherVersionView.getPublisherAddressRegion()).isEqualTo("E"); | ||
298 | - assertThat(publisherVersionView.getPublisherAddressLocality()).isEqualTo("F"); | ||
299 | - assertThat(publisherVersionView.getPublisherTelephone()).isEqualTo("G"); | ||
300 | - assertThat(publisherVersionView.getPublisherEmail()).isEqualTo("H"); | ||
301 | - assertThat(publisherVersionView.getPublisherURL()).isEqualTo("I"); | ||
302 | - assertThat(publisherVersionView.getPublisherHistory()).isEqualTo("J"); | ||
303 | - assertThat(publisherVersionView.isEditMode()).isFalse(); | ||
304 | - | ||
305 | - } | ||
306 | - | ||
307 | - @Test | ||
308 | - @DisplayName("Test de la fonction de chargement des valeurs initiales pour leur affichage") | ||
309 | - public void testLoadData() { | ||
310 | - publisherVersionView.setNewPublisher(true); | ||
311 | - publisherVersionView.setPublisherVersionId(1); | ||
312 | - publisherVersionView.loadData(); | ||
313 | - assertThat(publisherVersionView.getPublisherName()).isEqualTo("A"); | ||
314 | - assertThat(publisherVersionView.getPublisherStreetAddress()).isEqualTo("B"); | ||
315 | - assertThat(publisherVersionView.getPublisherPostalCode()).isEqualTo("C"); | ||
316 | - assertThat(publisherVersionView.getPublisherPostOfficeBoxNumber()).isEqualTo("D"); | ||
317 | - assertThat(publisherVersionView.getPublisherAddressRegion()).isEqualTo("E"); | ||
318 | - assertThat(publisherVersionView.getPublisherAddressLocality()).isEqualTo("F"); | ||
319 | - assertThat(publisherVersionView.getPublisherTelephone()).isEqualTo("G"); | ||
320 | - assertThat(publisherVersionView.getPublisherEmail()).isEqualTo("H"); | ||
321 | - assertThat(publisherVersionView.getPublisherURL()).isEqualTo("I"); | ||
322 | - assertThat(publisherVersionView.isPublisherActive()).isTrue(); | ||
323 | - assertThat(publisherVersionView.getPublisherHistory()).isEqualTo("J"); | ||
324 | - assertThat(publisherVersionView.isNewPublisher()).isFalse(); | ||
325 | - } | ||
326 | - | ||
327 | - @Test | ||
328 | - @DisplayName("Test initialisation formulaire pour nouvel éditeur") | ||
329 | - public void testLoadDataEmpty() { | ||
330 | - publisherVersionView.setNewPublisher(false); | ||
331 | - publisherVersionView.setPublisherVersionId(0); | ||
332 | - publisherVersionView.loadData(); | ||
333 | - assertThat(publisherVersionView.isNewPublisher()).isTrue(); | ||
334 | - assertThat(publisherVersionView.isEditMode()).isTrue(); | ||
335 | - } | ||
336 | - | ||
337 | - @Nested | ||
338 | - @DisplayName("post construct method") | ||
339 | - class init { | ||
340 | - | ||
341 | - private List<Country> countries; | ||
342 | - | ||
343 | - @BeforeEach | ||
344 | - public void setUp(@Mock SharedService sharedService) { | ||
345 | - when(sharedService.getAllCountries()).thenReturn(countries); | ||
346 | - } | ||
347 | - | ||
348 | - @Test | ||
349 | - @DisplayName("should set lists of available masks, user roles, and user properties from shared service") | ||
350 | - public void testList(@Mock SharedService sharedService) { | ||
351 | - publisherVersionView.init(); | ||
352 | - assertThat(publisherVersionView.getAvailableCountries()).isEqualTo(countries); | ||
353 | - } | ||
354 | - } | ||
355 | -} | ||
356 | - */ | ||
357 | } | 270 | } | ... | ... |
-
Please register or login to post a comment