Class FailingPublicationFetcher

  • All Implemented Interfaces:
    MockFetcher<Publication>, PublicationFetcher

    public class FailingPublicationFetcher
    extends AbstractFailingFetcher<Publication>
    implements PublicationFetcher
    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:
    05/08/13
    Author:
    Gabriel Aldam (galdam@ebi.ac.uk)
    • Constructor Detail

      • FailingPublicationFetcher

        public FailingPublicationFetcher​(int maxQuery)

        Constructor for FailingPublicationFetcher.

        Parameters:
        maxQuery - a int.