-
Notifications
You must be signed in to change notification settings - Fork 42
Unit Testing
Because we are using C# for our back-end, we have three main options for unit testing frameworks, XUnit, MSTest/Visual Studio unit testing and Nunit.
This is the unit testing framework that comes with Visual Studio. It is easy to setup and get started. But the issue with this that it can slow and sluggish. Also, because it's built into Visual Studio by Microsoft, it might be difficult to use it with other third part IDEs such as C# Rider.
This framework is not depended on a specific company's tools and because of this, it works well with third party IDEs. NUnit is much faster than the MSTest at testing. This could stop us from wasting unnecessary time. The biggest advantage of NUnit is that it is quite similar to JUnit and most of us have experience using it. Also because this is the most popular framework, there is a lot of documentation on it, which will be helpful. But might be slower to set up compared to MSTest because it is not built in but can be quickly installed through installing a Nuget package.
This tool is similar to NUnit. Many use this because the terminology a lot more intuitive compared to the others. But the biggest issue with this is that there isn't much documentation on it.
We decided to go NUnit because time was an issue. We won't have to spend much time learning it as it is similar to JUnit and there is a lot of documentation on it.
Reference: https://stackify.com/unit-test-frameworks-csharp/
Source: http://www.alteridem.net/2016/10/03/nunit-unit-tests/
The ServiceDependencyResolver.cs
dependency injector class has been created and can be used to resolve the dependencies required by the controller classes.
- Home
- Data Model
- Architecture
- API Documentation
- Front End Documentation
- Testing
- Prototyping
- Other
- Contributing Guidelines and Etiquitte
- Labels
- License
- Admin