本文整理了Java中org.apache.sis.test.Assert.assertNotSame()
方法的一些代码示例,展示了Assert.assertNotSame()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Assert.assertNotSame()
方法的具体详情如下:
包路径:org.apache.sis.test.Assert
类名称:Assert
方法名:assertNotSame
暂无
代码示例来源:origin: apache/sis
/**
* Tests the {@link org.apache.sis.test.Assert#assertSerializedEquals(Object)} method.
*/
@Test
public void testAssertSerializedEquals() {
final String local = "Le silence éternel de ces espaces infinis m'effraie";
assertNotSame(local, assertSerializedEquals(local));
}
}
代码示例来源:origin: apache/sis
/**
* Tests serialization.
*/
@Test
public void testSerialization() {
final AbstractCS cs = new AbstractCS(singletonMap(NAME_KEY, "Test"), HardCodedAxes.X, HardCodedAxes.Y);
assertNotSame(cs, assertSerializedEquals(cs));
}
}
代码示例来源:origin: apache/sis
/**
* Tests serialization.
*/
@Test
public void testSerialization() {
NumberRange<Float> r1 = MeasurementRange.create(1000f, true, 2000f, true, Units.METRE);
NumberRange<Float> r2 = MeasurementRange.create(1.5f, true, 3f, true, Units.KILOMETRE);
assertNotSame(r1, assertSerializedEquals(r1));
assertNotSame(r2, assertSerializedEquals(r2));
}
}
代码示例来源:origin: apache/sis
/**
* Tests serialization.
*/
@Test
public void testSerialization() {
final AbstractAssociation twinTown = twinTown();
assertNotSame(twinTown, assertSerializedEquals(twinTown));
}
代码示例来源:origin: apache/sis
/**
* Tests the serialization of a custom subclass. {@link OptionKey} can not resolve
* to a unique instance, unless the subclass provides its own resolution mechanism.
*/
@Test
public void testSubclassSerialization() {
final CustomKey<Integer> key = new CustomKey<>("key", Integer.class);
assertNotSame(key, assertSerializedEquals(key));
}
}
代码示例来源:origin: apache/sis
/**
* Tests serialization.
*/
@Test
public void testSerialization() {
final Fraction local = new Fraction(5, 7);
assertNotSame(local, assertSerializedEquals(local));
}
}
代码示例来源:origin: apache/sis
/**
* Tests serialization. Since we can not serialize native resources, {@link PJ} is expected
* to serialize the Proj.4 definition string instead.
*
* @throws FactoryException if the Proj.4 definition string used in this test is invalid.
*/
@Test
public void testSerialization() throws FactoryException {
final PJ pj = new PJ("+proj=latlong +datum=WGS84");
assertNotSame(pj, assertSerializedEquals(pj));
}
}
代码示例来源:origin: apache/sis
/**
* Tests serialization.
*/
@Test
public void testSerialization() {
final Version version = new Version("1.6.b2");
assertNotSame(version, assertSerializedEquals(version));
}
}
代码示例来源:origin: apache/sis
/**
* Tests serialization.
*/
@Test
public void testSerialization() {
final Line local = new Line(9.5, -3.7);
assertNotSame(local, assertSerializedEquals(local));
}
}
代码示例来源:origin: apache/sis
/**
* Tests serialization.
*/
@Test
public void testSerialization() {
final Range<Integer> range = new Range<>(Integer.class, -10, true, 10, true);
assertNotSame(range, assertSerializedEquals(range));
}
}
代码示例来源:origin: apache/sis
/**
* Tests {@link Scalar} serialization.
*/
@Test
public void testSerialization() {
final Quantity<Length> q1 = new Scalar.Length(24, Units.KILOMETRE);
assertNotSame(q1, assertSerializedEquals(q1));
}
代码示例来源:origin: apache/sis
/**
* Tests {@link Matrices#copy(Matrix)}
*/
@Test
public void testCopy() {
final Matrix matrix = new Matrix3(10, 20, 30, 40, 50, 60, 70, 80, 90);
final Matrix copy = Matrices.copy(matrix);
assertNotSame("copy", matrix, copy);
assertEquals ("copy", matrix, copy);
}
代码示例来源:origin: apache/sis
/**
* Tests serialization.
*/
@Test
public void testSerialize() {
final GeneralDirectPosition p1 = new GeneralDirectPosition(12, -20, 4, 9);
final GeneralDirectPosition p2 = assertSerializedEquals(p1);
assertNotSame(p1, p2);
validate(p2);
}
}
代码示例来源:origin: apache/sis
/**
* Tests serialization.
*/
@Test
public void testSerialize() {
final DirectPosition2D p1 = new DirectPosition2D(12, -20);
final DirectPosition2D p2 = assertSerializedEquals(p1);
assertNotSame(p1, p2);
validate(p2);
}
}
代码示例来源:origin: apache/sis
/**
* Tests serialization.
*/
@Test
@DependsOnMethod("testEquals")
public void testSerialization() {
final AbstractAttribute<String> attribute = universities();
attribute.setValue("University of international development");
assertNotSame(attribute, assertSerializedEquals(attribute));
}
}
代码示例来源:origin: apache/sis
/**
* Tests serialization.
*/
@Test
@DependsOnMethod("testEquals")
public void testSerialization() {
final AbstractAttribute<String> attribute = city();
attribute.setValue("Atlantide");
assertNotSame(attribute, assertSerializedEquals(attribute));
}
代码示例来源:origin: apache/sis
/**
* Tests {@link MultiValuedAttribute#clone()}.
*
* @throws CloneNotSupportedException should never happen.
*/
@Test
@DependsOnMethod("testEquals")
public void testClone() throws CloneNotSupportedException {
final MultiValuedAttribute<Integer> a1 = population();
final AbstractAttribute<Integer> a2 = a1.clone();
assertNotSame(a1, a2);
SingletonAttributeTest.testEquals(a1, a2);
}
代码示例来源:origin: apache/sis
/**
* Tests {@link SingletonAttribute#clone()}.
*
* @throws CloneNotSupportedException should never happen.
*/
@Test
@DependsOnMethod("testEquals")
public void testClone() throws CloneNotSupportedException {
final SingletonAttribute<Integer> a1 = population();
final AbstractAttribute<Integer> a2 = a1.clone();
assertNotSame(a1, a2);
testEquals(a1, a2);
}
代码示例来源:origin: apache/sis
/**
* Tests serialization.
*/
@Test
public void testSerialization() {
final RangeSet<Double> ranges = RangeSet.create(Double.class, true, false);
assertTrue(ranges.add(12.0, 12.5));
assertTrue(ranges.add(18.0, 18.5));
assertTrue(ranges.add(19.0, 20.0));
assertNotSame(ranges, assertSerializedEquals(ranges));
}
代码示例来源:origin: apache/sis
/**
* Tests the creation of a local name in the global namespace.
* The fully qualified name is {@code "EPSG"}.
*/
@Test
public void testGlobalNamespace() {
final DefaultLocalName name = new DefaultLocalName(null, EPSG);
assertSame(EPSG, name.toString());
assertSame(EPSG, name.toInternationalString().toString());
assertSame(GlobalNameSpace.GLOBAL, name.scope());
assertNotSame(name, assertSerializedEquals(name));
validate(name); // GeoAPI tests.
}
内容来源于网络,如有侵权,请联系作者删除!