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:
Chris Beams 2014-11-11 14:21:01 +01:00
parent 454ee1fbe0
commit 1c0a6ee432
No known key found for this signature in database
GPG key ID: 3D214F8F5BC5ED73
7 changed files with 76 additions and 114 deletions

View file

@ -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);
}