public void TestInsertOrUpdate() { mockTopicService.Setup(x => x.InsertOrUpdate(It.IsAny <Topic>())).Returns(topic); var topicController = new TopicController(mockTopicService.Object); IActionResult isDelete = topicController.InsertOrUpdate(topic); var type = isDelete.GetType(); Assert.AreEqual(type.Name, "OkObjectResult"); }