Package org.jtester.annotations

Examples of org.jtester.annotations.DbFit.auto()


   * @return
   */
  public static String[] autoFindClassWhen(Class testClazz) {
    DbFit dbFit = AnnotationUtils.getClassLevelAnnotation(DbFit.class, testClazz);
    List<String> whens = getFiles(dbFit == null ? null : dbFit.when());
    if (dbFit != null && dbFit.auto() == AUTO.UN_AUTO) {
      return whens.toArray(new String[0]);
    } else {
      String wiki = String.format(CLAZZ_WHEN_WIKI, testClazz.getSimpleName());
      if (whens.contains(wiki) == false && ResourceHelper.isResourceExists(testClazz, wiki)) {
        whens.add(wiki);
View Full Code Here


   *            测试方法
   * @return
   */
  private static boolean isAutoFind(Class testClazz, Method testMethod) {
    DbFit methodDbFit = testMethod.getAnnotation(DbFit.class);
    if (methodDbFit != null && methodDbFit.auto() != AUTO.DEFAULT) {
      return methodDbFit.auto() == AUTO.AUTO;
    }

    DbFit clazzDbFit = AnnotationUtils.getClassLevelAnnotation(DbFit.class, testClazz);
    if (clazzDbFit == null) {
View Full Code Here

   * @return
   */
  private static boolean isAutoFind(Class testClazz, Method testMethod) {
    DbFit methodDbFit = testMethod.getAnnotation(DbFit.class);
    if (methodDbFit != null && methodDbFit.auto() != AUTO.DEFAULT) {
      return methodDbFit.auto() == AUTO.AUTO;
    }

    DbFit clazzDbFit = AnnotationUtils.getClassLevelAnnotation(DbFit.class, testClazz);
    if (clazzDbFit == null) {
      return true;
View Full Code Here

    DbFit clazzDbFit = AnnotationUtils.getClassLevelAnnotation(DbFit.class, testClazz);
    if (clazzDbFit == null) {
      return true;
    } else {
      return !(clazzDbFit.auto() == AUTO.UN_AUTO);
    }
  }

  private static List<String> getFiles(String[] files) {
    List<String> list = new ArrayList<String>();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.