Java Mailing List Archive

http://www.gg3721.com/

Home » user.jmock »

[jmock-user] mock method call with method

Mikael Petterson

2008-03-27

Replies: Find Java Web Hosting

Author LoginPost Reply
mock method call with method

Hi,

When we test the following method in class Caller:

public class Caller {

        public String myCall (){
        ........

        routeTo(from,to);

        return "aString";
        }


        private void routeTo (String from , String to){

        }

}

Is it possible to mock the call to 'routeTo'? Or since it is part of the unit under test do we have to test it?

cheers,

//mikael

©2008 gg3721.com - Jax Systems, LLC, U.S.A.