Example #1
0
  @Test
  public void notFoundByDOI() throws IOException {
    // CI server is unreliable
    Assume.assumeFalse(DevEnvironment.isCIServer());

    entry.setField("doi", "10.1021/bk-2006-WWW.ch014");

    Assert.assertEquals(Optional.empty(), finder.findFullText(entry));
  }
Example #2
0
  @Test
  public void findByDOI() throws IOException {
    // CI server is unreliable
    Assume.assumeFalse(DevEnvironment.isCIServer());

    entry.setField("doi", "10.1021/bk-2006-STYG.ch014");

    Assert.assertEquals(
        Optional.of(new URL("http://pubs.acs.org/doi/pdf/10.1021/bk-2006-STYG.ch014")),
        finder.findFullText(entry));
  }
Example #3
0
 @Test(expected = NullPointerException.class)
 public void rejectNullParameter() throws IOException {
   finder.findFullText(null);
   Assert.fail();
 }
Example #4
0
 @Test
 public void doiNotPresent() throws IOException {
   Assert.assertEquals(Optional.empty(), finder.findFullText(entry));
 }