Package org.apache.myfaces.extensions.validator.test.beanval.model

Examples of org.apache.myfaces.extensions.validator.test.beanval.model.SimulatedUserInformation


    }

    @Test
    public void testGroup2AwareValidationWithRoleAdmin()
    {
        createRequestScopedBean("currentUser", new SimulatedUserInformation("admin"));
        createValueBindingForComponent(this.inputComponent1, "#{testBean.model4.property1}");
        createValueBindingForComponent(this.inputComponent2, "#{testBean.model4.property2}");
        setValueToValidate(this.inputComponent1, "g"); //don't force a violation with Group1
        setValueToValidate(this.inputComponent2, "");
View Full Code Here


    }

    @Test
    public void testGroup2AndGroup3AwareValidationWithRoleUser()
    {
        createRequestScopedBean("currentUser", new SimulatedUserInformation("user"));
        createValueBindingForComponent(this.inputComponent1, "#{testBean.model4.property1}");
        createValueBindingForComponent(this.inputComponent2, "#{testBean.model4.property2}");
        setValueToValidate(this.inputComponent1, "g");
        setValueToValidate(this.inputComponent2, "p");
View Full Code Here

    }

    @Test
    public void testModelViolationWithAdminRole()
    {
        createRequestScopedBean("currentUser", new SimulatedUserInformation("admin"));

        createValueBindingForComponent(this.inputComponent1, "#{testBean.model5.property1}");
        setValueToValidate(this.inputComponent1, "123");

        createValueBindingForComponent(this.inputComponent2, "#{testBean.model5.property2}");
View Full Code Here

    }

    @Test
    public void testModelViolationWithUserRole()
    {
        createRequestScopedBean("currentUser", new SimulatedUserInformation("user"));

        createValueBindingForComponent(this.inputComponent1, "#{testBean.model5.property1}");
        setValueToValidate(this.inputComponent1, "123");

        createValueBindingForComponent(this.inputComponent2, "#{testBean.model5.property2}");
View Full Code Here

    }

    @Test
    public void testRestrictedGroupWithAdminRole()
    {
        createRequestScopedBean("currentUser", new SimulatedUserInformation("admin"));

        createValueBindingForComponent(this.inputComponent1, "#{testBean.model2.property1}");
        createValueBindingForComponent(this.inputComponent2, "#{testBean.model2.property2}");
        setValueToValidate(this.inputComponent1, "");
        setValueToValidate(this.inputComponent2, "");
View Full Code Here

    }

    @Test
    public void testRestrictedGroupWithUserRole()
    {
        createRequestScopedBean("currentUser", new SimulatedUserInformation("user"));

        createValueBindingForComponent(this.inputComponent1, "#{testBean.model2.property1}");
        createValueBindingForComponent(this.inputComponent2, "#{testBean.model2.property2}");
        setValueToValidate(this.inputComponent1, "");
        setValueToValidate(this.inputComponent2, "");
View Full Code Here

        checkMessageCount(0);
    }

    public void testRestrictedGroupWithAdminRole()
    {
        createRequestScopedBean("currentUser", new SimulatedUserInformation("admin"));

        createValueBindingForComponent(this.inputComponent1, "#{testBean.model2.property1}");
        createValueBindingForComponent(this.inputComponent2, "#{testBean.model2.property2}");
        setValueToValidate(this.inputComponent1, "");
        setValueToValidate(this.inputComponent2, "");
View Full Code Here

        checkMessageCount(0);
    }

    public void testRestrictedGroupWithUserRole()
    {
        createRequestScopedBean("currentUser", new SimulatedUserInformation("user"));

        createValueBindingForComponent(this.inputComponent1, "#{testBean.model2.property1}");
        createValueBindingForComponent(this.inputComponent2, "#{testBean.model2.property2}");
        setValueToValidate(this.inputComponent1, "");
        setValueToValidate(this.inputComponent2, "");
View Full Code Here

        checkMessageSeverities(FacesMessage.SEVERITY_ERROR, FacesMessage.SEVERITY_ERROR);
    }

    public void testModelViolationWithAdminRole()
    {
        createRequestScopedBean("currentUser", new SimulatedUserInformation("admin"));

        createValueBindingForComponent(this.inputComponent1, "#{testBean.model5.property1}");
        setValueToValidate(this.inputComponent1, "123");

        createValueBindingForComponent(this.inputComponent2, "#{testBean.model5.property2}");
View Full Code Here

        checkMessageCount(0);
    }

    public void testModelViolationWithUserRole()
    {
        createRequestScopedBean("currentUser", new SimulatedUserInformation("user"));

        createValueBindingForComponent(this.inputComponent1, "#{testBean.model5.property1}");
        setValueToValidate(this.inputComponent1, "123");

        createValueBindingForComponent(this.inputComponent2, "#{testBean.model5.property2}");
View Full Code Here

TOP

Related Classes of org.apache.myfaces.extensions.validator.test.beanval.model.SimulatedUserInformation

Copyright © 2018 www.massapicom. 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.