Skip to content

Commit

Permalink
improve AnnotationValidatorTests
Browse files Browse the repository at this point in the history
  • Loading branch information
geektortoise committed Apr 6, 2021
1 parent 200417d commit 30a191c
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions test/functional/be/cytomine/AnnotationValidatorTests.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ import be.cytomine.test.Infos
import be.cytomine.test.http.UserAnnotationAPI
import grails.converters.JSON

/**
* Created by IntelliJ IDEA.
* User: lrollus
* Date: 16/02/11
* Time: 13:49
* To change this template use File | Settings | File Templates.
*/
class AnnotationValidatorTests {

public static SELF_INTERSECT_CANNOT_MAKE_VALID = "POLYGON((13688 75041,13687 75040,13688 75041,13689 75041,13688 75041))"
Expand Down Expand Up @@ -107,4 +100,12 @@ class AnnotationValidatorTests {
def result = UserAnnotationAPI.create(json.toString(), Infos.SUPERADMINLOGIN, Infos.SUPERADMINPASSWORD)
assert 400 == result.code
}

public void testAnnotationGeometryPoint() {
def annotationToAdd = BasicInstanceBuilder.getUserAnnotation()
def json = JSON.parse(annotationToAdd.encodeAsJSON())
json.location = "POINT(10 10)"
def result = UserAnnotationAPI.create(json.toString(), Infos.SUPERADMINLOGIN, Infos.SUPERADMINPASSWORD)
assert 200 == result.code
}
}

0 comments on commit 30a191c

Please sign in to comment.