Class FailingCvTermFetcher

  • All Implemented Interfaces:
    CvTermFetcher<CvTerm>, MockFetcher<CvTerm>

    public class FailingCvTermFetcher
    extends AbstractFailingFetcher<CvTerm>
    implements CvTermFetcher<CvTerm>
    A mock fetcher for testing exceptions. It extends the functionality of the mock fetcher but can also throw exceptions. Upon initialisation, an integer is given which sets how many times a query is made before returning the result. If the current query matches the last query and the counter of the number of times is less than the maxQuery set at initialisation, then an exception will be thrown. Additionally, if the maxQuery is set to -1, the fetcher will always throw an exception.
    Since:
    01/07/13
    Author:
    Gabriel Aldam (galdam@ebi.ac.uk)
    • Constructor Detail

      • FailingCvTermFetcher

        public FailingCvTermFetcher​(int maxQuery)

        Constructor for FailingCvTermFetcher.

        Parameters:
        maxQuery - a int.