This article is the final part of the block of the materials devoted to testing. This block was devoted to the following topics:
All the highlights with the implementation of the tests itself will be omitted. It can be found in the previous articles.
As mentioned in the previous article, it should not to interfere the methods and objects related to the main job class with methods to test. Let’s do the following steps for it:
1) We create a
MainTestActivity.java class and inherit
MainActivity.java class.
2) We brought out all the methods associated with the tests at the new class.
3) And edit the class
MainActivityTest.java.
Class MainTestActivity, java will be as follows: