Subversion Repositories eFlore/Applications.del

Rev

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

package org.tela_botanica.del.test.modeles;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;
import org.tela_botanica.del.client.modeles.Image;
import org.tela_botanica.del.client.modeles.Observation;

public class ImageTest {
        
        Image testImage;
        Observation testObservation;
        
        @Before
    public void setUp() {
                testImage = new Image();
                testObservation = new Observation();    
                testImage.setObservation(testObservation);
        }
        
        @Test
        public void testEstADeterminerCarNomRetenuVide() {
                testObservation.setNomRetenu("");
                assertEquals(testImage.estADeterminer(), true);
        }
        
        @Test
        public void testEstADeterminerCarTagImageADeterminer() {
                testImage.ajouterMotsClef("aDeterminer");
                assertEquals(testImage.estADeterminer(), true);
        }
        
        @Test
        public void testEstADeterminerTagObservationADeterminer() {
                testObservation.ajouterMotsClef("aDeterminer");
                assertEquals(testImage.estADeterminer(), true);
        }

}