JAL-653 GFF new/refactored helper classes
[jalview.git] / test / jalview / util / StringUtilsTest.java
index 0b776d1..dc2555b 100644 (file)
@@ -27,7 +27,6 @@ import static org.testng.AssertJUnit.assertTrue;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
-import java.util.Map;
 
 import org.testng.annotations.Test;
 
@@ -132,46 +131,6 @@ public class StringUtilsTest
     { "a", "b*c", "cde" }, "*"));
   }
 
-  /**
-   * Test the method that parses lines like <br>
-   * ID=2345;Name=Something;
-   */
-  @Test(groups = { "Functional" })
-  public void testParseNameValuePairs()
-  {
-    char[] separators = new char[] { ' ' };
-    assertTrue(StringUtils.parseNameValuePairs(null, ";", separators)
-            .isEmpty());
-    assertTrue(StringUtils.parseNameValuePairs("", ";", separators)
-            .isEmpty());
-    assertTrue(StringUtils.parseNameValuePairs("hello=world", ";",
-            separators).isEmpty());
-
-    Map<String, List<String>> map = StringUtils.parseNameValuePairs(
-            "hello world", ";", separators);
-    assertEquals(1, map.size());
-    assertEquals(1, map.get("hello").size());
-    assertEquals("world", map.get("hello").get(0));
-
-    separators = new char[] { ' ', '=' };
-    map = StringUtils
-            .parseNameValuePairs(
-                    "Method= manual curation ;nothing; Notes F2=S ; Notes=Metal; Type=",
-                    ";", separators);
-
-    // Type is ignored as no value was supplied
-    assertEquals(2, map.size());
-
-    // equals separator used ahead of space separator:
-    assertEquals(1, map.get("Method").size());
-    assertEquals("manual curation", map.get("Method").get(0)); // trimmed
-
-    assertEquals(2, map.get("Notes").size());
-    // space separator used ahead of equals separator
-    assertEquals("F2=S", map.get("Notes").get(0));
-    assertEquals("Metal", map.get("Notes").get(1));
-  }
-
   @Test(groups = { "Functional" })
   public void testListToDelimitedString()
   {