code4nothing/singlepath — pull request #6 by arialdomartini (2014-07-22 12:20:29+00:00)
Title: Quiz #2 - To be clearer than Ayende 

Here is a snipped of code I copied from one of @ayende's RavenDB repository

Find the original code [here](https://github.com/ayende/ravendb/blob/321dc06c87fda8a279b3e36dcfd0b2153730b514/Raven.Database/Indexing/FieldsToFetch.cs#L86-L91)

The ```if``` to be remove is pretty trivial

```
public void EnsureHasField(string ensuredFieldName)
{
if (ensuredFieldNames == null)
ensuredFieldNames = new HashSet();
ensuredFieldNames.Add(ensuredFieldName);
}
```

I added a .net solution, with a simple build script in PowerShell, which will download the dependencies with NuGet and will run the tests with nUnit (@naighes, I'm looking forward to see a pull request with a switch to xUnit).

Come on! Can you remove this ```if```?