Skip to content

Testing

Josh Hiles edited this page Dec 22, 2023 · 1 revision

When running your test suite, it's helpful to know that the experimental results always match. To help with testing, Scientist has a ThrowOnMismatches property that can be set to true. Only do this in your test suite!

To throw on mismatches:

Scientist.Science<int>("ExperimentN", experiment => 
{
    experiment.ThrowOnMismatches = true;
    // ...
});

Scientist will throw a MismatchException<T, TClean> exception if any observations don't match.

Clone this wiki locally