Example #1
0
        public async Task DeveObterEnderecoComoXmlAsync()
        {
            var enderecoXml = await _viaCep.ObterEnderecoComoXmlAsync("01001000");

            Assert.NotNull(enderecoXml);
            Assert.True(enderecoXml.ToString().Contains("<xmlcep>"));

            enderecoXml = await _viaCep.ObterEnderecoComoXmlAsync("01001-000");

            Assert.NotNull(enderecoXml);
            Assert.True(enderecoXml.ToString().Contains("<xmlcep>"));

            var enderecosXml = await _viaCep.ObterEnderecosComoXmlAsync(_enderecoRequisicao);

            Assert.NotNull(enderecosXml);
            Assert.True(enderecosXml.ToString().Contains("<xmlcep>"));
        }
Example #2
0
 public async Task <XDocument> ComoXmlAsync()
 => await _viaCep.ObterEnderecoComoXmlAsync(_cep);