| 1201 |
gduche |
1 |
package org.tela_botanica.del.test.vues.identiplante;
|
| 380 |
gduche |
2 |
|
| 534 |
benjamin |
3 |
import static org.mockito.Mockito.mock;
|
| 380 |
gduche |
4 |
|
|
|
5 |
import org.junit.Before;
|
|
|
6 |
import org.junit.Test;
|
| 534 |
benjamin |
7 |
import static org.junit.Assert.*;
|
|
|
8 |
import org.mockito.Mockito;
|
|
|
9 |
import org.tela_botanica.del.client.cache.CacheClient;
|
| 413 |
aurelien |
10 |
import org.tela_botanica.del.client.services.rest.ImageService;
|
| 1201 |
gduche |
11 |
import org.tela_botanica.del.client.services.rest.ObservationService;
|
|
|
12 |
import org.tela_botanica.del.client.vues.identiplante.resultats.ResultatsIdentiplantePresenteur;
|
| 380 |
gduche |
13 |
|
| 1201 |
gduche |
14 |
public class ResultatIdentiplanteTest {
|
| 380 |
gduche |
15 |
|
| 1201 |
gduche |
16 |
private ResultatsIdentiplantePresenteur resultatPresenteur;
|
|
|
17 |
private ResultatsIdentiplantePresenteur.Vue vueResultat;
|
| 413 |
aurelien |
18 |
private ImageService serviceImage;
|
| 534 |
benjamin |
19 |
|
| 380 |
gduche |
20 |
@Before
|
|
|
21 |
public void setUp() throws Exception {
|
| 534 |
benjamin |
22 |
|
| 1201 |
gduche |
23 |
vueResultat = mock( ResultatsIdentiplantePresenteur.Vue.class, Mockito.RETURNS_MOCKS);
|
| 534 |
benjamin |
24 |
serviceImage = mock(ImageService.class);
|
| 1201 |
gduche |
25 |
ObservationService obsService = Mockito.mock(ObservationService.class);
|
| 1235 |
gduche |
26 |
resultatPresenteur = new ResultatsIdentiplantePresenteur(obsService, vueResultat);
|
| 380 |
gduche |
27 |
}
|
|
|
28 |
|
|
|
29 |
@Test
|
| 413 |
aurelien |
30 |
public void testAfficherImages() {
|
| 1201 |
gduche |
31 |
resultatPresenteur.chercherEtAfficherObservationsPageEnCours();
|
| 534 |
benjamin |
32 |
assertEquals(CacheClient.getInstance().getPageCouranteRechercheImage(), 1);
|
| 380 |
gduche |
33 |
}
|
|
|
34 |
|
|
|
35 |
}
|