mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-08-18 20:38:02 +08:00
fix bugs
This commit is contained in:
@@ -567,6 +567,11 @@ public class BeanUtilTest {
|
||||
Assert.assertNull(newFood.getCode());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void copyNullTest() {
|
||||
Assert.assertNull(BeanUtil.copyProperties(null, Food.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void copyBeanPropertiesFilterTest() {
|
||||
Food info = new Food();
|
||||
|
@@ -15,6 +15,8 @@ import org.junit.Test;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
@@ -383,4 +385,11 @@ public class ConvertTest {
|
||||
float b = Convert.toFloat(a);
|
||||
Assert.assertEquals(a, b, 5);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void localDateTimeToLocalDateTest(){
|
||||
final LocalDateTime localDateTime = LocalDateTime.now();
|
||||
final LocalDate convert = Convert.convert(LocalDate.class, localDateTime);
|
||||
Assert.assertEquals(localDateTime.toLocalDate(), convert);
|
||||
}
|
||||
}
|
||||
|
@@ -439,6 +439,9 @@ public class NumberUtilTest {
|
||||
Assert.assertFalse(NumberUtil.isEven(a[4]));
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void divIntegerTest(){
|
||||
Assert.assertEquals(1001013, NumberUtil.div(100101300, (Number) 100).intValue());
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user