WonderfulWidgets.CreditCardValidator 2.0.0

dotnet add package WonderfulWidgets.CreditCardValidator --version 2.0.0
NuGet\Install-Package WonderfulWidgets.CreditCardValidator -Version 2.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="WonderfulWidgets.CreditCardValidator" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add WonderfulWidgets.CreditCardValidator --version 2.0.0
#r "nuget: WonderfulWidgets.CreditCardValidator, 2.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install WonderfulWidgets.CreditCardValidator as a Cake Addin
#addin nuget:?package=WonderfulWidgets.CreditCardValidator&version=2.0.0

// Install WonderfulWidgets.CreditCardValidator as a Cake Tool
#tool nuget:?package=WonderfulWidgets.CreditCardValidator&version=2.0.0

This library provides an interface and class with a single boolean method that returns true if the string provided is a valid credit card number, in other words it contains only digits and the Luhn algorithm validates the checksum.

The library is a dependency of two projects: the Bank of Random Credit purchase authorizer and the Everyone is Authorized payment client. These two libraries available in NuGet are designed to be used for software design demonstrations and course labs for unit testing and dependency injection.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.1

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on WonderfulWidgets.CreditCardValidator:

Package Downloads
EveryoneIsAuthorized.Client

This library provides a credit card purchase payment authorizer that authorizes a payment 100% of the time, 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 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.

TheBankOfRandomCredit.Authorizer

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.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.0 574 2/3/2021
1.0.2 515 2/1/2021
1.0.1 558 1/23/2021
1.0.0 839 1/23/2021

Updated version to reflect new namespace.