Benday.Common.Testing 1.0.0

dotnet add package Benday.Common.Testing --version 1.0.0
                    
NuGet\Install-Package Benday.Common.Testing -Version 1.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="Benday.Common.Testing" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Benday.Common.Testing" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Benday.Common.Testing" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Benday.Common.Testing --version 1.0.0
                    
#r "nuget: Benday.Common.Testing, 1.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.
#addin nuget:?package=Benday.Common.Testing&version=1.0.0
                    
Install Benday.Common.Testing as a Cake Addin
#tool nuget:?package=Benday.Common.Testing&version=1.0.0
                    
Install Benday.Common.Testing as a Cake Tool

Benday.Common.Testing

A collection of classes to streamline testing with XUnit and Moq.

About

Written by Benjamin Day
Pluralsight Author | Microsoft MVP | Scrum.org Professional Scrum Trainer
https://www.benday.com
https://www.slidespeaker.ai
info@benday.com
YouTube: https://www.youtube.com/@_benday

Key Features

  • TestClassBase is a base class for XUnit test classes that provides a WriteLine() method that hooks into XUnit's ITestOutputHelper for writing messages to the console or test results.
  • MockUtility is a utility class that helps work with Moq-based mocks -- especially when testing classes that use dependency injection.
    • Call CreateInstance<T>() to create an instance of a class that automatically creates mocks for all constructor parameters
    • Access the generated class and mocks using the MockCreationResult<T> instance returned from CreateInstance<T>()
    • Organize, access, and verify mocks using the MockCreationResult<T> class

Bugs? Suggestions? Contribute?

Got ideas for git repo sync features you'd like to see? Found a bug? Let us know by submitting an issue. Want to contribute? Submit a pull request.

Source code

API Documentation

NuGet Package

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 145 4/24/2025

v1.0 - Base class for xunit tests; MockUtility for streamlining testing with Moq;