public void AddParent() { ParentTaskData lstParenttask = new ParentTaskData() { ParentID = 0, ParentTask = "Test Parent" }; var controller = new ProjectController() { Request = new System.Net.Http.HttpRequestMessage(), Configuration = new HttpConfiguration() }; Assert.AreEqual("OK", controller.AddParent(lstParenttask).StatusCode.ToString()); }