factorial-story Pub Share

Factorial example

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)


Was this useful?    

By: Razie | 2019-06-01 .. 2022-06-16 | Tags: story , dsl


Viewed 836 times ( | History | Print ) this page.

You need to log in to post a comment!

© Copyright DieselApps, 2012-2024, all rights reserved.