GithubHelp home page GithubHelp logo

verivox-tarrif-comparison's Introduction

Verivox task

Tarrif Comparison

.NET Core 5.0

Task description

Find below desgin pattern, frameworks and tools used in executing the task given;

  1. Domain Driven Design & Repository Pattern
  2. Documentation - Swagger
  3. Logging - Serilog
  4. Database - Postgress
  5. Unit Testing - xUnit, Moq
  6. Global exception handling

Layers

For the task, I tried to Keep It Simple by using folders to separate the layers.

  1. Presentation -> Controllers, Views (but none for this project)
  2. Application -> Business Use cases
  3. Domain -> Global Error Handling, Extensions, Entities etx
  4. Infrastructure -> Connection to database, third party integrations (none in this case)

Assumptions based on project understanding

  1. Supplied Consumption must be greater than 0 (Exception is thrown if not)
  2. More products can be created in future To do that, implement ITarrifModel, provide the name and calculation for the new tarrif model. The follwing are the default Model
  • BasicConsumptionTarrif
  • PackagedConsumptionTarrif
  1. The product is to return Annual cost and tarrif name ( I will suggest, the consumption is also returned)

Setup: Check the following to setup the project

  1. Provide valid postgress database connection string and run the appliaction for the database to be automatically created.

Host={Server_Here};user id={Database_User};password={Database_Password};database={Database_Name};Port=5432

Provide a valid database connection string, when you run the application the database is created automatically.

  1. You can also decide to run migrations using the following; dotnet ef migrations add Initial dotnet ef database update

Running the application

dotnet run

Running Test

A total of 9 test cases were written and all executed successfully. dotnet test

verivox-tarrif-comparison's People

Contributors

oluwasegunowa avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.