/** * * @param result */ private void assertResult(Result result) { if (result.wasFailed()) { throw new AssertionFailedError(result.getMessage()); } }
private void assertResult(Result result) { if (result.wasFailed()) { throw new AssertionFailedError(result.getMessage()); } }
private void assertResult(Result result) { if (result.wasFailed()) { throw new AssertionFailedError(result.getMessage()); } } }
/** * * @param result */ private void assertResult(Result result) { if (result.wasFailed()) { fail(result.getMessage()); } }
/** * Asserts there are no feedback messages with a certain level. * * @param level * the level to check for */ public void assertNoFeedbackMessage(int level) { Result result = hasNoFeedbackMessage(level); assertFalse(result.wasFailed(), result.getMessage()); }
/** * Asserts there are no feedback messages with a certain level. * * @param level * the level to check for */ public void assertNoFeedbackMessage(int level) { Result result = hasNoFeedbackMessage(level); assertFalse(result.getMessage(), result.wasFailed()); }
+ " will not be rendered at all and thus won't be accessible for subsequent AJAX interaction"; result = isTrue(failMessage, component.getOutputMarkupPlaceholderTag()); if (result.wasFailed()) .find(); result = isTrue(failMessage, isAjaxResponse); if (result.wasFailed()) + "which means that it can't have been added to the AJAX response"; result = isTrue(failMessage, !Strings.isEmpty(markupId)); if (result.wasFailed())
componentInfo; result = isTrue(failMessage, component.getOutputMarkupPlaceholderTag()); if (result.wasFailed()) .find(); result = isTrue(failMessage, isAjaxResponse); if (result.wasFailed()) componentInfo; result = isTrue(failMessage, !Strings.isEmpty(markupId)); if (result.wasFailed()) result = isTrue(failMessage, isComponentInAjaxResponse); if (!result.wasFailed()) { return result; boolean isEnclosureInAjaxResponse = !isComponentOnAjaxResponse(enclosure).wasFailed(); return isTrue(failMessage, isEnclosureInAjaxResponse);
componentInfo; result = isTrue(failMessage, component.getOutputMarkupPlaceholderTag()); if (result.wasFailed()) .find(); result = isTrue(failMessage, isAjaxResponse); if (result.wasFailed()) "which means that it can't have been added to the AJAX response. " + componentInfo; result = isTrue(failMessage, !Strings.isEmpty(markupId)); if (result.wasFailed()) result = isTrue(failMessage, isComponentInAjaxResponse); if (!result.wasFailed()) boolean isEnclosureInAjaxResponse = !isComponentOnAjaxResponse(enclosure).wasFailed(); return isTrue(failMessage, isEnclosureInAjaxResponse);
+ " will not be rendered at all and thus won't be accessible for subsequent AJAX interaction"; result = isTrue(failMessage, component.getOutputMarkupPlaceholderTag()); if (result.wasFailed()) boolean isAjaxResponse = ajaxResponse.startsWith("<?xml version=\"1.0\" encoding=\"UTF-8\"?><ajax-response>"); result = isTrue(failMessage, isAjaxResponse); if (result.wasFailed()) + "which means that it can't have been added to the AJAX response"; result = isTrue(failMessage, !Strings.isEmpty(markupId)); if (result.wasFailed())
/** * Checks whether a component is visible and/or enabled before usage * * @param component * @param throwException * @return result */ protected Result checkUsability(final Component component, boolean throwException) { Result res = Result.pass(); if (component.isVisibleInHierarchy() == false) { res = Result.fail( "The component is currently not visible in the hierarchy and thus you can not be used." + " Component: " + component); } if (component.isEnabledInHierarchy() == false) { res = Result.fail( "The component is currently not enabled in the hierarchy and thus you can not be used." + " Component: " + component); } if (throwException && res.wasFailed()) { throw new AssertionError(res.getMessage()); } return res; }
/** * Checks whether a component is visible and/or enabled before usage * * @param component * @param throwException * @return result */ protected Result checkUsability(final Component component, boolean throwException) { Result res = Result.pass(); if (component.isVisibleInHierarchy() == false) { res = Result.fail("The component is currently not visible in the hierarchy and thus you can not be used." + " Component: " + component); } if (component.isEnabledInHierarchy() == false) { res = Result.fail("The component is currently not enabled in the hierarchy and thus you can not be used." + " Component: " + component); } if (throwException && res.wasFailed()) { throw new AssertionFailedError(res.getMessage()); } return res; }
/** * Checks whether text is NOT present in the rendered page * @param text */ protected void assertNotContains(String text) { if (tester.ifContains("^" + text).wasFailed() == true) { assertTrue(true); } else { assertTrue(false); } }