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 |
|
|
|
20 |
public void testerExistanceConstanteI18n() {
|
|
|
21 |
String messageErreur = "L'attribut contenant l'i18n doit être accesible et non null";
|
|
|
22 |
assertTrue(messageErreur, module.i18nC != null);
|
|
|
23 |
}
|
|
|
24 |
|
|
|
25 |
public void testerInstanceConstanteI18n() {
|
|
|
26 |
String messageErreur = "L'attribut contenant l'i18n doit être une instance de "+AppliConstantes.class;
|
|
|
27 |
assertTrue(messageErreur, module.i18nC instanceof AppliConstantes);
|
|
|
28 |
}
|
|
|
29 |
|
|
|
30 |
public void testerRegistreContientAppliNom() {
|
|
|
31 |
assertEquals(module.i18nC.appliNom(), Registry.get(RegistreId.APPLI_NOM));
|
|
|
32 |
}
|
|
|
33 |
|
|
|
34 |
public void testerRegistreContientAppliCode() {
|
|
|
35 |
assertEquals(module.i18nC.appliCode(), Registry.get(RegistreId.APPLI_CODE));
|
|
|
36 |
}
|
|
|
37 |
|
|
|
38 |
public void testerRegistreContientAppliVersion() {
|
|
|
39 |
assertEquals(module.i18nC.appliVersion(), Registry.get(RegistreId.APPLI_VERSION));
|
|
|
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 |
}
|