I'm trying to write unit tests for an UmbracoApiController
but when running the tests I'm getting an error when creating a new instance of the api controller.
I've started to look into mocking the umbraco context but haven't made much progress as I'm so new to it.
[TestMethod]
public void GetAllMembers()
{
var c = new GroupManagerApiController();
Assert.Fail();
}
Controller
public class GroupManagerApiController : UmbracoApiController
When creating a new instance of the controller I'm getting the following error message:
System.ArgumentNullException: 'Value cannot be null.
Parameter name: umbracoContext'
Kindly guide me for this.
Thank You.