using System; using Centron.BusinessLogic; using Centron.BusinessLogic.WebServices.Sales.Receipts; using Centron.Interfaces.BL; using Centron.Tests.EndToEnd.Infrastructure; using Xunit.Abstractions; namespace Centron.Tests.EndToEnd.Tests.Receipts; public class ReceiptOfferUpdateClassificationTest : EndToEndTest { public ReceiptOfferUpdateClassificationTest(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } public override void Execute() { using var session = new BLSession(); var result = session.GetBL().UpdateOfferClassification(base.GetLoggedInUser(), 6691, Guid.Parse("47E669EF-9DCD-4EDF-AA0A-5321A0D29352"), new DateTime(2024, 05, 22), 3, 1); if (result.Status == ResultStatus.Error) { throw new Exception(result.Message); } Verifier.VerifySql("ReceiptOfferUpdateClassificationTestResult", "SELECT AnlageI3D, AnlageArt, Beschreibung FROM AnlageLog WHERE AnlageI3D = 6691 AND AnlageArt = 1 ORDER BY Beschreibung"); if (result.Data == Guid.Parse("47E669EF-9DCD-4EDF-AA0A-5321A0D29352")) { throw new Exception("After updating the classification, the ConcurrencyControlGuid should be changed."); } } }