use of org.geometerplus.fbreader.description.BookDescription in project FBReaderJ by geometer.
the class TestBookCollection method testExternalBook.
public void testExternalBook() {
BookDescription bd = BookDescription.getDescription(myDirectory + "/" + filename);
assertTrue(bd != null);
BookCollection bc = new BookCollection();
bc.isBookExternal(bd);
ArrayList authors = bc.authors();
for (int i = 0; i < authors.size(); i++) {
System.out.println(authors.get(i));
}
}
use of org.geometerplus.fbreader.description.BookDescription in project FBReaderJ by geometer.
the class TestDescriptionBook method testLanguageEncoding.
public void testLanguageEncoding() {
BookDescription bd = BookDescription.getDescription(myDirectory + "/" + filename);
assertTrue(bd != null);
assertEquals(bd.getEncoding(), "auto");
assertEquals(bd.getFileName(), "test/data/fb2/filesystem/testfb2book.fb2");
assertEquals(bd.getLanguage(), "ru");
//System.out.println(bd.getNumberInSequence());
assertEquals(bd.getSequenceName(), "����������� ������ ���������");
assertEquals(bd.getTitle(), "�������� ���������");
}
use of org.geometerplus.fbreader.description.BookDescription in project FBReaderJ by geometer.
the class TestDescriptionBook method testGetDescription.
public void testGetDescription() {
BookDescription bd = BookDescription.getDescription(myDirectory + "/" + filename, false);
assertTrue(bd != null);
BookDescription bd2 = BookDescription.getDescription(myDirectory + "/c" + filename, false);
assertTrue(bd2 == null);
}
use of org.geometerplus.fbreader.description.BookDescription in project FBReaderJ by geometer.
the class TestDescriptionBook method testAuthor.
public void testAuthor() {
BookDescription bd = BookDescription.getDescription(myDirectory + "/" + filename);
assertTrue(bd != null);
Author author = bd.getAuthor();
assertTrue(author != null);
assertEquals(author.getDisplayName(), "����� ������");
assertEquals(author.getSortKey(), "������");
assertEquals(author.isSingle(), true);
}
use of org.geometerplus.fbreader.description.BookDescription in project FBReaderJ by geometer.
the class TestDescriptionBook method testBookModel.
public void testBookModel() {
BookDescription bd = BookDescription.getDescription(myDirectory + "/" + filename, false);
assertTrue(bd != null);
BookModel bm = new BookModel(bd);
assertTrue(bm != null);
//System.out.println(bm.getContentsModel().getParagraphsNumber());
}
Aggregations