Skip to content

Instantly share code, notes, and snippets.

View ChrisMaddock's full-sized avatar

Chris Maddock ChrisMaddock

  • Yorkshire, UK
View GitHub Profile
If you're using Visual Studio for Mac the NUnit templates extension can't be used. This guide assumes that you have a solution with either a PCL or a Shared project and a number of platform specific projects. It doesn't matter if you're using Xamarin.Forms or Xamarin.iOS/Xamarin.Android directly. Your solution might look something like this:
```
Project Solution
...Project (Contains Shared Code)
...Project.iOS
...Project.Android
```
### Shared Test Project
@ChrisMaddock
ChrisMaddock / gist:4f829f67527a9e08e7450575fbef3d97
Created April 4, 2017 12:28
NUnit VS Templates Gallery Overview
An extension that adds Project and Item templates to Visual Studio along with Code Snippets to make unit testing with NUnit 3 easier.
The project currently provides the following templates.
### Project Templates
| Template | Platform | Language |
|------------------------------|------------------------------|--------------|
| NUnit 3 Unit Test Project | Desktop | C# |
| NUnit 3 Unit Test Project | Desktop | Visual Basic |

The EmptyCollectionConstraint tests if a Collection is empty. An ArgumentException is thrown if the collection is null.

Constructor

```C# EmptyCollectionConstraint() ```

Syntax

```C# Is.Empty