Package org.kuali.rice.core.api.datetime

Examples of org.kuali.rice.core.api.datetime.DateTimeService.toDateTimeString()


        .thenReturn(dtFormat);
    ConfigContext.overrideConfig(Thread.currentThread()
        .getContextClassLoader(), config);
    DateTimeService dtSvc = mock(DateTimeService.class);
    SimpleDateFormat sdf = new SimpleDateFormat(dtFormat);
    when(dtSvc.toDateTimeString(date)).thenReturn(sdf.format(date));
    attributeValueReader.setDateTimeService(dtSvc);
    // create allowed formats
    List<String> allowedFormats = new ArrayList<String>();
    allowedFormats.add(dtFormat);
    allowedFormats.add("d MMM yyyy hh:mm a");
View Full Code Here


   
    SimpleDateFormat sdf = new SimpleDateFormat(MartinlawConstants.DEFAULT_TIMESTAMP_FORMAT);
    final String formattedDate = sdf.format(event.getStartDate());
   
    DateTimeService dtSvc = mock(DateTimeService.class);
    when(dtSvc.toDateTimeString(same(event.getStartDate()))).thenReturn(formattedDate);
    event.setDateTimeService(dtSvc);
   
    return event;
  }
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.