Package barrysoft.application.tests

Source Code of barrysoft.application.tests.LocalizationTest

package barrysoft.application.tests;

import static org.junit.Assert.fail;

import java.util.Hashtable;

import org.junit.Test;

import barrysoft.localization.Localization;

public class LocalizationTest {

  @Test
  public void testLocalization() {
   
    Localization localization = new Localization();
   
    Hashtable<String, String> values = new Hashtable<String, String>();
   
    values.put("TEST1", "This is a string[br]yeah");
   
    localization.addLocalization("English", values);
    localization.setCurrentLocalization("English");
   
    String t = localization.getLocalized("TEST1");
   
    if (t.lastIndexOf('\n') == -1)
      fail("Can't find new line");

   
  }
 
}
TOP

Related Classes of barrysoft.application.tests.LocalizationTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.