Info
Version: | 2.0.0 |
Author(s): | Joel Mussman |
Last Update: | Wednesday, February 3, 2021 |
.NET Fiddle: | Create the first Fiddle |
Project Url: | https://github.com/jmussman/everyone-is-authorized-client-dotnet |
NuGet Url: | https://www.nuget.org/packages/EveryoneIsAuthorized.Client |
Install
Install-Package EveryoneIsAuthorized.Client
dotnet add package EveryoneIsAuthorized.Client
paket add EveryoneIsAuthorized.Client
EveryoneIsAuthorized.Client Download (Unzip the "nupkg" after downloading)
Dependencies
- WonderfulWidgets.CreditCardValidator(>= 2.0.0)
If the class constructor is called without arguments it instantiates its own ICreditCardValidator. If it is called with an ICardValidator instance then it uses that. This scenario allows for a demonstration of dependcy injection without involving any other components.
When paired with the sister project The Bank of Random Credit Authorizer both libraries may be used to create a scenario to demonstrate the problems of a tightly coupled dependency in a SalesOrderManager class. Use this to demonstrate dependency injection and the Adapter Pattern to decouple the authorization from the SalesOrderManager, and then allow for a test-double to be injected in their place.
To setup this scenario use the default constructor for each class and ignore the internal card validation. In a real application the classes would not share the same validator interface, they only do in these libraries to help in the first scenario.