コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 public SecurityMutualFundDto GetobjSecurityMutualFundDto(string symbol)
 {
     return(SecurityMfRepository.GetSecurityMfBySymbol(symbol));
 }