Test & Suite Lifecycle
Under Construction
This page is under construction and may contain incomplete or incorrect information.
Functional Approach to Tests
Developers familiar with existing testing frameworks like XUnit and NUnit will notice some key differences:
- The familiar
Assert
has been replaced bynew Fact()
or a collection ofShouldly
style assertion helpers - Test methods return
Fact
in the case of single synchronous test result andTask<Fact>
when the single result is asynchronous
ZeUnit borrows a lot from functional programming, and requires that functions return results. In our case the Fact
object which can have 0 or more assertions like Equal
or Type
in the code example above. Labeling the test function with a resulting type as defined in the table below allows you to define the execution timeline of your test(s) and how the Fact
object(s) is/are being returned.
Test Results | One | Many |
---|---|---|
Now | Fact | IEnumerable<Fact> |
Later | Task<Fact> | IObservable<Fact> |
Next Section: Reporting