Subversion Repositories eFlore/Applications.del

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
534 benjamin 1
package org.tela_botanica.del.uitest;
473 aurelien 2
 
3
import org.tela_botanica.del.client.modeles.Image;
4
import org.tela_botanica.del.client.modeles.Observation;
5
import org.tela_botanica.del.client.vues.comparaisoneflore.ComparaisonEfloreVue;
6
 
7
import com.google.gwt.junit.client.GWTTestCase;
8
 
9
public class ComparaisonEfloreVueTest extends GWTTestCase {
10
 
11
	// To run this test configure your junit launcher (Eclipse>Run>Run configurations
12
	// classpath>Advanced>Select Folders and choose src/)
13
 
14
	@Override
15
	public String getModuleName() {
16
		return "org.tela_botanica.del.Del";
17
	}
18
 
19
	public void testLoginView() {
20
 
21
		Observation observation = new Observation();
22
		String auteur = "benjamin";
23
		observation.setAuteur(auteur);
24
		observation.setNomRetenu("marronier");
25
		observation.setNumNomenclatural("num nomenclatural ");
26
		observation.setDateReleve("28/09/2011");
27
		observation.setFamille("famille ");
28
		observation.setLocalite("localite ");
29
 
30
		Image image = new Image();
31
		image.setIdImage("id image 1");
32
		image.setUrlFormat("http://www.tela-botanica.org/appli:cel-img:00001%s%.jpg");
33
		image.setUrl("http://www.tela-botanica.org/appli:cel-img:00001CRS.jpg");
34
		image.setMiniature("http://www.tela-botanica.org/appli:cel-img:00001XS.jpg");
35
		image.setObservation(observation);
36
 
37
		ComparaisonEfloreVue vue = new ComparaisonEfloreVue();
38
		vue.chargerImagePrincipale(image);
39
		assertTrue(vue.getNomAuteur().getText().contains("benjamin"));
40
	}
41
 
42
}