PropertiesFileSettings { public boolean isVirtualServerEnabled() { return isVirtualServerEnabled; }  boolean isVirtualServerEnabled();  }
@Test public void testParameterEnableVirtualServer_Text() throws FileNotFoundException { String path = System.getProperty("user.dir") + Paths.get("/src/test/resources/settings4.properties"); Injector i = Guice.createInjector(PropertiesSettingsModule.init(new FileInputStream(path))); this.propertiesFileSettings = i.getInstance(PropertiesFileSettings.class); assertEquals("", true, propertiesFileSettings.isVirtualServerEnabled()); }
@Test public void testParameterEnableVirtualServer_NoParameter() throws FileNotFoundException { String path = System.getProperty("user.dir") + Paths.get("/src/test/resources/settings5.properties"); Injector i = Guice.createInjector(PropertiesSettingsModule.init(new FileInputStream(path))); this.propertiesFileSettings = i.getInstance(PropertiesFileSettings.class); assertEquals("", true, propertiesFileSettings.isVirtualServerEnabled()); }
@Test public void testDefaultParameters() { PropertiesSettingsModule.delInstance(); Injector i = Guice.createInjector(PropertiesSettingsModule.init()); PropertiesFileSettings propertiesFileSettings = i.getInstance(PropertiesFileSettings.class); assertEquals("", true, propertiesFileSettings.isVirtualServerEnabled()); }
@Test public void testParameterEnableVirtualServer_True() throws FileNotFoundException { String path = System.getProperty("user.dir") + Paths.get("/src/test/resources/settings.properties"); Injector i = Guice.createInjector(PropertiesSettingsModule.init(new FileInputStream(path))); this.propertiesFileSettings = i.getInstance(PropertiesFileSettings.class); assertEquals("", true, propertiesFileSettings.isVirtualServerEnabled()); }
@Test public void testParameterEnableVirtualServer_False() throws FileNotFoundException { String path = System.getProperty("user.dir") + Paths.get("/src/test/resources/settings2.properties"); Injector i = Guice.createInjector(PropertiesSettingsModule.init(new FileInputStream(path))); this.propertiesFileSettings = i.getInstance(PropertiesFileSettings.class); assertEquals("", false, propertiesFileSettings.isVirtualServerEnabled()); }
@Test public void testParameterEnableVirtualServer_NoValue() throws FileNotFoundException { String path = System.getProperty("user.dir") + Paths.get("/src/test/resources/settings3.properties"); Injector i = Guice.createInjector(PropertiesSettingsModule.init(new FileInputStream(path))); this.propertiesFileSettings = i.getInstance(PropertiesFileSettings.class); assertEquals("", true, propertiesFileSettings.isVirtualServerEnabled()); }