|
1 | 1 | package fr.free.nrw.commons;
|
2 |
| -import org.junit.Test; |
3 | 2 |
|
4 | 3 | import static org.hamcrest.CoreMatchers.is;
|
5 |
| -import static org.junit.Assert.*; |
6 | 4 |
|
| 5 | +import org.junit.Assert; |
| 6 | +import org.junit.Test; |
7 | 7 |
|
8 | 8 | public class UtilsTest {
|
9 |
| - |
10 |
| - @Test public void fixExtensionJpegToJpeg() { |
11 |
| - assertThat(Utils.fixExtension("SampleFile.jpeg", "jpeg"), is("SampleFile.jpg")); |
12 |
| - } |
13 |
| - |
14 |
| - @Test public void fixExtensionJpegToJpg() { |
15 |
| - assertThat(Utils.fixExtension("SampleFile.JPEG", null), is("SampleFile.jpg")); |
16 |
| - } |
17 |
| - |
18 |
| - @Test public void fixExtensionNull() { |
19 |
| - assertThat(Utils.fixExtension("SampleFile.jpeg", "JPEG"), is("SampleFile.jpg")); |
20 |
| - } |
21 |
| - |
22 |
| - @Test public void fixExtensionJpgToJpeg() { |
23 |
| - assertThat(Utils.fixExtension("SampleFile.jpg", "jpeg"), is("SampleFile.jpg")); |
24 |
| - } |
25 |
| - |
26 |
| - @Test public void fixExtensionJpgToJpg() { |
27 |
| - assertThat(Utils.fixExtension("SampleFile.jpg", "jpg"), is("SampleFile.jpg")); |
28 |
| - } |
29 |
| - |
30 |
| - @Test public void fixExtensionPngToPng() { |
31 |
| - assertThat(Utils.fixExtension("SampleFile.png", "png"), is("SampleFile.png")); |
32 |
| - } |
33 |
| - |
34 |
| - @Test public void fixExtensionEmptyToJpg() { |
35 |
| - assertThat(Utils.fixExtension("SampleFile", "jpg"), is("SampleFile.jpg")); |
36 |
| - } |
37 |
| - |
38 |
| - @Test public void fixExtensionEmptyToJpeg() { |
39 |
| - assertThat(Utils.fixExtension("SampleFile", "jpeg"), is("SampleFile.jpg")); |
40 |
| - } |
41 |
| - |
42 |
| - @Test public void fixExtensionJpgNotExtension() { |
43 |
| - assertThat(Utils.fixExtension("SAMPLEjpg", "jpg"), is("SAMPLEjpg.jpg")); |
44 |
| - } |
45 |
| - |
46 |
| - @Test public void fixExtensionJpegNotExtension() { |
47 |
| - assertThat(Utils.fixExtension("SAMPLE.jpeg.SAMPLE", "jpg"), is("SAMPLE.jpeg.SAMPLE.jpg")); |
48 |
| - } |
49 |
| - |
50 | 9 | @Test public void stripLocalizedStringPass() {
|
51 |
| - assertThat(Utils.stripLocalizedString("Hello"), is("Hello")); |
| 10 | + Assert.assertThat(Utils.stripLocalizedString("Hello"), is("Hello")); |
52 | 11 | }
|
53 | 12 |
|
54 | 13 | @Test public void stripLocalizedStringJa() {
|
55 |
| - assertThat(Utils.stripLocalizedString("\"こんにちは\"@ja"), is("こんにちは")); |
| 14 | + Assert.assertThat(Utils.stripLocalizedString("\"こんにちは\"@ja"), is("こんにちは")); |
56 | 15 | }
|
57 | 16 | }
|
0 commit comments