Commit a2feacfe authored by oleg.pahhomov's avatar oleg.pahhomov

SA0140-504 | Fix observations order

parent 323a84ff
......@@ -5,10 +5,10 @@ import lombok.Getter;
import lombok.Setter;
import org.apache.commons.collections4.MapUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;
import java.util.StringJoiner;
import java.util.TreeMap;
import static org.apache.commons.collections4.CollectionUtils.isNotEmpty;
......@@ -17,7 +17,7 @@ import static org.apache.commons.collections4.CollectionUtils.isNotEmpty;
public class DataSet {
private String action;
private HashMap<String, List<Object>> observations;
private TreeMap<String, List<Object>> observations;
@JsonIgnore
public Number getObservation(String key) {
......
......@@ -42,7 +42,6 @@ public class StatDbRepositoryTest {
assertEquals("http://andmebaas.stat.ee/sdmx-json/data/LES01/3+10+13.4.1+2+3.1/all?startTime=2013&dimensionAtObservation=allDimensions&detail=dataOnly", data.getUrl());
DataSet dataSet = data.getResponse(Language.ET).getDataSet();
assertNotNull(dataSet);
assertEquals(dataSet.getObservation(null), d(null));
assertEquals(dataSet.getObservation("0"), d(null));
assertEquals(dataSet.getObservation("0:0:0:0:0"), d("9.7"));
assertEquals(dataSet.getObservation("0:0:0:0:1"), d("9.1"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment