In this example we'll unit test the Search From URL controller.
Percentage coverage is important as at least 75 % coverage across all code must be achieved before classes may be deployed to a production organization.
and click Save
Percentage coverage is important as at least 75 % coverage across all code must be achieved before classes may be deployed to a production organization.
Test Controller
Test class executes two unit tests.
The first method tests the search term being passed in the URL.
The second method tests that the search is correctly executed when the user enters a search term.
In both the cases, we have to setup the test data since the tests do not have access to organization data.
and click Save
