Exemple #1
0
        public async Task GetHtml_response_have_html_tags()
        {
            var query = new QueryFilterBuilder <OutboxInvoiceGetModel>()
                        .PageIndex(1)
                        .PageSize(3)
                        .QueryFor(q => q.Currency, Operator.Equal, "TRY")
                        .Build();
            var pageList = await inboxInvoiceClient.Get(query);

            var model = pageList.Items.FirstOrDefault();

            var streamData = await inboxInvoiceClient.GetHtml(model.Id);

            using (var reader = new StreamReader(streamData, Encoding.UTF8))
            {
                string value = reader.ReadToEnd();
                Assert.Contains("<html>", value);
                Assert.Contains("</html>", value);
                Assert.Contains("<head>", value);
            }
        }
        [HttpGet("previewhtml/{id}")] //48653485-b3ac-4daa-b9b4-aa8418a3a86b
        public async Task <IActionResult> PreviewHtml(Guid id)
        {
            var t = await inboxInvoiceClient.GetHtml(id, false);

            return(Ok(t));
        }