Skip to content

dennisdoomen/fluentassertions.mockly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Mockly

FluentAssertions extensions for Mockly

Coveralls branch GitHub Repo stars open issues Static Badge

Documentation

Mockly documentation (including assertion usage) lives on https://mockly.org.

This repository contains only the FluentAssertions assertion packages for Mockly. For the core HTTP mocking library, see:

Packages

Choose the package that matches your FluentAssertions major version:

Package FluentAssertions NuGet
FluentAssertions.Mockly.v7 7.x https://www.nuget.org/packages/FluentAssertions.Mockly.v7
FluentAssertions.Mockly.v8 8.x https://www.nuget.org/packages/FluentAssertions.Mockly.v8

Quick start

Install Mockly and the assertion package you need:

dotnet add package Mockly

# Pick one:
dotnet add package FluentAssertions.Mockly.v7
dotnet add package FluentAssertions.Mockly.v8

Example:

using System.Net;
using FluentAssertions;
using Mockly;

var mock = new HttpMock();
mock.ForGet()
    .WithPath("/api/users/123")
    .RespondsWithStatus(HttpStatusCode.OK);

var client = mock.GetClient();
var response = await client.GetAsync("/api/users/123");

response.StatusCode.Should().Be(HttpStatusCode.OK);
mock.Should().HaveAllRequestsCalled();

Building

./build.ps1

Contributing

Contributions are welcome! Please read CONTRIBUTING.md and open an issue or PR.

Versioning

This repository uses Semantic Versioning. See the releases.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors