File tree Expand file tree Collapse file tree 2 files changed +23
-12
lines changed
ipp-v3-java-devkit/src/test/java/com/intuit/ipp/serialization Expand file tree Collapse file tree 2 files changed +23
-12
lines changed Original file line number Diff line number Diff line change 3838import java .io .OutputStream ;
3939import java .lang .reflect .Method ;
4040import java .math .BigDecimal ;
41+ import java .text .ParseException ;
42+ import java .text .SimpleDateFormat ;
4143import java .util .Calendar ;
4244import java .util .Collections ;
4345import java .util .Date ;
@@ -239,8 +241,17 @@ private Invoice getInvoiceObject() {
239241 }
240242
241243 private Date getDate () {
242- Calendar calendar = Calendar .getInstance (TimeZone .getTimeZone ("UTC" ));
243- calendar .setTimeInMillis (1546300800666L );
244+ SimpleDateFormat sdf = new SimpleDateFormat ("dd-M-yyyy hh:mm:ss" );
245+ String dateInString = "01-01-2019 00:00:00" ;
246+ Date date ;
247+ Calendar calendar = Calendar .getInstance ();
248+ try {
249+ date = sdf .parse (dateInString );
250+ calendar .setTime (date );
251+ } catch (ParseException e ) {
252+ // TODO Auto-generated catch block
253+ e .printStackTrace ();
254+ }
244255 return calendar .getTime ();
245256 }
246257
Original file line number Diff line number Diff line change 101101 </execution >
102102 </executions >
103103 </plugin >
104+ <plugin >
105+ <groupId >org.apache.maven.plugins</groupId >
106+ <artifactId >maven-surefire-plugin</artifactId >
107+ <version >3.0.0-M3</version >
108+ <configuration >
109+ <argLine >
110+ -Djdk.attach.allowAttachSelf <!-- required to run test with jmockit on JDK 9 -->
111+ </argLine >
112+ </configuration >
113+ </plugin >
104114 <plugin >
105115 <groupId >org.jacoco</groupId >
106116 <artifactId >jacoco-maven-plugin</artifactId >
142152 </execution >
143153 </executions >
144154 </plugin >
145- <plugin >
146- <groupId >org.apache.maven.plugins</groupId >
147- <artifactId >maven-surefire-plugin</artifactId >
148- <version >3.0.0-M3</version >
149- <configuration >
150- <argLine >
151- -Djdk.attach.allowAttachSelf <!-- required to run test with jmockit on JDK 9 -->
152- </argLine >
153- </configuration >
154- </plugin >
155155 </plugins >
156156 </build >
157157
You can’t perform that action at this time.
0 commit comments