Ignore:
Timestamp:
2016-09-05T01:10:07+02:00 (10 years ago)
Author:
Don-vip
Message:

improve unit tests

File:
1 edited

Legend:

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

    r10899 r10962  
    33
    44import static org.junit.Assert.assertEquals;
     5import static org.junit.Assert.assertNotNull;
    56import static org.junit.Assert.assertNull;
    67import static org.junit.Assert.assertTrue;
    78
    89import java.util.Collection;
     10
     11import javax.swing.UIManager;
    912
    1013import org.junit.BeforeClass;
     
    6770        assertTrue(warnings.contains("W: First line of warning message on several lines"));
    6871    }
     72
     73    /**
     74     * Unit test of {@link Main#preConstructorInit}.
     75     */
     76    @Test
     77    public void testPreConstructorInit() {
     78        Main.preConstructorInit();
     79        assertNotNull(Main.getProjection());
     80        assertEquals(Main.pref.get("laf", Main.platform.getDefaultStyle()), UIManager.getLookAndFeel().getClass().getCanonicalName());
     81        assertNotNull(Main.toolbar);
     82    }
    6983}
Note: See TracChangeset for help on using the changeset viewer.