Skip to content

Commit

Permalink
SetID does not store value as internal id field
Browse files Browse the repository at this point in the history
  • Loading branch information
Siedlerchr committed Oct 25, 2019
1 parent 6a2760c commit 96d65e9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/test/java/org/jabref/logic/shared/DBMSProcessorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.jabref.logic.shared.exception.OfflineLockException;
import org.jabref.model.database.shared.DBMSType;
import org.jabref.model.entry.BibEntry;
import org.jabref.model.entry.field.InternalField;
import org.jabref.model.entry.field.StandardField;
import org.jabref.model.entry.field.UnknownField;
import org.jabref.model.entry.types.StandardEntryType;
Expand Down Expand Up @@ -126,9 +127,9 @@ void testUpdateEntry(DBMSType dbmsType, DBMSConnection dbmsConnection, DBMSProce
void testGetEntriesByIdList(DBMSType dbmsType, DBMSConnection dbmsConnection, DBMSProcessor dbmsProcessor) throws Exception {
dbmsProcessor.setupSharedDatabase();
BibEntry firstEntry = getBibEntryExample();
firstEntry.setId("00000024");
firstEntry.setField(InternalField.INTERNAL_ID_FIELD, "00001");
BibEntry secondEntry = getBibEntryExample();
secondEntry.setId("00000028");
firstEntry.setField(InternalField.INTERNAL_ID_FIELD, "00002");

This comment has been minimized.

Copy link
@matthiasgeiger

matthiasgeiger Oct 25, 2019

Member

Should be secondEntry right?

This comment has been minimized.

Copy link
@Siedlerchr

Siedlerchr Oct 25, 2019

Author Member

oh yes thx


dbmsProcessor.insertEntry(firstEntry);
dbmsProcessor.insertEntry(secondEntry);
Expand All @@ -137,8 +138,8 @@ void testGetEntriesByIdList(DBMSType dbmsType, DBMSConnection dbmsConnection, DB

clear(dbmsConnection);

assertEquals(firstEntry.getId(), sharedEntriesByIdList.get(0).getId());
assertEquals(secondEntry.getId(), sharedEntriesByIdList.get(1).getId());
assertEquals(firstEntry, sharedEntriesByIdList.get(0));
assertEquals(secondEntry, sharedEntriesByIdList.get(1));

}

Expand Down

0 comments on commit 96d65e9

Please sign in to comment.