I am using `ASP.NET MVC 3` and `NUnit`. I am trying to write a unit to test one of my helper methods. Here it is:

```
public static class UrlHelperAssetExtensions
{
   private static readonly string yuiBuildPath = "http://yui.yahooapis.com/2.8.2r1/build/";

   public static string YuiResetFontsGridsStylesheet(this UrlHelper helper)
   {
      return helper.Content(yuiBuildPath + "reset-fonts-grids/reset-fonts-grids.css");
   }
}

```

Here is my unit test:

```
[Test]
public void YuiResetFontsGridsStylesheet_should_return_stylesheet()
{
   // Arrange
   RequestContext requestContext = new RequestContext();
   UrlHelper urlHelper = new UrlHelper(requestContext);

   // Act
   string actual = urlHelper.YuiResetFontsGridsStylesheet();

   // Assert
   string expected = yuiBuildPath + "reset-fonts-grids/reset-fonts-grids.css";
   Assert.AreEqual(expected, actual);
}

```

Am I testing it the correct way? When I run it in the NUnit GUI then I get the following error:

System.ArgumentNullException : Value cannot be null.
Parameter name: httpContext

Is this possible to test? If so please explain in clear how do I get an instance of httpContext?

**UPDATED**

I can't get this test to pass. In my method I have the following:

```
private static readonly string stylesheetPath = "~/Assets/Stylesheets/";

public static string Stylesheet(this UrlHelper helper)
{
   return helper.Content(stylesheetPath + "MyStylesheet.css");
}

```

The test that I wrote for it is the following:

```
private string stylesheetPath = "/Assets/Stylesheets/";
private HttpContextBase httpContextBaseStub;
private RequestContext requestContext;
private UrlHelper urlHelper;

[SetUp]
public void SetUp()
{
   httpContextBaseStub = MockRepository.GenerateStub<HttpContextBase>();
   requestContext = new RequestContext(httpContextBaseStub, new RouteData());
   urlHelper = new UrlHelper(requestContext);
}

[Test]
public void Stylesheet_should_return_stylesheet()
{
   // Act
   string actual = urlHelper.Stylesheet();

   // Assert
   string expected = stylesheetPath + "MyStylesheet.css";
   Assert.AreEqual(expected, actual);
}

```

The NUnit GUI gives the following error:

```
System.NullReferenceException : Object reference not set to an instance of an object.

```

It seems to be getting the error with the ~ in:

```
private static readonly string stylesheetPath = "~/Assets/Stylesheets/";

```