Subversion Repositories eFlore/Applications.coel

Rev

Rev 400 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

package org.tela_botanica.client;

import org.tela_botanica.client.i18n.AppliConstantes;

import com.extjs.gxt.ui.client.Registry;
import com.google.gwt.junit.client.GWTTestCase;

public class CoelTest extends GWTTestCase {
        private Coel module = null;
        
        public String getModuleName() {
                return "org.tela_botanica.Coel";
        }
        
        protected void gwtSetUp() {
                module = new Coel();
                module.onModuleLoad();
        }
        
        public void testerCreationConstanteI18n() {
                String messageErreur = "L'attribut contenant l'i18n doit ĂȘtre accesible et non null";
                assertTrue(messageErreur, module.getI18nConstante() != null);
        }
        
        public void testerInstanceConstanteI18n() {
                String messageErreur = "L'attribut contenant l'i18n doit ĂȘtre une instance de "+AppliConstantes.class;
                assertTrue(messageErreur, module.getI18nConstante() instanceof AppliConstantes);
        }

        public void testerRegistreContientAppliNom() {
                assertEquals(module.getI18nConstante().appliNom(), Registry.get(RegistreId.APPLI_NOM));
        }
        
        public void testerRegistreContientAppliCode() {
                assertEquals(module.getI18nConstante().appliCode(), Registry.get(RegistreId.APPLI_CODE));
        }
        
        public void testerRegistreContientAppliVersion() {
                assertEquals(module.getI18nConstante().appliVersion(), Registry.get(RegistreId.APPLI_VERSION));
        }
        
        public void testerRegistreContientAppliRevision() {
                assertTrue(Registry.get(RegistreId.APPLI_VERSION) != null);
        }
        
        public void testerRegistreContientConfiguration() {
                assertTrue(Registry.get(RegistreId.CONFIG) != null);
        }
        
        public void testerRegistreContientPopUpChargement() {
                assertTrue(Registry.get(RegistreId.POPUP_CHARGEMENT) != null);
        }
        
}