當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。