🍪 Privacy & Transparency

We and our partners use cookies to Store and/or access information on a device. We and our partners use data for Personalised ads and content, ad and content measurement, audience insights and product development. An example of data being processed may be a unique identifier stored in a cookie. Some of our partners may process your data as a part of their legitimate business interest without asking for consent. To view the purposes they believe they have legitimate interest for, or to object to this data processing use the vendor list link below. The consent submitted will only be used for data processing originating from this website. If you would like to change your settings or withdraw consent at any time, the link to do so is in our privacy policy accessible from our home page..

Vendor List | Privacy Policy
Home Tags Privacy About

All posts tagged with "Testing"

These are all my posts on (automated) software testing such as unit, integration and system tests. It also contains posts on specific testing frameworks.

Page 1 of 2 Older Posts →

C# - NSubstitute, how to mock and match a call that takes a list of items as a parameter

NSubstitute is a great framework for mocking objects for tests. I recently had an unexpected behaviour when stubbing a method call. For this simple example we »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, Testing 21 October 2022

Nsubstitute Error - NSubstitute.Exceptions.CouldNotSetReturnDueToNoLastCallException : Could not find a call to return from

If you see the following error: > NSubstitute.Exceptions.CouldNotSetReturnDueToNoLastCallException : Could not find a call to return from. You are likely trying to mock a method on »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Testing, C# 17 May 2022

C# - How to mock or stub a class without an interface

Sometimes you come across a class that you need to stub or mock but it does not have an interface. The easiest way is of course »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Testing, C# 15 May 2022

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 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, Testing 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, Testing, C# 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, Testing, C# 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, Testing, C# 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 Testing, Wiremock, C# 02 September 2021

xUnit - How to assert that a method throws an exception - 2022

A year ago I made a post on the absence of the DoesNotThrow assertion in xUnit. In this post I show how you can assert if »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Testing, C# 09 September 2020
Page 1 of 2 Older Posts →
  • Rss
  • Twitter
  • LinkedIn
  • profile for Peter Rasmussen at Stack Overflow, Q&A for professional and enthusiast programmers
Peter Daugaard Rasmussen - developer, Consultant, Blogger © 2023 Privacy policy