aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/geojson/jackson/LngLatAltSerializerTest.java
blob: ee20e08a92f31bcada00ea27ab8463fd90822ea3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package org.geojson.jackson;

import org.geojson.LngLatAlt;
import org.junit.Assert;
import org.junit.Test;

import com.fasterxml.jackson.databind.ObjectMapper;

public class LngLatAltSerializerTest
{

    @Test
    public void testSerialization() throws Exception
    {
        LngLatAlt position = new LngLatAlt(49.43245, 52.42345, 120.34626);
        String correctJson = "[49.43245,52.42345,120.34626]";
        String producedJson = new ObjectMapper().writeValueAsString(position);
        Assert.assertEquals(correctJson, producedJson);
    }
}