Skip to content

Commit e3c073d

Browse files
committed
Added a test case for null results
1 parent 6fa1b2b commit e3c073d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

jcalc/src/test/java/cu/lt/joe/jcalc/JCalcTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
package cu.lt.joe.jcalc;
22

33
import static org.junit.jupiter.api.Assertions.assertEquals;
4+
import static org.junit.jupiter.api.Assertions.assertNull;
45
import static org.junit.jupiter.api.Assertions.assertThrows;
56
import org.junit.jupiter.api.Test;
67
import org.junit.jupiter.params.ParameterizedTest;
78
import org.junit.jupiter.params.provider.CsvFileSource;
89

910
public class JCalcTest
1011
{
12+
@Test
13+
void testNullResult()
14+
{
15+
assertNull(JCalc.solveMathExpression(null));
16+
}
17+
1118
@Test
1219
void testIllegalArgumentException()
1320
{

0 commit comments

Comments
 (0)