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.
19 lines
523 B
19 lines
523 B
package com.fanruan.api.util; |
|
|
|
import org.junit.Assert; |
|
import org.junit.Test; |
|
|
|
public class TypeKitTest { |
|
|
|
@Test |
|
public void classInstanceOf() { |
|
Assert.assertTrue(TypeKit.classInstanceOf(Integer.class, Object.class)); |
|
Assert.assertFalse(TypeKit.classInstanceOf(Object.class, Integer.class)); |
|
} |
|
|
|
@Test |
|
public void objectInstanceOf() { |
|
Assert.assertTrue(TypeKit.objectInstanceOf(1, Integer.class)); |
|
Assert.assertFalse(TypeKit.objectInstanceOf(1.0, Integer.class)); |
|
} |
|
} |