Skip to content

thebigword Migration Guide

Kevin Kuszyk edited this page May 16, 2014 · 4 revisions

There are some breaking changes in this version of the test framework:

  1. The thebigword.TestFramework namespace has been renamed to TestFramework.NUnit.Ninject.Moq.
  2. The thebigword.TestFramework.NSubstitute namespace has been renamed to TestFramework.NUnit.Ninject.NSubstitute.
  3. The Tests base class has been renamed to TestsFor<>.
  4. The SetMock<>() and SetSubstituteFor<>() methods have changed to the more fluent Set.Mock<>() and Set.SubstituteFor<>().
  5. To keep the public version of the framework lean, the IsEquivalentTo() and ToQueryable<>() extension methods have been removed from the Moq version. Please consider the much better Deep Equal package instead.
  6. The Returns() (async) extension method has been removed from the NSubstitute version.

Please follow the steps below to migrate from either thebigword.TestFramework or thebigword.TestFramework.NSubstitute.

If you have any issues migrating, please raise an issue on the issues page.

thebigword.TestFramework

  1. Update thebigword.TestFramework, Ninject, Ninject.MockingKernel, Ninject.MockingKernel.Moq and Moq packages in your test project to the latest versions.

  2. Remove thebigword.TestFramework package. Don't uninstall it's dependencies - we still need them.

  3. Install the TestFramework.NUnit.Ninject.Moq package from the public NuGet gallery.

  4. Change all namespace references from thebigword.TestFramework to TestFramework.NUnit.Ninject.Moq.

  5. Change all references to the Tests<> base class to TestsFor<>.

  6. Change all references to SetMock<>() to Set.Mock<>().

  7. Build and run your tests.

thebigword.TestFramework.NSubstitute

  1. Update thebigword.TestFramework.NSubstitute, Ninject, Ninject.MockingKernel, Ninject.MockingKernel.NSubstitute and NSubstitute packages in your test project to the latest versions.

  2. Remove thebigword.TestFramework.NSubstitute package. Don't uninstall it's dependencies - we still need them.

  3. Install the TestFramework.NUnit.Ninject.NSubstitute package from the public NuGet gallery.

  4. Change all namespace references from thebigword.TestFramework.NSubstitute to TestFramework.NUnit.Ninject.NSubstitute.

  5. Change all references to the Tests<> base class to TestsFor<>.

  6. Change all references to SetSubstituteFor<>() to Set.SubstituteFor<>().

  7. Build and run your tests.

Clone this wiki locally