Class ExpressionExperimentBibRefFinderTest

java.lang.Object
ubic.gemma.core.loader.entrez.pubmed.ExpressionExperimentBibRefFinderTest

public class ExpressionExperimentBibRefFinderTest extends Object
Resolution is exercised against a stubbed GeoBrowser rather than live Entrez.

These assertions used to be driven by feeding SOFT text to a package-private parser, because the finder scraped acc.cgi and had no seam. It now goes through esearch/esummary via GeoBrowser, which is injectable, so the same behaviours — order, de-duplication, the empty case — are pinned at the boundary the class actually has.

Author:
pavlidis
  • Constructor Details

    • ExpressionExperimentBibRefFinderTest

      public ExpressionExperimentBibRefFinderTest()
  • Method Details

    • testTheSeriesPubMedIdIsTheAuthoritativeLink

      @Test public void testTheSeriesPubMedIdIsTheAuthoritativeLink() throws IOException
      Throws:
      IOException
    • testReturnsFirstWhenMultiple

      @Test public void testReturnsFirstWhenMultiple() throws IOException
      Throws:
      IOException
    • testEveryPubMedIdIsReadableNotJustTheFirst

      @Test public void testEveryPubMedIdIsReadableNotJustTheFirst() throws IOException
      A series listing two papers has a primary and a follow-up, and the second one has somewhere to go: the other-relevant slot. The single-id form counted them and warned "a curator should confirm which is primary", which described work no caller could act on because the id was already gone by the time the warning was written.
      Throws:
      IOException
    • testARepeatedIdIsOnePaper

      @Test public void testARepeatedIdIsOnePaper() throws IOException
      Throws:
      IOException
    • testANonNumericIdIsSkippedRatherThanFatal

      @Test public void testANonNumericIdIsSkippedRatherThanFatal() throws IOException
      Throws:
      IOException
    • testNoPublicationIsAnEmptyListNotAZero

      @Test public void testNoPublicationIsAnEmptyListNotAZero() throws IOException
      Throws:
      IOException
    • testNoPublicationIsMinusOneForTheSingleIdForm

      @Test public void testNoPublicationIsMinusOneForTheSingleIdForm() throws IOException
      Throws:
      IOException
    • testANonSeriesAccessionIsEmpty

      @Test public void testANonSeriesAccessionIsEmpty() throws IOException
      Throws:
      IOException
    • testAnUnreadableGeoThrowsRatherThanLookingLikeNoPublication

      @Test public void testAnUnreadableGeoThrowsRatherThanLookingLikeNoPublication() throws IOException
      The distinction the reCAPTCHA incident turned on. GEO being unreadable must not arrive as an empty list, because callers write "GEO states no publication" findings off an empty list — VerifyPublicationEvidenceCli records geo_states_none with a dated evidence string. An unknown answer throws instead, so no finding can be built from it.
      Throws:
      IOException
    • testAnAbsentRecordThrowsRatherThanLookingLikeNoPublication

      @Test public void testAnAbsentRecordThrowsRatherThanLookingLikeNoPublication() throws IOException
      Likewise for an accession GEO has no record of: we have learned nothing about its publications, which is not the same as learning that it has none.
      Throws:
      IOException
    • testARecordWithNoPubMedListIsEmpty

      @Test public void testARecordWithNoPubMedListIsEmpty() throws IOException
      A record that carries no PubMed list at all is GEO stating none, not a failure.
      Throws:
      IOException