@Test public void testEqual() { ConstraintReportId id1 = constraintReportId("name", "failureId"); ConstraintReportId id2 = constraintReportId("name", "failureId"); assertThat(id1,equalTo(id2)); }
@Test public void testEqualWithDifferentFailureIds() { ConstraintReportId id1 = constraintReportId("name", "failureId1"); ConstraintReportId id2 = constraintReportId("name", "failureId2"); assertThat(id1,not(equalTo(id2))); }
@Test public void testEqualWithDifferentIds() { ConstraintReportId id1 = constraintReportId("name1", "failureId1"); ConstraintReportId id2 = constraintReportId("name2", "failureId2"); assertThat(id1,not(equalTo(id2))); }
@Test public void testEqualWithDifferentReportIds() { ConstraintReportId id1 = constraintReportId("name1", "failureId"); ConstraintReportId id2 = constraintReportId("name2", "failureId"); assertThat(id1,not(equalTo(id2))); }
@Test public void testEqualOnlyToOtherIds() { ConstraintReportId id = constraintReportId("name", "failureId"); assertThat((Object)id,not(equalTo((Object)"another type"))); }
@Test public void testEqualToSelf() { ConstraintReportId id = constraintReportId("name", "failureId"); assertThat(id,equalTo(id)); }
@Test public void testHasCustomString() { ConstraintReportId id = constraintReportId("name","failureId"); assertThat(id.toString(),not(equalTo(ConstraintReportId.class.getName()+"@"+System.identityHashCode(id)))); }
@Test public void testHashCodeWithDifferentFailureIds() { ConstraintReportId id1 = constraintReportId("name", "failureId1"); ConstraintReportId id2 = constraintReportId("name", "failureId2"); assertThat(id1.hashCode(),not(equalTo(id2.hashCode()))); }
@Test public void testHashCodeWithDifferentReportIds() { ConstraintReportId id1 = constraintReportId("name1", "failureId"); ConstraintReportId id2 = constraintReportId("name2", "failureId"); assertThat(id1.hashCode(),not(equalTo(id2.hashCode()))); }
@Test public void testHashCodeWithDifferentIds() { ConstraintReportId id1 = constraintReportId("name1", "failureId1"); ConstraintReportId id2 = constraintReportId("name2", "failureId2"); assertThat(id1.hashCode(),not(equalTo(id2.hashCode()))); }
@Test public void testHashCode() { ConstraintReportId id1 = constraintReportId("name", "failureId"); ConstraintReportId id2 = constraintReportId("name", "failureId"); assertThat(id1.hashCode(),equalTo(id2.hashCode())); }
@Test public void testReturnsFailureId() { assertThat(constraintReportId("name","failureId").failureId(),equalTo("failureId")); }
@Test public void testHashCodeAsSelf() { ConstraintReportId id = constraintReportId("name", "failureId"); assertThat(id.hashCode(),equalTo(id.hashCode())); }
@Test public void testReturnsResourceId() { assertThat(constraintReportId("name","failureId").resourceId(),equalTo(resourceId("name"))); }