本文整理匯總了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();
}