A collection of classes for supporting the searching, paging, domain model pattern, and other miscellaneous stuff in .NET Core.


Keywords
License
MIT
Install
Install-Package Benday.Common -Version 3.2.0

Documentation

Benday.Common & Benday.Common.Testing

Benday.Common is a collection of classes for supporting the domain model pattern in .NET Core. Benday.Common.Testing is collection of classes to streamline testing with XUnit and Moq.

Key Features: Benday.Common

  • Utilty class for running command line tools, reading the results, and managing errors
  • Classes for handling the paging and sorting of results
  • Identity interfaces for managing string and integer based object identity
  • Utility classes for managing searching and queries
  • Interfaces for organizing type registration for dependency injection
  • ...and more.

Key Features: Benday.Common.Testing

  • 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

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

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

Benday.Common NuGet Package

Benday.Common.Testing NuGet Package