Vulnerability in EPiServer.Forms
I am trying to implement some unit tests on EpiServer 8.11. I'm using Moq, and I've found FakeMaker which seems to be awesome. My question is, how can I configure my test project to inject all my services.
There is a good guide here
You need to play around with structure map and mocking framework some :)
Thanks for reply. I can add all services and mock special features that I need.
I just wonder if I can load the other services that I don't need to mock by injection.
Using FakeMaker, I can create almost all of my EpiServer's structure and I just need to mock methods that use EpiServer or its data, after that I can test everything, including big services
Best way I know is to dotPeek Episerver.Global and look for IInitializableModule and copy those configurations and use them to set up "real" Episerver mappings. Version 2 is to avoid using dependencies to those in code and have a separate abstraction layer above them which are easier to mock. If you are using real calls to Episerver it will be more of an integration test of course.