Package org.apache.myfaces.trinidadbuild.test

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


   */
  public void testNullContext()
  {
    Mock mock = mock(UIComponent.class);
    UIComponent component = (UIComponent) mock.proxy();
    MockUIComponentWrapper wrapper = new MockUIComponentWrapper(mock, component);
    NumberConverter converter = getNumberConverter();

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


   */
  public void testNullInputValue() throws ConverterException
  {
    Mock mock = mock(UIComponent.class);
    UIComponent component = (UIComponent) mock.proxy();
    MockUIComponentWrapper wrapper = new MockUIComponentWrapper(mock, component);
    NumberConverter converter  = getNumberConverter();

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

    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 ConverterException
  {
    Mock mock = mock(UIComponent.class);
    UIComponent component = (UIComponent) mock.proxy();
    MockUIComponentWrapper wrapper = new MockUIComponentWrapper(mock, component);

    ColorConverter converter  = new ColorConverter();

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

   */
  public void testNullContext()
  {
    Mock mock = mock(UIComponent.class);
    UIComponent component = (UIComponent) mock.proxy();
    MockUIComponentWrapper wrapper = new MockUIComponentWrapper(mock, component);
    ColorConverter converter  = new ColorConverter();

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

  public void testDefaultColorPatternWorks()
  {
    ColorConverter converter  = new ColorConverter();
    Mock mock = mock(UIComponent.class);
    UIComponent component = (UIComponent) mock.proxy();
    MockUIComponentWrapper wrapper = new MockUIComponentWrapper(mock, component);
    String value = "#FFFFFF";
    Color expectedColor = new Color(255,255,255);
    doTestGetAsObject(converter, facesContext, wrapper, value, expectedColor);
  }
View Full Code Here

  public void testStateHolderSaveRestore()
  {
    ColorConverter converter = new ColorConverter();
    Mock mock = mock(UIComponent.class);
    UIComponent component = (UIComponent) mock.proxy();
    MockUIComponentWrapper wrapper = new MockUIComponentWrapper(mock, component);

    String[] patterns = {"#RRGGBB","RR.GG.BB"};
    converter.setPatterns(patterns);
    converter.setMessageDetailConvert("Works fine");
    ColorConverter restoreConverter = new  ColorConverter();
View Full Code Here

  public void testGetAsObjectConversion()
  {
    ColorConverter converter = new ColorConverter();
    Mock mock = mock(UIComponent.class);
    UIComponent component = (UIComponent) mock.proxy();
    MockUIComponentWrapper wrapper = new MockUIComponentWrapper(mock, component);

    String[] patterns = { "#RRGGBB",
                          "RR.GG.BB",
                          "RRGGBB",
                          "RR GG BB",
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.