Search in sources :

Example 1 with SakuliProperties

use of org.sakuli.datamodel.properties.SakuliProperties in project sakuli by ConSol.

the class SakuliPropertyPlaceholderConfigurerTest method testSakuliHomeFolder.

@Test
public void testSakuliHomeFolder() throws IOException {
    SakuliProperties properties = BeanLoader.loadBean(SakuliProperties.class);
    assertTrue(Files.exists(properties.getJsLibFolder()), "include folder doesn't exists");
    assertTrue(properties.getJsLibFolder().toString().contains(BaseTest.SAKULI_HOME_FOLDER_PATH.substring(2)));
    assertNotNull(properties.getLogPattern());
}
Also used : SakuliProperties(org.sakuli.datamodel.properties.SakuliProperties) BaseTest(org.sakuli.BaseTest) Test(org.testng.annotations.Test)

Example 2 with SakuliProperties

use of org.sakuli.datamodel.properties.SakuliProperties in project sakuli by ConSol.

the class ScreenBasedSettingsTest method testSetDefaults.

@Test(expectedExceptions = InvalidParameterException.class, expectedExceptionsMessageRegExp = "the property '" + ActionProperties.DEFAULT_HIGHLIGHT_SEC + "' has to be greater as 1, but was 0.6")
public void testSetDefaults() throws Exception {
    ActionProperties props = new ActionProperties();
    props.setDefaultHighlightSeconds(0.6f);
    SakuliProperties sakuliProps = new SakuliProperties();
    sakuliProps.setTessDataLibFolder(Paths.get("."));
    ScreenBasedSettings testling = new ScreenBasedSettings(props, sakuliProps);
    testling.setDefaults();
}
Also used : ActionProperties(org.sakuli.datamodel.properties.ActionProperties) ScreenBasedSettings(org.sakuli.actions.settings.ScreenBasedSettings) SakuliProperties(org.sakuli.datamodel.properties.SakuliProperties) Test(org.testng.annotations.Test)

Aggregations

SakuliProperties (org.sakuli.datamodel.properties.SakuliProperties)2 Test (org.testng.annotations.Test)2 BaseTest (org.sakuli.BaseTest)1 ScreenBasedSettings (org.sakuli.actions.settings.ScreenBasedSettings)1 ActionProperties (org.sakuli.datamodel.properties.ActionProperties)1