using System.Collections.Generic; using Centron.BusinessLogic.WebServices.Sales.Receipts; using Centron.Data.WebServices.Sales.Receipts; using Centron.Tests.EndToEnd.Infrastructure; using Xunit.Abstractions; namespace Centron.Tests.EndToEnd.TicketTests.Ticket141553; public class Ticket141553Tests : EndToEndTest { public Ticket141553Tests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } public override void Execute() { this.PrepareDatabase(); var input = new List { new UpdatedArticleText { ReceiptItemTemporaryId = "1", ArticleI3D = 4351, ManufacturerCode = string.Empty, CurrentText = "Blaues Patchkabel 5 Meter!", }, new UpdatedArticleText { ReceiptItemTemporaryId = "2", ArticleI3D = 4351, ManufacturerCode = string.Empty, CurrentText = "Patchkabel 5 m blau ", // Extra whitespace should be ignored }, new UpdatedArticleText { ReceiptItemTemporaryId = "3", ArticleI3D = 1, ManufacturerCode = "CB071A#BEK", CurrentText = "Officejet J3680 CB071A", } }; var result = this.WithSession(s => s.GetBL().GetUpdatedArticleTexts(input, this.GetLoggedInUser())); this.Verifier.Verify("Result", result); } private void PrepareDatabase() { // The external-articles in the database are kinda broken - a lot of them reference manufacturer 95 - which doesn't exist anymore // Just let them point to a different existing manufacturer this.Sql($"UPDATE dbo.HerstellerArtik SET I3D = 8 WHERE I3D = 95"); } }