File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
jabsrv/src/test/java/org/jabref/http/server Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 1111import org .jabref .http .dto .GsonFactory ;
1212import org .jabref .http .server .cayw .format .FormatterService ;
1313import org .jabref .http .server .services .FilesToServe ;
14+ import org .jabref .logic .FilePreferences ;
1415import org .jabref .logic .bibtex .FieldPreferences ;
1516import org .jabref .logic .importer .ImportFormatPreferences ;
1617import org .jabref .logic .preferences .CliPreferences ;
1718import org .jabref .logic .preferences .LastFilesOpenedPreferences ;
1819import org .jabref .model .entry .BibEntryPreferences ;
20+ import org .jabref .model .metadata .UserHostInfo ;
1921
2022import com .google .gson .Gson ;
2123import org .glassfish .hk2 .utilities .binding .AbstractBinder ;
@@ -128,6 +130,11 @@ private static void initializePreferencesService() {
128130 LastFilesOpenedPreferences lastFilesOpenedPreferences = mock (LastFilesOpenedPreferences .class );
129131 when (preferences .getLastFilesOpenedPreferences ()).thenReturn (lastFilesOpenedPreferences );
130132 when (lastFilesOpenedPreferences .getLastFilesOpened ()).thenReturn (FXCollections .emptyObservableList ());
133+
134+ FilePreferences filePreferences = mock (FilePreferences .class );
135+ when (preferences .getFilePreferences ()).thenReturn (filePreferences );
136+ when (filePreferences .getUserAndHost ()).thenReturn (new UserHostInfo ("user" , "host" ).getUserHostString ());
137+ when (importFormatPreferences .filePreferences ()).thenReturn (filePreferences );
131138 }
132139
133140 protected void addGlobalExceptionMapperToResourceConfig (ResourceConfig resourceConfig ) {
You can’t perform that action at this time.
0 commit comments