Skip to content

Commit efe0945

Browse files
committed
Add comments to make the test better comprehensible.
1 parent 2cdfd69 commit efe0945

File tree

1 file changed

+28
-23
lines changed

1 file changed

+28
-23
lines changed

src/test/java/org/culturegraph/mf/morph/functions/NormalizeUTF8Test.java

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,31 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.culturegraph.mf.morph.functions;
17-
18-
import static org.junit.Assert.assertEquals;
19-
20-
import org.culturegraph.mf.morph.functions.NormalizeUTF8;
21-
import org.junit.Test;
22-
23-
24-
/**
25-
* @author Christoph Böhme <[email protected]>
26-
*
27-
*/
28-
public final class NormalizeUTF8Test {
29-
30-
private static final String INPUT_STR = "Bauer, Sigmund: Über den Einfluß der Ackergeräthe auf den Reinertrag.";
31-
private static final String OUTPUT_STR = "Bauer, Sigmund: Über den Einfluß der Ackergeräthe auf den Reinertrag.";
32-
33-
@Test
34-
public void testProcess() {
35-
final NormalizeUTF8 normalize = new NormalizeUTF8();
36-
assertEquals("Normalization incorrect", OUTPUT_STR, normalize.process(INPUT_STR));
37-
}
38-
}
16+
package org.culturegraph.mf.morph.functions;
17+
18+
import static org.junit.Assert.assertEquals;
19+
20+
import org.culturegraph.mf.morph.functions.NormalizeUTF8;
21+
import org.junit.Test;
22+
23+
24+
/**
25+
* @author Christoph Böhme <[email protected]>
26+
*
27+
*/
28+
public final class NormalizeUTF8Test {
29+
30+
// The umlauts in this string are composed of two characters (u and ", e.g.):
31+
private static final String INPUT_STR =
32+
"Bauer, Sigmund: Über den Einfluß der Ackergeräthe auf den Reinertrag.";
33+
34+
// The umlauts in this string are individual characters:
35+
private static final String OUTPUT_STR =
36+
"Bauer, Sigmund: Über den Einfluß der Ackergeräthe auf den Reinertrag.";
37+
38+
@Test
39+
public void testProcess() {
40+
final NormalizeUTF8 normalize = new NormalizeUTF8();
41+
assertEquals("Normalization incorrect", OUTPUT_STR, normalize.process(INPUT_STR));
42+
}
43+
}

0 commit comments

Comments
 (0)