当前位置: 首页>>代码示例>>Java>>正文


Java GWTTestCase类代码示例

本文整理汇总了Java中com.google.gwt.junit.client.GWTTestCase的典型用法代码示例。如果您正苦于以下问题:Java GWTTestCase类的具体用法?Java GWTTestCase怎么用?Java GWTTestCase使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


GWTTestCase类属于com.google.gwt.junit.client包,在下文中一共展示了GWTTestCase类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: convertClassNamesToClass

import com.google.gwt.junit.client.GWTTestCase; //导入依赖的package包/类
private static Set<Class<? extends GWTTestCase>> convertClassNamesToClass(final Collection<String> classNames) {
    Set<Class<? extends GWTTestCase>> allGwtTestCaseClasses = Sets.newHashSet();
    for (String className : classNames) {
        try {
            Class<? extends GWTTestCase> clazz = (Class<? extends GWTTestCase>) GWTTestCaseSuite.class.getClassLoader().loadClass(className);
            allGwtTestCaseClasses.add(clazz);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }
    return allGwtTestCaseClasses;
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:13,代码来源:GWTTestCaseSuite.java

示例2: addClass

import com.google.gwt.junit.client.GWTTestCase; //导入依赖的package包/类
public void addClass(Class<?> clazz) {
    if (!finished.add(clazz.getName())) {
        return;
    }
    addGwtModules(clazz);
    if (EntryPoint.class.isAssignableFrom(clazz)) {
        try {
            addMethod(clazz.getMethod("onModuleLoad"));
        } catch (Exception e) {
            X_Log.error(GwtcProjectGenerator.class, "Could not extract onModuleLoad method from ", clazz, e);
        }
    } else if (GWTTestCase.class.isAssignableFrom(clazz)) {
        addGwtTestCase(clazz.asSubclass(GWTTestCase.class));
    } else if (GWTTestSuite.class.isAssignableFrom(clazz)) {
        addGwtTestSuite(clazz.asSubclass(GWTTestSuite.class));
    } else if (RunAsyncCallback.class.isAssignableFrom(clazz)) {
        addAsyncBlock(clazz.asSubclass(RunAsyncCallback.class));
    } else {
        // Check if this class has methods annotated w/ junit @Test
        for (Method m : clazz.getMethods()) {
            if (m.getAnnotation(Test.class) != null) {
                finished.remove(clazz.getName());
                addJUnitClass(clazz);
                return;
            }
        }
        try {
            addMethod(clazz.getMethod("main", String[].class));
        } catch (Exception ignored){
            X_Log.warn(getClass(), "Class",clazz," was added to Gwtc, "
                + "but that class was not a subclass of EntryPoint, RunAsync,"
                + " GWTTestCase, GWTTestSuite, nor did it have a main method, or"
                + " any JUnit 4 annotated @Test method.");
        }
    }
}
 
开发者ID:WeTheInternet,项目名称:xapi,代码行数:37,代码来源:GwtcProjectGeneratorDefault.java

示例3: isGwtTestCase

import com.google.gwt.junit.client.GWTTestCase; //导入依赖的package包/类
private boolean isGwtTestCase(Class<?> clazz) {
    return GWTTestCase.class.isAssignableFrom(clazz);
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:4,代码来源:GwtTestCaseScanner.java

示例4: getTestClasses

import com.google.gwt.junit.client.GWTTestCase; //导入依赖的package包/类
private static Set<Class<? extends GWTTestCase>> getTestClasses() {
    return Sets.filter(getAllTestClasses(), unsupportedClazzFilter);
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:4,代码来源:GWTTestCaseSuite.java

示例5: getAllTestClasses

import com.google.gwt.junit.client.GWTTestCase; //导入依赖的package包/类
private static Set<Class<? extends GWTTestCase>> getAllTestClasses() {
    Reflections reflections = createReflectionsForGwtTestCase();
    Collection<String> classNames = getGwtTestCaseClassNames(reflections);
    return convertClassNamesToClass(classNames);
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:6,代码来源:GWTTestCaseSuite.java

示例6: addGwtTestCase

import com.google.gwt.junit.client.GWTTestCase; //导入依赖的package包/类
@Override
public void addGwtTestCase(Class<? extends GWTTestCase> subclass) {
    // TODO: setup a GWTTestSuite to add this test case to
    throw new NotYetImplemented("GwtTestCase not yet implemented");
}
 
开发者ID:WeTheInternet,项目名称:xapi,代码行数:6,代码来源:GwtcProjectGeneratorDefault.java

示例7: addGwtTestCase

import com.google.gwt.junit.client.GWTTestCase; //导入依赖的package包/类
void addGwtTestCase(Class<? extends GWTTestCase> subclass); 
开发者ID:WeTheInternet,项目名称:xapi,代码行数:2,代码来源:GwtcProjectGenerator.java


注:本文中的com.google.gwt.junit.client.GWTTestCase类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。