mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add test
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package org.dromara.hutool.core.bean;
|
||||
|
||||
import lombok.Data;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class BeanDescFactoryTest {
|
||||
@Test
|
||||
void getBeanDescTest() {
|
||||
final BeanDesc beanDesc = BeanDescFactory.getBeanDesc(Food.class);
|
||||
final Collection<PropDesc> props = beanDesc.getProps();
|
||||
assertEquals(2, props.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getBeanDescWithoutCacheTest() {
|
||||
final BeanDesc beanDesc = BeanDescFactory.getBeanDescWithoutCache(Food.class);
|
||||
final Collection<PropDesc> props = beanDesc.getProps();
|
||||
assertEquals(2, props.size());
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class Food {
|
||||
private String bookID;
|
||||
private String code;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user