Package com.google.inject.testing.guiceberry

Examples of com.google.inject.testing.guiceberry.GuiceBerryEnv


  }
 
  @VisibleForTesting
  static String getGbeNameFromGbeAnnotation(TestDescription testDescription) {
    Class<?> testCaseClass = testDescription.getTestCaseClass();
    GuiceBerryEnv gbeAnnotation = getGbeAnnotation(testCaseClass);
    AnnotatedGuiceBerryEnv annotatedGbeAnnotation = getAnnotatedGbeAnnotation(testCaseClass);

    if ((gbeAnnotation != null) && (annotatedGbeAnnotation != null)) {
      throw new IllegalArgumentException("It seems your test used both the "
          + "deprecated GuiceBerryEnv and AnnotatedGuiceBerryEnv annotations."
          + "Please remove the deprecated one.");
    }

    String declaredGbeName;
    if (gbeAnnotation != null) {
      declaredGbeName = gbeAnnotation.value();
    } else if (annotatedGbeAnnotation != null) {
      declaredGbeName = annotatedGbeAnnotation.value();
    } else {
      throw new IllegalArgumentException(String.format(
          "In order to use the deprecated GuiceBerryJunit3, your test class "
View Full Code Here


      testCaseClass.getAnnotation(AnnotatedGuiceBerryEnv.class);
    return gbeAnnotation;
  }
 
  private static GuiceBerryEnv getGbeAnnotation(Class<?> testCaseClass) {
    GuiceBerryEnv gbeAnnotation =
      testCaseClass.getAnnotation(GuiceBerryEnv.class);
    return gbeAnnotation;
 
View Full Code Here

    return gbeClass;
  }
 
  private static String getGbeNameFromGbeAnnotation(TestDescription testDescription) {
    Class<?> testCaseClass = testDescription.getTestCaseClass();
    GuiceBerryEnv gbeAnnotation = getGbeAnnotation(testCaseClass);
    AnnotatedGuiceBerryEnv annotatedGbeAnnotation = getAnnotatedGbeAnnotation(testCaseClass);

    if ((gbeAnnotation != null) && (annotatedGbeAnnotation != null)) {
      throw new IllegalArgumentException("It seems your test used both the "
          + "deprecated GuiceBerryEnv and AnnotatedGuiceBerryEnv annotations."
          + "Please remove the deprecated one.");
    }

    String declaredGbeName;
    if (gbeAnnotation != null) {
      declaredGbeName = gbeAnnotation.value();
    } else if (annotatedGbeAnnotation != null) {
      declaredGbeName = annotatedGbeAnnotation.value();
    } else {
      throw new IllegalArgumentException(String.format(
          "In order to use the deprecated GuiceBerryJunit3, your test class "
View Full Code Here

      testCaseClass.getAnnotation(AnnotatedGuiceBerryEnv.class);
    return gbeAnnotation;
  }
 
  private static GuiceBerryEnv getGbeAnnotation(Class<?> testCaseClass) {
    GuiceBerryEnv gbeAnnotation =
      testCaseClass.getAnnotation(GuiceBerryEnv.class);
    return gbeAnnotation;
 
View Full Code Here

TOP

Related Classes of com.google.inject.testing.guiceberry.GuiceBerryEnv

Copyright © 2018 www.massapicom. 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.