use of org.sakuli.actions.settings.ScreenBasedSettings in project sakuli by ConSol.
the class ScreenBasedSettingsSikuliLogSystemOutTest method testDoHandleSikuliLog.
@Test
public void testDoHandleSikuliLog() throws Throwable {
ScreenBasedSettings testling = BeanLoader.loadBean(ScreenBasedSettings.class);
testling.setDefaults();
BeanLoader.loadBean(LoggerInitializer.class).initLoggerContext();
System.out.println("LOG-FOLDER: " + logFile);
//errors
Debug.error("SIKULI-ERROR-message");
assertLastLine(logFile, "SIKULI-", LogLevel.INFO, "[error] SIKULI-ERROR-message");
//enter message like for typing
Debug.enter("SIKULI-ENTER-message");
assertLastLine(logFile, "SIKULI-", LogLevel.INFO, "[profile] entering: SIKULI-ENTER-message");
//info messages
Debug.info("SIKULI-INFO-message");
assertLastLine(logFile, "SIKULI-", LogLevel.INFO, "[info] SIKULI-INFO-message");
//debug messages
Debug.log(-3, "SIKULI-DEBUG-message");
assertLastLine(logFile, "SIKULI-", LogLevel.INFO, "[debug] SIKULI-DEBUG-message");
}
use of org.sakuli.actions.settings.ScreenBasedSettings 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();
}
Aggregations