Setup: Windows – .NET 4.5, Linux – Mono 3, Mint 17 (based on Ubuntu 14). I need to build and test .NET application from command line and on CI server.
Sample solution can be downloaded from here https://github.com/mchudinov/BuildingTesting. Solution is compatible with MonoDevelop 5, Xamarin Studio 5 and Visual Studio 2012,2013,2015.
1. Building in command line
There are two standard command line building tools for .NET: MSBuild on Windows and xbuild on Linux/Mono. xbuild build files are compatible (with some exceptions) with MSBuild files.
We need at least 4 simple steps (targets as they called in MSBuild terminology) to build a .NET solution:
I want to mock some methods from an external dependency class without executing the original constructor for this external class. This external class is from somewhere else, imported to our project by composer for example. Continue reading →
While testing PHP we need sometimes to create a mock for a method with reference parameters. I use returnCallback() from PHPUnit framework to to this. returnCallback() will call a function that imitates functionality of the original method. The original method can be either public or protected. Continue reading →