The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Originally posted by Manohar Karamballi:
I have a requirement where my class that is being tested instantiates thrid party class which is not implementing any interface.
Am just not getting how to test this..either manually or using any API for the same.
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
The latest release of EasyMock supports mocking up concrete classes (it uses CGLIB bytecode library internally to accomplish this).
Originally posted by Manohar Karamballi:
I have a requirement where my class that is being tested instantiates thrid party class which is not implementing any interface.
Am just not getting how to test this..either manually or using any API for the same.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Originally posted by Manohar Karamballi:
mockClientcontrol = MockControl.createControl(AClass.class);
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Consider Paul's rocket mass heater. |