View Javadoc
1   package org.csveed.bean.conversion;
2   
3   import static org.junit.jupiter.api.Assertions.assertEquals;
4   
5   import org.junit.jupiter.api.Test;
6   
7   public class EasyAbstractConverterTest {
8   
9       @Test
10      public void testEasyAbstractConverter() throws Exception {
11          Converter<Coordinate> converter = new EasyAbstractConverter<Coordinate>(Coordinate.class) {
12              @Override
13              public Coordinate fromString(String text) throws Exception {
14                  return Coordinate.fromString(text);
15              }
16          };
17          Coordinate coords = converter.fromString("11/38");
18          assertEquals((Integer)11, coords.getX());
19          assertEquals((Integer)38, coords.getY());
20      }
21  }