Skip to content
Shared .NET libraries to do more with less code!
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Update to ASP.NET Core 3.1 and .NET Standard 2.1 (#13) Jan 26, 2020
.dockerignore Feature/add webapp lib (#4) Apr 7, 2019
Directory.Build.props Update to ASP.NET Core 3.1 and .NET Standard 2.1 (#13) Jan 26, 2020
Withywoods.sln Feature/add basic rest test runner (#8) Oct 15, 2019

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.

Getting started



Version Downloads

New extension method to access configuration: configuration.TryGetSection().

More information


Version Downloads

Small extensions methods: myObject.ToJson() and myString.FromJson().

More information

Data Access Layer (DAL)


Version Downloads

No need to dig into MongoDB driver documentation and experimentation, just use the provided RepositoryBase!

Configuration interface and dependency injection will help through defining only what is required and you have the choice to configure it the way you want (no forced section names in your configuration file).

More information.



Version Downloads

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

More information.

Web application

Version Downloads

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 testing

Version Downloads

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.

Build & Debug

  • .NET Core SDK must be installed (download)
    • Check the version from the command line dotnet --version (>= 2.2.104)
  • Clone the repository (replace by the url if it was forked): git clone
  • Enter the directory: cd withywoods
  • Restore packages (NuGet): dotnet restore
  • Build the solution: dotnet run
  • Run the tests: dotnet test



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

You can’t perform that action at this time.