In testing, we have what we call the setUp() and tearDown() methods. You can use the setUp method to call whatever you need for every test function in that class. Before a test method is run, the setUp() is invoked if you define it.
So you can just instantiate EvangelistFetcher class there rather than doing it in every method.
Check here for more information
In testing, we have what we call the
setUp()andtearDown()methods. You can use the setUp method to call whatever you need for every test function in that class. Before a test method is run, the setUp() is invoked if you define it.So you can just instantiate EvangelistFetcher class there rather than doing it in every method.
Check here for more information