Package org.spockframework.mock

Examples of org.spockframework.mock.IMockMethod


  public EqualPropertyNameConstraint(String propertyName) {
    this.propertyName = propertyName;
  }

  public boolean isSatisfiedBy(IMockInvocation invocation) {
    IMockMethod method = invocation.getMethod();
    return propertyName.equals(GroovyRuntimeUtil.getterMethodToPropertyName(
        method.getName(), method.getParameterTypes(), method.getReturnType()));
  }
View Full Code Here


  public RegexPropertyNameConstraint(String regex) {
    pattern = Pattern.compile(regex);
  }

  public boolean isSatisfiedBy(IMockInvocation invocation) {
    IMockMethod method = invocation.getMethod();
    String propertyName = GroovyRuntimeUtil.getterMethodToPropertyName(
        method.getName(), method.getParameterTypes(), method.getReturnType());
    return propertyName != null && pattern.matcher(propertyName).matches();
  }
View Full Code Here

TOP

Related Classes of org.spockframework.mock.IMockMethod

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.