using Centron.BusinessLogic; using Centron.BusinessLogic.EmployeeArea; using Centron.BusinessLogic.WebServices.Sales.Receipts; using Centron.Data.Entities.Administration.Logins; using Centron.Data.WebServices.Sales.Receipts.Orders; using Centron.Interfaces.BL; using Centron.Tests.EndToEnd.Infrastructure; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using Xunit.Abstractions; namespace Centron.Tests.EndToEnd.TicketTests.Ticket124401 { public class Ticket124401Test : EndToEndTest { private LoggedInUser GetUser(BLSession session) => new LoggedInUser(session.GetBL().GetAppUser(f => f.I3D == 11)); private LoggedInUser GetUser() { using (var session = new BLSession()) return new LoggedInUser(session.GetBL().GetAppUser(f => f.I3D == 11)); } private string _openTransOrderXML = @" itscope 2022-01-05T11:43:11 193B-220105-3 2022-01-05T11:42:51.459 deu 14598 buyer
DRK-Kreisverband Gütersloh e.V. d73f90ec-4b81-4467-ba2c-f3087a5635eb Heinze Daniel Sonstige daniel.heinze@hosysteme.de Kaiserstraße 38 33330 Gütersloh Deutschland DE
14598 invoice_recipient
DRK-Kreisverband Gütersloh e.V. 63a732aa-9c9c-499e-aa31-0c82fea717cd Heinze Daniel Sonstige daniel.heinze@hosysteme.de Kaiserstraße 38 33330 Gütersloh Deutschland DE
14598 delivery
DRK-Kreisverband Gütersloh e.V. Kaiserstraße 38 33330 Gütersloh Deutschland DE
667 manufacturer
Lenovo Global Technology Germany GmbH Meitnerstr. 9 70563 Stuttgart Deutschland DE +49 711 656900 http://www.lenovo.com/de/de/ e092f2de-96c8-4f33-a0db-182219f2947c
20002650 supplier
ho.Systeme GmbH & Co. KG Kreisstraße 10 33790 Halle Deutschland DE +49 5201/971770 +49 5201/97177177 www.hosysteme.de 3d00be03-8c01-4bac-afd4-e70021a7acd9
Test 123 14598 20002650 14598 14598 EUR true false 5.00
00001 - 20002650 1000000678000 HOSTDNB15Basic bundle 8913673000 0195042247329 8913673000 Lenovo ThinkPad E15 \1 - Ryzen 5 4500U / 2.3 GHz, ThinkPad E15 - 15,6"" Notebook - 2,3 GHz 39,6 cm 667 20T8000MGE component 1 C62 1 C62 850.00 standard_rate VAT 0.19 161.50 850.00 true 1 850.00
"; public Ticket124401Test(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } public override void Execute() { this.CreateOrderPositionItemsFromOpenTransXML(); } private void CreateOrderPositionItemsFromOpenTransXML() { using (var session = new BLSession()) { var result = session.GetBL() .CreateOrderFromITscope(10022, null, null, this._openTransOrderXML, this.GetUser().User) .ThrowIfError(); this.Verifier.Verify("OrderPositionItems", result); } } } }