Getting Started
- Install dotnet 7.0 or higher (https://dotnet.microsoft.com)
- Connection to MongoDB (local/cloud)
- Clone this repo
- Go to
src
folder - Change
Mongodb
settings insideappsettings.Development.json
{
"ConnectionStrings": {
"Mongodb": "mongodb://localhost:27017"
}
}
-
Open terminal/CMD and run the following command:
dotnet run
-
Open swagger (eg: http://localhost:5183/swagger) or you can use Postman collection below
Testing with Postman
Run Unit/Integration Testing
- Follow
Getting Started
section from step #1 to step #3 - Go to
test
folder - Change
Mongodb
settings insideappsettings.Integration.json
{
"ConnectionStrings": {
"Mongodb": "mongodb://localhost:27017"
}
}
-
Open terminal/CMD and run the following command:
dotnet test --no-build --verbosity normal
Please submit your solution as a GitHub repository with the following files:
- A C# class for the spin game model.
- A C# class for the prize model.
- A C# interface for the spin game repository.
- A C# implementation of the spin game repository using MongoDB.
- A C# class for the spin result model.
- A C# interface for the spin result repository.
- A C# implementation of the spin result repository using MongoDB.
- Test case for each function you make
- Create a README file that provides instructions on how to run the script