Mock an object in a method that is not a parameter in java similar to the following python code? -
following cool mocking python, there anyway in java?
mockpath = os.path mockpath.isdir = mock(return_value=false) myobj = myclass() myobj.invoke_some_method() myobj.some_other_method.assert_called_with(false)
is possible in java? meaning updating return values , behavior of objects instantiated inside other object methods in such convenient way? framework nicely?
thanks
mockito supports partial mocks mocking out method in real class. latter looks more similar python example.
i believe easymock supports same thing i'm having trouble finding in documentation.
Comments
Post a Comment