Smartwyre Developer Test Instructions

In the 'RebateService.cs' file you will find a method for calculating a rebate. At a high level the steps for calculating a rebate are:

  1. Lookup the rebate that the request is being made against.
  2. Lookup the product that the request is being made against.
  3. Check that the rebate and request are valid to calculate the incentive type rebate.
  4. Store the rebate calculation.

What we'd like you to do is refactor the code with the following things in mind:

  • Adherence to SOLID principles
  • Testability
  • Readability
  • Currently there are 3 known incentive types. In the future the business will want to add many more incentive types. Your solution should make it easy for developers to add new incentive types in the future.

We’d also like you to

  • Add some unit tests to the Smartwyre.DeveloperTest.Tests project to show how you would test the code that you’ve produced
  • Run the RebateService from the Smartwyre.DeveloperTest.Runner console application accepting inputs

The only specific 'rules' are:

  • The solution should build
  • The tests should all pass

You are free to use any frameworks/NuGet packages that you see fit. You should plan to spend around 1 hour completing the exercise.