root / trunk / libraries / libDwg / src-test / com / iver / cit / jdwglib / dwg / DwgFileTest.java @ 10198
History | View | Annotate | Download (1.22 KB)
1 |
package com.iver.cit.jdwglib.dwg; |
---|---|
2 |
|
3 |
import java.io.File; |
4 |
import java.io.FileInputStream; |
5 |
import java.io.FileNotFoundException; |
6 |
import java.io.IOException; |
7 |
import java.net.URL; |
8 |
import java.nio.ByteBuffer; |
9 |
import java.nio.ByteOrder; |
10 |
import java.nio.channels.FileChannel; |
11 |
import java.util.LinkedList; |
12 |
|
13 |
import com.iver.cit.jdwglib.dwg.readers.DwgFileV15Reader; |
14 |
import com.iver.cit.jdwglib.dwg.readers.IDwgFileReader; |
15 |
|
16 |
import junit.framework.TestCase; |
17 |
|
18 |
public class DwgFileTest extends TestCase { |
19 |
private File baseDataPath; |
20 |
|
21 |
protected void setUp() throws Exception { |
22 |
super.setUp();
|
23 |
URL url = this.getClass().getResource("DwgFileTest_data"); |
24 |
if (url == null) |
25 |
throw new Exception("Can't find 'DwgFileTest_data' dir"); |
26 |
|
27 |
baseDataPath = new File(url.getFile()); |
28 |
if (!baseDataPath.exists())
|
29 |
throw new Exception("Can't find 'DwgFileTest_data' dir"); |
30 |
|
31 |
} |
32 |
|
33 |
protected void tearDown() throws Exception { |
34 |
super.tearDown();
|
35 |
} |
36 |
public void test1() throws IOException, DwgVersionNotSupportedException { |
37 |
String fileName = baseDataPath.getAbsolutePath()+"/Un punto.dwg"; |
38 |
DwgFile dwg = new DwgFile(fileName);
|
39 |
|
40 |
dwg.read(); |
41 |
dwg.calculateGisModelDwgPolylines(); |
42 |
dwg.blockManagement(); |
43 |
LinkedList dwgObjects = dwg.getDwgObjects();
|
44 |
|
45 |
} |
46 |
|
47 |
} |