use of com.github.noraui.application.page.Page.PageElement in project NoraUi by NoraUi.
the class StepUT method testFormatMessageNullMessage.
@Test
public void testFormatMessageNullMessage() {
try {
final DemoPage demoPage = (DemoPage) Page.getInstance(DEMO_PAGE_NAME);
final PageElement pageElement = demoPage.getPageElementByKey("-input");
Messages.format(null, pageElement, demoPage.getApplication());
} catch (final TechnicalException e) {
Assert.assertEquals("TechnicalException found", Messages.getMessage("FAIL_MESSAGE_FORMAT_STRING"), e.getMessage());
}
}
use of com.github.noraui.application.page.Page.PageElement in project NoraUi by NoraUi.
the class StepUT method testFormatMessageNotValidMessage.
@Test
public void testFormatMessageNotValidMessage() {
try {
final DemoPage demoPage = (DemoPage) Page.getInstance(DEMO_PAGE_NAME);
final PageElement pageElement = demoPage.getPageElementByKey("-input");
Messages.format("Message %s in %s.%s", pageElement, demoPage.getApplication());
} catch (final TechnicalException e) {
Assert.assertEquals("TechnicalException found", Messages.getMessage("FAIL_MESSAGE_FORMAT_STRING"), e.getMessage());
}
}
use of com.github.noraui.application.page.Page.PageElement in project NoraUi by NoraUi.
the class StepUT method testFormatMessage.
@Test
public void testFormatMessage() {
try {
final DemoPage demoPage = (DemoPage) Page.getInstance(DEMO_PAGE_NAME);
final PageElement pageElement = demoPage.getPageElementByKey("-input_select_field");
final String a = Messages.format("Message %s in %s.", pageElement, demoPage.getApplication());
Assert.assertEquals("", "Message Input Select field in demo.", a);
} catch (final TechnicalException e) {
Assert.assertFalse("Error", true);
}
}
use of com.github.noraui.application.page.Page.PageElement in project NoraUi by NoraUi.
the class StepUT method testFormatMessageNotValid2Message.
@Test
public void testFormatMessageNotValid2Message() {
try {
final DemoPage demoPage = (DemoPage) Page.getInstance(DEMO_PAGE_NAME);
final PageElement pageElement = demoPage.getPageElementByKey("-input");
Messages.format("Message %s.", pageElement, demoPage.getApplication());
} catch (final TechnicalException e) {
Assert.assertEquals("TechnicalException found", Messages.getMessage("FAIL_MESSAGE_FORMAT_STRING"), e.getMessage());
}
}
use of com.github.noraui.application.page.Page.PageElement in project NoraUi by NoraUi.
the class StepUT method testFormatMessage2.
@Test
public void testFormatMessage2() {
try {
final DemoPage demoPage = (DemoPage) Page.getInstance(DEMO_PAGE_NAME);
final PageElement pageElement = demoPage.getPageElementByKey("-submit");
final String a = Messages.format("Message %s in %s.", pageElement, demoPage.getApplication());
Assert.assertEquals("", "Message Submit button in demo.", a);
} catch (final TechnicalException e) {
Assert.assertFalse("Error", true);
}
}
Aggregations