本文整理了Java中org.apache.sis.test.Assert.assertNotEquals()
方法的一些代码示例,展示了Assert.assertNotEquals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Assert.assertNotEquals()
方法的具体详情如下:
包路径:org.apache.sis.test.Assert
类名称:Assert
方法名:assertNotEquals
暂无
代码示例来源:origin: apache/sis
/**
* Tests {@link Scalar#equals(Object)} and {@link Scalar#hashCode()}.
*/
@Test
public void testEqualsAndHashCode() {
final Quantity<Length> q1 = new Scalar.Length(24, Units.METRE);
Quantity<Length> q2 = new Scalar.Length(24, Units.METRE);
assertEquals("hashCode()", q1.hashCode(), q2.hashCode());
assertEquals("equals(…)", q1, q2);
q2 = new Scalar.Length(12, Units.METRE);
assertNotEquals("hashCode()", q1.hashCode(), q2.hashCode());
assertNotEquals("equals(…)", q1, q2);
q2 = new Scalar.Length(24, Units.CENTIMETRE);
assertNotEquals("hashCode()", q1.hashCode(), q2.hashCode());
assertNotEquals("equals(…)", q1, q2);
}
代码示例来源:origin: apache/sis
/**
* Tests the equality and hash code value computation.
*/
@Test
@DependsOnMethod("testToString") // Because in case of failure, JUnit invokes toString().
public void testEquals() {
final ModifiableLocationType t1 = create(false)[0];
final ModifiableLocationType t2 = create(true )[0];
assertEquals("hashCode", t1.hashCode(), t2.hashCode());
assertEquals("equals", t1, t2);
t2.removeIdentification("name");
assertNotEquals("equals", t1, t2);
}
代码示例来源:origin: apache/sis
assertNotNull("park.native_name", npn);
assertNotNull("park.english_name", epn);
assertNotEquals("park.names", npn, epn);
assertTrue("park.english_name", expectedParks.remove(epn));
代码示例来源:origin: apache/sis
assertTrue("trimSourceDimensions", s.getTrimSourceDimensions());
MathTransform reduced = s.separate();
assertNotEquals("separate()", tr, reduced);
assertArrayEquals(new int[] {0, 1}, s.getSourceDimensions());
assertArrayEquals(new int[] {0, 1}, s.getTargetDimensions());
s.setTrimSourceDimensions(true);
reduced = s.separate();
assertNotEquals("separate()", tr, reduced);
assertArrayEquals(new int[] {1, 2}, s.getSourceDimensions());
assertArrayEquals(new int[] {0, 1}, s.getTargetDimensions());
内容来源于网络,如有侵权,请联系作者删除!