1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package helper;
import com.yanzuoguang.util.helper.CalcHelper;
import com.yanzuoguang.util.helper.StringHelper;
import org.junit.Test;
public class TestGetFirst {
@Test
public void testDouble() {
Double statementMoney = -0D;
Double zero = 0D;
Double first = StringHelper.getFirst(statementMoney);
Double zeroTo = StringHelper.getFirst(zero);
System.out.println(first.equals(zeroTo));
}
@Test
public void testDouble1() {
double first = 0;
double retValue = 0;
System.out.println(CalcHelper.sub(first,retValue));
}
@Test
public void testFloat() {
Float statementMoney = -0f;
Float zero = 0f;
Float first = StringHelper.getFirst(statementMoney);
Float zeroTo = StringHelper.getFirst(zero);
System.out.println(first.equals(zeroTo));
}
@Test
public void testInt() {
Integer statementMoney = -0;
Integer zero = 0;
Integer first = StringHelper.getFirst(statementMoney);
Integer zeroTo = StringHelper.getFirst(zero);
System.out.println(first.equals(zeroTo));
}
@Test
public void testBoolean() {
Boolean first = StringHelper.getFirst(false);
System.out.println(first);
}
}