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
41 lines
1.3 KiB
C#
41 lines
1.3 KiB
C#
using Centron.Interfaces.Administration.Logins;
|
|
using CentronSoftware.Centron.WebServices.Interception.Interceptors;
|
|
using System;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
using System.ServiceModel.Web;
|
|
using CentronSoftware.Centron.WebServices.Connections;
|
|
using Xunit;
|
|
|
|
namespace Centron.Tests.EndToEnd.Tests.ApplicationKinds
|
|
{
|
|
public class ApplicationKindTests
|
|
{
|
|
[Fact]
|
|
public void NoDuplicateApplicationKinds()
|
|
{
|
|
var duplicates = ApplicationKind.GetAllKinds()
|
|
.GroupBy(f => f.Id)
|
|
.Where(f => f.Count() > 1)
|
|
.ToList();
|
|
|
|
if (duplicates.Any())
|
|
throw new Exception($"There is a duplicate ApplicationKind with the ID {duplicates[0].Key}. This is not allowed, the IDs need to be unique.");
|
|
}
|
|
|
|
[Fact]
|
|
public void AuthenticateAttributesThrowNoErrors()
|
|
{
|
|
var methods = typeof(ICentronRestService).GetMethods().Where(f => f.GetCustomAttribute<WebInvokeAttribute>() != null);
|
|
|
|
foreach (var method in methods)
|
|
{
|
|
var attribute = method.GetCustomAttribute<AuthenticateAttribute>();
|
|
|
|
if (attribute != null)
|
|
Assert.NotNull(attribute.Applications);
|
|
}
|
|
}
|
|
}
|
|
}
|