public void Check_That_Right_Method_Was_Called_Inside_IsGameKeyAvailable_Action() { // Arrange var mockGameService = new Mock <IGameService>(); mockGameService.Setup(m => m.GameExists(It.IsAny <string>(), It.IsAny <int>())) .Returns(false); ValidationController validationController = GetValidationController(mockGameService); const string key = "key"; const int currentGameId = 1; // Act validationController.IsGameKeyAvailable(key, currentGameId); // Assert mockGameService.Verify(m => m.GameExists(key, currentGameId)); }