|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.fanruan.api.util; |
|
|
|
|
|
|
|
|
|
import org.junit.Assert; |
|
|
|
|
import org.junit.Test; |
|
|
|
|
|
|
|
|
|
import static org.junit.Assert.*; |
|
|
|
@ -26,4 +27,13 @@ public class StringKitTest {
|
|
|
|
|
@Test |
|
|
|
|
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), ""); |
|
|
|
|
} |
|
|
|
|
} |