<commit_before>---
title: Getting started
layout: post
---

So you've [downloaded NSubstitute](http://github.com/nsubstitute/NSubstitute/downloads) and are staring at a blank test fixture you've created to try it out, wondering where to start. 

Well, first you need to add a reference to `NSubstitute.dll` (from the download) into your project, and add `using NSubstitute;` to your current C# file. This will give you everything you need to start substituting.

Now let's say we have a basic calculator interface:

{% examplecode csharp %}
public interface ICalculator
{<commit_msg>Docs: mentioned Nunit in getting started guide.<commit_after>---
title: Getting started
layout: post
---

So you've [downloaded NSubstitute](http://github.com/nsubstitute/NSubstitute/downloads), created a new project with a reference to your favourite unit testing framework (for these examples we're using [NUnit](http://www.nunit.org/)), and are staring at a blank test fixture you've created to try it out, wondering where to start. 

Well, first you need to add a reference to `NSubstitute.dll` (from the download) into your project, and add `using NSubstitute;` to your current C# file. This will give you everything you need to start substituting.

Now let's say we have a basic calculator interface:

{% examplecode csharp %}
public interface ICalculator
{
{'fraction_non_alphanumeric': 0.08098068350668648, 'fraction_numerical': 0.0, 'mean_word_length': 4.756410256410256, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3953613', 'n_tokens_mistral': 387, 'n_tokens_neox': 351, 'n_words': 179}