public void CreateEntityTest() { var teamService = new Mock <ITeamService>(); teamService.Setup(mock => mock.CreateEntity(It.IsAny <TeamDTO>())); var teamController = new TeamController(teamService.Object); teamController.CreateEntity(It.IsAny <TeamDTO>()); teamService.Verify(mock => mock.CreateEntity(It.IsAny <TeamDTO>()), Times.Once); }