public void setupGwtModule(Class<?> testClass) {
GwtModule gwtModule = testClass.getAnnotation(GwtModule.class);
if (gwtModule == null) {
throw new GwtTestConfigurationException("The test class " + testClass.getName()
+ " must be annotated with @" + GwtModule.class.getSimpleName()
+ " to specify the fully qualified name of the GWT module to test");
}
String moduleName = gwtModule.value();
if (moduleName == null || "".equals(moduleName.trim())) {
throw new GwtTestConfigurationException("Incorrect value for @"
+ GwtModule.class.getSimpleName() + " on " + testClass.getName() + ": "
+ moduleName);
}
if (!GwtFactory.get().getConfigurationLoader().getGwtModules().contains(moduleName)) {
throw new GwtTestConfigurationException(
"The tested @GwtModule '"
+ moduleName
+ "' configured in "
+ testClass.getName()
+ " has not been found. Did you forget to declare a 'gwt-module' property in your 'META-INF/gwt-test-utils.properties' configuration file ?");