Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

Commit

Permalink
|#00|Fixing date issue in template parameter test
Browse files Browse the repository at this point in the history
  • Loading branch information
ans7991 committed Jul 30, 2014
1 parent 121f00c commit 5044874
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
import org.openlmis.db.categories.UnitTests;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

import static org.hamcrest.CoreMatchers.is;
Expand Down Expand Up @@ -62,8 +64,8 @@ public void shouldGetParsedValueForBooleanDataType() throws Exception {
@Test
public void shouldGetParsedValueForDateDataType() throws Exception {
parameter.setDataType("java.util.Date");
Date date = new Date(66600000L);
assertThat(parameter.getParsedValueOf("02/01/1970"), is((Object) date));
String stringDate = new SimpleDateFormat("dd/MM/yyyy").format(new Date());
assertThat(parameter.getParsedValueOf(stringDate), is((Object) new SimpleDateFormat("dd/MM/yyyy").parse(stringDate)));
}

@Test
Expand Down

0 comments on commit 5044874

Please sign in to comment.