public void Given_I_Call_ServerParkExists_Then_The_Correct_Method_Is_called_On_The_Api() { //arrange _blaiseApiMock.Setup(b => b.ServerParkExists(_serverParkName)) .Returns(It.IsAny <bool>()); //act _sut.ServerParkExists(_serverParkName); //assert _blaiseApiMock.Verify(v => v.ServerParkExists(_serverParkName), Times.Once); }
public IHttpActionResult ServerParkExists([FromUri] string serverParkName) { var exists = _serverParkService.ServerParkExists(serverParkName); _loggingService.LogInfo($"Successfully found server park '{serverParkName}'"); return(Ok(exists)); }
public bool ServerParkExists(string serverParkName) { serverParkName.ThrowExceptionIfNullOrEmpty("serverParkName"); return(_parkService.ServerParkExists(_connectionModel, serverParkName)); }