public async void DeleteRobot_Ok() { //Arrange var robot = new Robot { Id = Guid.NewGuid(), Name = "Test" }; m_repositoryMock.Setup(t => t.SearchAsync(It.IsAny <Pagination>(), It.IsAny <Ordering>(), It.IsAny <IFilter <Robot> >())) .ReturnsAsync(new Tuple <int, List <Robot> >(1, new List <Robot> { robot })); //Act await m_robotService.DeleteRobotAsync(robot.Id); //Assert m_repositoryMock.Verify(t => t.DeleteAsync(It.IsAny <Robot>()), Times.Once); }