Premiere commit - Omika

This commit is contained in:
2026-10-23 18:46:50 +02:00
commit 8ea76c1b24
2155 changed files with 984301 additions and 0 deletions
@@ -0,0 +1,38 @@
using Omika.App.Local.Abstractions;
using Omika.App.Local.Models;
using Omika.Core.Contracts.Mobile.License;
namespace Omika.Tests.Mobile.Local;
/// <summary>
/// Stub réutilisable de <see cref="IMobileSessionService"/> : retourne un
/// bootstrap configurable (défaut null) et ne fait aucun appel réseau.
/// </summary>
public sealed class StubSessionService : IMobileSessionService
{
public LocalBootstrapState? Bootstrap { get; set; }
public Task<bool> HasValidSessionAsync(CancellationToken cancellationToken = default)
=> Task.FromResult(true);
public Task<bool> HasExpiredSessionAsync(CancellationToken cancellationToken = default)
=> Task.FromResult(false);
public Task<LicenseResponse> ActivateAsync(string codeClient, string numeroLicence, CancellationToken cancellationToken = default)
=> Task.FromResult(new LicenseResponse { IsValid = true });
public Task<LicenseResponse> ValidateAsync(CancellationToken cancellationToken = default)
=> Task.FromResult(new LicenseResponse { IsValid = true });
public Task<LocalBootstrapState?> GetBootstrapAsync(CancellationToken cancellationToken = default)
=> Task.FromResult(Bootstrap);
public Task<string?> GetAccessTokenAsync(CancellationToken cancellationToken = default)
=> Task.FromResult<string?>(null);
public Task EnsureDevelopmentSessionAsync(CancellationToken cancellationToken = default)
=> Task.CompletedTask;
public Task ClearSessionAsync(CancellationToken cancellationToken = default)
=> Task.CompletedTask;
}