public void GetContest_EmptyGuid_Returns() { //arrange //act var result = _sut.GetContest(Guid.Empty); //assert Assert.IsNotNull(result); Assert.AreEqual(null, result.Result.Champion); }
public virtual Task <ContestResponse> GetContest(Guid sessionId) { try { var result = ContestRepository.GetContest(sessionId); return(result); } catch (Exception ex) { Logger.Error("ContestService.GetContest failed", this, ex); } return(null); }
public HttpResponseMessage <Contest> Get(int code, HttpRequestMessage request) { try { return(new HttpResponseMessage <Contest>(contestRepository.GetContest(code)) { StatusCode = HttpStatusCode.OK }); } catch (Exception ex) { return(new HttpResponseMessage <Contest>(null) { StatusCode = HttpStatusCode.InternalServerError }); } }