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 com.fanruan.api.Prepare;
|
|
|
|
import com.fr.third.guava.base.Objects;
|
|
|
|
import org.junit.Assert;
|
|
|
|
import org.junit.Test;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author richie
|
|
|
|
* @version 10.0
|
|
|
|
* Created by richie on 2019-08-09
|
|
|
|
*/
|
|
|
|
public class GeneralKitTest extends Prepare {
|
|
|
|
|
|
|
|
@Test
|
|
|
|
public void getMacAddress() throws Exception{
|
|
|
|
Assert.assertEquals(GeneralKit.getMacAddress(), com.fr.general.GeneralUtils.getMacAddress());
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
public void equals() throws Exception{
|
|
|
|
Integer x = 5;
|
|
|
|
Integer y = 10;
|
|
|
|
Integer z =5;
|
|
|
|
Short a = 5;
|
|
|
|
Assert.assertEquals(GeneralKit.equals(x, y), false);
|
|
|
|
Assert.assertEquals(GeneralKit.equals(x, z), true);
|
|
|
|
Assert.assertEquals(GeneralKit.equals(z, a), false);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
public void hashCodes(){
|
|
|
|
class A{};
|
|
|
|
Object a = new A();
|
|
|
|
Assert.assertEquals(GeneralKit.hashCode(a), Objects.hashCode(a));
|
|
|
|
}
|
|
|
|
}
|