Report for lv.id.jc.workscope.SideTest


Summary:

Created on Tue Oct 25 14:34:33 UTC 2022 by runner
Executed features Passed Failures Errors Skipped Success rate Time
2 2 0 0 0 100.0% 0.031 seconds
Side of surface
a positive number representing the side of the surface

Features:

should create an instance of Side class for a positive number Return
(0.001 seconds)
When:
we create a side using a positive real number
def side = Side.of(value as double)
Then:
no exceptions are thrown
notThrown IllegalArgumentException
And:
we get an object of type side
side instanceof Side
And:
this object can be used as a regular high precision number
side instanceof BigDecimal
Examples:
value
1 OK (0.001 seconds)
0.001 OK (0)
4.9E-324 OK (0)
38 OK (0)
1.7976931348623157E308 OK (0)
5/5 passed
should throw an exception for a negative or zero number Return
(0.002 seconds)
When:
we are trying to create a side using a negative number or zero
def side = Side.of(value)
Then:
we cannot create this object and an exception is thrown
def message = thrown IllegalArgumentException
And:
the error message indicates the reason for the exception
message =~ "must be a positive"
Examples:
value
0.0 OK (0.001 seconds)
-4.9E-324 OK (0.001 seconds)
-0.001 OK (0)
-97 OK (0)
4/4 passed