The Bank of Random Credit Authorizer NuGet Package

This library provides a credit card purchase payment authorizer that randomly authorizes a payment (50/50), but only if the credit card number is a valid card number.

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 Everyone Is Authorized Client 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.




Got any The Bank of Random Credit Authorizer Question?





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/the-bank-of-random-credit-authorizer-dotnet
NuGet Url: https://www.nuget.org/packages/TheBankOfRandomCredit.Authorizer


Install
Install-Package TheBankOfRandomCredit.Authorizer
dotnet add package TheBankOfRandomCredit.Authorizer
paket add TheBankOfRandomCredit.Authorizer
TheBankOfRandomCredit.Authorizer Download (Unzip the "nupkg" after downloading)





STATS

must-have-score

3

avg-downloads-per-day

0

days-since-last-release

1201