mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-24 15:35:34 -04:00
Eliminate remaining uses of @Named("appName")
Changes include: - Remove lighthouse.files.AppDirectory. Several methods from this class have, as of this commit, been rewritten and moved into the BitsquareEnvironment and BitsquareApp classes as appropriate. - Rename "appName" property => "app.name" for consistency with other configurable properties. - Allow configuration of both user and application data directories on the command line. See --help menu for details.
This commit is contained in:
parent
454ee1fbe0
commit
1c0a6ee432
7 changed files with 76 additions and 114 deletions
|
@ -25,8 +25,6 @@ import io.bitsquare.gui.ViewLoader;
|
|||
import com.google.inject.Guice;
|
||||
import com.google.inject.Injector;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
import javafx.application.Application;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
|
@ -36,7 +34,6 @@ import org.junit.BeforeClass;
|
|||
import org.junit.Test;
|
||||
|
||||
import joptsimple.OptionParser;
|
||||
import org.springframework.core.env.PropertiesPropertySource;
|
||||
|
||||
public class ViewLoaderTests {
|
||||
|
||||
|
@ -65,11 +62,8 @@ public class ViewLoaderTests {
|
|||
|
||||
@Before
|
||||
public void setUp() {
|
||||
Properties properties = new Properties();
|
||||
properties.setProperty(BitsquareEnvironment.APP_NAME_KEY, "testApp");
|
||||
OptionParser parser = new OptionParser();
|
||||
BitsquareEnvironment env = new BitsquareEnvironment(parser.parse(new String[] {}));
|
||||
env.getPropertySources().addLast(new PropertiesPropertySource("testProperties", properties));
|
||||
Injector injector = Guice.createInjector(new BitsquareAppModule(env, TestApp.primaryStage));
|
||||
ViewLoader.setInjector(injector);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue