Package br.com.caelum.vraptor.core

Examples of br.com.caelum.vraptor.core.JstlLocalization


  @Test
  public void isCapableOfDealingWithEmptyParameterForInternalValueWhichNeedsAConverter() throws OgnlException {
  final MutableRequest request = mock(MutableRequest.class);
  final RequestInfo webRequest = new RequestInfo(null, null, request, null);
  final JstlLocalization jstlLocalization = new JstlLocalization(webRequest);

  when(request.getAttribute("javax.servlet.jsp.jstl.fmt.locale.request")).thenReturn("pt_br");
  when(converters.to(Calendar.class)).thenReturn(new LocaleBasedCalendarConverter(jstlLocalization));
  Ognl.setValue("cat.firstLeg.birthDay", context, house, "10/5/2010");
  assertThat(house.cat.firstLeg.birthDay, is(equalTo((Calendar) new GregorianCalendar(2010, 4, 10))));
View Full Code Here


  public void setup() {
    MockitoAnnotations.initMocks(this);
   
    FilterChain chain = mock(FilterChain.class);
    final RequestInfo webRequest = new RequestInfo(context, chain, request, null);
  jstlLocalization = new JstlLocalization(webRequest);
   
    converter = new LocaleBasedJodaTimeConverter(jstlLocalization);
  }
View Full Code Here

  public void setup() {
    MockitoAnnotations.initMocks(this);
   
    FilterChain chain = mock(FilterChain.class);
    final RequestInfo webRequest = new RequestInfo(context, chain, request, null);
    jstlLocalization = new JstlLocalization(webRequest);
    converter = new LocaleBasedCalendarConverter(jstlLocalization);
    bundle = ResourceBundle.getBundle("messages");
  Locale.setDefault(Locale.ENGLISH);
  }
View Full Code Here

   
    bundle = ResourceBundle.getBundle("messages");
    FilterChain chain = mock(FilterChain.class);

    final RequestInfo webRequest = new RequestInfo(context, chain, request, null);
  jstlLocalization = new JstlLocalization(webRequest);

    converter = new LocalDateConverter(jstlLocalization);
  }
View Full Code Here

  public void setup() {
    MockitoAnnotations.initMocks(this);
   
  FilterChain chain = mock(FilterChain.class);
  final RequestInfo webRequest = new RequestInfo(context, chain, request, null);
  jstlLocalization = new JstlLocalization(webRequest);
  converter = new LocaleBasedPrimitiveDoubleConverter(jstlLocalization);
  bundle = ResourceBundle.getBundle("messages");
  Locale.setDefault(Locale.ENGLISH);
  }
View Full Code Here

  public void setup() {
    MockitoAnnotations.initMocks(this);
   
  FilterChain chain = mock(FilterChain.class);
  final RequestInfo webRequest = new RequestInfo(context, chain, request, null);
  jstlLocalization = new JstlLocalization(webRequest);
  converter = new LocaleBasedBigDecimalConverter(jstlLocalization);
  bundle = ResourceBundle.getBundle("messages");
  Locale.setDefault(Locale.ENGLISH);
  }
View Full Code Here

  public void setup() {
    MockitoAnnotations.initMocks(this);
   
  FilterChain chain = mock(FilterChain.class);
  final RequestInfo webRequest = new RequestInfo(context, chain, request, null);
  jstlLocalization = new JstlLocalization(webRequest);
  converter = new LocaleBasedPrimitiveFloatConverter(jstlLocalization);
  bundle = ResourceBundle.getBundle("messages");
  Locale.setDefault(Locale.ENGLISH);
  }
View Full Code Here

  public void setup() {
    MockitoAnnotations.initMocks(this);
   
  FilterChain chain = mock(FilterChain.class);
  final RequestInfo webRequest = new RequestInfo(context, chain, request, null);
  jstlLocalization = new JstlLocalization(webRequest);
  converter = new LocaleBasedFloatConverter(jstlLocalization);
  bundle = ResourceBundle.getBundle("messages");
  Locale.setDefault(Locale.ENGLISH);
  }
View Full Code Here

  public void setup() {
    MockitoAnnotations.initMocks(this);
   
  FilterChain chain = mock(FilterChain.class);
  final RequestInfo webRequest = new RequestInfo(context, chain, request, null);
  jstlLocalization = new JstlLocalization(webRequest);
  converter = new LocaleBasedDoubleConverter(jstlLocalization);
  bundle = ResourceBundle.getBundle("messages");
  Locale.setDefault(Locale.ENGLISH);
  }
View Full Code Here

   
    bundle = ResourceBundle.getBundle("messages");
    FilterChain chain = mock(FilterChain.class);

    final RequestInfo webRequest = new RequestInfo(context, chain, request, null);
  jstlLocalization = new JstlLocalization(webRequest);

    converter = new LocalDateTimeConverter(jstlLocalization);
  }
View Full Code Here

TOP

Related Classes of br.com.caelum.vraptor.core.JstlLocalization

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.