Search in sources :

Example 1 with DateUtils.parseDate

use of org.sonar.api.utils.DateUtils.parseDate in project sonarqube by SonarSource.

the class DateUtilsTest method parseDate_valid_format.

@Test
public void parseDate_valid_format() {
    Date date = DateUtils.parseDate("2010-05-18");
    assertThat(date.getDate()).isEqualTo(18);
}
Also used : Date(java.util.Date) DateUtils.parseDate(org.sonar.api.utils.DateUtils.parseDate) Test(org.junit.Test)

Aggregations

Date (java.util.Date)1 Test (org.junit.Test)1 DateUtils.parseDate (org.sonar.api.utils.DateUtils.parseDate)1