2121import static org .junit .jupiter .api .Assertions .assertTrue ;
2222
2323import org .apache .commons .codec .AbstractStringEncoderTest ;
24- import org .apache .commons .codec .EncoderException ;
2524import org .junit .jupiter .api .Test ;
2625
2726/**
@@ -83,10 +82,9 @@ public void testDan() {
8382 /**
8483 * Tests data gathered from around the internet.
8584 *
86- * @see <a href="http://www.dropby.com/NYSIISTextStrings.html">http://www.dropby.com/NYSIISTextStrings.html</a>
87- * @throws EncoderException for some failure scenarios */
85+ * @see <a href="http://www.dropby.com/NYSIISTextStrings.html">http://www.dropby.com/NYSIISTextStrings.html</a>*/
8886 @ Test
89- public void testDropBy () throws EncoderException {
87+ public void testDropBy () {
9088 // Explanation of differences between this implementation and the one at dropby.com is
9189 // prepended to the test string. The referenced rules refer to the outlined steps the
9290 // class description for Nysiis.
@@ -149,11 +147,9 @@ public void testFal() {
149147 }
150148
151149 /**
152- * Tests data gathered from around the internets.
153- *
154- * @throws EncoderException for some failure scenarios */
150+ * Tests data gathered from around the internets.*/
155151 @ Test
156- public void testOthers () throws EncoderException {
152+ public void testOthers () {
157153 this .assertEncodings (
158154 new String [] { "O'Daniel" , "ODANAL" },
159155 new String [] { "O'Donnel" , "ODANAL" },
@@ -165,11 +161,9 @@ public void testOthers() throws EncoderException {
165161 }
166162
167163 /**
168- * Tests rule 1: Translate first characters of name: MAC → MCC, KN → N, K → C, PH, PF → FF, SCH → SSS
169- *
170- * @throws EncoderException for some failure scenarios */
164+ * Tests rule 1: Translate first characters of name: MAC → MCC, KN → N, K → C, PH, PF → FF, SCH → SSS*/
171165 @ Test
172- public void testRule1 () throws EncoderException {
166+ public void testRule1 () {
173167 this .assertEncodings (
174168 new String [] { "MACX" , "MCX" },
175169 new String [] { "KNX" , "NX" },
@@ -180,11 +174,9 @@ public void testRule1() throws EncoderException {
180174 }
181175
182176 /**
183- * Tests rule 2: Translate last characters of name: EE → Y, IE → Y, DT, RT, RD, NT, ND → D
184- *
185- * @throws EncoderException for some failure scenarios */
177+ * Tests rule 2: Translate last characters of name: EE → Y, IE → Y, DT, RT, RD, NT, ND → D*/
186178 @ Test
187- public void testRule2 () throws EncoderException {
179+ public void testRule2 () {
188180 this .assertEncodings (
189181 new String [] { "XEE" , "XY" },
190182 new String [] { "XIE" , "XY" },
@@ -196,11 +188,9 @@ public void testRule2() throws EncoderException {
196188 }
197189
198190 /**
199- * Tests rule 4.1: EV → AF else A, E, I, O, U → A
200- *
201- * @throws EncoderException for some failure scenarios */
191+ * Tests rule 4.1: EV → AF else A, E, I, O, U → A*/
202192 @ Test
203- public void testRule4Dot1 () throws EncoderException {
193+ public void testRule4Dot1 () {
204194 this .assertEncodings (
205195 new String [] { "XEV" , "XAF" },
206196 new String [] { "XAX" , "XAX" },
@@ -211,45 +201,37 @@ public void testRule4Dot1() throws EncoderException {
211201 }
212202
213203 /**
214- * Tests rule 4.2: Q → G, Z → S, M → N
215- *
216- * @throws EncoderException for some failure scenarios */
204+ * Tests rule 4.2: Q → G, Z → S, M → N*/
217205 @ Test
218- public void testRule4Dot2 () throws EncoderException {
206+ public void testRule4Dot2 () {
219207 this .assertEncodings (
220208 new String [] { "XQ" , "XG" },
221209 new String [] { "XZ" , "X" },
222210 new String [] { "XM" , "XN" });
223211 }
224212
225213 /**
226- * Tests rule 5: If last character is S, remove it.
227- *
228- * @throws EncoderException for some failure scenarios */
214+ * Tests rule 5: If last character is S, remove it.*/
229215 @ Test
230- public void testRule5 () throws EncoderException {
216+ public void testRule5 () {
231217 this .assertEncodings (
232218 new String [] { "XS" , "X" },
233219 new String [] { "XSS" , "X" });
234220 }
235221
236222 /**
237- * Tests rule 6: If last characters are AY, replace with Y.
238- *
239- * @throws EncoderException for some failure scenarios */
223+ * Tests rule 6: If last characters are AY, replace with Y.*/
240224 @ Test
241- public void testRule6 () throws EncoderException {
225+ public void testRule6 () {
242226 this .assertEncodings (
243227 new String [] { "XAY" , "XY" },
244228 new String [] { "XAYS" , "XY" }); // Rules 5, 6
245229 }
246230
247231 /**
248- * Tests rule 7: If last character is A, remove it.
249- *
250- * @throws EncoderException for some failure scenarios */
232+ * Tests rule 7: If last character is A, remove it.*/
251233 @ Test
252- public void testRule7 () throws EncoderException {
234+ public void testRule7 () {
253235 this .assertEncodings (
254236 new String [] { "XA" , "X" },
255237 new String [] { "XAS" , "X" }); // Rules 5, 7
0 commit comments