Skip to content

Commit

Permalink
added two unit test for point (#2513)
Browse files Browse the repository at this point in the history
  • Loading branch information
anandwana001 authored Jun 25, 2024
1 parent e4cf1a1 commit 38f6658
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ class GeometryTest {
assertThat(point).isEqualTo(point.toLocalDataStoreObject().getGeometry())
}

@Test
fun testPointIsEmpty() {
val point = point(x, y)
assertThat(POINT_IS_EMPTY).isEqualTo(point.isEmpty())
}

@Test
fun testPointArea() {
val point = point(x, y)
assertThat(POINT_AREA).isEqualTo(point.area)
}

@Test
fun testPolygonSerialization() {
val polygon = polygon(path1, path2)
Expand Down Expand Up @@ -131,5 +143,8 @@ class GeometryTest {

private val OPEN_LOOP = listOf(COORDINATE_1, COORDINATE_2, COORDINATE_3)
private val CLOSED_LOOP = listOf(COORDINATE_1, COORDINATE_2, COORDINATE_3, COORDINATE_1)

private const val POINT_AREA = 0.0
private const val POINT_IS_EMPTY = false
}
}

0 comments on commit 38f6658

Please sign in to comment.