I\'m wondering if there\'s any mocking framework that allows testing methods contaning method calls to dependent class instances not injected to the tested method or its class:<
If you want to mock the dependent object, you'll need a way to provide a mock instance. The best way to do this is to use dependency injection. It will not only make your code cleaner but it will also help decouple your classes, improving your design.