bitScry

  • Home
  • About
  • Blog
  • Contact

Test

About this site

This is a blog to help me remember some of the coding challenges I’ve faced and hopefully help others out if they’re suffering the same problems.

Recent Posts
  • Serving Images from Blob Storage in an Azure Function
  • Redis Caching in .NET
  • Passing Environment Variables From Docker to .NET Web App
  • Retrieving Data from MySQL Stored Procedures in .NET
  • Excluding Child Properties from a List of Objects in Fluent Assertions
Tag Cloud

.NET .NET Core AAD API ASP.NET Core Authentication Authorization Azure Azure Active Directory Azure Function Azure Storage Blob Bootstrap C# Cloud Storage Console Application CSS DataTable Dependency Injection Dictionary Entity Framework Enum Extension Google HTML Image IP Address JavaScript jQuery JSON List MVC MVC 6 Newtonsoft RestSharp Serilog SQL Stored Procedure Stream Table Table Storage Test Web App Web Application WordPress

Programming

Excluding Child Properties from a List of Objects in Fluent Assertions

We’re currently using Fluent Assertions to help make writing tests for our project a bit easier. This is a very handy library and certainly helps to make test conditions easier to specify and more readable. One issue we did have though was how to exclude specific child properties from a Read more…

By Shinigami, 5 months ago
Programming

Creating a Code Coverage Report for Multiple Projects

The current solution I’m working on is composed of 11 seperate projects, 3 of which are test projects. As part of our CI/CD deployment pipeline we want to be able to generate a code coverage report for these projects which is displayed as a comment on the PR in GitHub. Read more…

By Shinigami, 7 months7 September 2022 ago
Programming

Mocking IHttpContextAcessor

If you use IHttpContextAccessor in any services then you may need to mock it for unit tests. It’s quite a complicated class but in order to mock the request URL the below code can be used.

By Shinigami, 7 months ago
Programming

Mocking Hangfire BackgroundClient Jobs

As part of the current project I’m working on we’ve got a service which offloads some email send tasks to a background worker running in Hangfire. Creating the BackgroundJobClient directly in our service was throwing errors and didn’t allow us to test that it had actually been called so we Read more…

By Shinigami, 9 months ago
  • Facebook
  • Twitter
  • Instagram
  • Email
Hestia | Developed by ThemeIsle