Acceptance tests for factorial:
0! is 1
send::
msg sample.factorial (n:Number=0
)
expect:: (payload == 1
)
1! is 1
send::
msg sample.factorial (n:Number=1
)
expect:: (payload == 1
)
5! is 120
send::
msg sample.factorial (n:Number=5
)
expect:: (payload == 120
)
You need to log in to post a comment!