commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1151455 - in /commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/bm: BeiderMorseEncoderTest.java PhoneticEngineTest.java PhoneticTest.java
Date Wed, 27 Jul 2011 13:20:01 GMT
Author: ggregory
Date: Wed Jul 27 13:20:00 2011
New Revision: 1151455

URL: http://svn.apache.org/viewvc?rev=1151455&view=rev
Log:
[CODEC-125] Implement a Beider-Morse phonetic matching codec. Fix test method names.

Added:
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/bm/PhoneticEngineTest.java
      - copied, changed from r1151311, commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/bm/PhoneticTest.java
Removed:
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/bm/PhoneticTest.java
Modified:
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/bm/BeiderMorseEncoderTest.java

Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/bm/BeiderMorseEncoderTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/bm/BeiderMorseEncoderTest.java?rev=1151455&r1=1151454&r2=1151455&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/bm/BeiderMorseEncoderTest.java
(original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/bm/BeiderMorseEncoderTest.java
Wed Jul 27 13:20:00 2011
@@ -38,49 +38,49 @@ public class BeiderMorseEncoderTest exte
     }
 
     @Test(expected = IllegalStateException.class)
-    public void invalidLangResourceShouldRaiseException() {
+    public void testInvalidLangIllegalStateException() {
         Lang.loadFromResource("thisIsAMadeUpResourceName", Languages.instance(NameType.GENERIC));
     }
 
     @Test(expected = IllegalArgumentException.class)
-    public void invalidLangShouldRaiseException() {
+    public void testInvalidLangIllegalArgumentException() {
         Rule.instance(NameType.GENERIC, RuleType.APPROX, "noSuchLanguage");
     }
 
     @Test(expected = IllegalArgumentException.class)
-    public void invalidLanguageResourceShouldRaiseException() {
+    public void testInvalidLanguageIllegalArgumentException() {
         Languages.instance("thereIsNoSuchLanguage");
     }
 
     @Test(expected = IndexOutOfBoundsException.class)
-    public void negativeIndexForRuleMatchShouldRaiseException() {
+    public void testNegativeIndexForRuleMatchIndexOutOfBoundsException() {
         Rule r = new Rule("a", "", "", "", Collections.<String> emptySet(), "bob");
         r.patternAndContextMatches("bob", -1);
     }
 
     @Test
-    public void setConcat() {
+    public void testSetConcat() {
         BeiderMorseEncoder bmpm = new BeiderMorseEncoder();
         bmpm.setConcat(false);
         assertEquals("Should be able to set concat to false", false, bmpm.isConcat());
     }
 
     @Test
-    public void setNameTypeAsh() {
+    public void testSetNameTypeAsh() {
         BeiderMorseEncoder bmpm = new BeiderMorseEncoder();
         bmpm.setNameType(NameType.ASHKENAZI);
         assertEquals("Name type should have been set to ash", NameType.ASHKENAZI, bmpm.getNameType());
     }
 
     @Test
-    public void setRuleTypeExact() {
+    public void testSetRuleTypeExact() {
         BeiderMorseEncoder bmpm = new BeiderMorseEncoder();
         bmpm.setRuleType(RuleType.EXACT);
         assertEquals("Rule type should have been set to exact", RuleType.EXACT, bmpm.getRuleType());
     }
 
     @Test(expected = IllegalArgumentException.class)
-    public void setRuleTypeToRulesShouldRaiseException() {
+    public void testSetRuleTypeToRulesIllegalArgumentException() {
         BeiderMorseEncoder bmpm = new BeiderMorseEncoder();
         bmpm.setRuleType(RuleType.RULES);
     }

Copied: commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/bm/PhoneticEngineTest.java
(from r1151311, commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/bm/PhoneticTest.java)
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/bm/PhoneticEngineTest.java?p2=commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/bm/PhoneticEngineTest.java&p1=commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/bm/PhoneticTest.java&r1=1151311&r2=1151455&rev=1151455&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/bm/PhoneticTest.java
(original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/bm/PhoneticEngineTest.java
Wed Jul 27 13:20:00 2011
@@ -33,7 +33,7 @@ import org.junit.runners.Parameterized;
  * @since 2.0
  */
 @RunWith(Parameterized.class)
-public class PhoneticTest {
+public class PhoneticEngineTest {
 
     @Parameterized.Parameters
     public static List<Object[]> data() {
@@ -57,7 +57,7 @@ public class PhoneticTest {
     private final String phoneticExpected;
     private final RuleType ruleType;
 
-    public PhoneticTest(String name, String phoneticExpected, NameType nameType, RuleType
ruleType, boolean concat) {
+    public PhoneticEngineTest(String name, String phoneticExpected, NameType nameType, RuleType
ruleType, boolean concat) {
         this.name = name;
         this.phoneticExpected = phoneticExpected;
         this.nameType = nameType;



Mime
View raw message