Package br.com.caelum.vraptor.converter

Examples of br.com.caelum.vraptor.converter.LocaleBasedCalendarConverter


  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

TOP

Related Classes of br.com.caelum.vraptor.converter.LocaleBasedCalendarConverter

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.