|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| MethodConstraintFactory.java | - | 100% | 100% | 100% |
|
||||||||||||||
| 1 | package com.agical.rmock.core.match.constraint.method; | |
| 2 | ||
| 3 | import com.agical.rmock.core.match.Expression; | |
| 4 | ||
| 5 | public class MethodConstraintFactory { | |
| 6 | ||
| 7 | /** | |
| 8 | * Passes if the mame of any method passed to this constraint passes the expression | |
| 9 | * passes as the expression parameter. | |
| 10 | * @param expression The expression the name of a methofd passed to the constraint must pass | |
| 11 | * @return A MethodNameConstraint | |
| 12 | */ | |
| 13 | 1 | public Expression name(Expression expression) { |
| 14 | 1 | return new MethodNameConstraint(expression); |
| 15 | } | |
| 16 | ||
| 17 | /** | |
| 18 | * Returns an expression that matches the parametertypes of a method. | |
| 19 | * @param expressions Expressions to match the parameter types of this method | |
| 20 | * @return an expression that matches parameter types. | |
| 21 | */ | |
| 22 | 1 | public Expression paramTypes(Expression[] expressions) { |
| 23 | 1 | return new MethodParameterTypesConstraint(expressions); |
| 24 | } | |
| 25 | } |
|
||||||||||