-
Would like to know the details of the technical challenges of removing |
Beta Was this translation helpful? Give feedback.
Answered by
ashmind
Apr 4, 2021
Replies: 1 comment
-
The main one is that you have to have specific types for However I found a better idea than It will look like this: [assembly: MockTypesInAssemblyOf(typeof(IParser), ...)]
using ParserNamespace.Mocks;
var parser = new MockIParser(); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jsk95
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The main one is that you have to have specific types for
Setup
andCalls
.Those specific types cannot be returned from a generic,
Of<T>
can only return eitherT
orX<T>
, and there is no way for either to provide a custom surface.However I found a better idea than
Get
(which might be more reusable too), so I am going to try it out.It will look like this: