feat(19-02): add app registration UI to profile dialog and 7 ViewModel tests

- ProfileManagementDialog.xaml: height 750, new Row 4 with Register/Remove buttons
- BooleanToVisibilityConverter added to Window.Resources
- Fallback instructions panel bound to ShowFallbackInstructions
- RegistrationStatus text block with StringToVisibilityConverter
- Buttons row shifted to Row 5
- ProfileManagementViewModelRegistrationTests: 7 unit tests, all passing
- ProfileManagementViewModelLogoTests: updated to 5-param constructor
This commit is contained in:
Dev
2026-04-09 15:19:37 +02:00
parent 42b5eda460
commit 809ac8613b
3 changed files with 210 additions and 5 deletions

View File

@@ -15,6 +15,7 @@ public class ProfileManagementViewModelLogoTests : IDisposable
{
private readonly string _tempFile;
private readonly Mock<IBrandingService> _mockBranding;
private readonly Mock<IAppRegistrationService> _mockAppReg;
private readonly GraphClientFactory _graphClientFactory;
private readonly ILogger<ProfileManagementViewModel> _logger;
@@ -23,6 +24,7 @@ public class ProfileManagementViewModelLogoTests : IDisposable
_tempFile = Path.GetTempFileName();
File.Delete(_tempFile);
_mockBranding = new Mock<IBrandingService>();
_mockAppReg = new Mock<IAppRegistrationService>();
_graphClientFactory = new GraphClientFactory(new MsalClientFactory());
_logger = NullLogger<ProfileManagementViewModel>.Instance;
}
@@ -40,7 +42,8 @@ public class ProfileManagementViewModelLogoTests : IDisposable
profileService,
_mockBranding.Object,
_graphClientFactory,
_logger);
_logger,
_mockAppReg.Object);
}
[Fact]
@@ -102,7 +105,8 @@ public class ProfileManagementViewModelLogoTests : IDisposable
profileService,
_mockBranding.Object,
_graphClientFactory,
_logger);
_logger,
_mockAppReg.Object);
vm.SelectedProfile = profile;
@@ -173,7 +177,8 @@ public class ProfileManagementViewModelLogoTests : IDisposable
profileService,
_mockBranding.Object,
_graphClientFactory,
_logger);
_logger,
_mockAppReg.Object);
vm.SelectedProfile = profile;
Assert.NotNull(vm.ClientLogoPreview);