Package org.jbehave.core.mock

Examples of org.jbehave.core.mock.Expectation.matches()


        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
            if (args == null) args = new Object[0];
           
            for (Iterator i = expectations.iterator(); i.hasNext();) {
                Expectation expectation = (Expectation) i.next();
                if (expectation.matches(method.getName(), args)) {
                    return expectation.invoke(proxy, method, args);
                }
            }
           
            // if we get here we didn't match on any expectations          
View Full Code Here


    }

    private boolean anyExpectationsMatchMethodName(String methodName) {
            for (Iterator i = expectations.iterator(); i.hasNext();) {
               Expectation expectation = (Expectation) i.next();
               if(expectation.matches(methodName)) return true;
            }
            return false;
        }
    }
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.