Subversion Repositories eFlore/Applications.del

Rev

Rev 484 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 484 Rev 534
Line 1... Line 1...
1
package org.tela_botanica.del.test.vues.rechercheimages;
1
package org.tela_botanica.del.test.vues.rechercheimages;
Line 2... Line 2...
2
 
2
 
Line 3... Line 3...
3
import static org.junit.Assert.*;
3
import static org.mockito.Mockito.mock;
4
 
4
 
-
 
5
import org.junit.Before;
-
 
6
import org.junit.Test;
-
 
7
import static org.junit.Assert.*;
5
import org.junit.Before;
8
import org.mockito.Mockito;
6
import org.junit.Test;
9
import org.tela_botanica.del.client.cache.CacheClient;
Line 7... Line -...
7
import org.tela_botanica.del.client.services.rest.ImageService;
-
 
8
import org.tela_botanica.del.client.vues.rechercheimages.resultats.ResultatRechercheImagePresenteur;
-
 
9
 
-
 
10
import com.google.gwt.user.client.ui.HasWidgets;
-
 
11
 
10
import org.tela_botanica.del.client.services.rest.ImageService;
Line 12... Line 11...
12
import static org.mockito.Mockito.*;
11
import org.tela_botanica.del.client.vues.rechercheimages.resultats.ResultatRechercheImagePresenteur;
13
 
-
 
14
public class ResultatRechercheImagePresenteurTest {
12
 
15
 
13
public class ResultatRechercheImagePresenteurTest {
16
	private ResultatRechercheImagePresenteur resultatPresenteur;
14
 
17
	private org.tela_botanica.del.client.vues.rechercheimages.moteur.MoteurRechercheImagePresenteur.Vue vueMoteurRecherche;
15
	private ResultatRechercheImagePresenteur resultatPresenteur;
18
	private org.tela_botanica.del.client.vues.rechercheimages.resultats.ResultatRechercheImagePresenteur.Vue vueResultat;
16
	private org.tela_botanica.del.client.vues.rechercheimages.resultats.ResultatRechercheImagePresenteur.Vue vueResultat;
19
	private ImageService serviceImage;
17
	private ImageService serviceImage;
20
	
18
 
21
	@Before
19
	@Before
22
	public void setUp() throws Exception {
20
	public void setUp() throws Exception {
23
		
-
 
24
		vueResultat = mock(org.tela_botanica.del.client.vues.rechercheimages.resultats.ResultatRechercheImagePresenteur.Vue.class);
-
 
25
		serviceImage = mock(ImageService.class); 
-
 
26
		resultatPresenteur = new ResultatRechercheImagePresenteur(serviceImage, vueResultat);
-
 
27
		vueMoteurRecherche = mock(org.tela_botanica.del.client.vues.rechercheimages.moteur.MoteurRechercheImagePresenteur.Vue.class);
-
 
28
		HasWidgets zoneResultats = mock(HasWidgets.class);
21
 
Line 29... Line 22...
29
		when(vueMoteurRecherche.getZoneResultats()).thenReturn(zoneResultats);
22
		vueResultat = mock(org.tela_botanica.del.client.vues.rechercheimages.resultats.ResultatRechercheImagePresenteur.Vue.class, Mockito.RETURNS_MOCKS);
30
		resultatPresenteur.go(vueMoteurRecherche.getZoneResultats());
23
		serviceImage = mock(ImageService.class);
31
		
-
 
32
	}
24
		resultatPresenteur = new ResultatRechercheImagePresenteur(serviceImage, vueResultat);
33
 
25
	}
34
	@Test
26
 
Line 35... Line 27...
35
	public void testAfficherImages() {
27
	@Test