Ask a Question
Back to All

Primitive dependencies

Moq has a way of specifying values for primitive dependencies. Is there any way to explain this to SpecsFor without completely taking over the SUT construction via InitializeClassUnderTest?

In my case, I'm mocking out a repository that takes some paging and result limits at construction time. As such, I need to provide an integer to the constructor or face an error like "Int32 limit = Required primitive dependency is not explicitly defined"