< Summary

Information
Class: LOCKnet.App.ViewModels.CredentialListDesignViewModel
Assembly: LOCKnet.App
File(s): /home/runner/work/LOCKnet/LOCKnet/src/LOCKnet.App/ViewModels/DesignData.cs
Line coverage
96%
Covered lines: 25
Uncovered lines: 1
Coverable lines: 26
Total lines: 49
Line coverage: 96.1%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Credentials()100%11100%
.ctor()100%11100%
get_SelectedCredential()100%210%
get_SearchText()100%11100%
get_StatusMessage()100%11100%
get_LockTimerText()100%11100%

File(s)

/home/runner/work/LOCKnet/LOCKnet/src/LOCKnet.App/ViewModels/DesignData.cs

#LineLine coverage
 1using LOCKnet.Core.DataAbstractions;
 2using System.Collections.ObjectModel;
 3
 4namespace LOCKnet.App.ViewModels;
 5
 6/// <summary>
 7/// Statische Design-Time-Daten für den Avalonia-Previewer.
 8/// Wird ausschließlich über Design.DataContext referenziert — nie zur Laufzeit verwendet.
 9/// </summary>
 10public static class DesignData
 11{
 12  /// <summary>Sample-ViewModel für die Credential-Liste (Designer-Vorschau).</summary>
 13  public static CredentialListDesignViewModel CredentialList { get; } = new();
 14}
 15
 16/// <summary>
 17/// Design-Time-Variante des CredentialListViewModel.
 18/// Initialisiert ohne AppServices — enthält nur statische Sample-Daten.
 19/// </summary>
 20public sealed class CredentialListDesignViewModel : ViewModelBase
 21{
 222  public ObservableCollection<CredentialRecord> Credentials { get; } =
 223  [
 224    new CredentialRecord
 225    {
 226      Id = 1,
 227      Title = "GitHub",
 228      Username = "Alhasan Ramadan",
 229      Url = "https://github.com/alhasan-ramadan/LOCKnet",
 230      CreatedAt = DateTime.UtcNow,
 231      UpdatedAt = DateTime.UtcNow,
 232    },
 233    new CredentialRecord
 234    {
 235      Id = 2,
 236      Title = "Beispiel-Eintrag",
 237      Username = "nutzer@example.com",
 238      Url = "https://example.com",
 239      CreatedAt = DateTime.UtcNow,
 240      UpdatedAt = DateTime.UtcNow,
 241      CredentialType = CredentialType.ApiKey,
 242    },
 243  ];
 44
 045  public CredentialRecord? SelectedCredential { get; set; }
 246  public string SearchText { get; set; } = string.Empty;
 247  public string StatusMessage { get; set; } = string.Empty;
 348  public string LockTimerText { get; set; } = "⏱ 0:58";
 49}