I am totally a beginner to Episerver and starting our first project with Episerver at the moment. We would like to start writing unit tests for our project, but I am feeling a bit lost now with the setup and starting. I have been reading blogs and articles about unit testing in Episerver, but don't really know how to start. At the moment I have a solution in Visual studio and below that my project and then MSTest project. I have also added the Moq framework to my project. Should I have the unit tests as a project below my solution or inside my project directly?
My first question is what kind of initialization I would need for my unit tests? And what are the services I need to mock? In the first phase I will just create unit tests for validation of some models we have and also for some content reference areas (where you can only add spesific blocks) checking they accept only those.
And also what testing framework would u recommend the best for Episerver? I installed MSTest as I said, but was also considering Nunit ja xunit.
Hello everyone :)
I am totally a beginner to Episerver and starting our first project with Episerver at the moment. We would like to start writing unit tests for our project, but I am feeling a bit lost now with the setup and starting. I have been reading blogs and articles about unit testing in Episerver, but don't really know how to start. At the moment I have a solution in Visual studio and below that my project and then MSTest project. I have also added the Moq framework to my project. Should I have the unit tests as a project below my solution or inside my project directly?
My first question is what kind of initialization I would need for my unit tests? And what are the services I need to mock? In the first phase I will just create unit tests for validation of some models we have and also for some content reference areas (where you can only add spesific blocks) checking they accept only those.
And also what testing framework would u recommend the best for Episerver? I installed MSTest as I said, but was also considering Nunit ja xunit.
Thanks in advance :)
Regards,
Jenni