I’ve made a helper
public static class UrlHelperExtension
{
public static string GetContent(this UrlHelper url, string link, bool breakCache = true)
{
// stuff
}
}
How do I test it in a unit test?
[TestClass]
public class HelperTestSet
{
[TestMethod]
public void GetContentUrl()
{
// What do I need to do here?
// I need a RequestContext to create a new UrlHelper
// Which is the simplest way to test it?
}
}
How do I create the helper needed for the test?
From this website I came up with