Subversion Repositories eFlore/Applications.del

Rev

Rev 534 | Blame | Compare with Previous | Last modification | View Log | RSS feed

package org.tela_botanica.del.uitest;

import org.tela_botanica.del.client.modeles.Image;
import org.tela_botanica.del.client.modeles.Observation;
import org.tela_botanica.del.client.vues.comparaisoneflore.ComparaisonEfloreVue;

import com.google.gwt.junit.client.GWTTestCase;

public class ComparaisonEfloreVueTest extends GWTTestCase {

        // To run this test configure your junit launcher (Eclipse>Run>Run configurations
        // classpath>Advanced>Select Folders and choose src/)

        @Override
        public String getModuleName() {
                return "org.tela_botanica.del.Del";
        }

        public void testLoginView() {

                Observation observation = new Observation();
                String auteur = "benjamin";
                observation.setAuteur(auteur);
                observation.setNomRetenu("marronier");
                observation.setNumNomenclatural("num nomenclatural ");
                observation.setDateReleve("28/09/2011");
                observation.setFamille("famille ");
                observation.setLocalite("localite ");

                Image image = new Image();
                image.setIdImage("id image 1");
                image.setUrlFormat("http://www.tela-botanica.org/appli:cel-img:00001%s%.jpg");
                image.setUrl("http://www.tela-botanica.org/appli:cel-img:00001CRS.jpg");
                image.setMiniature("http://www.tela-botanica.org/appli:cel-img:00001XS.jpg");
                image.setObservation(observation);

                ComparaisonEfloreVue vue = new ComparaisonEfloreVue();
                vue.chargerImagePrincipale(image);
                assertTrue(vue.getNomAuteur().getText().contains("benjamin"));
        }

}