using Centron.BusinessLogic; using Centron.BusinessLogic.WebServices.Accounts; using Centron.Tests.EndToEnd.Infrastructure; using Xunit.Abstractions; namespace Centron.Tests.EndToEnd.Tests.Account { public class AccountContactTests : EndToEndTest { private int _referenceAccountI3D = 1; public AccountContactTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } public override void Execute() { this.PrepareDatabase(); this.SearchAccountContactsByAdSearchstring(); } private void PrepareDatabase() { this.Sql("UPDATE AccountAddressContacts SET SearchTag = 'SearchTag' WHERE I3D = 1"); } private void SearchAccountContactsByAdSearchstring() { using (var session = new BLSession()) { var byEmailResult = session.GetBL() .SearchAccountContactByAdSearchstring(this._referenceAccountI3D, "support@c-entron.de"); this.Verifier.Verify("AccountContactByEmailResult", byEmailResult); var bySearchtag = session.GetBL() .SearchAccountContactByAdSearchstring(this._referenceAccountI3D, "Searchtag"); this.Verifier.Verify("AccountContactBySearchTagResult", bySearchtag); var defaultResult = session.GetBL() .SearchAccountContactByAdSearchstring(this._referenceAccountI3D, "youWontFindThisTextAnywhere"); this.Verifier.Verify("AccountContactDefaultResult", defaultResult); this.Sql("UPDATE AccountAddressContacts SET SearchTag = 'SearchTag' WHERE I3D = 2"); var bySearchtag2 = session.GetBL() .SearchAccountContactByAdSearchstring(this._referenceAccountI3D, "Searchtag"); this.Verifier.Verify("AccountContactBySearchTag2Result", bySearchtag2); } } } }