本文整理汇总了Java中nl.jqno.equalsverifier.EqualsVerifier类的典型用法代码示例。如果您正苦于以下问题:Java EqualsVerifier类的具体用法?Java EqualsVerifier怎么用?Java EqualsVerifier使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EqualsVerifier类属于nl.jqno.equalsverifier包,在下文中一共展示了EqualsVerifier类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: equalsAndHashCode
import nl.jqno.equalsverifier.EqualsVerifier; //导入依赖的package包/类
@Test
public void equalsAndHashCode() throws Exception {
Stop oneStop = someStop();
Stop anotherStop = anotherStop();
Journey oneJourney = someJourney();
Journey anotherJourney = anotherJourney();
Connection oneConnection = connection().startsAt(oneStop).build();
Connection anotherConnection = connection().startsAt(anotherStop).build();
EqualsVerifier
.forClass(ScannedRoute.class)
.withPrefabValues(Point2D.class, coordinate(0, 0), coordinate(1, 1))
.withPrefabValues(Stop.class, oneStop, anotherStop)
.withPrefabValues(Journey.class, oneJourney, anotherJourney)
.withPrefabValues(Connection.class, oneConnection, anotherConnection)
.usingGetClass()
.verify();
}
示例2: testEquals
import nl.jqno.equalsverifier.EqualsVerifier; //导入依赖的package包/类
@Test
void testEquals() {
EqualsVerifier.forClass(DummyEdge.class)
.withRedefinedSuperclass()
.withPrefabValues(Node.class,
new DummyNode(mock(Node.class), mock(Node.class)),
new DummyNode(mock(Node.class), mock(Node.class)))
.suppress(Warning.ALL_FIELDS_SHOULD_BE_USED)
.verify();
}
示例3: testEqualsContract
import nl.jqno.equalsverifier.EqualsVerifier; //导入依赖的package包/类
@Test
void testEqualsContract() {
EqualsVerifier.forClass(HealthCheck.class)
.usingGetClass()
.suppress(Warning.NONFINAL_FIELDS)
.verify();
}
示例4: equalsContract
import nl.jqno.equalsverifier.EqualsVerifier; //导入依赖的package包/类
@Test
public void equalsContract() {
EqualsVerifier.forClass(PathIds.class)
.usingGetClass()
.suppress(Warning.NULL_FIELDS)
.suppress(Warning.NONFINAL_FIELDS)
.verify();
}
示例5: equalsContract
import nl.jqno.equalsverifier.EqualsVerifier; //导入依赖的package包/类
@Test
public void equalsContract() {
EqualsVerifier.forClass(JsonPath.class)
.usingGetClass()
.withPrefabValues(JsonPath.class, Mockito.mock(JsonPath.class), Mockito.mock(JsonPath.class))
.suppress(Warning.NONFINAL_FIELDS)
.suppress(Warning.REFERENCE_EQUALITY)
.verify();
}
示例6: testEquals
import nl.jqno.equalsverifier.EqualsVerifier; //导入依赖的package包/类
@Test
public void testEquals() throws NoSuchFieldException {
EqualsVerifier.forClass(ResourceIdentifier.class).usingGetClass().suppress(Warning.NONFINAL_FIELDS).verify();
Assert.assertEquals(ResourcePermission.ALL, ResourcePermission.ALL);
Assert.assertEquals(ResourcePermission.DELETE, ResourcePermission.DELETE);
Assert.assertEquals(ResourcePermission.GET, ResourcePermission.GET);
Assert.assertEquals(ResourcePermission.POST, ResourcePermission.POST);
Assert.assertNotEquals(ResourcePermission.DELETE, ResourcePermission.ALL);
Assert.assertNotEquals(ResourcePermission.DELETE, ResourcePermission.GET);
Assert.assertNotEquals(ResourcePermission.DELETE, ResourcePermission.PATCH);
Assert.assertNotEquals(ResourcePermission.DELETE, ResourcePermission.POST);
Assert.assertNotEquals(ResourcePermission.DELETE, "not a resource permission");
}
示例7: fulfillsEqualsContract
import nl.jqno.equalsverifier.EqualsVerifier; //导入依赖的package包/类
@Test
void fulfillsEqualsContract() {
EqualsVerifier
.forClass(UnitTypeData.class)
.withNonnullFields("unitType", "name", "techAliases", "attributes", "weapons")
.verify();
}
示例8: fulfillsEqualsContract
import nl.jqno.equalsverifier.EqualsVerifier; //导入依赖的package包/类
@Test
void fulfillsEqualsContract() {
EqualsVerifier.forClass(ResponseSaveReplay.class)
.withIgnoredFields("nanoTime")
.withNonnullFields("type", "status", "data")
.withRedefinedSuperclass()
.verify();
}
示例9: fulfillsEqualsContract
import nl.jqno.equalsverifier.EqualsVerifier; //导入依赖的package包/类
@Test
void fulfillsEqualsContract() {
EqualsVerifier
.forClass(ResponseQuery.class)
.withIgnoredFields("nanoTime")
.withNonnullFields("type", "status", "placements", "abilities", "pathing")
.withRedefinedSuperclass()
.verify();
}
示例10: fulfillsEqualsContract
import nl.jqno.equalsverifier.EqualsVerifier; //导入依赖的package包/类
@Test
void fulfillsEqualsContract() {
EqualsVerifier.forClass(PlayerSetup.class)
.withRedefinedSubclass(ComputerPlayerSetup.class)
.withNonnullFields("playerType")
.verify();
}
示例11: fulfillsEqualsContract
import nl.jqno.equalsverifier.EqualsVerifier; //导入依赖的package包/类
@Test
void fulfillsEqualsContract() {
EqualsVerifier.forClass(ResponseSaveMap.class)
.withIgnoredFields("nanoTime")
.withNonnullFields("type", "status")
.withRedefinedSuperclass()
.verify();
}
示例12: fulfillsEqualsContract
import nl.jqno.equalsverifier.EqualsVerifier; //导入依赖的package包/类
@Test
void fulfillsEqualsContract() {
EqualsVerifier
.forClass(Unit.class)
.withNonnullFields("displayType", "alliance", "tag", "type", "position", "orders", "passengers",
"buffs")
.verify();
}
示例13: fulfillsEqualsContract
import nl.jqno.equalsverifier.EqualsVerifier; //导入依赖的package包/类
@Test
void fulfillsEqualsContract() {
EqualsVerifier
.forClass(ResponsePing.class)
.withIgnoredFields("nanoTime")
.withNonnullFields("type", "status", "gameVersion", "dataVersion", "dataBuild", "baseBuild")
.withRedefinedSuperclass()
.verify();
}
示例14: fulfillsEqualsContract
import nl.jqno.equalsverifier.EqualsVerifier; //导入依赖的package包/类
@Test
void fulfillsEqualsContract() {
EqualsVerifier
.forClass(ResponseAction.class)
.withIgnoredFields("nanoTime")
.withNonnullFields("type", "status", "results")
.withRedefinedSuperclass()
.verify();
}
示例15: fulfillsEqualsContract
import nl.jqno.equalsverifier.EqualsVerifier; //导入依赖的package包/类
@Test
void fulfillsEqualsContract() {
EqualsVerifier.forClass(ResponseObservation.class)
.withIgnoredFields("nanoTime")
.withNonnullFields("type", "status", "actions", "actionErrors", "observation", "playerResults", "chat")
.withRedefinedSuperclass()
.withPrefabValues(UnitInfo.class, UnitInfo.from(sc2ApiUnitInfoAddOn()), UnitInfo.from(sc2ApiUnitInfo()))
.verify();
}