Search in sources :

Example 6 with Author

use of org.jabref.model.entry.Author in project jabref by JabRef.

the class MsBibAuthorTest method testGetNoMiddleName.

@Test
public void testGetNoMiddleName() {
    Author author = new Author("Gustav", null, null, "Bach", null);
    MsBibAuthor msBibAuthor = new MsBibAuthor(author);
    assertEquals(null, msBibAuthor.getMiddleName());
}
Also used : Author(org.jabref.model.entry.Author) Test(org.junit.Test)

Example 7 with Author

use of org.jabref.model.entry.Author in project jabref by JabRef.

the class MsBibAuthorTest method testGetNoFirstName.

@Test
public void testGetNoFirstName() {
    Author author = new Author(null, null, null, "Bach", null);
    MsBibAuthor msBibAuthor = new MsBibAuthor(author);
    assertEquals(null, msBibAuthor.getMiddleName());
}
Also used : Author(org.jabref.model.entry.Author) Test(org.junit.Test)

Example 8 with Author

use of org.jabref.model.entry.Author in project jabref by JabRef.

the class MsBibAuthorTest method testGetMiddleName.

@Test
public void testGetMiddleName() {
    Author author = new Author("Gustav Peter Johann", null, null, "Bach", null);
    MsBibAuthor msBibAuthor = new MsBibAuthor(author);
    assertEquals("Peter Johann", msBibAuthor.getMiddleName());
}
Also used : Author(org.jabref.model.entry.Author) Test(org.junit.Test)

Example 9 with Author

use of org.jabref.model.entry.Author in project jabref by JabRef.

the class MsBibAuthorTest method testGetLastName.

@Test
public void testGetLastName() {
    Author author = new Author("Gustav Peter Johann", null, null, "Bach", null);
    MsBibAuthor msBibAuthor = new MsBibAuthor(author);
    assertEquals("Bach", msBibAuthor.getLastName());
}
Also used : Author(org.jabref.model.entry.Author) Test(org.junit.Test)

Example 10 with Author

use of org.jabref.model.entry.Author in project jabref by JabRef.

the class MsBibAuthorTest method testGetFirstName.

@Test
public void testGetFirstName() {
    Author author = new Author("Gustav Peter Johann", null, null, "Bach", null);
    MsBibAuthor msBibAuthor = new MsBibAuthor(author);
    assertEquals("Gustav", msBibAuthor.getFirstName());
}
Also used : Author(org.jabref.model.entry.Author) Test(org.junit.Test)

Aggregations

Author (org.jabref.model.entry.Author)13 AuthorList (org.jabref.model.entry.AuthorList)8 Test (org.junit.Test)5 ArrayList (java.util.ArrayList)2 TreeSet (java.util.TreeSet)2 LayoutFormatter (org.jabref.logic.layout.LayoutFormatter)2 BibEntry (org.jabref.model.entry.BibEntry)2 FieldName (org.jabref.model.entry.FieldName)2 File (java.io.File)1 FileInputStream (java.io.FileInputStream)1 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 InputStreamReader (java.io.InputStreamReader)1 Reader (java.io.Reader)1 StringReader (java.io.StringReader)1 Charset (java.nio.charset.Charset)1 StandardCharsets (java.nio.charset.StandardCharsets)1 Collections (java.util.Collections)1 HashMap (java.util.HashMap)1 List (java.util.List)1