Allow Faking of non-generic types with methods that have in parameters
See original GitHub issueAs mentioned in #1337, and due to castleproject/Core#339, types containing a method with an in
parameter cannot be faked by FakeItEasy .NET Standard, and if the type is a generic type, it cannot be faked by either the FakeItEasy .NET Standard or .NET Framework editions.
Once Castle.Core supports these scenarios, we should do so as well.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Passing generic type to non generic methods
I guess this has to do with value being of generic type instead of specific. Is there any way to give generic types...
Read more >Allow Faking of generic types with methods that have in ...
As mentioned in #1337 and castleproject/Core#339, generic types containing a method with an in parameter cannot be faked by FakeItEasy.
Read more >What to do, if I need non generic class use generic inside ...
What to do, if I need non generic class use generic inside, but don't want pass down type arguments ... Let's assume we...
Read more >4. Generics - Programming C# 5.0 [Book]
A generic type (or method) is allowed to use only features that it has specified through constraints, or that are defined by the...
Read more >CA1004: Generic methods should provide type parameter
The following example shows the syntax for calling two generic methods. The type argument for InferredTypeArgument is inferred, and the type ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, thanks @zvirja. And @thomaslevesque for verifying. I’d meant to look last night, but we’re expecting houseguests, and the vacuuming sucked up (ha!) all my time.
@zvirja I just checked. Faking delegates with
in
parameters works, but the read-only semantics is not honored, e.g. this will print 123:Thanks for bringing this to our attention. I’ll open a new issue.