1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.student.common.test.util;
17
18
19 import static org.junit.Assert.*;
20
21
22
23
24
25 public class FloatAsStringTester {
26
27
28
29
30 public FloatAsStringTester() {
31 }
32
33 public void check(String expected, String actual) {
34
35 if (expected == null && actual == null) {
36 return;
37 }
38 if (expected == null) {
39 fail("expected null but found " + actual);
40 }
41 if (actual == null) {
42 fail("expected " + expected + " but found null");
43 }
44 Float expFloat = Float.parseFloat(expected);
45 Float actFloat = Float.parseFloat(actual);
46 assertEquals(expFloat, actFloat);
47 }
48 }