当前位置: 首页>>代码示例>>Java>>正文


Java EqualsVerifier类代码示例

本文整理汇总了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();
}
 
开发者ID:mobitopp,项目名称:connection-scan,代码行数:18,代码来源:ScannedRouteTest.java

示例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();
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:11,代码来源:DummyEdgeTest.java

示例3: testEqualsContract

import nl.jqno.equalsverifier.EqualsVerifier; //导入依赖的package包/类
@Test
void testEqualsContract() {
	EqualsVerifier.forClass(HealthCheck.class)
			.usingGetClass()
			.suppress(Warning.NONFINAL_FIELDS)
			.verify();
}
 
开发者ID:CMSgov,项目名称:qpp-conversion-tool,代码行数:8,代码来源:HealthCheckTest.java

示例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();
}
 
开发者ID:crnk-project,项目名称:crnk-framework,代码行数:9,代码来源:PathIdsTest.java

示例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();
}
 
开发者ID:crnk-project,项目名称:crnk-framework,代码行数:10,代码来源:JsonPathTest.java

示例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");
}
 
开发者ID:crnk-project,项目名称:crnk-framework,代码行数:15,代码来源:ResourcePermissionTest.java

示例7: fulfillsEqualsContract

import nl.jqno.equalsverifier.EqualsVerifier; //导入依赖的package包/类
@Test
void fulfillsEqualsContract() {
    EqualsVerifier
            .forClass(UnitTypeData.class)
            .withNonnullFields("unitType", "name", "techAliases", "attributes", "weapons")
            .verify();
}
 
开发者ID:ocraft,项目名称:ocraft-s2client,代码行数:8,代码来源:UnitTypeDataTest.java

示例8: fulfillsEqualsContract

import nl.jqno.equalsverifier.EqualsVerifier; //导入依赖的package包/类
@Test
void fulfillsEqualsContract() {
    EqualsVerifier.forClass(ResponseSaveReplay.class)
            .withIgnoredFields("nanoTime")
            .withNonnullFields("type", "status", "data")
            .withRedefinedSuperclass()
            .verify();
}
 
开发者ID:ocraft,项目名称:ocraft-s2client,代码行数:9,代码来源:ResponseSaveReplayTest.java

示例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();
}
 
开发者ID:ocraft,项目名称:ocraft-s2client,代码行数:10,代码来源:ResponseQueryTest.java

示例10: fulfillsEqualsContract

import nl.jqno.equalsverifier.EqualsVerifier; //导入依赖的package包/类
@Test
void fulfillsEqualsContract() {
    EqualsVerifier.forClass(PlayerSetup.class)
            .withRedefinedSubclass(ComputerPlayerSetup.class)
            .withNonnullFields("playerType")
            .verify();
}
 
开发者ID:ocraft,项目名称:ocraft-s2client,代码行数:8,代码来源:PlayerSetupTest.java

示例11: fulfillsEqualsContract

import nl.jqno.equalsverifier.EqualsVerifier; //导入依赖的package包/类
@Test
void fulfillsEqualsContract() {
    EqualsVerifier.forClass(ResponseSaveMap.class)
            .withIgnoredFields("nanoTime")
            .withNonnullFields("type", "status")
            .withRedefinedSuperclass()
            .verify();
}
 
开发者ID:ocraft,项目名称:ocraft-s2client,代码行数:9,代码来源:ResponseSaveMapTest.java

示例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();
}
 
开发者ID:ocraft,项目名称:ocraft-s2client,代码行数:9,代码来源:UnitTest.java

示例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();
}
 
开发者ID:ocraft,项目名称:ocraft-s2client,代码行数:10,代码来源:ResponsePingTest.java

示例14: fulfillsEqualsContract

import nl.jqno.equalsverifier.EqualsVerifier; //导入依赖的package包/类
@Test
void fulfillsEqualsContract() {
    EqualsVerifier
            .forClass(ResponseAction.class)
            .withIgnoredFields("nanoTime")
            .withNonnullFields("type", "status", "results")
            .withRedefinedSuperclass()
            .verify();
}
 
开发者ID:ocraft,项目名称:ocraft-s2client,代码行数:10,代码来源:ResponseActionTest.java

示例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();
}
 
开发者ID:ocraft,项目名称:ocraft-s2client,代码行数:10,代码来源:ResponseObservationTest.java


注:本文中的nl.jqno.equalsverifier.EqualsVerifier类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。