source: josm/trunk/test/unit/org/openstreetmap/josm/tools/I18nTest.java@ 17360

Last change on this file since 17360 was 17275, checked in by Don-vip, 3 years ago

see #16567 - upgrade almost all tests to JUnit 5, except those depending on WiremockRule

See https://github.com/tomakehurst/wiremock/issues/684

  • Property svn:eol-style set to native
File size: 499 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.tools;
3
4import static org.junit.jupiter.api.Assertions.assertEquals;
5
6import org.junit.jupiter.api.Test;
7
8/**
9 * Unit tests of {@link I18n}.
10 */
11class I18nTest {
12
13 /**
14 * Unit test of {@link I18n#escape}.
15 */
16 @Test
17 void testEscape() {
18 String foobar = "{foo'bar}";
19 assertEquals("'{'foo''bar'}'", I18n.escape(foobar));
20 assertEquals(foobar, I18n.tr(I18n.escape(foobar)));
21 }
22}
Note: See TracBrowser for help on using the repository browser.