blob: 913a316523168c498a06370239a8882ca3a3a107 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.provision.persistence;
import com.yahoo.component.Version;
import com.yahoo.config.provision.NodeType;
import org.junit.Test;
import java.util.Map;
import java.util.TreeMap;
import static org.junit.Assert.assertEquals;
/**
* @author mpolden
*/
public class NodeTypeVersionsSerializerTest {
@Test
public void test_serialization() {
Map<NodeType, Version> versions = new TreeMap<>();
versions.put(NodeType.host, Version.fromString("7.1"));
versions.put(NodeType.confighost, Version.fromString("7.2"));
Map<NodeType, Version> serialized = NodeTypeVersionsSerializer.fromJson(NodeTypeVersionsSerializer.toJson(versions));
assertEquals(versions, serialized);
}
}
|