Best Practices Best Practices Best Practices Best Practices Best Practices Best Practices Best Practices Best Practices Best Practices Best Practices Best Practices Best Practices Best Practices Best Practices Best Practices Best Practices Best Practices Best Practices Best Practices Best Practices Best Practices Best Practices

Best Practices

The list below is what considered to be a best practice by Typemock staff.

Referencing Typemock from test projects:

Problem: Referencing Typemock from the installation directory can cause build errors by building a test project on a machine where
Typemock is installed in a different location.

Solutions:

1. Using Typemock Isolator from NuGet:

  1. In "Visual Studio" select the "Tools" tab.

  2. Select "NuGet Package Manager"

  3. Select "Package Manager Console"

  4. Type "Install-Package Typemock.Isolator" and press "Enter".

If you don't have NuGet Console on your Visual Studio or if there's no internet connection use the Typemock assemblies

2. Check-In Typemock assemblies in the repository and referencing them:

  1. Create PublicAssemblies Directory in "<repository>\Typemock\"

  2. Create Isolator<version> in "<repository>\Typemock\PublicAssemblies\" for each Isolator version that you use.

  3. Copy the following files to the directory with corresponding version:

    • Typemock.dll

    • Typemock.ArrangeActAssert.dll

    In order to use IntelliSense, add the following files to the folders where the dlls are stored:

    • Typemock.xml

    • Typemock.ArrangeActAssert.xml

    By default, these files are located at "<Typemock installation folder>\PublicAssemblies\"

  4. Change the references in your test projects to their new location in "<repository>\Typemock\PublicAssemblies\Isolator<version>"