1
2
3
4
5
6
7
8
9
10
11 package org.csveed.bean.conversion;
12
13 import static org.junit.jupiter.api.Assertions.assertEquals;
14
15 import org.junit.jupiter.api.Test;
16
17
18
19
20 class EasyAbstractConverterTest {
21
22
23
24
25
26
27
28 @Test
29 void testEasyAbstractConverter() throws Exception {
30 Converter<Coordinate> converter = new EasyAbstractConverter<Coordinate>(Coordinate.class) {
31 @Override
32 public Coordinate fromString(String text) throws Exception {
33 return Coordinate.fromString(text);
34 }
35 };
36 Coordinate coords = converter.fromString("11/38");
37 assertEquals((Integer) 11, coords.getX());
38 assertEquals((Integer) 38, coords.getY());
39 }
40 }