Using Assertion Scopes to execute multiple Assertions in C#

Using Assertion Scopes to execute multiple Assertions in C#

Fluent Assertions is a .NET library that provides use with a bunch of useful extension methods that allow us to test our C# code in a more natural way. Let’s say for example we are testing the output of a string. Without Fluent Assertions, we might write something like this: string testString = "hello"; string expectedOutput = testString.ToUpper(); Assert.Equal(expectedOutput, "HELLO"); If we were to write this test using Fluent Assertions, we could do so like this: ...

June 27, 2023 · 4 min · Will Velida
Using Workload Identities for Bicep Deployments in GitHub Actions

Using Workload Identities for Bicep Deployments in GitHub Actions

As I’ve been working on my side project, I’ve been trying to work on my CI/CD skills and deploy all my resources through GitHub Actions. This project is made up of a couple of services, which each have their own infrastructure and application code. I’m deploying my resources to a single resource group in Azure. To deploy infrastructure to Azure via GitHub Actions, we need to authenticate to our Azure subscription. Via the command line, we can do this using PowerShell or the CLI, but that’s possible due to us being able to interact with the authentication process. ...

June 24, 2023 · 7 min · Will Velida
Building Simple Dapr Cron Jobs with ASP.NET Core Web APIs

Building Simple Dapr Cron Jobs with ASP.NET Core Web APIs

I’ve been thinking about migrating one of my side projects from Azure Functions to the Dapr framework to make it more portable. One of the most important components of this architecture is the ability to refresh an authentication token that enables each Function app to retrieve data from an external API. In an Azure Functions architecture, we can use timer triggers to perform scheduled jobs simply. The issue here is that Functions have an opinionated programming model. While this does make integrations between components simple, this can lock us into the Azure Functions hosting model, limiting the portability that I’d like my architecture to achieve. ...

June 19, 2023 · 5 min · Will Velida
Implementing Dapr State Management in ASP.NET Core Web APIs

Implementing Dapr State Management in ASP.NET Core Web APIs

In distributed architectures, we’ll usually have a number of independent stateless services that serve a purpose (set around a domain, such as ordering items, storing items in a catalog, handling authentication etc.) While services should strive to be stateless, there will be some services that need to track state in order to fufil a business operation or function. Dapr has a state management build block that simplifies state tracking and enables you to store state across a variety of data stores. ...

June 14, 2023 · 12 min · Will Velida
Getting Started with Dedicated Workload profiles for Azure Container Apps

Getting Started with Dedicated Workload profiles for Azure Container Apps

About mid-April, the Azure Container Apps team announced a public preview of a new hosting plan and pricing structure for hosting your Container Apps. By default, there was a Serverless consumption hosting plan which you can use to host your Container Apps. This provided support for scale-to-zero scenarios and you’d only pay for resources that your application would use. With the Dedicated hosting plan now in preview, you still have the option of having a fully managed environment for hosting your Container Apps with scale-to-zero capabilities, but in addition to this you can also run applications with customized hardware using Dedicated workload profiles. ...

May 1, 2023 · 7 min · Will Velida