New file |
0,0 → 1,35 |
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 ResultatPictofloraPresenteur resultatPresenteur; |
private org.tela_botanica.del.client.vues.rechercheimages.resultats.ResultatRechercheImagePresenteur.ResultatPictofloraPresenteur vueResultat; |
private ImageService serviceImage; |
|
@Before |
public void setUp() throws Exception { |
|
vueResultat = mock(org.tela_botanica.del.client.vues.ResultatPictofloraPresenteur.resultats.ResultatRechercheImagePresenteur.Vue.class, Mockito.RETURNS_MOCKS); |
serviceImage = mock(ImageService.class); |
ProtocoleService protocoleService = Mockito.mock(ProtocoleService.class); |
resultatPresenteur = new ResultatPictofloraPresenteur(serviceImage, protocoleService, vueResultat); |
} |
|
@Test |
public void testAfficherImages() { |
resultatPresenteur.chargerEtAfficherImagesPageEnCours(); |
assertEquals(CacheClient.getInstance().getPageCouranteRechercheImage(), 1); |
} |
|
} |