Example #1
0
 @Test
 public void testInitialize() {
   Labels.initialize(new Locale("en"));
   Object oldInternalInstance = Labels.getInstance();
   Labels.initialize(new Locale("ee"));
   assertFalse(oldInternalInstance == Labels.getInstance());
 }
Example #2
0
 @Test
 public void testImageAsStream() throws IOException {
   InputStream stream = Labels.getInstance().getImageAsStream("button.start.img");
   // Now check the first bytes of GIF image header
   stream.read();
   assertEquals((int) 'P', stream.read());
   assertEquals((int) 'N', stream.read());
   assertEquals((int) 'G', stream.read());
   stream.close();
 }