following is a very cool mocking with python, is there anyway to do that also 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 anything like this possible in java? meaning updating the return values and behavior of objects instantiated inside other object methods in such a convenient way? any framework to do that so nicely?
thanks
I found that powermock library is the most suitable for this in java and most resembels mocks.py