[Add] PixivSearchBuilder 增加equals, hashCode, toString方法的覆写;

[Update] PixivSearchBuilderTest 补充测试项;
This commit is contained in:
2020-04-14 11:05:53 +08:00
parent ee1f066ee4
commit b06702f367
2 changed files with 78 additions and 1 deletions

View File

@ -1,5 +1,6 @@
package net.lamgc.cgj.pixiv;
import org.junit.Assert;
import org.junit.Test;
public class PixivSearchBuilderTest {
@ -12,4 +13,14 @@ public class PixivSearchBuilderTest {
System.out.println(builder.buildURL());
}
@Test
public void equalsTest() {
Assert.assertEquals(new PixivSearchBuilder("风景"), new PixivSearchBuilder("风景"));
}
@Test
public void hashCodeTest() {
Assert.assertEquals(new PixivSearchBuilder("风景").hashCode(), new PixivSearchBuilder("风景").hashCode());
}
}