August 8, 2018

SpecFlow Basics

SpecFlow is hands down my favorite testing tool. I’ve been blogging about it since 2013 covering mostly advanced topics. In this post, I’ll go back to the beginning and briefly cover the basics to give you an idea of what it can do. What is SpecFlow? SpecFlow is a tool that allows you to: Define, manage, and automate human-readable acceptance tests in .NET. Enable BDD with easy to understand tests. Read more

December 14, 2017

The C# Language - Overflow Checking for Integral Operations

The C# language has been around for over 15 years. It started off as a Java ripoff and evolved into its own language. Some parts of the language I use daily: enumerators, generics, async/await. Other parts lurk in the shadows until the rare moment when I need to put them to use. One such part is overflow checking for integral operations. Compiler Option By default, integral operations are not checked for overflows either by the C# compiler or at runtime. Read more

October 22, 2017

SpecFlow NUnit3 Generator Plugin

I recently created a SpecFlow plugin to solve a peculiar problem with NUnit test code generation. The issue is SpecFlow will generate test code that doesn’t compile when the .NET project containing the SpecFlow scenarios has a default namespace with the word NUnit. For example, if your project has the namespace IntegrationTests.NUnit, then you’ll receive the following error when trying to build. The type or namespace name ‘Framework’ does not exist in the namespace ‘IntegrationTests. Read more

August 15, 2016

TaskCompletionSource - Bridging the Gap Between Old and New

In the latest versions of the .NET Framework, asynchronous work is represented by the Task class. A task is similar to a future or promise in other languages. You can create one in many ways the most common being Task.Run(). The result of a task is exposed by the Task.Result property. If the work is complete, then the property immediately returns a value; otherwise, it blocks until the operation is finished. Read more

July 8, 2016

Top 6 Industry Shifts During My IT Career

In the fall of 1999, I dropped my plans to attend grad school to embark on a career in IT. The industry has changed considerably since then mostly for the better. In fact I’ve never been more excited to be a software developer. As part of a personal retrospective on my career, below are my thoughts on the top six shifts in IT. By a “shift” I mean a change that has profoundly affected the way developers go about their daily work. Read more

December 9, 2015

A Short and Easy Introduction to .NET's Task Class

Task.Run You can use Task.Run to schedule a delegate to run on the thread pool. The method returns a new task, and if the work is complete, the result will be available via Task.Result. If not, Task.Result will block until it is complete. 1 2 3 4 5 6 7 8 9 10 11 12 private void button_Click(object sender, EventArgs e) { Task<DateTime> task = Task.Run(() => GetDateTime()); lblDateTime.Text = task. Read more

© Joe Buschmann 2020