|
|
@ -1,5 +1,6 @@ |
|
|
|
package com.fanruan.api.util; |
|
|
|
package com.fanruan.api.util; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.junit.Assert; |
|
|
|
import org.junit.Test; |
|
|
|
import org.junit.Test; |
|
|
|
|
|
|
|
|
|
|
|
import static org.junit.Assert.*; |
|
|
|
import static org.junit.Assert.*; |
|
|
@ -26,4 +27,13 @@ public class StringKitTest { |
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void isNotBlank() { |
|
|
|
public void isNotBlank() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void trim(){ |
|
|
|
|
|
|
|
String stringHaveBlank = " abc "; |
|
|
|
|
|
|
|
String stringWithoutBlank = "abc"; |
|
|
|
|
|
|
|
String blankString = " "; |
|
|
|
|
|
|
|
Assert.assertEquals(StringKit.trim(stringHaveBlank), "abc"); |
|
|
|
|
|
|
|
Assert.assertEquals(StringKit.trim(stringWithoutBlank), "abc"); |
|
|
|
|
|
|
|
Assert.assertEquals(StringKit.trim(blankString), ""); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |