Package com.cedarsolutions.shared.domain

Examples of com.cedarsolutions.shared.domain.ValidationErrors.addMessage()


    /** Test showValidationError(), with summary but unknown field. */
    public void testShowValidationError8() {
        View view = new View();
        ValidationErrors details = new ValidationErrors();
        details.setSummary(new LocalizableMessage("summaryKey1", "summaryText1"));
        details.addMessage("detailKey1", "fieldX", "detailText1");
        InvalidDataException error = new InvalidDataException("message", details);
        ValidationUtils.getInstance().showValidationError(view, error, "style");
        assertTrue(view.validationErrorWidget.isVisible());
        assertEquals("__summaryKey1", view.validationErrorWidget.getErrorSummary());
        assertEquals(1, view.validationErrorWidget.getErrorList().size());
View Full Code Here


    /** Test showValidationError(), with summary and one valid field. */
    public void testShowValidationError9() {
        View view = new View();
        ValidationErrors details = new ValidationErrors();
        details.setSummary(new LocalizableMessage("summaryKey1", "summaryText1"));
        details.addMessage("detailKey1", "field1", "detailText1");
        InvalidDataException error = new InvalidDataException("message", details);
        ValidationUtils.getInstance().showValidationError(view, error, "style");
        assertTrue(view.validationErrorWidget.isVisible());
        assertEquals("__summaryKey1", view.validationErrorWidget.getErrorSummary());
        assertEquals(1, view.validationErrorWidget.getErrorList().size());
View Full Code Here

    /** Test showValidationError(), with summary and multiple valid fields. */
    public void testShowValidationError10() {
        View view = new View();
        ValidationErrors details = new ValidationErrors();
        details.setSummary(new LocalizableMessage("summaryKey1", "summaryText1"));
        details.addMessage("detailKey1", "field1", "detailText1");
        details.addMessage("detailKey2", "field2", "detailText2");
        InvalidDataException error = new InvalidDataException("message", details);
        ValidationUtils.getInstance().showValidationError(view, error, "style");
        assertTrue(view.validationErrorWidget.isVisible());
        assertEquals("__summaryKey1", view.validationErrorWidget.getErrorSummary());
View Full Code Here

    public void testShowValidationError10() {
        View view = new View();
        ValidationErrors details = new ValidationErrors();
        details.setSummary(new LocalizableMessage("summaryKey1", "summaryText1"));
        details.addMessage("detailKey1", "field1", "detailText1");
        details.addMessage("detailKey2", "field2", "detailText2");
        InvalidDataException error = new InvalidDataException("message", details);
        ValidationUtils.getInstance().showValidationError(view, error, "style");
        assertTrue(view.validationErrorWidget.isVisible());
        assertEquals("__summaryKey1", view.validationErrorWidget.getErrorSummary());
        assertEquals(2, view.validationErrorWidget.getErrorList().size());
View Full Code Here

    /** Test showValidationError(), with summary and multiple valid and invalid fields. */
    public void testShowValidationError11() {
        View view = new View();
        ValidationErrors details = new ValidationErrors();
        details.setSummary(new LocalizableMessage("summaryKey1", "summaryText1"));
        details.addMessage("detailKey1", "field1", "detailText1");
        details.addMessage("detailKey2", "field2", "detailText2");
        details.addMessage("detailKey3", "field3", "detailText3");
        InvalidDataException error = new InvalidDataException("message", details);
        ValidationUtils.getInstance().showValidationError(view, error, "style");
        assertTrue(view.validationErrorWidget.isVisible());
View Full Code Here

    public void testShowValidationError11() {
        View view = new View();
        ValidationErrors details = new ValidationErrors();
        details.setSummary(new LocalizableMessage("summaryKey1", "summaryText1"));
        details.addMessage("detailKey1", "field1", "detailText1");
        details.addMessage("detailKey2", "field2", "detailText2");
        details.addMessage("detailKey3", "field3", "detailText3");
        InvalidDataException error = new InvalidDataException("message", details);
        ValidationUtils.getInstance().showValidationError(view, error, "style");
        assertTrue(view.validationErrorWidget.isVisible());
        assertEquals("__summaryKey1", view.validationErrorWidget.getErrorSummary());
View Full Code Here

        View view = new View();
        ValidationErrors details = new ValidationErrors();
        details.setSummary(new LocalizableMessage("summaryKey1", "summaryText1"));
        details.addMessage("detailKey1", "field1", "detailText1");
        details.addMessage("detailKey2", "field2", "detailText2");
        details.addMessage("detailKey3", "field3", "detailText3");
        InvalidDataException error = new InvalidDataException("message", details);
        ValidationUtils.getInstance().showValidationError(view, error, "style");
        assertTrue(view.validationErrorWidget.isVisible());
        assertEquals("__summaryKey1", view.validationErrorWidget.getErrorSummary());
        assertEquals(3, view.validationErrorWidget.getErrorList().size());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.