Search in sources :

Example 1 with ConfigReader

use of com.seleniumtests.core.config.ConfigReader in project seleniumRobot by bhecquet.

the class TestConfigReader method readConfigurationWithoutValueOverride.

@Test(groups = { "ut" })
public void readConfigurationWithoutValueOverride() {
    Map<String, TestVariable> config = new ConfigReader("VNR", null).readConfig(Thread.currentThread().getContextClassLoader().getResourceAsStream("tu/env.ini"));
    Assert.assertEquals(config.get("key1").getValue(), "value1", "Key should not be overriden");
}
Also used : ConfigReader(com.seleniumtests.core.config.ConfigReader) TestVariable(com.seleniumtests.core.TestVariable) XmlTest(org.testng.xml.XmlTest) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Example 2 with ConfigReader

use of com.seleniumtests.core.config.ConfigReader in project seleniumRobot by bhecquet.

the class TestConfigReader method readConfigurationWithValueOverride.

@Test(groups = { "ut" })
public void readConfigurationWithValueOverride() {
    Map<String, TestVariable> config = new ConfigReader("DEV", null).readConfig(Thread.currentThread().getContextClassLoader().getResourceAsStream("tu/env.ini"));
    Assert.assertEquals(config.get("key1").getValue(), "value4", "Key override does not work");
}
Also used : ConfigReader(com.seleniumtests.core.config.ConfigReader) TestVariable(com.seleniumtests.core.TestVariable) XmlTest(org.testng.xml.XmlTest) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Aggregations

GenericTest (com.seleniumtests.GenericTest)2 TestVariable (com.seleniumtests.core.TestVariable)2 ConfigReader (com.seleniumtests.core.config.ConfigReader)2 Test (org.testng.annotations.Test)2 XmlTest (org.testng.xml.XmlTest)2