Home About

All posts tagged with "Mocking"

A collection of 8 posts tagged with "Mocking"

Page 1 of 1

C# - How to setup WebApplicationFactory in .Net 6 without a startup.cs file

Prior to .Net 6 you would have a startup.cs class to set up your asp.net application. In .Net 6 the standard is now to »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Mocking, Integration tests, Testing, C# 05 February 2022

C# - How to set priority for request matching in Wiremock.Net

If you are on this page you likely created a wildcard endpoint and now you want to respond differently to a request, but keep the wildcard »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Wiremock, .Net, Testing, Integration tests, Mocking, System tests 12 September 2021

C# - How to set up scenarios with Wiremock - with examples

Sometimes we want more than just a simple stub from wiremock, sometimes we want to create a scenario. We want Wiremock to do something different when »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Wiremock, .Net, Testing, Test doubles, System tests, Mocking 08 September 2021

C# - How to match a specific header in Wiremock.Net

Using Wiremock.Net you can set a requestmatcher to only match a request if it contains a specific header with a specific value, in this post »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Wiremock, .Net, C#, Mocking, Testing, System tests 07 September 2021

C# - How to match a path with a wildcard in Wiremock.Net

In many cases you want some sort of wildcard in your URL matching for Wiremock.Net. Most REST URLs contain an id, especially at the end »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Wiremock, .Net, Mocking, Test doubles, Testing, System tests 05 September 2021

C# - A simple guide to setup Wiremock.Net for integration tests

Are you looking for a simple guide for setting up Wiremock.Net? Well I hope this can be helpful to you :) I did this yesterday as »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Integration tests, Test doubles, System tests, Testing, .Net, Wiremock, Mocking 02 September 2021

Mocks vs stubs, the pros and cons of frameworks vs implementations

I will go right to the point here. In the title I have used the term "stub" in its broad sense. What I really »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Mocking, Test doubles, Testing 03 December 2018

C# - How to mock the HttpClient for tests when it is a dependency

In this post I will go through how you can mock the HttpClient class in C#. This is often needed as everything we develop these days »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on HttpClient, HTTP, C#, Dependency injection, Test doubles, Mocking 11 October 2018
Page 1 of 1
Rss
Twitter
LinkedIn
profile for Peter Rasmussen at Stack Overflow, Q&A for professional and enthusiast programmers
Peter Daugaard Rasmussen - developer, Consultant, Blogger © 2022 Cookie policy