阅读背景:

如何在没有Mockingn框架的情况下测试在另一个类中调用另一个方法的方法

来源:互联网 

I've been trying to get this scenario tested but I can't find a good way to test it. So this method under test creates a new Object of certain custom type which invokes a method afterwards.Now during debugging when my code reaches to this point it detects new object being created but when it goes into the method it blows up because certain fields are not initialized. There is no relationship between the Class I am testing the and the class for which my test is failing. Without any Mocking framework is there a way to test this. I cannot change the source code too. If it is a bad code can I still test it. I've been trying to get this scenario tested bu




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: