Discussions

Ask a Question
Back to All

SpecsFor<object?>

I have a test I need to write that is for a static method on a static class. Since I don't need a SUT to be created, I don't really have anything to put between the angle brackets on the base class. I could just not inherit from SpecsFor at all, but then I have one mutant test that doesn't match the others in terms of style. I'd like to keep the pattern of overriding Given and When for consistency with my other tests. Is there an established or generally accepted pattern for this? I can inherit from SpecsFor and it doesn't seem to complain, but can I count on this in the future?