When writing tests specifically for a Selector class method, the process is almost as per the standard Apex testing guidelines; insert the data you need to support the queries, call the Selector methods, and assert the results returned. You can review some of the Selector tests included in this chapter.
Of course, other Apex tests around the Controllers, Batch Apex, Domain, and Service layers may also invoke the Selector methods indirectly, thus providing code coverage, but not necessarily testing every aspect of the Selector classes.
As highlighted previously, often writing more isolated Apex tests can be made harder due to the fact that the code being tested often requires records to be set up in the database. By leveraging the Selector factory option described earlier, a mocking approach can be taken to the Selector methods, which can help make writing more isolated and varied component or class-level tests easier. We will revisit this topic in Chapter 12, Unit Testing.