Ignore:
Timestamp:
2014-02-24T17:49:12+01:00 (10 years ago)
Author:
Don-vip
Message:

javadoc/code style/minor refactorization

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

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/tools/TextTagParserTest.java

    r6471 r6881  
    1010import org.junit.Test;
    1111import org.openstreetmap.josm.Main;
    12 import org.openstreetmap.josm.data.Preferences;
    1312
    1413public class TextTagParserTest {
     14
     15    /**
     16     * Setup test.
     17     */
    1518    @BeforeClass
    16     public static void before() {
     19    public static void setUp() {
    1720        Main.initApplicationPreferences();
    1821    }
     
    2629        s = "\"2 \\\"3\\\" 4\"";       s1 = "2 \"3\" 4";
    2730        Assert.assertEquals(s1, TextTagParser.unescape(s));
    28        
     31
    2932        s = "\"2 3 ===4===\"";       s1 = "2 3 ===4===";
    3033        Assert.assertEquals(s1, TextTagParser.unescape(s));
     
    3336        Assert.assertEquals(s1, TextTagParser.unescape(s));
    3437    }
    35    
     38
    3639    @Test
    3740    public void testTNformat() {
     
    6366        tags = TextTagParser.readTagsFromText(txt);
    6467        Assert.assertEquals(correctTags, tags);
    65        
     68
    6669        txt = "\"a\"  :     \"1 1 1\", \"b2\"  :\"2 \\\"3 qwe\\\" 4\"";
    6770        correctTags= new HashMap<String, String>() { { put("a", "1 1 1"); put("b2", "2 \"3 qwe\" 4");}};
    6871        tags = TextTagParser.readTagsFromText(txt);
    6972        Assert.assertEquals(correctTags, tags);
    70        
     73
    7174        txt = " \"aыыы\"   :    \"val\\\"\\\"\\\"ue1\"";
    7275        correctTags= new HashMap<String, String>() { { put("aыыы", "val\"\"\"ue1");} };
     
    7477        Assert.assertEquals(correctTags, tags);
    7578    }
    76    
     79
    7780    @Test
    7881    public void testFreeformat() {
     
    8487        Assert.assertEquals(correctTags, tags);
    8588    }
    86    
     89
    8790    @Test
    8891    public void errorDetect() {
     
    9093        Map<String, String> tags = TextTagParser.readTagsFromText(txt);
    9194        Assert.assertEquals(Collections.EMPTY_MAP, tags);
    92        
     95
    9396    }
    9497}
  • trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateEngineTest.java

    r6471 r6881  
    1919public class TemplateEngineTest {
    2020
     21    /**
     22     * Setup test.
     23     */
    2124    @BeforeClass
    22     public static void before() {
     25    public static void setUp() {
    2326        Main.initApplicationPreferences();
    2427    }
Note: See TracChangeset for help on using the changeset viewer.