DotNetMockServerClient 1.2.0

dotnet add package DotNetMockServerClient --version 1.2.0                
NuGet\Install-Package DotNetMockServerClient -Version 1.2.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="DotNetMockServerClient" Version="1.2.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DotNetMockServerClient --version 1.2.0                
#r "nuget: DotNetMockServerClient, 1.2.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 DotNetMockServerClient as a Cake Addin
#addin nuget:?package=DotNetMockServerClient&version=1.2.0

// Install DotNetMockServerClient as a Cake Tool
#tool nuget:?package=DotNetMockServerClient&version=1.2.0                

Build Status .NET .github/workflows/dependabot.yml Greetings CodeQL NuGet version License: MIT

C# Fluent API for interacting with Mock-Server targeting dotnet 5.

This client, available at MockServerClientNet Repository, is written in C# and based on the original Java client Fluent API, available at Mock-Server Repository. Thanks to its authors for their contributions to open-source. I am not an author of the mentioned Java client and this client is not part of the official Mock-Server clients.

For users

Usage

Refer to Usage Samples for examples on how to use the Fluent API.

To start an instance of Mock-Server using Docker:

docker run -d --rm --name mockserver -p 1080:1080 mockserver/mockserver

For more details on using the Docker image, check the official Mock-Server documentation.

For contributors

Build

dotnet build

Testing

The code comes with unit and integration tests. The unit tests are executed with the following command:

dotnet test --filter "category:MockTests"

The below command will run the integration tests against a local running instance of Mock-Server.

dotnet test

Integration tests need instances of Mockserver running, that can be easily setup by running /tests/Docker-MockServer/dockerstart.ps1

Use the following environment variables to change the target instance of the tests:

  • MOCKSERVER_TEST_HOST (Defaults to localhost)
  • MOCKSERVER_TEST_PORT (Defaults to 1080)

How to Contribute

Please take a look at CONTRIBUTING for details.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  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. 
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.2.0 237 12/11/2023
1.1.0 1,537 1/14/2021
1.0.0 359 1/14/2021

Added json matcher support