use of com.googlecode.gwt.test.GwtModule in project gwt-test-utils by gwt-test-utils.
the class GwtConfig method setupGwtModule.
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 ?");
}
this.testedModuleName = moduleName;
}
Aggregations