tonidy / spin-app-test

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting Started

  1. Install dotnet 7.0 or higher (https://dotnet.microsoft.com)
  2. Connection to MongoDB (local/cloud)
  3. Clone this repo
  4. Go to src folder
  5. Change Mongodb settings inside appsettings.Development.json
    {
        "ConnectionStrings": {
            "Mongodb": "mongodb://localhost:27017"
        }
    }
  1. Open terminal/CMD and run the following command:

    dotnet run

  2. Open swagger (eg: http://localhost:5183/swagger) or you can use Postman collection below

Testing with Postman

Run in Postman

Run Unit/Integration Testing

  1. Follow Getting Started section from step #1 to step #3
  2. Go to test folder
  3. Change Mongodb settings inside appsettings.Integration.json
    {
        "ConnectionStrings": {
            "Mongodb": "mongodb://localhost:27017"
        }
    }
  1. 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

About


Languages

Language:C# 100.0%