-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update user agent and log URL #11852
Changes from 10 commits
02a8281
1553f05
c73753a
0f3b387
c649240
390d2ce
85b382e
300b7b3
d4e933a
759b1d7
654616c
d1c33d9
f406414
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,6 @@ | |
|
||
import org.apache.lucene.queryparser.flexible.core.nodes.QueryNode; | ||
import org.apache.lucene.queryparser.flexible.standard.parser.StandardSyntaxParser; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.NO_EXPLICIT_FIELD; | ||
|
@@ -23,8 +22,30 @@ | |
class BvbFetcherTest { | ||
|
||
BvbFetcher fetcher = new BvbFetcher(); | ||
BibEntry bibEntryISBN0134685997; | ||
BibEntry bibEntryISBN9783960886402; | ||
BibEntry bibEntryISBN9783960886402 = new BibEntry(StandardEntryType.Misc) | ||
.withField(StandardField.TITLE, "Effective Java") | ||
.withField(StandardField.YEAR, "2018") | ||
.withField(StandardField.SUBTITLE, "best practices für die Java-Plattform") | ||
.withField(StandardField.AUTHOR, "Bloch, Joshua") | ||
.withField(StandardField.TITLEADDON, "Joshua Bloch") | ||
.withField(StandardField.EDITION, "3. Auflage, Übersetzung der englischsprachigen 3. Originalausgabe 2018") | ||
.withField(StandardField.FILE, "ParsedFileField{description='', link='http://search.ebscohost.com/login.aspx?direct=true&scope=site&db=nlebk&db=nlabk&AN=1906353', fileType='PDF'}") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Better use withFiles(List.of(new LInkedFile( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was a bug in the fetcher. Fixed at 654616c. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One more: d1c33d9 |
||
.withField(StandardField.ISBN, "9783960886402") | ||
.withField(StandardField.KEYWORDS, "Klassen, Interfaces, Generics, Enums, Annotationen, Lambdas, Streams, Module, parallel, Parallele Programmierung, Serialisierung, funktional, funktionale Programmierung, Java EE, Jakarta EE") | ||
.withField(StandardField.ADDRESS, "Heidelberg") | ||
.withField(StandardField.PAGETOTAL, "396") | ||
.withField(StandardField.PUBLISHER, "{dpunkt.verlag} and {Dpunkt. Verlag (Heidelberg)}"); | ||
|
||
BibEntry bibEntryISBN0134685997 = new BibEntry(StandardEntryType.Misc) | ||
.withField(StandardField.TITLE, "Effective Java") | ||
.withField(StandardField.YEAR, "2018") | ||
.withField(StandardField.AUTHOR, "Bloch, Joshua") | ||
.withField(StandardField.TITLEADDON, "Joshua Bloch") | ||
.withField(StandardField.EDITION, "Third edition") | ||
.withField(StandardField.ISBN, "0134685997") | ||
.withField(StandardField.PAGETOTAL, "392") | ||
.withField(StandardField.ADDRESS, "Boston") | ||
.withField(StandardField.PUBLISHER, "{Addison-Wesley}"); | ||
|
||
@Test | ||
void performTest() throws Exception { | ||
|
@@ -38,41 +59,6 @@ void performTest() throws Exception { | |
// result.forEach(entry -> System.out.println(entry.toString())); | ||
} | ||
|
||
@BeforeEach | ||
void setUp() { | ||
fetcher = new BvbFetcher(); | ||
|
||
bibEntryISBN9783960886402 = new BibEntry(StandardEntryType.Misc) | ||
.withField(StandardField.TITLE, "Effective Java") | ||
.withField(StandardField.YEAR, "2018") | ||
.withField(StandardField.SUBTITLE, "best practices für die Java-Plattform") | ||
.withField(StandardField.AUTHOR, "Bloch, Joshua") | ||
.withField(StandardField.TITLEADDON, "Joshua Bloch") | ||
.withField(StandardField.EDITION, "3. Auflage, Übersetzung der englischsprachigen 3. Originalausgabe 2018") | ||
.withField(StandardField.FILE, "ParsedFileField{description='', link='http://search.ebscohost.com/login.aspx?direct=true&scope=site&db=nlebk&db=nlabk&AN=1906353', fileType='PDF'}") | ||
.withField(StandardField.ISBN, "9783960886402") | ||
.withField(StandardField.KEYWORDS, "Klassen, Interfaces, Generics, Enums, Annotationen, Lambdas, Streams, Module, parallel, Parallele Programmierung, Serialisierung, funktional, funktionale Programmierung, Java EE, Jakarta EE") | ||
.withField(StandardField.ADDRESS, "Heidelberg") | ||
.withField(StandardField.PAGETOTAL, "396") | ||
.withField(StandardField.PUBLISHER, "{dpunkt.verlag} and {Dpunkt. Verlag (Heidelberg)}"); | ||
|
||
bibEntryISBN0134685997 = new BibEntry(StandardEntryType.Misc) | ||
.withField(StandardField.TITLE, "Effective Java") | ||
.withField(StandardField.YEAR, "2018") | ||
.withField(StandardField.AUTHOR, "Bloch, Joshua") | ||
.withField(StandardField.TITLEADDON, "Joshua Bloch") | ||
.withField(StandardField.EDITION, "Third edition") | ||
.withField(StandardField.ISBN, "0134685997") | ||
.withField(StandardField.PAGETOTAL, "392") | ||
.withField(StandardField.ADDRESS, "Boston") | ||
.withField(StandardField.PUBLISHER, "{Addison-Wesley}"); | ||
} | ||
|
||
@Test | ||
void getName() { | ||
assertEquals("Bibliotheksverbund Bayern (Experimental)", fetcher.getName()); | ||
} | ||
|
||
@Test | ||
void simpleSearchQueryURLCorrect() throws Exception { | ||
String query = "java jdk"; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will have an impact of using custom SSL certifactes now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked. --> TrustStore is created at org.jabref.logic.net.ssl.TrustStoreManager#configureTrustStore.
I created JavaDoc for it: 300b7b3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, maybe, this only works if we do this setting?! - I am not sure. How can we test this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I see it should be enough if we set in the truststore manager
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was about to revert the change ^^. -- Since its an alpha, we can take the risk?