F#, MSTest, and FsUnit 184.108.40.206
Join the DZone community and get the full member experience.Join For Free
Learn more about how DevOps teams must adopt a more agile development process, working in parallel instead of waiting on other teams to finish their components or for resources to become available, brought to you in partnership with CA Technologies.
MSTest Project Template:
In the first week of March I released a new project template that helps in the creation of unit tests with MSTest and VS11. You can find it at http://visualstudiogallery.msdn.microsoft.com/51ebe64a-899b-4959-8c24-b0148ed6b264 or by searching for "fsharp mstest" in the Visual Studio Gallery online templates.
FsUnit has also had a few enhancements.
1. Support for MsTest has been added for VS11 and made available through a new NuGet package named Fs30Unit.MsTest.
2. A few new assertions have been added for NUnit including NaN, instanceOfType, and unique.
3. FsUnit has long supported a function named "not". While this is a nice feature, the fact that it overwrites an F# operator is not ideal. Because of this, version 220.127.116.11 renames this function to not'. For the purpose of backward compatibility, you can open the module named FsUnitDepricated to make the "not" function available.
One last thing. If you're using FsUnit with NUnit, MbUnit, or xUnit in VS11 Beta, you will need to add binding redirects from previous versions of FSharp.Core to version 18.104.22.168. The easiest way to do this is to use the Add-BindingRedirect PowerShell cmdlet provided by NuGet (http://docs.nuget.org/docs/reference/package-manager-console-powershell-reference). Here are the steps:
1. After installing one of the FsUnit NuGet packages, create an App.config file (if one doesn't already exist).
2. In the NuGet Package Manager Console, run the following command "Add-BindingRedirect projectname" after replacing projectname with the name of your test project.
Opinions expressed by DZone contributors are their own.