Skip to content


Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Devpro Withywoods - Shared .NET libraries

Build Status Quality Gate Status Coverage

Whithywoods is a set of small independant .NET libraries (Standard/Core). The goal is to do better with less code and capitalize on best practices (#KISS #DRY).

All libraries are available on Feel free to report any issue or ask for a change. You can also contribute with Pull Requests on GitHub!

NB: The name Whithywoods comes from Robin Hobb's incredible writing.

How to use

Common / Configuration library

Version Downloads

tl;dr New extension method to access configuration: configuration.TryGetSection()

More information

Common / Net HTTP library

Version Downloads

tl;dr New exception: ConnectivityException

More information

Common / Serialization library

Version Downloads

tl;dr New extension methods to serialize/deserialize from Json: myObject.ToJson() and myString.FromJson()

More information

Common / System library

Version Downloads

tl;dr New string extensions: myString.FirstCharToUpper()

More information

Common / Unit testing

Version Downloads

tl;dr Enable unit testing on HTTP calls: HttpRepositoryTestBase abstract class with BuildHttpClientFactory() method

More information

Data Access / MongoDB library

Version Downloads

tl;dr Get access to a MongoDB database in a few lines by using best practices.

More information

Message Broker / RabbitMQ library

Version Downloads

tl;dr Clean channel factory to ease the use of RabbitMQ as well as enabling decoupling through interfaces.

More information

Web / Selenium library

Version Downloads

tl;dr New extension method to find an element with a wait: driver.FindElement(By.ClassName("title"), 360);.

More information

Web / Web Application library

Version Downloads

tl;dr Easily add Swagger self-generated web page, only two lines in your Startup class!

services.AddSwaggerGen(_webAppConfiguration); // in ConfigureServices()

app.UseSwagger(_webAppConfiguration); // in Configure()

More information

Web / Web Testing library

Version Downloads

tl;dr Use Selenium web driver inside ASP.NET Integration tests? Yes, that's possible with LocalServerFactory class!

public class SwaggerResourceTest : IClassFixture<LocalServerFactory<Startup>>, IDisposable
    public void AspNetCoreApiSampleSwaggerResourceGet_ReturnsHttpOk()
        // Arrange & Act

        // Assert
        _webDriver.FindElement(By.ClassName("title"), 360);
        _webDriver.Title.Should().Be("Swagger UI");
        _webDriver.FindElementByClassName("title").Text.Should().Contain("My API");

Want to write easy API Rest tests? Sure, just use the TestRunner class!

public async Task AspNetCoreApiSampleTaskResourceFullCycle_IsOk()
    var initialTasks = await _restRunner.GetResources<TaskDto>(_client);

    var created = await _restRunner.CreateResource<TaskDto>(_client);

    await _restRunner.GetResourceById(created.Id, _client, created);

    await _restRunner.UpdateResource(created.Id, created, _client);

    var existingTasks = await _restRunner.GetResources<TaskDto>(_client);

    await _restRunner.DeleteResource(created.Id, _client);

    var expectedNotFound = new ProblemDetails
        Title = "Not Found",
        Status = 404,
        Type = ""
    await _restRunner.GetResourceById(created.Id, _client, expectedNotFound, HttpStatusCode.NotFound, config => config.Excluding(x => x.Extensions));

    var finalTasks = await _restRunner.GetResources<TaskDto>(_client);

More information

How to build

# check .NET Core SDK is installed (download from
dotnet --version

# restore NuGet packages
dotnet restore

# build the solution
dotnet build

How to test

/!\ MongoDB DAL integration tests require a local MongoDB server (through Docker for instance)

dotnet test



This is a fully working example, with Swagger generation, API controllers, completely tested by integration tests.


There are two console projects to publish and consumes messages through RabbitMQ, using Withywoods RabbitMQ library.