public void QuerySingleSecurityMfNoExceptionTest() { var list = _repository.GetSecurityMfBySymbol("FCNTX"); Assert.That(list.Id, Is.EqualTo(2153)); Assert.That(list.MorningStarRating, Is.EqualTo(4)); Assert.IsInstanceOf <SecurityMutualFundDto>(list); }
public HttpResponseMessage Get([FromUri] string symbol) { HttpResponseMessage response; try { var securityMf = SecurityMfRepository.GetSecurityMfBySymbol(symbol); response = securityMf != null?Request.CreateResponse <SecurityMutualFundDto>(HttpStatusCode.OK, securityMf) : new HttpResponseMessage(HttpStatusCode.NotFound); } catch (Exception exception) { response = Request.CreateErrorResponse(HttpStatusCode.InternalServerError, exception.Message); } return(response); }
public SecurityMutualFundDto GetobjSecurityMutualFundDto(string symbol) { return(SecurityMfRepository.GetSecurityMfBySymbol(symbol)); }