how can I write a test case to compare infinity value?

Viewed 108

how can I write a test case to compare infinity value. Example 10/0.0 results infinity how can i write following for it

assertThat(<**what will be here?**>).isCloseTo(10/0.0);
1 Answers

How about

assertTrue(Double.isInfinite(10/0.0))
Related