public void SaveNewNhlGameAsync_CallsRepo()
        {
            // Arrange
            _nhlRepository.Setup(r => r.SaveNewNhlGameAsync(It.IsAny <DataContracts.NHLGameContract>())).ReturnsAsync(1);

            // Act
            _nhlService.SaveNewNhlGameAsync(It.IsAny <DataContracts.NHLGameContract>());

            // Assert
            _nhlRepository.Verify(r => r.SaveNewNhlGameAsync(It.IsAny <DataContracts.NHLGameContract>()), Times.Once);
        }
        public async Task <IHttpActionResult> SaveNewNhlGame([FromBody] NHLGameContract nhlGameContract)
        {
            if (nhlGameContract == null)
            {
                return(BadRequest());
            }

            if (string.IsNullOrEmpty(nhlGameContract.AwayPlayer1) || string.IsNullOrEmpty(nhlGameContract.HomePlayer1) ||
                string.IsNullOrEmpty(nhlGameContract.HomeTeam) || string.IsNullOrEmpty(nhlGameContract.AwayTeam))
            {
                return(BadRequest("Invalid Parameter supplied."));
            }

            await _nhlService.SaveNewNhlGameAsync(nhlGameContract);

            return(Ok());
        }