コード例 #1
0
        public async Task Get_AllCardType()
        {
            var service = new CardTypeService(_httpClient);
            var result  = await service.GetAllCardTypes(requestUri);

            // Assert
            Assert.False(result.Status == HttpStatusCode.BadRequest, "ERROR");
            Assert.True(result.Status == HttpStatusCode.OK, "OK");
        }
コード例 #2
0
        public static async Task <dynamic> InformationCombo()
        {
            List <string> tipoCartao = new List <string>();

            var serviceTipoCartao = new CardTypeService(_httpClient);
            var resultTipoCartao  = await serviceTipoCartao.GetAllCardTypes(requestUri);

            foreach (var item in resultTipoCartao.Data)
            {
                tipoCartao.Add(item.Name);
            }

            return(tipoCartao);
        }
コード例 #3
0
        public static async Task <dynamic> Information()
        {
            var serviceTipoCartao = new CardTypeService(_httpClient);
            var resultTipoCartao  = await serviceTipoCartao.GetAllCardTypes(requestUri);

            foreach (var item in resultTipoCartao.Data)
            {
                cardType.Add(new CardType {
                    Id = item.Id, Name = item.Name
                });
            }

            return(cardType);
        }