Consider exposing managers through interfaces #654
Replies: 4 comments
-
Can you provide some examples please? |
Beta Was this translation helpful? Give feedback.
-
I find myself writing a lot of game logic that wraps/sits on top of core FishNet functionality and I'd like to unit test my functionality and mock everything that isn't the system under test. Most C# mocking frameworks (Moq, NSubstitute, etc) do mocking by implementing an interface or extending a class, and the interface approach is simpler and more robust. So for example, I have a class that manages clients reconnecting. I want it to do things like:
This requires building on top of things like |
Beta Was this translation helpful? Give feedback.
-
This is a good idea but it would sit pretty low on the priority list, and with how many other things need to be done probably won't get implemented. |
Beta Was this translation helpful? Give feedback.
-
I know it's been awhile since this suggestion has been covered. I do like the idea and I've been trying to find time, but there's no way this feature is going to make it in due to work and time restraints. While I support the idea, I'm going to have to close this out as declined. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It would be easier to unit test code written against FishNet if the managers were exposed as interfaces to allow for easy mocking.
Beta Was this translation helpful? Give feedback.
All reactions