Ignore:
Timestamp:
2015-10-22T02:01:00+02:00 (9 years ago)
Author:
Don-vip
Message:

javadoc fixes

Location:
trunk/test/unit/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/UnconnectedWaysTest.java

    r7937 r8926  
    66
    77import java.io.FileInputStream;
     8import java.io.FileNotFoundException;
     9import java.io.IOException;
    810import java.io.InputStream;
    911
     
    1315import org.openstreetmap.josm.data.osm.DataSet;
    1416import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
     17import org.openstreetmap.josm.io.IllegalDataException;
    1518import org.openstreetmap.josm.io.OsmReader;
    1619
     20/**
     21 * Unit tests of {@code UnconnectedWays} class.
     22 */
    1723public class UnconnectedWaysTest {
    1824
    19     UnconnectedWays bib;
     25    private UnconnectedWays bib;
    2026
    2127    /**
    2228     * Setup test.
     29     * @throws Exception if the test cannot be initialized
    2330     */
    2431    @Before
     
    3037    }
    3138
     39    /**
     40     * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/6313">Bug #6313</a>.
     41     * @throws IOException if any I/O error occurs
     42     * @throws IllegalDataException if the OSM data cannot be parsed
     43     * @throws FileNotFoundException if the data file cannot be found
     44     */
    3245    @Test
    33     public void testTicket6313() throws Exception {
     46    public void testTicket6313() throws IOException, IllegalDataException, FileNotFoundException {
    3447        try (InputStream fis = new FileInputStream("data_nodist/UnconnectedWaysTest.osm")) {
    3548            final DataSet ds = OsmReader.parseDataSet(fis, NullProgressMonitor.INSTANCE);
  • trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateEngineTest.java

    r8857 r8926  
    3030    }
    3131
     32    /**
     33     * Test to parse an empty string.
     34     * @throws ParseError if the template cannot be parsed
     35     */
    3236    @Test
    3337    public void testEmpty() throws ParseError {
     
    3640    }
    3741
     42    /**
     43     * Test to parse a variable.
     44     * @throws ParseError if the template cannot be parsed
     45     */
    3846    @Test
    3947    public void testVariable() throws ParseError {
     
    4351    }
    4452
     53    /**
     54     * Test to parse a condition with whitespaces.
     55     * @throws ParseError if the template cannot be parsed
     56     */
    4557    @Test
    4658    public void testConditionWhitespace() throws ParseError {
     
    5365    }
    5466
     67    /**
     68     * Test to parse a condition without whitespace.
     69     * @throws ParseError if the template cannot be parsed
     70     */
    5571    @Test
    5672    public void testConditionNoWhitespace() throws ParseError {
     
    6379    }
    6480
    65     private static Match compile(String expression) throws org.openstreetmap.josm.actions.search.SearchCompiler.ParseError {
     81    private static Match compile(String expression) throws SearchCompiler.ParseError {
    6682        return SearchCompiler.compile(expression);
    6783    }
    6884
    69     @Test
    70     public void testConditionSearchExpression() throws Exception {
     85    /**
     86     * Test to parse a search expression condition.
     87     * @throws ParseError if the template cannot be parsed
     88     * @throws SearchCompiler.ParseError if an error has been encountered while compiling
     89     */
     90    @Test
     91    public void testConditionSearchExpression() throws ParseError, SearchCompiler.ParseError {
    7192        TemplateParser parser = new TemplateParser("?{ admin_level = 2 'NUTS 1' | admin_level = 4 'NUTS 2' |  '{admin_level}'}");
    7293        Condition condition = new Condition();
     
    108129    };
    109130
    110     @Test
    111     public void testFilling() throws Exception {
     131    /**
     132     * Test to fill a template.
     133     * @throws ParseError if the template cannot be parsed
     134     */
     135    @Test
     136    public void testFilling() throws ParseError {
    112137        TemplateParser parser = new TemplateParser("{name} u{unknown}u i{number}i");
    113138        TemplateEntry entry = parser.parse();
     
    117142    }
    118143
    119     @Test
    120     public void testFillingSearchExpression() throws Exception {
     144    /**
     145     * Test to parse a search expression.
     146     * @throws ParseError if the template cannot be parsed
     147     */
     148    @Test
     149    public void testFillingSearchExpression() throws ParseError {
    121150        TemplateParser parser = new TemplateParser("?{ admin_level = 2 'NUTS 1' | admin_level = 4 'NUTS 2' |  '{admin_level}'}");
    122151        TemplateEntry templateEntry = parser.parse();
     
    134163    }
    135164
    136     @Test
    137     public void testPrintAll() throws Exception {
     165    /**
     166     * Test to print all.
     167     * @throws ParseError if the template cannot be parsed
     168     */
     169    @Test
     170    public void testPrintAll() throws ParseError {
    138171        TemplateParser parser = new TemplateParser("{special:everything}");
    139172        TemplateEntry entry = parser.parse();
     
    143176    }
    144177
    145     @Test
    146     public void testPrintMultiline() throws Exception {
     178    /**
     179     * Test to print on several lines.
     180     * @throws ParseError if the template cannot be parsed
     181     */
     182    @Test
     183    public void testPrintMultiline() throws ParseError {
    147184        TemplateParser parser = new TemplateParser("{name}\\n{number}");
    148185        TemplateEntry entry = parser.parse();
     
    152189    }
    153190
    154     @Test
    155     public void testSpecialVariable() throws Exception {
     191    /**
     192     * Test to print special variables.
     193     * @throws ParseError if the template cannot be parsed
     194     */
     195    @Test
     196    public void testSpecialVariable() throws ParseError {
    156197        TemplateParser parser = new TemplateParser("{name}u{special:localName}u{special:special:key}");
    157198        TemplateEntry templateEntry = parser.parse();
     
    169210    }
    170211
    171     @Test
    172     public void testSwitchContext() throws Exception {
     212    /**
     213     * Test to switch context.
     214     * @throws ParseError if the template cannot be parsed
     215     */
     216    @Test
     217    public void testSwitchContext() throws ParseError {
    173218        TemplateParser parser = new TemplateParser("!{parent() type=parent2 '{name}'}");
    174219        DatasetFactory ds = new DatasetFactory();
     
    208253        parent1.addMember(new RelationMember("", child2));
    209254        parent2.addMember(new RelationMember("", child2));
    210 
    211255
    212256        StringBuilder sb = new StringBuilder();
Note: See TracChangeset for help on using the changeset viewer.