Files
Christoph Schwörer f045b99a25 Codebasis als Dateien ins Arbeitsrepo statt als Gitlink
QuellCode/CentronERP war nur als Gitlink (Submodul-Referenz auf 79c1142)
getrackt, ohne .gitmodules und ohne erreichbares Remote. Der
Untersuchungsgegenstand der Versuchsreihe war damit nicht reproduzierbar
gesichert: Ein Klon haette ein leeres Verzeichnis erhalten, und die Belege
der 3.287 Anforderungen waeren nicht ueberpruefbar gewesen.

Umstellung:
- Historie nach c:\DEV\CentronERP_git_snapshot_79c1142 ausgelagert
  (vollstaendig lesbar, enthaelt 79c1142 und Vorgaenger 89ccfd6)
- Gitlink aus dem Index entfernt
- Dateiinhalt aufgenommen: 24.557 Dateien, rund 333 MB

Die verschachtelte .gitignore der Codebasis gilt weiter, Build-Artefakte
bleiben ausgeschlossen. Details in Versuche/Versuch_01/_Codebasis-Nachweis.md
2026-08-26 07:43:51 +02:00

1738 lines
71 KiB
C#

using Centron.BusinessLogic;
using Centron.BusinessLogic.Administration.Masterdata;
using Centron.BusinessLogic.Administration.Settings;
using Centron.BusinessLogic.DataExchange.Connectors;
using Centron.BusinessLogic.EmployeeArea;
using Centron.BusinessLogic.Mail;
using Centron.BusinessLogic.MyDay;
using Centron.BusinessLogic.Sales.Receipts;
using Centron.BusinessLogic.WebServices.Accounts.Survey;
using Centron.BusinessLogic.WebServices.Administration.ArtificialIntelligence;
using Centron.BusinessLogic.WebServices.Administration.Employees.EmployeeSettings;
using Centron.BusinessLogic.WebServices.Administration.HourlySurchargeRates;
using Centron.BusinessLogic.WebServices.Administration.CentronConfigDb;
using Centron.BusinessLogic.WebServices.Administration.Logins;
using Centron.BusinessLogic.WebServices.Administration.Logins.LoginSettings;
using Centron.BusinessLogic.WebServices.Administration.MasterData;
using Centron.BusinessLogic.WebServices.Administration.Phone.PhoneSettings;
using Centron.BusinessLogic.WebServices.Administration.Settings.SettingGroups;
using Centron.BusinessLogic.WebServices.Calendar;
using Centron.BusinessLogic.WebServices.CustomerArea;
using Centron.BusinessLogic.WebServices.DataExchange.BookKeeping;
using Centron.BusinessLogic.WebServices.DataExchange.Rmm;
using Centron.BusinessLogic.WebServices.DataExchange.PaymentTransactions;
using Centron.BusinessLogic.WebServices.Finances.ActivitySettings;
using Centron.BusinessLogic.WebServices.Finances.ProductLifecyle;
using Centron.BusinessLogic.WebServices.Logistics.LogisticSettings;
using Centron.BusinessLogic.WebServices.Monitoring;
using Centron.BusinessLogic.WebServices.Monitoring.NAble.Asset;
using Centron.BusinessLogic.WebServices.PasswordManager;
using CentronSoftware.Centron.WebServices.Entities.PasswordManager;
using Centron.BusinessLogic.WebServices.ProductMatrix;
using Centron.BusinessLogic.WebServices.Purchasing.PurchaseSettings;
using Centron.BusinessLogic.WebServices.RiverSuiteAssetManagment;
using Centron.BusinessLogic.WebServices.Sales.CustomerAssets.Contracts;
using Centron.BusinessLogic.WebServices.Sales.Customers.CrmProjects;
using Centron.BusinessLogic.WebServices.Sales.Receipts;
using Centron.BusinessLogic.WebServices.Sales.Receipts.LeasingAndService;
using Centron.BusinessLogic.WebServices.Sales.Receipts.PickUps;
using Centron.BusinessLogic.WebServices.Sales.Receipts.Switzerland;
using Centron.BusinessLogic.WebServices.Security;
using Centron.BusinessLogic.WebServices.Warehousing;
using Centron.Data.Entities.Administration;
using Centron.Data.Entities.Administration.Logins;
using Centron.Data.Entities.Administration.Settings.SettingGroups;
using Centron.Data.WebServices.Mail;
using Centron.Interfaces.Administration.Settings;
using Centron.Interfaces.BL;
using Centron.Tests.EndToEnd.Infrastructure;
using Centron.Tests.EndToEnd.Infrastructure.Verifier;
using CentronSoftware.Centron.WebServices.Entities.Administration.ArtificialIntelligence;
using CentronSoftware.Centron.WebServices.Entities.MyDay;
using CentronSoftware.Centron.WebServices.Entities.Sales.Receipts.Invoices;
using System;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using Xunit;
using Xunit.Abstractions;
namespace Centron.Tests.EndToEnd.Tests.Settings
{
public class SettingsTests : EndToEndTest
{
private AppUser GetUser()
{
using (var session = new BLSession())
return session.GetBL<AppUserBL>().GetAppUser(f => f.I3D == 11);
}
public SettingsTests(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
this.Verifier.Settings.CleanupProperty<HelpdeskSettings>(f => f.HelpdeskClosingExternalEmailBodyRTF, RegexHelper.RtfInfo, "{\\info{\\author John Doe}");
this.Verifier.Settings.CleanupProperty<HelpdeskSettings>(f => f.HelpdeskClosingInternalEmailBodyRTF, RegexHelper.RtfInfo, "{\\info{\\author John Doe}");
this.Verifier.Settings.CleanupProperty<HelpdeskSettings>(f => f.HelpdeskEMailForCustomerBodyRTF, RegexHelper.RtfInfo, "{\\info{\\author John Doe}");
this.Verifier.Settings.CleanupProperty<HelpdeskSettings>(f => f.HelpdeskEMailForEditorBodyRTF, RegexHelper.RtfInfo, "{\\info{\\author John Doe}");
this.Verifier.Settings.CleanupProperty<HelpdeskSettings>(f => f.HelpdeskEMailForOthersBodyRTF, RegexHelper.RtfInfo, "{\\info{\\author John Doe}");
this.Verifier.Settings.CleanupProperty<HelpdeskSettings>(f => f.HelpdeskForwardingExternalEmailBodyRTF, RegexHelper.RtfInfo, "{\\info{\\author John Doe}");
this.Verifier.Settings.CleanupProperty<HelpdeskSettings>(f => f.HelpdeskForwardingInternalEmailBodyRTF, RegexHelper.RtfInfo, "{\\info{\\author John Doe}");
this.Verifier.Settings.CleanupProperty<HelpdeskSettings>(f => f.NewTicketMailBodyRTF, RegexHelper.RtfInfo, "{\\info{\\author John Doe}");
this.Verifier.Settings.CleanupProperty<HelpdeskSettings>(f => f.OperationReportBodyRTF, RegexHelper.RtfInfo, "{\\info{\\author John Doe}");
}
public override void Execute()
{
this.EnsureAllApplicationSettingsHaveADefinition();
this.EnsureThereAreNoDuplicateSettings();
this.HelpdeskSettings();
this.CrmSettings();
this.TaskManagementSettings();
this.BookKeepingSettings();
this.MyDaySettings();
this.ProductMatrixSettings();
this.SurveySettings();
this.ContractArticleSettings();
this.SBOWebAccountRegistrationSettings();
this.TicketPatternSettings();
this.HelpdeskDunningSettings();
this.DunningSettings();
this.ArticleSettings();
this.DsgvoSettings();
this.SepaContractSettings();
this.TapiSettings();
this.PaymentTransactionSettings();
this.TextBlockSettings();
this.UpdateAvailableNotificationSettings();
this.ManagementInfoSettings();
this.DatevOnlineSettings();
this.EmployeeVariableSettings();
this.LoginSettings();
this.WebServiceSettings();
this.PaymentConditionsSettings();
this.PhoneSettings();
this.CalendarRepresentationSettings();
this.CalendarSynchronizationSettings();
this.ActivitySettings();
this.ProductLifecycleSettings();
this.LogisticSettings();
this.MailSettings();
this.PurchaseSettings();
this.GeneralContractSettings();
this.ClickBillingSettings();
this.ContigentSettings();
this.ContactPersonLabelSettings();
this.SaveHourlySurchargeRateSettings();
this.PickUpSettings();
this.SwitzerlandSettings();
this.VariableAttributesSettings();
this.ContactDepartmentSettings();
this.BookKeepingExportInformations();
this.PasswordManagerSettings();
this.RiverSuiteWebServiceSettings();
this.ContractSettings();
this.LeasingSettings();
this.ServiceSettings();
this.ReceiptSettings();
this.PdfSigningSettings();
this.ChecklistSettings();
this.ReceiptInvoiceSettings();
this.RmaSettings();
this.WebCartSettings();
this.AppointmentsForTicketsSettings();
this.ArtificialIntelligenceSettings();
this.DocBeeConnectorSettings();
this.RmmConnectionSettings();
}
private void EnsureAllApplicationSettingsHaveADefinition()
{
foreach (ApplicationSettingID setting in Enum.GetValues(typeof(ApplicationSettingID)))
{
var definition = ApplicationSettingDefinitions.Instance.GetApplicationSettingDescription(setting);
Assert.NotNull(definition);
}
}
private void EnsureThereAreNoDuplicateSettings()
{
var appSettingsConst = Enum.GetNames(typeof(AppSettingsConst))
.Select(f => new {Setting = f, I3D = (int)Enum.Parse(typeof(AppSettingsConst), f)})
.OrderBy(f => f.I3D)
.ThenBy(f => f.Setting)
.ToList();
var appSettingsConstDuplicates = appSettingsConst.GroupBy(f => f.I3D).Where(f => f.Count() > 1).ToList();
this.Verifier.Verify("DuplicateAppSettingsConst", appSettingsConstDuplicates);
var applicationSettings = Enum.GetNames(typeof(ApplicationSettingID))
.Select(f => new {Setting = f, I3D = (int)Enum.Parse(typeof(ApplicationSettingID), f)})
.OrderBy(f => f.I3D)
.ThenBy(f => f.Setting)
.ToList();
var applicationSettingDuplicates = applicationSettings.GroupBy(f => f.I3D).Where(f => f.Count() > 1).ToList();
this.Verifier.Verify("DuplicateApplicationSettingID", applicationSettingDuplicates);
}
private void HelpdeskSettings()
{
// we add a value to AppSettingsConst.GeneralMessages so we can properly test it.
this.Sql($"UPDATE Stammdat SET WertMemo = 'test@test.test' WHERE I3D = {(int)AppSettingsConst.GeneralMessages}");
using (var session = new BLSession())
{
var settings = session.GetBL<AppSettingsGroupWebServiceBL>().GetHelpdeskSettings();
Assert.NotNull(settings);
this.Verifier.Verify("HelpdeskSettings", settings);
this.ChangeAllPropertyValues(settings,
f => f.Adviser1Caption,
f => f.Adviser1CaptionShort,
f => f.Adviser2Caption,
f => f.Adviser2CaptionShort,
f => f.Adviser3Caption,
f => f.Adviser4Caption,
f => f.Adviser5Caption,
f => f.Adviser6Caption,
f => f.NoPasswordRequestAtHotlineModule,
f => f.UseFormattedVersion,
f => f.HelpdeskForwardingUseFormattedVersion,
f => f.HelpdeskEMailForEditorUseFormattedVersion,
f => f.HelpdeskEMailForOthersUseFormattedVersion,
f => f.NewHelpdeskMessageUseGeneral,
#pragma warning disable CS0612 // Type or member is obsolete
f => f.HelpdeskClosingExternalEmailSubject,
f => f.HelpdeskClosingExternalEmailBody,
f => f.HelpdeskClosingExternalEmailBodyRTF,
f => f.HelpdeskClosingInternalEmailSubject,
f => f.HelpdeskClosingInternalEmailBody,
f => f.HelpdeskClosingInternalEmailBodyRTF,
f => f.HelpdeskEMailForCustomerSubject,
f => f.HelpdeskEMailForCustomerBody,
f => f.HelpdeskEMailForCustomerBodyRTF,
f => f.HelpdeskEMailForEditorSubject,
f => f.HelpdeskEMailForEditorBody,
f => f.HelpdeskEMailForEditorBodyRTF,
f => f.HelpdeskEMailForOthersSubject,
f => f.HelpdeskEMailForOthersBody,
f => f.HelpdeskEMailForOthersBodyRTF,
f => f.HelpdeskForwardingExternalEmailSubject,
f => f.HelpdeskForwardingExternalEmailBody,
f => f.HelpdeskForwardingExternalEmailBodyRTF,
f => f.HelpdeskForwardingInternalEmailSubject,
f => f.HelpdeskForwardingInternalEmailBody,
f => f.HelpdeskForwardingInternalEmailBodyRTF,
f => f.NewTicketMailSubject,
f => f.NewTicketMailBody,
f => f.NewTicketMailBodyRTF,
f => f.OperationReportSubject,
f => f.OperationReportBody,
f => f.OperationReportBodyRTF
#pragma warning restore CS0612 // Type or member is obsolete
);
session.GetBL<AppSettingsGroupWebServiceBL>().UpdateHelpdeskSettings(settings);
var settings2 = session.GetBL<AppSettingsGroupWebServiceBL>().GetHelpdeskSettings();
Assert.NotNull(settings2);
var propertiesToIgnore = new CentronVerifierSettings();
propertiesToIgnore.IgnoreProperties<HelpdeskSettings>(
// Ignore because of HelpdeskEmailSubjectPrefix changes
f => f.HelpdeskClosingExternalEmailSubject,
f => f.HelpdeskClosingInternalEmailSubject,
f => f.HelpdeskEMailForCustomerSubject,
f => f.HelpdeskEMailForEditorSubject,
f => f.HelpdeskEMailForOthersSubject,
f => f.HelpdeskForwardingExternalEmailSubject,
f => f.HelpdeskForwardingInternalEmailSubject,
f => f.NewTicketMailSubject,
f => f.OperationReportSubject,
// Ignore because of HelpdeskForwardingIdentical changes
#pragma warning disable CS0612 //obsolete
f => f.HelpdeskForwardingExternalEmailBody,
#pragma warning restore CS0612
f => f.HelpdeskForwardingExternalEmailBodyRTF);
this.Verifier.Verify("HelpdeskSettings2_WithInvalidEnumValues", settings, propertiesToIgnore);
this.Verifier.Verify("HelpdeskSettings2", settings2, propertiesToIgnore);
}
}
private void CrmSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<AppSettingsGroupWebServiceBL>().GetCrmSettings();
Assert.NotNull(settings);
this.Verifier.Verify("CrmSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<AppSettingsGroupWebServiceBL>().UpdateCrmSettings(settings);
var settings2 = session.GetBL<AppSettingsGroupWebServiceBL>().GetCrmSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("CrmSettings2", settings);
this.Verifier.Verify("CrmSettings2", settings2);
}
}
private void TaskManagementSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<AppSettingsGroupWebServiceBL>().GetTaskManagementSettings();
Assert.NotNull(settings);
this.Verifier.Verify("TaskManagementSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<AppSettingsGroupWebServiceBL>().UpdateTaskManagementSettings(settings);
var settings2 = session.GetBL<AppSettingsGroupWebServiceBL>().GetTaskManagementSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("TaskManagementSettings2", settings);
this.Verifier.Verify("TaskManagementSettings2", settings2);
}
}
private void BookKeepingSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<AppSettingsGroupWebServiceBL>().GetBookKeepingSettings();
Assert.NotNull(settings);
this.Verifier.Verify("BookKeepingSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<AppSettingsGroupWebServiceBL>().UpdateBookKeepingSettings(settings);
var settings2 = session.GetBL<AppSettingsGroupWebServiceBL>().GetBookKeepingSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("BookKeepingSettings2", settings);
this.Verifier.Verify("BookKeepingSettings2", settings2);
}
}
private void MyDaySettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<MyDayWebServiceBL>().GetSettings();
Assert.Equal(ResultStatus.Success, settings.Status);
Assert.NotNull(settings.Data);
this.Verifier.Verify("MyDaySettings", settings.Data);
this.ChangeAllPropertyValues(settings.Data,
#pragma warning disable CS0618 //obsolete
f => f.DaySummarySubject,
f => f.DaySummaryBody,
f => f.DayNotFinalizedNotificationBody,
f => f.DayNotFinalizedTeamLeaderNotificationBody,
f => f.DayNotFinalizedNotificationSubject,
f => f.DayNotFinalizedTeamLeaderNotificationSubject
#pragma warning restore CS0618
);
session.GetBL<MyDayWebServiceBL>().UpdateSettings(settings.Data);
var settings2 = session.GetBL<MyDayWebServiceBL>().GetSettings();
Assert.Equal(ResultStatus.Success, settings2.Status);
Assert.NotNull(settings2.Data);
var propertiesToIgnore = new CentronVerifierSettings();
propertiesToIgnore.IgnoreProperties<MyDaySettingsDTO>(
#pragma warning disable CS0618 //obsolete
f => f.DayNotFinalizedNotificationSubject,
f => f.DayNotFinalizedTeamLeaderNotificationSubject,
f => f.IsSimplifiedMyDayNewWorkItemTypesList
#pragma warning restore CS0618
);
this.Verifier.Verify("MyDaySettings2", settings.Data, propertiesToIgnore);
this.Verifier.Verify("MyDaySettings2", settings2.Data, propertiesToIgnore);
}
}
private void ProductMatrixSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<ProductMatrixWebserviceBL>().GetProductMatrixSettings();
Assert.Equal(ResultStatus.Success, settings.Status);
Assert.NotNull(settings.Data);
this.Verifier.Verify("ProductMatrixSettings", settings.Data);
this.ChangeAllPropertyValues(settings.Data);
session.GetBL<ProductMatrixWebserviceBL>().UpdateProductMatrixSettings(settings.Data);
var settings2 = session.GetBL<ProductMatrixWebserviceBL>().GetProductMatrixSettings();
Assert.Equal(ResultStatus.Success, settings2.Status);
Assert.NotNull(settings2.Data);
this.Verifier.Verify("ProductMatrixSettings2", settings.Data);
this.Verifier.Verify("ProductMatrixSettings2", settings2.Data);
}
}
private void SurveySettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<SurveyProcessWebServiceBL>().GetSurveySettings();
Assert.Equal(ResultStatus.Success, settings.Status);
Assert.NotNull(settings.Data);
this.Verifier.Verify("SurveySettings", settings.Data);
this.ChangeAllPropertyValues(settings.Data);
session.GetBL<SurveyProcessWebServiceBL>().UpdateSurveySettings(settings.Data);
var settings2 = session.GetBL<SurveyProcessWebServiceBL>().GetSurveySettings();
Assert.Equal(ResultStatus.Success, settings2.Status);
Assert.NotNull(settings2.Data);
this.Verifier.Verify("SurveySettings2", settings.Data);
this.Verifier.Verify("SurveySettings2", settings2.Data);
}
}
private void ContractArticleSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<ContractWebServiceBL>().GetContractArticleSettings();
Assert.NotNull(settings);
this.Verifier.Verify("ContractArticleSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<ContractWebServiceBL>().UpdateContractArticleSettings(settings);
var settings2 = session.GetBL<ContractWebServiceBL>().GetContractArticleSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("ContractArticleSettings2", settings);
this.Verifier.Verify("ContractArticleSettings2", settings2);
}
}
private void SBOWebAccountRegistrationSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<AppSettingsGroupWebServiceBL>().GetSBOWebAccountRegistrationSettings();
Assert.NotNull(settings);
this.Verifier.Verify("SBOWebAccountRegistrationSettings", settings);
this.ChangeAllPropertyValues(settings,
f => f.DefaultSenderEmailAddress);
session.GetBL<AppSettingsGroupWebServiceBL>().UpdateSBOWebAccountRegistrationSettings(settings);
var settings2 = session.GetBL<AppSettingsGroupWebServiceBL>().GetSBOWebAccountRegistrationSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("SBOWebAccountRegistrationSettings2", settings);
this.Verifier.Verify("SBOWebAccountRegistrationSettings2", settings2);
}
}
private void TicketPatternSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<AppSettingsGroupWebServiceBL>().GetTicketPatternSettings();
Assert.NotNull(settings);
this.Verifier.Verify("TicketPatternSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<AppSettingsGroupWebServiceBL>().UpdateTicketPatternSettings(settings);
var settings2 = session.GetBL<AppSettingsGroupWebServiceBL>().GetTicketPatternSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("TicketPatternSettings2", settings);
this.Verifier.Verify("TicketPatternSettings2", settings2);
}
}
private void HelpdeskDunningSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<AppSettingsGroupWebServiceBL>().GetHelpdeskDunningSettings();
Assert.NotNull(settings);
this.Verifier.Verify("HelpdeskDunningSettings", settings);
}
}
private void DunningSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<DunningWebServiceBL>().GetSettings();
Assert.NotNull(settings);
this.Verifier.Verify("DunningSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<DunningWebServiceBL>().UpdateSettings(settings);
var settings2 = session.GetBL<DunningWebServiceBL>().GetSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("DunningSettings2", settings);
this.Verifier.Verify("DunningSettings2", settings2);
}
}
private void ArticleSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<AppSettingsGroupWebServiceBL>().GetArticleSettings();
Assert.NotNull(settings);
this.Verifier.Verify("ArticleSettings", settings);
this.ChangeAllPropertyValues(settings,
f => f.ArticleVarAttributes1Text,
f => f.ArticleVarAttributes2Text,
f => f.ArticleVarAttributes3Text);
session.GetBL<AppSettingsGroupWebServiceBL>().UpdateArticleSettings(settings);
var settings2 = session.GetBL<AppSettingsGroupWebServiceBL>().GetArticleSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("ArticleSettings2", settings);
this.Verifier.Verify("ArticleSettings2", settings2);
}
}
private void DsgvoSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<AppSettingsGroupWebServiceBL>().GetDsgvoSettings();
Assert.NotNull(settings);
this.Verifier.Verify("DsgvoSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<AppSettingsGroupWebServiceBL>().UpdateDsvgoSettings(settings);
var settings2 = session.GetBL<AppSettingsGroupWebServiceBL>().GetDsgvoSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("DsgvoSettings2", settings);
this.Verifier.Verify("DsgvoSettings2", settings2);
}
}
private void SepaContractSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<AppSettingsGroupWebServiceBL>().GetSepaContractSettings();
Assert.NotNull(settings);
this.Verifier.Verify("SepaContractSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<AppSettingsGroupWebServiceBL>().UpdateSepaContractSettings(settings);
var settings2 = session.GetBL<AppSettingsGroupWebServiceBL>().GetSepaContractSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("SepaContractSettings2", settings);
this.Verifier.Verify("SepaContractSettings2", settings2);
}
}
private void TapiSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<AppSettingsGroupWebServiceBL>().GetTapiSettings();
Assert.NotNull(settings);
this.Verifier.Verify("TapiSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<AppSettingsGroupWebServiceBL>().UpdateTapiSettings(settings);
var settings2 = session.GetBL<AppSettingsGroupWebServiceBL>().GetTapiSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("TapiSettings2", settings);
this.Verifier.Verify("TapiSettings2", settings2);
}
}
private void PaymentTransactionSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<PaymentTransactionWebServiceBL>().GetSettingsForPaymentTransaction();
Assert.Equal(ResultStatus.Success, settings.Status);
Assert.NotNull(settings.Data);
this.Verifier.Verify("PaymentTransactionSettings", settings.Data);
this.ChangeAllPropertyValues(settings.Data);
session.GetBL<PaymentTransactionWebServiceBL>().SaveSettingsForPaymentTransaction(settings.Data);
var settings2 = session.GetBL<PaymentTransactionWebServiceBL>().GetSettingsForPaymentTransaction();
Assert.Equal(ResultStatus.Success, settings2.Status);
Assert.NotNull(settings2.Data);
this.Verifier.Verify("PaymentTransactionSettings2", settings.Data);
this.Verifier.Verify("PaymentTransactionSettings2", settings2.Data);
}
}
private void TextBlockSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<AppSettingsGroupWebServiceBL>().GetTextBlockSettings();
Assert.NotNull(settings);
this.Verifier.Verify("TextBlockSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<AppSettingsGroupWebServiceBL>().UpdateTextBlockSettings(settings);
var settings2 = session.GetBL<AppSettingsGroupWebServiceBL>().GetTextBlockSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("TextBlockSettings2", settings);
this.Verifier.Verify("TextBlockSettings2", settings2);
}
}
private void UpdateAvailableNotificationSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<AppSettingsGroupWebServiceBL>().GetUpdateAvailableNotificationSettings();
Assert.NotNull(settings);
this.Verifier.Verify("UpdateAvailableNotificationSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<AppSettingsGroupWebServiceBL>().UpdateUpdateAvailableNotificationSettings(settings);
var settings2 = session.GetBL<AppSettingsGroupWebServiceBL>().GetUpdateAvailableNotificationSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("UpdateAvailableNotificationSettings2", settings);
this.Verifier.Verify("UpdateAvailableNotificationSettings2", settings2);
}
}
private void ManagementInfoSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<AppSettingsGroupWebServiceBL>().GetManagementInfoSettings();
Assert.NotNull(settings);
this.Verifier.Verify("ManagementInfoSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<AppSettingsGroupWebServiceBL>().UpdateManagementInfoSettings(settings);
var settings2 = session.GetBL<AppSettingsGroupWebServiceBL>().GetManagementInfoSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("ManagementInfoSettings2", settings);
this.Verifier.Verify("ManagementInfoSettings2", settings2);
}
}
private void DatevOnlineSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<AppSettingsGroupWebServiceBL>().GetDatevOnlineSettings();
Assert.NotNull(settings);
this.Verifier.Verify("DatevOnlineSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<AppSettingsGroupWebServiceBL>().UpdateDatevOnlineSettings(settings);
var settings2 = session.GetBL<AppSettingsGroupWebServiceBL>().GetDatevOnlineSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("DatevOnlineSettings2", settings);
this.Verifier.Verify("DatevOnlineSettings2", settings2);
}
}
private void EmployeeVariableSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<EmployeeSettingsWebServiceBL>().GetEmployeeVariableSettings(this.GetUser());
Assert.NotNull(settings);
this.Verifier.Verify("EmployeeVariableSettings", settings);
this.ChangeAllPropertyValues(settings,
f => f.CentronSystemUserEmployeeI3D,
f => f.RmmAgentSystemUserEmployeeI3D);
session.GetBL<EmployeeSettingsWebServiceBL>().UpdateEmployeeVariableSettings(settings);
var settings2 = session.GetBL<EmployeeSettingsWebServiceBL>().GetEmployeeVariableSettings(this.GetUser());
Assert.NotNull(settings2);
this.Verifier.Verify("EmployeeVariableSettings2", settings);
this.Verifier.Verify("EmployeeVariableSettings2", settings2);
}
}
private void LoginSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<LoginSettingsWebServiceBL>().GetLoginSettings();
Assert.NotNull(settings);
this.Verifier.Verify("LoginSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<LoginSettingsWebServiceBL>().UpdateLoginSettings(settings);
var settings2 = session.GetBL<LoginSettingsWebServiceBL>().GetLoginSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("LoginSettings2", settings);
this.Verifier.Verify("LoginSettings2", settings2);
}
}
private void WebServiceSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<TicketWebServiceBL>().GetWebServiceSettings();
Assert.Equal(ResultStatus.Success, settings.Status);
Assert.NotNull(settings.Data);
this.Verifier.Verify("WebServiceSettings", settings.Data);
this.ChangeAllPropertyValues(settings.Data);
session.GetBL<TicketWebServiceBL>().SetWebServiceSettings(settings.Data);
var settings2 = session.GetBL<TicketWebServiceBL>().GetWebServiceSettings();
Assert.Equal(ResultStatus.Success, settings2.Status);
Assert.NotNull(settings2.Data);
this.Verifier.Verify("WebServiceSettings2", settings.Data);
this.Verifier.Verify("WebServiceSettings2", settings2.Data);
}
}
private void PaymentConditionsSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<AssetConditionWebServiceBL>().GetPaymentConditionsSettings();
Assert.NotNull(settings);
this.Verifier.Verify("PaymentConditionsSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<AssetConditionWebServiceBL>().UpdatePaymentConditionSettings(settings);
var settings2 = session.GetBL<AssetConditionWebServiceBL>().GetPaymentConditionsSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("PaymentConditionsSettings2", settings);
this.Verifier.Verify("PaymentConditionsSettings2", settings2);
}
}
private void PhoneSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<PhoneSettingsWebServiceBL>().GetPhoneSettings();
Assert.NotNull(settings);
this.Verifier.Verify("PhoneSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<PhoneSettingsWebServiceBL>().UpdatePhoneSettings(settings);
var settings2 = session.GetBL<PhoneSettingsWebServiceBL>().GetPhoneSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("PhoneSettings2", settings);
this.Verifier.Verify("PhoneSettings2", settings2);
}
}
private void CalendarRepresentationSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<CalendarWebServiceBL>().GetCalendarRepresentationSettings();
Assert.NotNull(settings);
this.Verifier.Verify("CalendarRepresentationSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<CalendarWebServiceBL>().UpdateCalendarRepresentationSettings(settings);
var settings2 = session.GetBL<CalendarWebServiceBL>().GetCalendarRepresentationSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("CalendarRepresentationSettings2", settings);
this.Verifier.Verify("CalendarRepresentationSettings2", settings2);
}
}
private void CalendarSynchronizationSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<CalendarWebServiceBL>().GetCalendarSynchronizationSettings();
Assert.NotNull(settings);
this.Verifier.Verify("CalendarSynchronizationSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<CalendarWebServiceBL>().UpdateCalendarSynchronizationSettings(settings);
var settings2 = session.GetBL<CalendarWebServiceBL>().GetCalendarSynchronizationSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("CalendarSynchronizationSettings2", settings);
this.Verifier.Verify("CalendarSynchronizationSettings2", settings2);
}
}
private void AppointmentsForTicketsSettings()
{
var settings = this.WithSession(f => f.GetBL<CalendarWebServiceBL>().GetAppointmentsForTicketsSettings());
this.Verifier.Verify("AppointmentsForTicketsSettings", settings);
this.ChangeAllPropertyValues(settings);
this.WithSession(f => f.GetBL<CalendarWebServiceBL>().UpdateAppointmentsForTicketsSettings(settings));
var settings2 = this.WithSession(f => f.GetBL<CalendarWebServiceBL>().GetAppointmentsForTicketsSettings());
this.Verifier.Verify("AppointmentsForTicketsSettings2", settings);
this.Verifier.Verify("AppointmentsForTicketsSettings2", settings2);
}
private void ActivitySettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<ActivitySettingsWebServiceBL>().GetActivitySettings();
Assert.NotNull(settings);
this.Verifier.Verify("ActivitySettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<ActivitySettingsWebServiceBL>().UpdateActivitySettings(settings);
var settings2 = session.GetBL<ActivitySettingsWebServiceBL>().GetActivitySettings();
Assert.NotNull(settings2);
this.Verifier.Verify("ActivitySettings2", settings);
this.Verifier.Verify("ActivitySettings2", settings2);
}
}
private void ProductLifecycleSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<ProductLifecycleWebServiceBL>().GetProductLifecycleSettings();
Assert.NotNull(settings);
this.Verifier.Verify("ProductLifecycleSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<ProductLifecycleWebServiceBL>().UpdateProductLifecycleSettings(settings);
var settings2 = session.GetBL<ProductLifecycleWebServiceBL>().GetProductLifecycleSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("ProductLifecycleSettings2", settings);
this.Verifier.Verify("ProductLifecycleSettings2", settings2);
}
}
private void LogisticSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<LogisticSettingsWebServiceBL>().GetLogisticSettings();
Assert.NotNull(settings);
this.Verifier.Verify("LogisticSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<LogisticSettingsWebServiceBL>().UpdateLogisticSettings(settings);
var settings2 = session.GetBL<LogisticSettingsWebServiceBL>().GetLogisticSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("LogisticSettings2", settings);
this.Verifier.Verify("LogisticSettings2", settings2);
}
}
private void MailSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<MailSettingsBL>().GetMailSettings();
Assert.NotNull(settings);
this.Verifier.Verify("MailSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<MailSettingsBL>().SetMailSettings(settings, new LoggedInUser(GetUser()));
var settings2 = session.GetBL<MailSettingsBL>().GetMailSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("MailSettings2", settings);
this.Verifier.Verify("MailSettings2", settings2);
}
}
private void PurchaseSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<PurchaseSettingsWebServiceBL>().GetPurchaseSettings();
Assert.NotNull(settings);
this.Verifier.Verify("PurchaseSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<PurchaseSettingsWebServiceBL>().UpdatePurchaseSettings(settings);
var settings2 = session.GetBL<PurchaseSettingsWebServiceBL>().GetPurchaseSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("PurchaseSettings2", settings);
this.Verifier.Verify("PurchaseSettings2", settings2);
}
}
private void GeneralContractSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<ContractWebServiceBL>().GetGeneralContractSettings();
Assert.Equal(ResultStatus.Success, settings.Status);
Assert.NotNull(settings.Data);
this.Verifier.Verify("GeneralContractSettings", settings.Data);
this.ChangeAllPropertyValues(settings.Data);
session.GetBL<ContractWebServiceBL>().UpdateGeneralContractSettings(settings.Data);
var settings2 = session.GetBL<ContractWebServiceBL>().GetGeneralContractSettings();
Assert.Equal(ResultStatus.Success, settings2.Status);
Assert.NotNull(settings2.Data);
this.Verifier.Verify("GeneralContractSettings2", settings.Data);
this.Verifier.Verify("GeneralContractSettings2", settings2.Data);
}
}
private void ClickBillingSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<ContractWebServiceBL>().GetClickBillingSettings();
Assert.Equal(ResultStatus.Success, settings.Status);
Assert.NotNull(settings.Data);
this.Verifier.Verify("ClickBillingSettings", settings.Data);
this.ChangeAllPropertyValues(settings.Data);
session.GetBL<ContractWebServiceBL>().UpdateClickBillingSettings(settings.Data);
var settings2 = session.GetBL<ContractWebServiceBL>().GetClickBillingSettings();
Assert.Equal(ResultStatus.Success, settings2.Status);
Assert.NotNull(settings2.Data);
this.Verifier.Verify("ClickBillingSettings2", settings.Data);
this.Verifier.Verify("ClickBillingSettings2", settings2.Data);
}
}
private void ContigentSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<ContractWebServiceBL>().GetContigentSettings();
Assert.Equal(ResultStatus.Success, settings.Status);
Assert.NotNull(settings.Data);
this.Verifier.Verify("ContigentSettings", settings.Data);
this.ChangeAllPropertyValues(settings.Data);
session.GetBL<ContractWebServiceBL>().UpdateContigentSettings(settings.Data);
var settings2 = session.GetBL<ContractWebServiceBL>().GetContigentSettings();
Assert.Equal(ResultStatus.Success, settings2.Status);
Assert.NotNull(settings2.Data);
this.Verifier.Verify("ContigentSettings2", settings.Data);
this.Verifier.Verify("ContigentSettings2", settings2.Data);
}
}
private void ContactPersonLabelSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<CrmProjectWebServiceBL>().GetCrmProjectSettings();
Assert.NotNull(settings);
this.Verifier.Verify("ContactPersonLabelSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<CrmProjectWebServiceBL>().UpdateCrmProjectSettings(settings);
var settings2 = session.GetBL<CrmProjectWebServiceBL>().GetCrmProjectSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("ContactPersonLabelSettings2", settings);
this.Verifier.Verify("ContactPersonLabelSettings2", settings2);
}
}
private void SaveHourlySurchargeRateSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<HourlySurchargeRatesWebServiceBL>().GetHourlySurchargeRateSettings();
Assert.Equal(ResultStatus.Success, settings.Status);
Assert.NotNull(settings.Data);
this.Verifier.Verify("SaveHourlySurchargeRateSettings", settings.Data);
this.ChangeAllPropertyValues(settings.Data);
session.GetBL<HourlySurchargeRatesWebServiceBL>().SaveHourlySurchargeRateSettings(settings.Data);
var settings2 = session.GetBL<HourlySurchargeRatesWebServiceBL>().GetHourlySurchargeRateSettings();
Assert.Equal(ResultStatus.Success, settings2.Status);
Assert.NotNull(settings2.Data);
this.Verifier.Verify("SaveHourlySurchargeRateSettings2", settings.Data);
this.Verifier.Verify("SaveHourlySurchargeRateSettings2", settings2.Data);
}
}
private void PickUpSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<PickUpSettingsWebServiceBL>().GetPickUpSettings();
Assert.NotNull(settings);
this.Verifier.Verify("PickUpSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<PickUpSettingsWebServiceBL>().UpdatePickUpSettings(settings);
var settings2 = session.GetBL<PickUpSettingsWebServiceBL>().GetPickUpSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("PickUpSettings2", settings);
this.Verifier.Verify("PickUpSettings2", settings2);
}
}
private void SwitzerlandSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<SwitzerlandSettingsWebServiceBL>().GetSwitzerlandSettings();
Assert.NotNull(settings);
this.Verifier.Verify("SwitzerlandSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<SwitzerlandSettingsWebServiceBL>().UpdateSwitzerlandSettings(settings);
var settings2 = session.GetBL<SwitzerlandSettingsWebServiceBL>().GetSwitzerlandSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("SwitzerlandSettings2", settings);
this.Verifier.Verify("SwitzerlandSettings2", settings2);
}
}
private void VariableAttributesSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<ArticleVariableWebServiceBL>().GetArticleVariableSettings();
Assert.NotNull(settings);
this.Verifier.Verify("VariableAttributesSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<ArticleVariableWebServiceBL>().UpdateArticleVariableSettings(settings);
var settings2 = session.GetBL<ArticleVariableWebServiceBL>().GetArticleVariableSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("VariableAttributesSettings2", settings);
this.Verifier.Verify("VariableAttributesSettings2", settings2);
}
}
private void ContactDepartmentSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<ContactDepartmentWebserviceBL>().GetContactDepartmentSettings();
Assert.NotNull(settings);
this.Verifier.Verify("ContactDepartmentSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<ContactDepartmentWebserviceBL>().UpdateContactDepartmentSettings(settings);
var settings2 = session.GetBL<ContactDepartmentWebserviceBL>().GetContactDepartmentSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("ContactDepartmentSettings2", settings);
this.Verifier.Verify("ContactDepartmentSettings2", settings2);
}
}
private void BookKeepingExportInformations()
{
using (var session = new BLSession())
{
var settings = session.GetBL<BookKeepingExportWebServiceBL>().GetBookKeepingExportInformations();
Assert.Equal(ResultStatus.Success, settings.Status);
Assert.NotNull(settings.Data);
this.Verifier.Verify("BookKeepingExportInformations", settings);
this.ChangeAllPropertyValues(settings.Data);
session.GetBL<BookKeepingExportWebServiceBL>().UpdateBookKeepingExportInformations(settings.Data);
var settings2 = session.GetBL<BookKeepingExportWebServiceBL>().GetBookKeepingExportInformations();
Assert.Equal(ResultStatus.Success, settings2.Status);
Assert.NotNull(settings2.Data);
this.Verifier.Verify("BookKeepingExportInformations2", settings);
this.Verifier.Verify("BookKeepingExportInformations2", settings2);
}
}
private void PasswordManagerSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<PasswordManagerWebServiceBL>().GetPasswordManagerSettings();
Assert.Equal(ResultStatus.Success, settings.Status);
Assert.NotNull(settings.Data);
this.Verifier.Verify("PasswordManagerSettings", settings.Data);
this.ChangeAllPropertyValues(settings.Data);
session.GetBL<PasswordManagerWebServiceBL>().UpdatePasswordManagerSettings(new LoggedInUser(this.GetUser()), settings.Data);
var settings2 = session.GetBL<PasswordManagerWebServiceBL>().GetPasswordManagerSettings();
Assert.Equal(ResultStatus.Success, settings2.Status);
Assert.NotNull(settings2.Data);
this.Verifier.Verify("PasswordManagerSettings2", settings.Data);
this.Verifier.Verify("PasswordManagerSettings2", settings2.Data);
}
}
private void RiverSuiteWebServiceSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<RiverSuiteWebServiceSettingsWebServiceBL>().GetRiverSuiteWebServiceSettings(this.GetLoggedInUser());
Assert.Equal(ResultStatus.Success, settings.Status);
Assert.NotNull(settings.Data);
this.Verifier.Verify("RiverSuiteWebServiceSettings", settings.Data);
this.ChangeAllPropertyValues(settings.Data);
session.GetBL<RiverSuiteWebServiceSettingsWebServiceBL>().UpdateRiverSuiteWebServiceSettings(settings.Data, this.GetLoggedInUser());
var settings2 = session.GetBL<RiverSuiteWebServiceSettingsWebServiceBL>().GetRiverSuiteWebServiceSettings(this.GetLoggedInUser());
Assert.Equal(ResultStatus.Success, settings2.Status);
Assert.NotNull(settings2.Data);
this.Verifier.Verify("RiverSuiteWebServiceSettings2", settings.Data);
this.Verifier.Verify("RiverSuiteWebServiceSettings2", settings2.Data);
}
}
private void RmmConnectionSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<RmmConnectionSettingsWebServiceBL>().GetRmmConnectionSettings(this.GetLoggedInUser());
Assert.Equal(ResultStatus.Success, settings.Status);
Assert.NotNull(settings.Data);
this.Verifier.Verify("RmmConnectionSettings", settings.Data);
this.ChangeAllPropertyValues(settings.Data);
session.GetBL<RmmConnectionSettingsWebServiceBL>().UpdateRmmConnectionSettings(settings.Data, this.GetLoggedInUser());
var settings2 = session.GetBL<RmmConnectionSettingsWebServiceBL>().GetRmmConnectionSettings(this.GetLoggedInUser());
Assert.Equal(ResultStatus.Success, settings2.Status);
Assert.NotNull(settings2.Data);
this.Verifier.Verify("RmmConnectionSettings2", settings.Data);
this.Verifier.Verify("RmmConnectionSettings2", settings2.Data);
}
}
private void ContractSettings()
{
using (var session = new BLSession())
{
//it seems not all save mehtods which changes properties in this cache clear it, so we clear it first for clean test values
ReceiptItemSpecialArticleHelperBL.ClearSpecialArticlesCache();
var settings = session.GetBL<ContractWebServiceBL>().GetContractSettings(this.GetUser());
Assert.NotNull(settings);
this.Verifier.Verify("ContractSettings", settings);
this.ChangeAllPropertyValues(settings,
f => f.RecalculationArticleCode,
f => f.BalanceArticleArticleCode,
f => f.BalanceArticleI3D,
f => f.RecalculationArticleI3D,
f => f.ServiceArticleMaterialgroupID,
f => f.FreeContingentDescriptionRequired);
session.GetBL<ContractWebServiceBL>().UpdateContractSettings(settings, this.GetUser());
var settings2 = session.GetBL<ContractWebServiceBL>().GetContractSettings(this.GetUser());
Assert.NotNull(settings2);
this.Verifier.Verify("ContractSettings2", settings);
this.Verifier.Verify("ContractSettings2", settings2);
}
}
private void LeasingSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<LeasingRateWebServiceBL>().GetLeasingSettings();
Assert.NotNull(settings);
this.Verifier.Verify("LeasingSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<LeasingRateWebServiceBL>().SaveLeasingSettings(new LoggedInUser(this.GetUser()), settings);
var settings2 = session.GetBL<LeasingRateWebServiceBL>().GetLeasingSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("LeasingSettings2", settings);
this.Verifier.Verify("LeasingSettings2", settings2);
}
}
private void ServiceSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<ServiceRateWebServiceBL>().GetServiceSettings();
Assert.NotNull(settings);
this.Verifier.Verify("ServiceSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<ServiceRateWebServiceBL>().SaveServiceSettings(new LoggedInUser(this.GetUser()), settings);
var settings2 = session.GetBL<ServiceRateWebServiceBL>().GetServiceSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("ServiceSettings2", settings);
this.Verifier.Verify("ServiceSettings2", settings2);
}
}
private void ReceiptSettings()
{
using (var session = new BLSession())
{
//it seems not all save mehtods which changes properties in this cache clear it, so we clear it first for clean test values
ReceiptItemSpecialArticleHelperBL.ClearSpecialArticlesCache();
var settings = session.GetBL<ReceiptWebServiceBL>().GetReceiptSettings(this.GetUser());
Assert.NotNull(settings);
this.Verifier.Verify("ReceiptSettings", settings);
this.ChangeAllPropertyValues(settings,
f => f.RecalculationArticleCode,
f => f.BalanceArticleArticleCode,
f => f.BalanceArticleI3D,
f => f.RecalculationArticleI3D,
f => f.Adviser1Active,
f => f.Adviser1Caption,
f => f.Adviser2Active,
f => f.Adviser2Caption,
f => f.Adviser3Active,
f => f.Adviser3Caption,
f => f.Adviser4Active,
f => f.Adviser4Caption,
f => f.Adviser5Active,
f => f.Adviser5Caption,
f => f.Adviser6Active,
f => f.Adviser6Caption,
f => f.CanAlwaysUseBarcodes,
f => f.CanCancelInvoices,
f => f.CanChangeDateInContracts,
f => f.CanChangeDateInCreditVouchers,
f => f.CanChangeDateInDeliveryLists,
f => f.CanChangeDateInInvoices,
f => f.CanChangeDateInOffers,
f => f.CanChangeDateInOrders,
f => f.CanChangeDateInPickupLists,
f => f.CanChangeDateInSupplierOrders,
f => f.CanChangePriceInContracts,
f => f.CanChangePriceInCreditVouchers,
f => f.CanChangePriceInDeliveryLists,
f => f.CanChangePriceInInvoices,
f => f.CanChangePriceInOffers,
f => f.CanChangePriceInOrders,
f => f.CanChangePriceInPickupLists,
f => f.CanChangePurchasePriceInDeliveryLists,
f => f.CanChangePurchasePriceInInvoices,
f => f.CanChangePurchasePriceInOffers,
f => f.CanChangePurchasePriceInOrders,
f => f.CanCreateNewContract,
f => f.CanCreateNewCreditVouchers,
f => f.CanCreateNewDeliveryLists,
f => f.CanCreateNewInvoices,
f => f.CanCreateNewOffers,
f => f.CanCreateNewOrders,
f => f.CanCreateNewPickupLists,
f => f.CanCreateNewSupplierOrder,
f => f.CanEditContract,
f => f.CanEditContractOnlyOwnBranch,
f => f.CanEditCreditVouchers,
f => f.CanEditCreditVouchersOnlyOwnBranch,
f => f.CanEditDeliveryLists,
f => f.CanEditDeliveryListsOnlyOwnBranch,
f => f.CanEditInvoices,
f => f.CanEditInvoicesOnlyOwnBranch,
f => f.CanEditOffers,
f => f.CanEditOffersOnlyOwnBranch,
f => f.CanEditOrders,
f => f.CanEditOrdersOnlyOwnBranch,
f => f.CanEditPickupLists,
f => f.ContractMasterDataListArticleI3D,
f => f.ContractMasterDataListArticleCode,
f => f.CustomerDiscountArticleCode,
f => f.CustomerDiscountArticleI3D,
f => f.ExternalArticleArticleCode,
f => f.ExternalArticleI3D,
f => f.IsSupplierReceiptsCustomPropertyAvailable,
f => f.IsSupplierReceiptsCustomPropertyMandatoryInReceiptSupplierCreditVoucher,
f => f.IsSupplierReceiptsCustomPropertyMandatoryInReceiptSupplierDeliveryList,
f => f.IsSupplierReceiptsCustomPropertyMandatoryInReceiptSupplierInvoice,
f => f.IsSupplierReceiptsCustomPropertyMandatoryInReceiptSupplierOffer,
f => f.IsSupplierReceiptsCustomPropertyMandatoryInReceiptSupplierOrder,
f => f.NewArticleArticleCode,
f => f.NewArticleI3D,
f => f.OutgoingPaymentArticleCode,
f => f.OutgoingPaymentArticleI3D,
f => f.ReceiptTemplateCustomerNumber,
f => f.RepairArticleI3D,
f => f.RepairArticleCode,
f => f.SuggestionOrderRelated,
f => f.SupplierReceiptsCustomPropertyCaption,
f => f.SupplierReceiptsCustomPropertyCharacterCount,
f => f.TakeDistributorFromCurrentPurchase,
f => f.CanEditPickupListsOnlyOwnBranch,
f => f.CanPassCurrentPurchasePricePosition,
f => f.CanChangeAdviser1InCreditVouchers,
f => f.CanChangeAdviser1InDeliveryLists,
f => f.CanChangeAdviser1InInvoices,
f => f.CanChangeAdviser1InOffers,
f => f.CanChangeAdviser1InOrders,
f => f.CanChangeAdviser1InPickupLists,
f => f.CanChangeAdviser2InCreditVouchers,
f => f.CanChangeAdviser2InDeliveryLists,
f => f.CanChangeAdviser2InInvoices,
f => f.CanChangeAdviser2InOffers,
f => f.CanChangeAdviser2InOrders,
f => f.CanChangeAdviser2InPickupLists,
f => f.CanChangeEditorInInvoices,
f => f.MaintenanceFeeArticleI3D,
f => f.MaintenanceFeeArticleCode
);
session.GetBL<ReceiptWebServiceBL>().UpdateReceiptSettings(settings, this.GetUser());
var settings2 = session.GetBL<ReceiptWebServiceBL>().GetReceiptSettings(this.GetUser());
Assert.NotNull(settings2);
this.Verifier.Verify("ReceiptSettings2", settings);
this.Verifier.Verify("ReceiptSettings2", settings2);
}
}
public void PdfSigningSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<PdfSigningWebServiceBL>().GetPdfSigningSettings();
Assert.Equal(ResultStatus.Success, settings.Status);
Assert.NotNull(settings.Data);
this.Verifier.Verify("PdfSigningSettings", settings.Data);
this.ChangeAllPropertyValues(settings.Data);
session.GetBL<PdfSigningWebServiceBL>().SavePdfSigningSettings(new LoggedInUser(this.GetUser()), settings.Data, false, new byte[0], string.Empty);
var settings2 = session.GetBL<PdfSigningWebServiceBL>().GetPdfSigningSettings();
Assert.Equal(ResultStatus.Success, settings2.Status);
Assert.NotNull(settings2);
this.Verifier.Verify("PdfSigningSettings2", settings.Data);
this.Verifier.Verify("PdfSigningSettings2", settings2.Data);
}
}
private void ChecklistSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<AppSettingsGroupWebServiceBL>().GetChecklistSettings();
Assert.NotNull(settings);
this.Verifier.Verify("ChecklistSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<AppSettingsGroupWebServiceBL>().UpdateChecklistSettings(settings);
var settings2 = session.GetBL<AppSettingsGroupWebServiceBL>().GetChecklistSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("ChecklistSettings2", settings);
this.Verifier.Verify("ChecklistSettings2", settings2);
}
}
private void ReceiptInvoiceSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<ReceiptWebServiceBL>().GetReceiptInvoiceSettings();
Assert.NotNull(settings);
Assert.Equal(ResultStatus.Success, settings.Status);
this.Verifier.Verify("ReceiptInvoiceSettings", settings.Data);
this.ChangeAllPropertyValues(settings.Data, f => f.ZugferdSellerContactPerson);
settings.Data.ZugferdSellerContactPerson = ZugferdSellerContactPersonKind.Adviser2;
session.GetBL<ReceiptWebServiceBL>().SaveReceiptInvoiceSettings(settings.Data);
var settings2 = session.GetBL<ReceiptWebServiceBL>().GetReceiptInvoiceSettings();
Assert.NotNull(settings2);
Assert.Equal(ResultStatus.Success, settings2.Status);
this.Verifier.Verify("ReceiptInvoiceSettings2", settings.Data);
this.Verifier.Verify("ReceiptInvoiceSettings2", settings2.Data);
}
}
private void RmaSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<AppSettingsGroupWebServiceBL>().GetRmaSettings();
Assert.NotNull(settings);
this.Verifier.Verify("RmaSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<AppSettingsGroupWebServiceBL>().UpdateRmaSettings(settings);
var settings2 = session.GetBL<AppSettingsGroupWebServiceBL>().GetRmaSettings();
Assert.NotNull(settings2);
this.Verifier.Verify("RmaSettings2", settings);
this.Verifier.Verify("RmaSettings2", settings2);
}
}
private void WebCartSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<ReceiptCartWebServiceBL>().GetWebCartSettings(this.GetLoggedInUser());
Assert.NotNull(settings);
this.Verifier.Verify("WebCartSettings", settings);
this.ChangeAllPropertyValues(settings, f => f.PurchaseOrderNumberRequired);
session.GetBL<ReceiptCartWebServiceBL>().UpdateWebCartSettings(settings);
var settings2 = session.GetBL<ReceiptCartWebServiceBL>().GetWebCartSettings(this.GetLoggedInUser());
Assert.NotNull(settings2);
this.Verifier.Verify("WebCartSettings2", settings);
this.Verifier.Verify("WebCartSettings2", settings2);
}
}
private void ArtificialIntelligenceSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<ArtificialIntelligenceWebServiceBL>().GetAISettings();
Assert.NotNull(settings);
this.Verifier.Verify("OpenAISettings", settings);
this.ChangeAllPropertyValues(settings);
settings.ApiType = ArtificialIntelligenceApiType.OpenAiCompatible;
settings.ApiLink = "https://api.tensorix.ai/v1";
settings.WebSearchProvider = ArtificialIntelligenceWebSearchProvider.Linkup;
settings.LinkupSearchMode = ArtificialIntelligenceLinkupSearchModes.DeepSearchResults;
session.GetBL<ArtificialIntelligenceWebServiceBL>().UpdateAISettings(settings);
var settings2 = session.GetBL<ArtificialIntelligenceWebServiceBL>().GetAISettings();
Assert.NotNull(settings2);
this.Verifier.Verify("OpenAISettings2", settings);
this.Verifier.Verify("OpenAISettings2", settings2);
}
}
private void DocBeeConnectorSettings()
{
using (var session = new BLSession())
{
var settings = session.GetBL<DocBeeConnectorConfigurationBL>().GetDocBeeConnectorConfiguration();
Assert.NotNull(settings);
this.Verifier.Verify("DocBeeConnectorSettings", settings);
this.ChangeAllPropertyValues(settings);
session.GetBL<DocBeeConnectorConfigurationBL>().UpdateDocBeeConnectorConfiguration(settings);
var settings2 = session.GetBL<DocBeeConnectorConfigurationBL>().GetDocBeeConnectorConfiguration();
#pragma warning disable CS0618 // Type or member is obsolete
settings.OrderTicketCreationType = settings2.OrderTicketCreationType;
#pragma warning restore CS0618 // Type or member is obsolete
Assert.NotNull(settings2);
this.Verifier.Verify("DocBeeConnectorSettings2", settings);
this.Verifier.Verify("DocBeeConnectorSettings2", settings2);
}
}
private void ChangeAllPropertyValues<T>(T item, params Expression<Func<T, object>>[] blackList)
{
var propertyInfos = item.GetType().GetProperties();
var x = 0;
var blackListItems = blackList.Select(f => (((f.Body as UnaryExpression)?.Operand ?? f.Body) as MemberExpression).Member as PropertyInfo);
foreach (var propertyInfo in propertyInfos)
{
if (blackListItems.Contains(propertyInfo))
continue;
x++;
var type = Nullable.GetUnderlyingType(propertyInfo.PropertyType) ?? propertyInfo.PropertyType;
if (type.IsEnum)
{
propertyInfo.SetValue(item, Enum.ToObject(type, x));
continue;
}
var typeCode = Type.GetTypeCode(type);
switch (typeCode)
{
case TypeCode.Boolean:
var b = (bool?)propertyInfo.GetValue(item, null);
propertyInfo.SetValue(item, !b);
break;
case TypeCode.DateTime:
propertyInfo.SetValue(item, new DateTime(2020, 1, 1).AddDays(x));
break;
case TypeCode.String:
propertyInfo.SetValue(item, x.ToString());
break;
case TypeCode.Decimal:
propertyInfo.SetValue(item, (decimal)x);
break;
case TypeCode.Double:
propertyInfo.SetValue(item, (double)x);
break;
case TypeCode.Int16:
case TypeCode.Int32:
case TypeCode.Int64:
propertyInfo.SetValue(item, x);
break;
}
}
}
}
}