Example #1
0
        public void CT1_Insert()
        {
            Assert.That(async() => await _service.Insert(_invoice), Throws.Nothing);

            Task.Delay(2000);

            Varsis.Data.Model.Connector.POSInvoice invoice = readInvoice();
            Assert.IsNotNull(invoice);
        }
Example #2
0
        public void Setup()
        {
            ConfigurationBuilder builder = new ConfigurationBuilder();

            builder.AddJsonFile(".\\appSettingsB1.json");

            ILoggerFactory    factory = new LoggerFactory();
            ILogger <Service> logger  = factory.CreateLogger <Service>();

            _configuration = builder.Build();
            _service       = new Service(_configuration, logger);

            doLogin();

            //Instancia produto
            _invoice = new Varsis.Data.Model.Connector.POSInvoice()
            {
                DocumentType  = "dDocument_Items",
                DocumentDate  = new DateTime(2020, 02, 07),
                DocumentTime  = new DateTime(2020, 02, 07, 14, 43, 0),
                DueDate       = new DateTime(2020, 02, 07),
                CustomerId    = "C99999",
                SalesPersonId = -1,
                BranchId      = 3,
                InvoiceId     = 9987,
                InvoiceSeries = "1",
                InvoiceModel  = "53",
                FiscalKey     = "3588888888888"
            };

            _invoice.Items = new List <Model.Connector.POSInvoiceItem>();

            _invoice.Items.Add(new Model.Connector.POSInvoiceItem()
            {
                LineSequence = 0,
                ItemId       = "0001000002",
                Quantity     = 1,
                Price        = 235.0,
                Usage        = 10
            });
        }