VS2017

Unit testing is usually used for testing public types and members. However, there are cases when you might need to test types or members that are not public. These could be internal classes or private helper methods, for instance. Whether that is proper unit testing or beyond its scope is not a discussion that I want to get into here. However, in this post, I will show how you can unit test non-public types and members from .NET assemblies.

When faced with the need for testing non-public types and members you can use several approaches:

  • change the accessibility to public; you can do that perhaps only for debug builds and keep the intended accessibility in release builds by using conditional compilation.
  • provide public members of a class that invoke private ones;
  • use reflection.

The first solutions involve changing the API only for the sake of the testing. The last solution avoids that but requires more work. To help with that, the Visual Studio unit testing framework provides some helper types that enable you to focus on the actual testing and be less concerned about the reflection details.

Read More Unit testing non-public types and members for .NET projects

If you are working with TFS and have projects created in older versions you might want to use features available in newer versions of TFS (given that you have updated to such a newer version). These features could be code reviews, feedback, my work, storyboarding, and others. In this post, I will explain how to manually modify the team project settings to enable code review. You can only do this is you have proper access rights.

Read More Update a TFS team project manually to support code reviews

curl is a project containing a command line tool and a library that can be used to transfer data using a variety of protocols, including, of course, HTTP and HTTPS. The library API is written in C, but there are various C++ wrappers on top of it. One of those is curlcpp. In this article, I will show how to build these libraries for Windows with Visual Studio.

Read More Using the curl library from C++ on Windows

Visual Studio 2017 Enterprise provides a feature called Live Unit Testing that enables developers to see live how changing C# and VB.NET code affects its corresponding unit tests. Among its features, it includes showing coverage information in the editor as you type, integration with the Test Explorer, including/excluding targeted test methods or projects for large…

Read More TDD with Live Unit Testing in Visual Studio 2017

Visual Studio 2017 has been officially launched today. The release notes contain a summary of all the changes available in the new version. This post is focused on the changes for C++ development. The Visual C++ team has released a series of blog posts to document some of the new features. Here is a list…

Read More What’s New in Visual Studio 2017 for C++ Development