Skip to content

Commit

Permalink
Add assertion java8 time object to OpackAssert
Browse files Browse the repository at this point in the history
  • Loading branch information
devjeonghwan committed Aug 20, 2023
1 parent c38e034 commit aab9745
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/test/java/com/realtimetech/opack/test/OpackAssert.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.nio.file.Path;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
Expand Down Expand Up @@ -163,7 +166,10 @@ static void assertSingleValue(Object originalObject, Object targetObject) throws
} else if (originalObject instanceof File && targetObject instanceof File ||
originalObject instanceof Path && targetObject instanceof Path ||
originalObject instanceof Date && targetObject instanceof Date ||
originalObject instanceof Calendar && targetObject instanceof Calendar) {
originalObject instanceof Calendar && targetObject instanceof Calendar ||
originalObject instanceof LocalDate && targetObject instanceof LocalDate ||
originalObject instanceof LocalTime && targetObject instanceof LocalTime ||
originalObject instanceof LocalDateTime && targetObject instanceof LocalDateTime) {
OpackAssert.assertEquals(originalObject.toString(), targetObject.toString());
} else {
OpackAssert.assertObject(originalObject, targetObject);
Expand Down

0 comments on commit aab9745

Please sign in to comment.