You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package com.fanruan.api.util;
|
|
|
|
|
|
|
|
import org.junit.Assert;
|
|
|
|
import org.junit.Test;
|
|
|
|
|
|
|
|
public class ReflectKitTest {
|
|
|
|
|
|
|
|
@Test
|
|
|
|
public void classInstanceOf() {
|
|
|
|
Assert.assertTrue(ReflectKit.classInstanceOf(Integer.class, Object.class));
|
|
|
|
Assert.assertFalse(ReflectKit.classInstanceOf(Object.class, Integer.class));
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
public void objectInstanceOf() {
|
|
|
|
Assert.assertTrue(ReflectKit.objectInstanceOf(1, Integer.class));
|
|
|
|
Assert.assertFalse(ReflectKit.objectInstanceOf(1.0, Integer.class));
|
|
|
|
}
|
|
|
|
}
|