Search in sources :

Example 1 with PunctualEditor

use of com.revolsys.geometry.model.editor.PunctualEditor in project com.revolsys.open by revolsys.

the class MultiPointEditorTest method testNotModified.

@Test
public void testNotModified() {
    final PunctualEditor editor = PUNCTUAL.newGeometryEditor();
    editor.setZ(new int[0], 13);
    final Punctual newMultiPoint = editor.newGeometry();
    Assert.assertSame(PUNCTUAL, newMultiPoint);
}
Also used : Punctual(com.revolsys.geometry.model.Punctual) PunctualEditor(com.revolsys.geometry.model.editor.PunctualEditor) Test(org.junit.Test)

Example 2 with PunctualEditor

use of com.revolsys.geometry.model.editor.PunctualEditor in project com.revolsys.open by revolsys.

the class MultiPointEditorTest method testSetX.

@Test
public void testSetX() {
    final PunctualEditor editor = PUNCTUAL.newGeometryEditor(3);
    editor.setX(0, 10);
    final Punctual newMultiPoint = editor.newGeometry();
    Assert.assertNotSame(PUNCTUAL, newMultiPoint);
    Assert.assertEquals(10.0, newMultiPoint.getX(0), 0.0);
}
Also used : Punctual(com.revolsys.geometry.model.Punctual) PunctualEditor(com.revolsys.geometry.model.editor.PunctualEditor) Test(org.junit.Test)

Example 3 with PunctualEditor

use of com.revolsys.geometry.model.editor.PunctualEditor in project com.revolsys.open by revolsys.

the class MultiPointEditorTest method testSetCoordinates.

@Test
public void testSetCoordinates() {
    for (int i = 0; i < 4; i++) {
        final PunctualEditor editor = PUNCTUAL.newGeometryEditor(4);
        final int newValue = i * 10;
        editor.setCoordinate(0, i, newValue);
        final Punctual newMultiPoint = editor.newGeometry();
        Assert.assertNotSame(PUNCTUAL, newMultiPoint);
        Assert.assertEquals(newValue, newMultiPoint.getCoordinate(0, i), 0.0);
    }
}
Also used : Punctual(com.revolsys.geometry.model.Punctual) PunctualEditor(com.revolsys.geometry.model.editor.PunctualEditor) Test(org.junit.Test)

Example 4 with PunctualEditor

use of com.revolsys.geometry.model.editor.PunctualEditor in project com.revolsys.open by revolsys.

the class MultiPointEditorTest method testSetZ.

@Test
public void testSetZ() {
    final PunctualEditor editor = PUNCTUAL.newGeometryEditor(3);
    editor.setZ(0, 10);
    final Punctual newMultiPoint = editor.newGeometry();
    Assert.assertNotSame(PUNCTUAL, newMultiPoint);
    Assert.assertEquals(10.0, newMultiPoint.getZ(0), 0.0);
}
Also used : Punctual(com.revolsys.geometry.model.Punctual) PunctualEditor(com.revolsys.geometry.model.editor.PunctualEditor) Test(org.junit.Test)

Example 5 with PunctualEditor

use of com.revolsys.geometry.model.editor.PunctualEditor in project com.revolsys.open by revolsys.

the class MultiPointEditorTest method testSetY.

@Test
public void testSetY() {
    final PunctualEditor editor = PUNCTUAL.newGeometryEditor(3);
    editor.setY(0, 10);
    final Punctual newMultiPoint = editor.newGeometry();
    Assert.assertNotSame(PUNCTUAL, newMultiPoint);
    Assert.assertEquals(10.0, newMultiPoint.getY(0), 0.0);
}
Also used : Punctual(com.revolsys.geometry.model.Punctual) PunctualEditor(com.revolsys.geometry.model.editor.PunctualEditor) Test(org.junit.Test)

Aggregations

PunctualEditor (com.revolsys.geometry.model.editor.PunctualEditor)7 Punctual (com.revolsys.geometry.model.Punctual)6 Test (org.junit.Test)6