⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 environmentvariablesconfigurationsourcetest.java

📁 sourcode about java basic
💻 JAVA
字号:
package jsunit.java.tests_core.net.jsunit.configuration;

import junit.framework.TestCase;

public class EnvironmentVariablesConfigurationSourceTest extends TestCase {
    private EnvironmentVariablesConfigurationSource source;

    protected void setUp() throws Exception {
        super.setUp();
        source = new EnvironmentVariablesConfigurationSource();
    }

    public void testSimple() {
        System.setProperty(ConfigurationProperty.BROWSER_FILE_NAMES.getName(), "aaa");
        System.setProperty(ConfigurationProperty.CLOSE_BROWSERS_AFTER_TEST_RUNS.getName(), "bbb");
        System.setProperty(ConfigurationProperty.LOGS_DIRECTORY.getName(), "ddd");
        System.setProperty(ConfigurationProperty.PORT.getName(), "eee");
        System.setProperty(ConfigurationProperty.REMOTE_MACHINE_URLS.getName(), "fff");
        System.setProperty(ConfigurationProperty.RESOURCE_BASE.getName(), "ggg");
        System.setProperty(ConfigurationProperty.TIMEOUT_SECONDS.getName(), "hhh");
        System.setProperty(ConfigurationProperty.URL.getName(), "iii");
        assertEquals("aaa", source.browserFileNames());
        assertEquals("bbb", source.closeBrowsersAfterTestRuns());
        assertEquals("ddd", source.logsDirectory());
        assertEquals("eee", source.port());
        assertEquals("fff", source.remoteMachineURLs());
        assertEquals("ggg", source.resourceBase());
        assertEquals("hhh", source.timeoutSeconds());
        assertEquals("iii", source.url());
    }

    public void tearDown() throws Exception {
        for (ConfigurationProperty property : ConfigurationProperty.values())
            System.getProperties().remove(property.getName());
        super.tearDown();
    }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -