scientistproject / Scientist.net

A .NET library for carefully refactoring critical paths. It's a port of GitHub's Ruby Scientist library
MIT License
1.47k stars 95 forks source link

[Question] Is there a way to test sideeffects of a method #89

Closed danielepo closed 7 years ago

danielepo commented 7 years ago

As an example I have a method that:

the call could be considered an indirect output. Is there a way to intercept the indirect output to ensure that a refactored version of the method still does the same call?

joncloud commented 7 years ago

Right now Scientist requires some kind of output in order to do comparisons. If the query has some kind of output, then Scientist could be used to compare the results. For example the query could return an object representation of a SELECT, or it could inspect the total number of rows modified from an UPDATE.

I can provide some more guidance with some more concrete examples.