Unit Test Service Fabric Actors when Actors call other Actors

In order to be able to effectively unit test Azure Service Fabric Actors we use a NuGet package called "ServiceFabric.Mocks”. It’s truly fantastic. As the name implies it allows you to Mock all Service Fabric services, not just Actors but the Actor model has unique structure that makes it exceptionally helpful in testing. The way … Continue reading Unit Test Service Fabric Actors when Actors call other Actors

Advertisements

Updating Service Fabric version for an Actor: Step by Step

ONE. Upgrade Actor Projects to .NET Core 2.1 TWO. Update Remoting Provider Decorator [assembly: FabricTransportActorRemotingProvider(RemotingListenerVersion = RemotingListenerVersion.V2, RemotingClientVersion = RemotingClientVersion.V2)] THREE. Remove all references from Tests Project First remove all references to dependent projects (Actor, Actor.Interfaces, Actor.Mocks, Actor.Model). Second open the Package Manager console and run the following commands: Uninstall-Package Microsoft.ServiceFabric Uninstall-Package Microsoft.ServiceFabric.Services Uninstall-Package Microsoft.ServiceFabric.Services.Remoting … Continue reading Updating Service Fabric version for an Actor: Step by Step

DLLHell 2018: Upgrading Service Fabric Project from v3.1.283 to v3.2.176

I’m getting an error from each of my xUnit test projects that there is a package downgrade from Microsoft.NETCore.App from 2.0.9 to 2.0.0. I tried isolating the issue to one project so I unloaded all the test projects in my solution. Then I tried upgrading the version of .NET Core from v2.0 to v2.1. However … Continue reading DLLHell 2018: Upgrading Service Fabric Project from v3.1.283 to v3.2.176

Switching from “Azure” to “AzureRM” Terraform Backend

Terraform no longer supports “azure” as a backend. So if you have a backend configuration that makes reference to the “azure” backend provider you will get the following warning: All you need to do is change the following property in your backend configuration file: To the following: Nothing else has to change. Just re-initialize your … Continue reading Switching from “Azure” to “AzureRM” Terraform Backend

Easy Hack to get a .NET Standard REST API

Everyone’s favorite Visual Studio Feature! LINKED ITEMS! 😊 I literally generated a client using the ‘Add REST API Client’ in the .NET Framework project and the PCL project and then linked them into a .NET Standard project and neither codebases threw compiler errors. However, this is no reason for the good folks on the Visual … Continue reading Easy Hack to get a .NET Standard REST API

Generating a REST API in Visual Studio with the many flavors of .NET

I remember a time when there was just .NET. .NET Framework 1.0, 1.1, 2.0, 3.5, 4.0 etc. but all .NET. Then came Silverlight, Windows Phone Silverlight, Windows Universal-ish, Universal Windows Platform, Xamarin.xyz, .NET Core, .NET Standard. Now my head hurts. Seriously. I just want to build a WebAPI client that I can use in a … Continue reading Generating a REST API in Visual Studio with the many flavors of .NET