package com.karateca.jstoolbox.dashcamel;

import org.junit.Test;

import static org.junit.Assert.*;

public class CaseHelperTest {
  @Test
  public void shouldTransformToCamelCase() {
    assertEquals("oneTwoThree", CaseHelper.toCamelCase("one-two-three"));
    assertEquals("one", CaseHelper.toCamelCase("one"));
  }

  @Test
  public void shouldTransformEmptyString() {
    assertEquals("", CaseHelper.toCamelCase(""));
  }

  @Test
  public void shouldAcceptSpaces() {
    assertEquals("oneTwoThree", CaseHelper.toCamelCase("one two-three"));
    assertEquals("oneTwoThree", CaseHelper.toCamelCase("one  two-three"));
  }

  @Test
  public void shouldAcceptMultipleDashes() {
    assertEquals("oneTwoThreeee", CaseHelper.toCamelCase("one--two---threeee  "));
    assertEquals("oneTwoThreeee", CaseHelper.toCamelCase("---one--two---threeee---"));
  }

  @Test
  public void shouldCorrectUpperCase() {
    assertEquals("oneTwoThree", CaseHelper.toCamelCase("ONE-TWO-THREE"));
  }
}
@@ -304,28 +304,80 @@
 se(%22one%22));%0A
+    assertEquals(%22o%22, CaseHelper.toCamelCase(%22o%22));%0A
   %7D%0A
-
 %0A  @Test%0A  p
@@ -663,24 +663,104 @@
 o-three%22));%0A
+    assertEquals(%22x%22, CaseHelper.toCamelCase(%22          x        -- - - -  %22));%0A
   %7D%0A%0A  @Test
@@ -1021,32 +1021,32 @@
 ctUpperCase() %7B%0A
-
     assertEquals
@@ -1106,10 +1106,130 @@
 %22));%0A  %7D
+%0A%0A  @Test%0A  public void shouldTransformCamelToDash() %7B%0A    assertEquals(%22one-two%22, CaseHelper.toDashCase(%22oneTwo%22));%0A  %7D
 %0A%7D

Add test for dash case