Package org.apache.myfaces.trinidadbuild.test

Examples of org.apache.myfaces.trinidadbuild.test.MockUIComponentWrapper


    NumberConverter converter = getNumberConverter();

    NumberConverter restoreConverter = getNumberConverter();
    Mock mock = mock(UIComponent.class);
    UIComponent component = (UIComponent) mock.proxy();
    MockUIComponentWrapper wrapper = new MockUIComponentWrapper(mock, component);

    for (int i = 0; i < _LOCALES.length; i++)
    {
      converter.setLocale(_LOCALES[i]);
      restoreConverter.setLocale(_LOCALES[i]);
View Full Code Here


  public void testStrictnessOfConversion()
  {
    String[] inputValues = {"123ABC", "22.22.2" };
    Mock mock = buildMockUIComponent(inputValues.length * 3);
    UIComponent component = (UIComponent) mock.proxy();
    MockUIComponentWrapper wrapper = new MockUIComponentWrapper(mock, component);

    for (int i = 0; i < inputValues.length; i++)
    {
      doTestStrictNess(facesContext, wrapper, Locale.US, inputValues[i]);
    }
View Full Code Here

      try
      {
        Mock mock = buildMockUIComponent(3);
        UIComponent component = (UIComponent) mock.proxy();
        MockUIComponentWrapper wrapper = new MockUIComponentWrapper(mock, component);
       
       
        org.apache.myfaces.trinidad.convert.NumberConverter converter =
          new org.apache.myfaces.trinidad.convert.NumberConverter();
       
View Full Code Here

   */
  public void testNull() throws ValidatorException
  {
    Mock mock = buildMockUIComponent();
    UIComponent component = (UIComponent) mock.proxy();
    MockUIComponentWrapper wrapper = new MockUIComponentWrapper(mock, component);
    LengthValidator validator = new LengthValidator();

    doTestNull(facesContext, wrapper, validator);
  }
View Full Code Here

   */
  public void testNullContext()
  {
    Mock mock = buildMockUIComponent();
    UIComponent component = (UIComponent) mock.proxy();
    MockUIComponentWrapper wrapper = new MockUIComponentWrapper(mock, component);
    LengthValidator validator = new LengthValidator();

    doTestNullContext(wrapper, validator);
  }
View Full Code Here

  {
    // since the pattern has not been set it will be null
    // let us push some arbitary value
    Mock mock = mock(UIComponent.class);
    UIComponent component = (UIComponent) mock.proxy();
    MockUIComponentWrapper wrapper = new MockUIComponentWrapper(mock, component);
    setMockLabelForComponent(wrapper);

    try
    {
      LengthValidator validator = new LengthValidator();
View Full Code Here

  public void testExactFailure()
  {
    // some very basic sanity test
    Mock mock = buildMockUIComponent();
    UIComponent component = (UIComponent) mock.proxy();
    MockUIComponentWrapper wrapper = new MockUIComponentWrapper(mock, component);
    setMockLabelForComponent(wrapper);

    try
    {
      LengthValidator validator = new LengthValidator();
View Full Code Here

    //some very basic sanity test
    //
    LengthValidator validator = new LengthValidator();
    Mock mock = buildMockUIComponent();
    UIComponent component = (UIComponent) mock.proxy();
    MockUIComponentWrapper wrapper = new MockUIComponentWrapper(mock, component);

    String values[]   = {"Hallo","world"};
    validator.setMinimum(2);
    for (int i = 0; i < values.length ; i++)
    {
View Full Code Here

  public void testStateHolderSaveRestore()
  {
    LengthValidator validator = new LengthValidator();
    Mock mock = buildMockUIComponent();
    UIComponent component = (UIComponent) mock.proxy();
    MockUIComponentWrapper wrapper = new MockUIComponentWrapper(mock, component);

    validator.setMaximum(5);
    validator.setMessageDetailMaximum("Validation failed");
    LengthValidator restoreValidator = new  LengthValidator();
View Full Code Here

    Mock mock = mock(UIComponent.class);
    UIComponent component = (UIComponent) mock.proxy();
    //we do not care about getValueExpression() being called or not
    mock.stubs().method("getValueExpression");

    MockUIComponentWrapper wrapper = new MockUIComponentWrapper(mock, component);
    NumberConverter converter = getNumberConverter();

    doTestNullContext(wrapper, converter);
  }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidadbuild.test.MockUIComponentWrapper

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.