ASP.NET Core - adding controllers directly from integration tests
From time to time it might happen, that you need to test certain parts of your ASP.NET Core configuration without hitting publicly visible business-related controllers. For instance, in my case, I wanted to make sure that my ASP.NET Core API behavior is consistent with the original API written in Nancy. As you might expect there are quite a lot of differences between both of the frameworks, so let’s focus on testing one thing, namely non-nullable reference type handling. Long story short, in order to have the same behavior in ASP.NET Core as in Nancy I had to add the following line of configuration
824 words
|
4 minutes
Running ASP.NET Core together with Nancy
Our current API runs on Nancy which in my opinion is past its prime. Recent news from the GitHub issue tracker seems to confirm that thesis, that is why we started looking for a migration path from Nancy based API to ASP.NET Core. Because the codebase is quite large we didn’t want to do a Big Bang Rewrite but instead of that, we wanted to gradually replace old API with a new one, so both of them can coexist next to each other.
593 words
|
3 minutes
Introduce substitute refactoring comes to NSubstitute.Analyzers
I am glad to announce the newest version of NSubstitute.Analyzers comes with “introduce substitute” refactoring, which allows you to automatically create substitutes for constructor arguments as fields or local variables. As an image is worth a thousand words here is a quick demo of C# version
48 words
|
1 minute
.NET Core - missing currency symbol in docker alpine image
2019-11-18
During the process of moving a Scala-based API to .NET Core, we encountered an interesting localization issue when running our code in a docker container based on an alpine image. The code itself was doing a currency formatting based on some culture. It looked more or less as below
516 words
|
3 minutes
MongoDB.Driver - class-based server side projection
When working with NoSQL databases, your documents might be quite heavy and in some cases, you would like to get only a slice of original data. For instance, let’s assume we have an Account document which among other things contains a list of transactions
883 words
|
4 minutes
Performance improvements in NSubstitute.Analyzers 1.0.11
I am glad to announce that the latest release of NSubstitute.Analyzers (apart from some bugfixes) brings a lot of performance and memory usage improvements for most of the analyzers. The benchmark results shown below should give you enough information about the speed and memory consumption of the newest version of the library. If you are interested in actual changes behind these results please take a look at this pull request.
103 words
|
1 minute
NSubstitute.Analyzers 1.0.0 released
A while ago I’ve announced a release of the first beta package of NSubstitute.Analyzers. Now, 4 months later I am happy to say that the first stable version is available for download. As usual, analyzers comes with two flavors:
84 words
|
1 minute
Announcing NSubstitute.Analyzers (beta)
I am glad to announce that yesterday, together with NSubstitute team we released first beta version of Roslyn analyzers for NSubstitute - NSubstitute.Analyzers. The analyzers come in two flavors: NSubstitute.Analyzers.CSharp and NSubstitute.Analyzers.VisualBasic. Feel free to grab them from NuGet and try them in your project.
80 words
|
1 minute