package edu.grinnell.csc207.username.utils;

import static org.junit.Assert.*;

import org.junit.Test;

public class StringUtilsTest
{

  @Test
  public void
    test1 ()
  {
    assertArrayEquals (new String[] { "a", "b", "c" },
                       StringUtils.splitAt ("a:b:c", ':'));
  }
    @Test
    public void
      test2 ()
    {
    assertArrayEquals (new String[] { "a", "b", "c" },
                       StringUtils.splitAt ("a b c", ' '));
    }
    @Test
    public void
      test3 ()
    {
    assertArrayEquals (new String[] { "a:b:c" },
                       StringUtils.splitAt ("a:b:c", ' '));
    }
    @Test
    public void
      test4 ()
    {
    assertArrayEquals ("one field", new String[] { "a" },
                       StringUtils.splitAt ("a", ':'));
    }
    @Test
    public void
      test5 ()
    {
    assertArrayEquals ("empty inner field", new String[] { "a", "", "c" },
                       StringUtils.splitAt ("a::c", ':'));
    }
    @Test
    public void
      test6 ()
    {
    assertArrayEquals ("leading empty field", new String[] { "", "a" },
                       StringUtils.splitAt (":a", ':'));
    }
    @Test
    public void
      test7 ()
    {
    assertArrayEquals ("trailing empty field", new String[] { "a", "" },
                       StringUtils.splitAt ("a:", ':'));
    }
  }



@@ -77,32 +77,8 @@
 *;%0A%0A
-import org.junit.Test;%0A%0A
 publ
@@ -1314,12 +1314,693 @@
     %7D%0A  
+  %0A    @Test%0A    public void%0A      test8 () %0A    %7B%0A  assertEquals (%22e%22, StringUtils.deLeet (%223%22));%0A    %7D%0A    @Test%0A    public void%0A      test9 ()%0A    %7B%0A  assertEquals (%22leet%22, StringUtils.deLeet (%22133+%22));%0A    %7D%0A    @Test%0A    public void%0A      test10 ()%0A    %7B%0A  assertEquals (%22eat banana%22, StringUtils.deLeet (%223@+ %7C3@%7C%5C%5C%7C@%7C%5C%5C%7C@%22));%0A    %7D%0A    @Test%0A    public void%0A      test11 ()%0A    %7B%0A    assertEquals (BigInteger.valueOf (0), Calculator.eval0 (%220%22));%0A    assertEquals (BigInteger.valueOf (2), Calculator.eval0 (%221 + 1%22));%0A    assertEquals (BigInteger.valueOf (4), Calculator.eval0 (%221 + 2 + 1%22));%0A    assertEquals (BigInteger.valueOf (9), Calculator.eval0 (%221 + 2 * 3%22));%0A    %7D%0A
 %7D%0A%0A%0A

Update StringUtilsTest.java