Subversion Repositories eFlore/Applications.coel

Rev

Rev 404 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
400 jp_milcent 1
package org.tela_botanica.client;
2
 
3
import org.tela_botanica.client.i18n.AppliConstantes;
4
 
5
import com.extjs.gxt.ui.client.Registry;
6
import com.google.gwt.junit.client.GWTTestCase;
7
 
8
public class CoelTest extends GWTTestCase {
9
	private Coel module = null;
10
 
11
	public String getModuleName() {
12
		return "org.tela_botanica.Coel";
13
	}
14
 
15
	protected void gwtSetUp() {
16
		module = new Coel();
17
		module.onModuleLoad();
18
	}
19
 
404 jp_milcent 20
	public void testerCreationConstanteI18n() {
400 jp_milcent 21
		String messageErreur = "L'attribut contenant l'i18n doit être accesible et non null";
404 jp_milcent 22
		assertTrue(messageErreur, module.getI18nConstante() != null);
400 jp_milcent 23
	}
24
 
25
	public void testerInstanceConstanteI18n() {
26
		String messageErreur = "L'attribut contenant l'i18n doit être une instance de "+AppliConstantes.class;
404 jp_milcent 27
		assertTrue(messageErreur, module.getI18nConstante() instanceof AppliConstantes);
400 jp_milcent 28
	}
29
 
30
	public void testerRegistreContientAppliNom() {
404 jp_milcent 31
		assertEquals(module.getI18nConstante().appliNom(), Registry.get(RegistreId.APPLI_NOM));
400 jp_milcent 32
	}
33
 
34
	public void testerRegistreContientAppliCode() {
404 jp_milcent 35
		assertEquals(module.getI18nConstante().appliCode(), Registry.get(RegistreId.APPLI_CODE));
400 jp_milcent 36
	}
37
 
38
	public void testerRegistreContientAppliVersion() {
404 jp_milcent 39
		assertEquals(module.getI18nConstante().appliVersion(), Registry.get(RegistreId.APPLI_VERSION));
400 jp_milcent 40
	}
41
 
42
	public void testerRegistreContientAppliRevision() {
43
		assertTrue(Registry.get(RegistreId.APPLI_VERSION) != null);
44
	}
45
 
46
	public void testerRegistreContientConfiguration() {
47
		assertTrue(Registry.get(RegistreId.CONFIG) != null);
48
	}
49
 
50
	public void testerRegistreContientPopUpChargement() {
51
		assertTrue(Registry.get(RegistreId.POPUP_CHARGEMENT) != null);
52
	}
53
 
54
}