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
128 lines
5.3 KiB
C#
128 lines
5.3 KiB
C#
using System;
|
|
using System.Linq;
|
|
using Centron.BusinessLogic.WebServices.ItPlanner;
|
|
using Centron.BusinessLogic.WebServices.Sales.Support;
|
|
using Centron.Interfaces.BL;
|
|
using Centron.Interfaces.ItPlaner;
|
|
using Centron.Interfaces.Sales.Helpdesks;
|
|
using Centron.Tests.EndToEnd.Infrastructure;
|
|
using Xunit;
|
|
using Xunit.Abstractions;
|
|
|
|
namespace Centron.Tests.EndToEnd.Tests.ServiceBoardWeb;
|
|
|
|
public class ServiceBoardWebTests(ITestOutputHelper testOutputHelper)
|
|
: EndToEndTest(testOutputHelper)
|
|
{
|
|
[SkipOnLinuxFact]
|
|
public override void Execute()
|
|
{
|
|
this.PrepareDatabase();
|
|
|
|
this.TestHelpdeskType();
|
|
this.TestHelpdeskStatus();
|
|
this.TestHelpdeskPriority();
|
|
this.TestHelpdeskCategory();
|
|
this.TestHelpdeskTimerType();
|
|
this.TestVirtualObjectCategory();
|
|
}
|
|
|
|
private void PrepareDatabase()
|
|
{
|
|
}
|
|
|
|
private void TestHelpdeskType()
|
|
{
|
|
const int TypeI3D = 1;
|
|
|
|
var types = this.WithSession(s => s.GetBL<HelpdeskTypeWebServiceBL>().GetHelpdeskTypes(new HelpdeskTypeFilter()));
|
|
|
|
var type = types.First(f => f.I3D == TypeI3D);
|
|
type.ServiceBoardWebColor = "#FF0000";
|
|
type.ServiceBoardWebIcon = "thumbs-up";
|
|
|
|
this.WithSession(s => s.GetBL<HelpdeskTypeWebServiceBL>().SaveHelpdeskType(type));
|
|
|
|
var typesAfterSave = this.WithSession(s => s.GetBL<HelpdeskTypeWebServiceBL>().GetHelpdeskTypes(new HelpdeskTypeFilter()));
|
|
this.Verifier.Verify("HelpdeskType", typesAfterSave.First(f => f.I3D == TypeI3D));
|
|
}
|
|
|
|
private void TestHelpdeskStatus()
|
|
{
|
|
const int StatusI3D = 2;
|
|
|
|
var allStatus = this.WithSession(s => s.GetBL<HelpdeskWebServiceBL>().GetHelpdesksStates());
|
|
|
|
var status = allStatus.First(f => f.I3D == StatusI3D);
|
|
status.ServiceBoardWebColor = "#FF0000";
|
|
status.ServiceBoardWebIcon = "thumbs-up";
|
|
|
|
this.WithSession(s => s.GetBL<HelpdeskWebServiceBL>().SaveHelpdeskStatus(status));
|
|
|
|
var allStatusAfterSave = this.WithSession(s => s.GetBL<HelpdeskWebServiceBL>().GetHelpdesksStates());
|
|
this.Verifier.Verify("HelpdeskStatus", allStatusAfterSave.First(f => f.I3D == StatusI3D));
|
|
}
|
|
|
|
private void TestHelpdeskPriority()
|
|
{
|
|
const int PriorityI3D = 2;
|
|
|
|
var allPriorities = this.WithSession(s => s.GetBL<HelpdeskWebServiceBL>().GetActiveHelpdeskPriorities());
|
|
|
|
var priority = allPriorities.First(f => f.I3D == PriorityI3D);
|
|
priority.ServiceBoardWebColor = "#FF0000";
|
|
priority.ServiceBoardWebIcon = "thumbs-up";
|
|
|
|
this.WithSession(s => s.GetBL<HelpdeskWebServiceBL>().UpdateActiveHelpdeskPriorities(allPriorities));
|
|
|
|
var allPrioritiesAfterSave = this.WithSession(s => s.GetBL<HelpdeskWebServiceBL>().GetActiveHelpdeskPriorities());
|
|
this.Verifier.Verify("HelpdeskPriority", allPrioritiesAfterSave.First(f => f.I3D == PriorityI3D));
|
|
}
|
|
|
|
private void TestHelpdeskCategory()
|
|
{
|
|
const int CategoryI3D = 10;
|
|
|
|
var allCategories = this.WithSession(s => s.GetBL<HelpdeskCategoryWebServiceBL>().GetHelpdeskCategories(new HelpdeskCategoryFilter()));
|
|
|
|
var category = allCategories.First(f => f.I3D == CategoryI3D);
|
|
category.ServiceBoardWebColor = "#FF0000";
|
|
category.ServiceBoardWebIcon = "thumbs-up";
|
|
|
|
this.WithSession(s => s.GetBL<HelpdeskCategoryWebServiceBL>().SaveHelpdeskCategoryV2(category));
|
|
|
|
var allCategoriesAfterSave = this.WithSession(s => s.GetBL<HelpdeskCategoryWebServiceBL>().GetHelpdeskCategories(new HelpdeskCategoryFilter()));
|
|
this.Verifier.Verify("HelpdeskCategory", allCategoriesAfterSave.First(f => f.I3D == CategoryI3D));
|
|
}
|
|
|
|
private void TestHelpdeskTimerType()
|
|
{
|
|
const int TimerTypeI3D = 3;
|
|
|
|
var allTimerTypes = this.WithSession(s => s.GetBL<HelpdeskTimerTypeWebServiceBL>().GetHelpdeskTimerTypes());
|
|
|
|
var timerType = allTimerTypes.First(f => f.I3D == TimerTypeI3D);
|
|
timerType.ServiceBoardWebColor = "#FF0000";
|
|
timerType.ServiceBoardWebIcon = "thumbs-up";
|
|
|
|
this.WithSession(s => s.GetBL<HelpdeskTimerTypeWebServiceBL>().SaveHelpdeskTimerType(timerType));
|
|
|
|
var allTimerTypesAfterSave = this.WithSession(s => s.GetBL<HelpdeskTimerTypeWebServiceBL>().GetHelpdeskTimerTypes());
|
|
this.Verifier.Verify("HelpdeskTimerType", allTimerTypesAfterSave.First(f => f.I3D == TimerTypeI3D));
|
|
}
|
|
|
|
private void TestVirtualObjectCategory()
|
|
{
|
|
const int CategoryI3D = 1;
|
|
|
|
var allCategories = this.WithSession(s => s.GetBL<ChecklistVirtualObjectCategoryWebServiceBL>().GetChecklistVirtualObjectCategoriesByFilter(new RBChecklistVirtualObjectCategoryFilter())).ThrowIfError();
|
|
|
|
var category = allCategories.First(f => f.I3D == CategoryI3D);
|
|
category.ServiceBoardWebIcon = "thumbs-up";
|
|
|
|
this.WithSession(s => s.GetBL<ChecklistVirtualObjectCategoryWebServiceBL>().SaveOrUpdateChecklistVirtualObjectCategory(category));
|
|
|
|
var allCategoriesAfterSave = this.WithSession(s => s.GetBL<ChecklistVirtualObjectCategoryWebServiceBL>().GetChecklistVirtualObjectCategoriesByFilter(new RBChecklistVirtualObjectCategoryFilter())).ThrowIfError();
|
|
this.Verifier.Verify("VirtualObjectCategory", allCategoriesAfterSave.First(f => f.I3D == CategoryI3D));
|
|
}
|
|
} |