Rev 534 | Rev 1197 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
package org.tela_botanica.del.test.vues.rechercheimages;import static org.mockito.Mockito.mock;import org.junit.Before;import org.junit.Test;import static org.junit.Assert.*;import org.mockito.Mockito;import org.tela_botanica.del.client.cache.CacheClient;import org.tela_botanica.del.client.services.rest.ImageService;import org.tela_botanica.del.client.services.rest.ProtocoleService;import org.tela_botanica.del.client.vues.rechercheimages.resultats.ResultatRechercheImagePresenteur;public class ResultatRechercheImagePresenteurTest {private ResultatRechercheImagePresenteur resultatPresenteur;private org.tela_botanica.del.client.vues.rechercheimages.resultats.ResultatRechercheImagePresenteur.Vue vueResultat;private ImageService serviceImage;@Beforepublic void setUp() throws Exception {vueResultat = mock(org.tela_botanica.del.client.vues.rechercheimages.resultats.ResultatRechercheImagePresenteur.Vue.class, Mockito.RETURNS_MOCKS);serviceImage = mock(ImageService.class);ProtocoleService protocoleService = Mockito.mock(ProtocoleService.class);resultatPresenteur = new ResultatRechercheImagePresenteur(serviceImage, protocoleService, vueResultat);}@Testpublic void testAfficherImages() {resultatPresenteur.chargerEtAfficherImagesPageEnCours();assertEquals(CacheClient.getInstance().getPageCouranteRechercheImage(), 1);}}