using Centron.BusinessLogic; using Centron.BusinessLogic.Administration.Settings; using Centron.BusinessLogic.Sales.Receipts.Orders; using Centron.Tests.EndToEnd.Infrastructure; using Xunit.Abstractions; namespace Centron.Tests.EndToEnd.TicketTests.Ticket128142; public class Ticket128142Tests : EndToEndTest { public Ticket128142Tests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } private const int OrderI3D = 198; public override void Execute() { this.PrepareDatabase(); using var session = new BLSession(); var notificationMailsResult = session.GetBL().SendOrderNotificationMails(OrderI3D, -1, this.GetLoggedInUser().User); this.Verifier.Verify("OrderNotificationMails", notificationMailsResult); } private void PrepareDatabase() { this.Sql($"UPDATE dbo.Stammdat SET Wert = 2 WHERE I3D = {(int)AppSettingsConst.OrderDirectDelivery}"); // Send mail with window, so the SendOrderNotificationMails will return the emails this.Sql($"UPDATE dbo.Stammdat SET Wert = 2 WHERE I3D = {(int)AppSettingsConst.OrderReducedAmount}"); // Same for order-reduced mail this.Sql($"UPDATE dbo.Stammdat SET Wert = 1 WHERE I3D = {(int)AppSettingsConst.HasDirectDeliveryMailDepartment}"); // Send mail with window, so the SendOrderNotificationMails will return the emails } }