Example usage for java.util Calendar set

List of usage examples for java.util Calendar set

Introduction

In this page you can find the example usage for java.util Calendar set.

Prototype

public final void set(int year, int month, int date) 

Source Link

Document

Sets the values for the calendar fields YEAR, MONTH, and DAY_OF_MONTH.

Usage

From source file:ru.retbansk.utils.scheduled.impl.ReadEmailAndConvertToXmlSpringImplTest.java

@BeforeClass
public static void beforeClass() {

    reader = new ReadEmailAndConvertToXmlSpringImpl();
    try {/*from   w  w w .  j  a  v  a2  s.c o m*/
        UsefulMethods.populate();
    } catch (InterruptedException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    DayReport dayReport = new DayReport();
    dayReport.setPersonId(USER2);
    Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("GMT+3"));
    calendar.set(2012, Calendar.OCTOBER, 18);
    dayReport.setCalendar(calendar);
    List<TaskReport> taskList = new ArrayList<TaskReport>();
    TaskReport taskReport = new TaskReport();
    taskReport.setDate(calendar.getTime());
    taskReport.setElapsedTime(1);
    taskReport.setStatus(TEST_STRING);
    taskReport.setWorkDescription(TEST_STRING2);
    taskList.add(taskReport);
    dayReport.setReportList(taskList);
    dayReportSet = new HashSet<DayReport>();
    dayReportSet.add(dayReport);

}