public void TestMethod9_AddParentTask() { TaskModel obj = new TaskModel() { TaskID = 100, TaskName = "Task1" }; Mock <IProjectDbService> mock = new Mock <IProjectDbService>(); ProjectManagerBL projBL = new ProjectManagerBL(mock.Object); projBL.AddParentTask(obj); mock.Verify(c => c.AddParentTask(It.IsAny <ParentTask>()), Times.Once); }