using Centron.BusinessLogic; using Centron.BusinessLogic.EmployeeArea; using Centron.BusinessLogic.WebServices.Sales.Support; using Centron.Data.Entities.Administration.Logins; using Centron.Data.WebServices.Sales.Support; using Centron.Tests.EndToEnd.Infrastructure; using Xunit.Abstractions; namespace Centron.Tests.EndToEnd.Tests.WikiHelpdesks { public class WikiHelpdeskTests : EndToEndTest { public WikiHelpdeskTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } public override void Execute() { var ticket = this.CreateTicket(); } private HelpdeskDTO CreateTicket() { using (var session = new BLSession()) { //Get an app user that acts as the current user var user = session.GetBL().GetAppUser(f => f.I3D == 11); //Create a new ticket var ticket = session.GetBL().GetNewTicketFromCustomer(user, 10022); //Set some values ticket.ShortDescription = "Mein super wichtiges Ticket!"; ticket.Description = "Mit einer nicht sehr ausführlichen Beschreibung."; //Save the helpdesk var saveHelpdeskResult = session.GetBL().SaveHelpdesk(ticket, new LoggedInUser(user)); //Verify the saveHelpdeskResult this.Verifier.Verify("SaveHelpdeskResult", saveHelpdeskResult); //Load the complete helpdesk object var savedTicket = session.GetBL().GetHelpdeskByI3D(saveHelpdeskResult.Data, new LoggedInUser(user)); //Verify the savedTicket this.Verifier.Verify("SavedTicket", savedTicket); return savedTicket.Data; } } } }