Package net.sf.jabref.imports

Examples of net.sf.jabref.imports.CopacImporter


    super.tearDown();
  }

  public void testIsRecognizedFormat() throws IOException {

        CopacImporter importer = new CopacImporter();
    assertTrue(importer.isRecognizedFormat(CopacImporterTest.class
      .getResourceAsStream("CopacImporterTest1.txt")));

    assertTrue(importer.isRecognizedFormat(CopacImporterTest.class
      .getResourceAsStream("CopacImporterTest2.txt")));

    assertFalse(importer.isRecognizedFormat(CopacImporterTest.class
      .getResourceAsStream("IsiImporterTest1.isi")));

    assertFalse(importer.isRecognizedFormat(CopacImporterTest.class
      .getResourceAsStream("IsiImporterTestINSPEC.isi")));

    assertFalse(importer.isRecognizedFormat(CopacImporterTest.class
      .getResourceAsStream("IsiImporterTestWOS.isi")));

    assertFalse(importer.isRecognizedFormat(CopacImporterTest.class
      .getResourceAsStream("IsiImporterTestMedline.isi")));
  }
View Full Code Here


    assertFalse(importer.isRecognizedFormat(CopacImporterTest.class
      .getResourceAsStream("IsiImporterTestMedline.isi")));
  }

  public void testImportEntries() throws IOException {
    CopacImporter importer = new CopacImporter();

    List<BibtexEntry> entries = importer.importEntries(CopacImporterTest.class
      .getResourceAsStream("CopacImporterTest1.txt"));
    assertEquals(1, entries.size());
    BibtexEntry entry = entries.get(0);
   
    assertEquals("The SIS project : software reuse with a natural language approach", entry.getField("title"));
View Full Code Here

    assertEquals("Karlsruhe :  Universitat Karlsruhe, Fakultat fur Informatik", entry.getField("publisher"));
    assertEquals(BibtexEntryType.BOOK, entry.getType());
  }

  public void testImportEntries2() throws IOException {
    CopacImporter importer = new CopacImporter();

    List<BibtexEntry> entries = importer.importEntries(CopacImporterTest.class
      .getResourceAsStream("CopacImporterTest2.txt"));
    assertEquals(2, entries.size());
    BibtexEntry one = entries.get(0);
   
    assertEquals("Computing and operational research at the London Hospital", one.getField("title"));
View Full Code Here

TOP

Related Classes of net.sf.jabref.imports.CopacImporter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.