garydgregory commented on code in PR #220:
URL: https://github.com/apache/commons-codec/pull/220#discussion_r1404620116
##########
src/test/java/org/apache/commons/codec/language/MatchRatingApproachEncoderTest.java:
##########
@@ -519,4 +520,34 @@ public final void
testRemoveVowel_ALESSANDRA_Returns_ALSSNDR() {
// ***** END REGION - TEST GET MRA COMPARISONS
+ // ***** BEGIN REGION - TEST INVALID STRING *****
Review Comment:
Noise comment, remove it please.
##########
src/test/java/org/apache/commons/codec/language/MatchRatingApproachEncoderTest.java:
##########
@@ -519,4 +520,34 @@ public final void
testRemoveVowel_ALESSANDRA_Returns_ALSSNDR() {
// ***** END REGION - TEST GET MRA COMPARISONS
+ // ***** BEGIN REGION - TEST INVALID STRING *****
+
+ @Test
+ public final void testPunctuationOnly() {
+ assertDoesNotThrow(() -> {
+ String expected = "";
+ String result = this.getStringEncoder().encode(".,-");
+ assertEquals(result, expected);
+ });
+ }
+
+ @Test
+ public final void testVowelOnly() {
+ assertDoesNotThrow(() -> {
+ String expected = "A";
+ String result = this.getStringEncoder().encode("aeiouAEIOU");
+ assertEquals(result, expected);
+ });
+ }
+
+ @Test
+ public final void testVowelAndPunctuationOnly() {
+ assertDoesNotThrow(() -> {
+ String expected = "U";
+ String result = this.getStringEncoder().encode("uoiea.,-AEIOU");
+ assertEquals(result, expected);
+ });
+ }
+
+ // ***** END REGION - TEST INVALID STRING *****
Review Comment:
Noise comment, remove it please.
##########
src/test/java/org/apache/commons/codec/language/MatchRatingApproachEncoderTest.java:
##########
@@ -519,4 +520,34 @@ public final void
testRemoveVowel_ALESSANDRA_Returns_ALSSNDR() {
// ***** END REGION - TEST GET MRA COMPARISONS
+ // ***** BEGIN REGION - TEST INVALID STRING *****
+
+ @Test
+ public final void testPunctuationOnly() {
+ assertDoesNotThrow(() -> {
+ String expected = "";
Review Comment:
No need for local vars, block, or does not throw api in single assert
method. I've already commented on this in a separate PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]