diff --git a/tests/ReC.Tests/Application/Profile/ProfileProcedureTests.cs b/tests/ReC.Tests/Application/Profile/ProfileProcedureTests.cs index 23f6955..586cef9 100644 --- a/tests/ReC.Tests/Application/Profile/ProfileProcedureTests.cs +++ b/tests/ReC.Tests/Application/Profile/ProfileProcedureTests.cs @@ -5,6 +5,7 @@ using NUnit.Framework; using ReC.Application.Common.Procedures.DeleteProcedure; using ReC.Application.Common.Procedures.InsertProcedure; using ReC.Application.Common.Procedures.UpdateProcedure; +using ReC.Application.Common.Procedures.UpdateProcedure.Dto; using ReC.Application.Profile.Commands; using ReC.Tests.Application; @@ -35,7 +36,7 @@ public class ProfileProcedureTests : RecApplicationTestBase [Test] public async Task UpdateProfileProcedure_runs_via_mediator() { - var procedure = new UpdateProfileCommand { Data = { Active = false, TypeId = 2, Name = "updated", Mandantor = "man2" }, Id = 45 }; + var procedure = new UpdateProfileCommand { Data = new UpdateProfileDto { Active = false, TypeId = 2, Name = "updated", Mandantor = "man2" }, Id = 45 }; var (sender, scope) = CreateScopedSender(); using var _ = scope; diff --git a/tests/ReC.Tests/Application/Profile/ProfileQueryTests.cs b/tests/ReC.Tests/Application/Profile/ProfileQueryTests.cs index 8e718f0..8202bbf 100644 --- a/tests/ReC.Tests/Application/Profile/ProfileQueryTests.cs +++ b/tests/ReC.Tests/Application/Profile/ProfileQueryTests.cs @@ -23,8 +23,9 @@ public class ProfileQueryTests : RecApplicationTestBase [Test] public async Task ReadProfileViewQuery_returns_profile_from_database() { - var profileId = Configuration.GetValue("FakeProfileId"); - Assert.That(profileId, Is.Not.Null.And.GreaterThan(0), "FakeProfileId must be configured in appsettings.json"); + var profileId = await TryResolveProfileIdAsync(); + if (profileId is null or <= 0) + Assert.Ignore("No profile available in the database for this test (set FakeProfileId or insert a profile)."); var (sender, scope) = CreateScopedSender(); using var _ = scope;