OSDN Git Service

imported from subversion repository
[xerial/xerial-core.git] / src / test / java / org / xerial / silk / SilkLinePullParserTest.java
1 /*--------------------------------------------------------------------------\r
2  *  Copyright 2009 Taro L. Saito\r
3  *\r
4  *  Licensed under the Apache License, Version 2.0 (the "License");\r
5  *  you may not use this file except in compliance with the License.\r
6  *  You may obtain a copy of the License at\r
7  *\r
8  *     http://www.apache.org/licenses/LICENSE-2.0\r
9  *\r
10  *  Unless required by applicable law or agreed to in writing, software\r
11  *  distributed under the License is distributed on an "AS IS" BASIS,\r
12  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13  *  See the License for the specific language governing permissions and\r
14  *  limitations under the License.\r
15  *--------------------------------------------------------------------------*/\r
16 //--------------------------------------\r
17 // XerialJ\r
18 //\r
19 // SilkPullParserTest.java\r
20 // Since: Jan 28, 2009 1:02:44 PM\r
21 //\r
22 // $URL: http://www.xerial.org/svn/project/XerialJ/trunk/xerial-core/src/test/java/org/xerial/silk/SilkLinePullParserTest.java $\r
23 // $Author: leo $\r
24 //--------------------------------------\r
25 package org.xerial.silk;\r
26 \r
27 import java.io.IOException;\r
28 \r
29 import org.junit.After;\r
30 import org.junit.Before;\r
31 import org.junit.Test;\r
32 import org.xerial.core.XerialException;\r
33 import org.xerial.util.FileResource;\r
34 import org.xerial.util.log.Logger;\r
35 \r
36 public class SilkLinePullParserTest\r
37 {\r
38     private static Logger _logger = Logger.getLogger(SilkLinePullParserTest.class);\r
39 \r
40     @Before\r
41     public void setUp() throws Exception\r
42     {}\r
43 \r
44     @After\r
45     public void tearDown() throws Exception\r
46     {}\r
47 \r
48     public void pull(String silkFile) throws IOException, XerialException\r
49     {\r
50         SilkLinePullParser p = new SilkLinePullParser(FileResource.open(SilkLinePullParserTest.class, silkFile));\r
51 \r
52         while (p.hasNext())\r
53         {\r
54             SilkEvent e = p.next();\r
55             _logger.debug(e);\r
56         }\r
57     }\r
58 \r
59     @Test\r
60     public void testSmall() throws Exception\r
61     {\r
62         pull("small.silk");\r
63     }\r
64 \r
65     @Test\r
66     public void testFunc() throws Exception\r
67     {\r
68         pull("func.silk");\r
69     }\r
70 \r
71     @Test\r
72     public void testGeneSequence() throws Exception\r
73     {\r
74         pull("sequence.silk");\r
75     }\r
76 \r
77     @Test\r
78     public void testOutValue() throws Exception\r
79     {\r
80         pull("impl/outvalue.silk");\r
81     }\r
82 \r
83     @Test\r
84     public void testBarChart() throws Exception\r
85     {\r
86         pull("barchart.silk");\r
87     }\r
88 \r
89     @Test\r
90     public void testMicroFormat() throws Exception\r
91     {\r
92         pull("microformat.silk");\r
93     }\r
94 \r
95     @Test\r
96     public void testHeredoc() throws Exception\r
97     {\r
98         pull("heredoc.silk");\r
99     }\r
100 \r
101     @Test\r
102     public void testScaffold() throws Exception\r
103     {\r
104         pull("scaffold5001.silk");\r
105     }\r
106 \r
107     @Test\r
108     public void testSuzakuConfig() throws Exception\r
109     {\r
110         pull("suzaku-config.silk");\r
111     }\r
112 \r
113     @Test\r
114     public void testExample() throws Exception\r
115     {\r
116         pull("example.silk");\r
117     }\r
118 \r
119     @Test\r
120     public void testMicroformat() throws Exception\r
121     {\r
122         pull("microformat.silk");\r
123     }\r
124 \r
125     @Test\r
126     public void testTab() throws Exception\r
127     {\r
128         pull("tab.silk");\r
129     }\r
130 \r
131     @Test\r
132     public void testJSON() throws Exception\r
133     {\r
134         pull("json.silk");\r
135     }\r
136 \r
137     @Test\r
138     public void testType() throws Exception\r
139     {\r
140         pull("type.silk");\r
141     }\r
142 \r
143     @Test\r
144     public void testLoad() throws Exception\r
145     {\r
146         pull("plugin/load-binary.silk");\r
147     }\r
148 \r
149     @Test\r
150     public void testBED() throws Exception\r
151     {\r
152         pull("sample.bed.silk");\r
153     }\r
154 \r
155 }\r