ASP.NET Core C# Integration Testing - Mocking Cookie Authentication

Published: 24 February 2021
on channel: Raw Coding
5,494
118

How to mock cookie authentication? Step by step explanation which things to pay attention to and how to arrive to a clean working solution.

Patreon 🤝   / raw_coding  
Courses 📚 https://learning.raw-coding.dev
Shop 🛒 https://shop.raw-coding.dev

Discord 💬   / discord  
Twitter 📣   / anton_t0shik  
Twitch 🎥   / raw_coding  

Timestamps
00:00 Introduction
02:50 Tests Setup
09:35 Code Exploration
20:15 Mocking IAuthenticationSchemeProvider
36:30 Mocking Claims

Integration Testing Introduction:    • C# Integration Testing Tutorial  
Middleware:    • In/Out Middleware Explained (C# ASP.N...  
Dependency Injection:    • How Dependency Injection Works in #cs...  
Playlist:    • ASP.NET Core C# - Unit Testing, Mocki...  
Source: https://github.com/raw-coding-youtube...

dotPeek: https://www.jetbrains.com/decompiler/
Rider trial extension:
1. Code: RD5K9-4TXXW-KMV3G-NYWSF-3ZSTP
2. Redeem: www.jetbrains.com/store/redeem/

#csharp #testing #aspnetcore