Package org.spockframework.runtime.extension

Examples of org.spockframework.runtime.extension.ExtensionException


  private Closure createCondition(Class<? extends Closure> clazz) {
    try {
      return clazz.getConstructor(Object.class, Object.class).newInstance(null, null);
    } catch (Exception e) {
      throw new ExtensionException("Failed to instantiate @Requires condition", e);
    }
  }
View Full Code Here


    condition.setResolveStrategy(Closure.DELEGATE_ONLY);
   
    try {
      return condition.call();
    } catch (Exception e) {
      throw new ExtensionException("Failed to evaluate @Requires condition", e);
    }
  }
View Full Code Here

  private Closure createCondition(Class<? extends Closure> clazz) {
    try {
      return clazz.getConstructor(Object.class, Object.class).newInstance(null, null);
    } catch (Exception e) {
      throw new ExtensionException("Failed to instantiate @IgnoreIf condition", e);
    }
  }
View Full Code Here

    condition.setResolveStrategy(Closure.DELEGATE_ONLY);
   
    try {
      return condition.call();
    } catch (Exception e) {
      throw new ExtensionException("Failed to evaluate @IgnoreIf condition", e);
    }
  }
View Full Code Here

    if (rule == null) {
      try {
        rule = field.getType().newInstance();
        field.writeValue(fieldTarget, rule);
      } catch (Exception e) {
        throw new ExtensionException("Auto-instantiating @Rule field '%s' failed. You may have to instantiate it manually.", e).withArgs(field.getName());
      }
    }
    return rule;
  }
View Full Code Here

TOP

Related Classes of org.spockframework.runtime.extension.ExtensionException

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.