Debian Codegraph @

test/func/read/ImgReadTest.java

raw symbols SCIP
1 /*
2 * Copyright (C) 2011.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 or
6 * version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
12 */
13 package func.read;
14
15 import java.io.IOException;
16 import java.util.List;
17
18 import uk.me.parabola.imgfmt.Utils;
19 import uk.me.parabola.imgfmt.app.map.MapReader;
20 import uk.me.parabola.imgfmt.app.net.RoadDef;
21
22 import func.lib.Args;
23 import org.junit.Test;
24
25 import static org.junit.Assert.*;
26
27
28 public class ImgReadTest {
29
30 @Test
31 public void testNet() throws IOException {
32 try (MapReader mr = new MapReader(Utils.joinPath(Args.TEST_RESOURCE_IMG, Args.DEF_MAP_FILENAME3))) {
33 List<RoadDef> roads = mr.getRoads();
34
35 assertEquals("number of roads", 1365, roads.size());
36 }
37 }
38 }