using Omika.App.Local.Abstractions; using Omika.Core.Contracts.Clients; using Omika.Core.Contracts.Interventions; using Omika.Core.Contracts.Mobile.Bootstrap; using Omika.Core.Contracts.Mobile.Documents; using Omika.Core.Contracts.Mobile.Interventions; using Omika.Core.Contracts.Mobile.License; using Omika.Core.Contracts.Mobile.Snapshot; using Omika.Core.Contracts.Mobile.Sync; using Omika.Core.Contracts.Planning; using Omika.Core.Contracts.Sites; namespace Omika.Tests.Mobile.Local; /// /// Stub réutilisable de : toutes les méthodes /// lèvent . Les tests qui ont besoin d'un /// comportement réseau particulier remplacent ce stub par leur propre fake. /// public class StubMobileApiClient : IMobileApiClient { public string? AccessToken { get; set; } public Task ActivateAsync(LicenseActivateRequest request, CancellationToken cancellationToken = default) => throw new NotSupportedException(); public Task ValidateAsync(LicenseValidateRequest request, CancellationToken cancellationToken = default) => throw new NotSupportedException(); public Task GetDevelopmentSessionAsync(string deviceId, CancellationToken cancellationToken = default) => throw new NotSupportedException(); public Task GetBootstrapAsync(CancellationToken cancellationToken = default) => throw new NotSupportedException(); public Task SendOperationAsync(SyncOperation operation, CancellationToken cancellationToken = default) => throw new NotSupportedException(); public Task GetStatusAsync(Guid operationId, CancellationToken cancellationToken = default) => throw new NotSupportedException(); public Task GetSnapshotAsync(CancellationToken cancellationToken = default) => throw new NotSupportedException(); public Task DownloadDocumentAsync(Guid documentGuid, CancellationToken cancellationToken = default) => throw new NotSupportedException(); public Task UploadDocumentAsync(DocumentUploadRequest request, CancellationToken cancellationToken = default) => throw new NotSupportedException(); public Task> SearchInterventionsAsync(MobileInterventionSearchRequest request, CancellationToken cancellationToken = default) => throw new NotSupportedException(); public Task> GetInterventionsByIdsAsync(MobileInterventionsByIdsRequest request, CancellationToken cancellationToken = default) => throw new NotSupportedException(); public Task GetDossierByIdAsync(Guid dossierGuid, CancellationToken cancellationToken = default) => Task.FromResult(null); public Task GetInterventionByIdAsync(Guid interventionGuid, CancellationToken cancellationToken = default) => Task.FromResult(null); public Task GetClientByIdAsync(Guid clientGuid, CancellationToken cancellationToken = default) => Task.FromResult(null); public Task GetSiteByIdAsync(Guid siteGuid, CancellationToken cancellationToken = default) => Task.FromResult(null); /// /// Surchargeable : les tests qui simulent l'agenda d'un collaborateur /// retournent leurs rendez-vous ici (défaut : non supporté). /// public virtual Task> GetRendezVousByCollaborateurAsync( Guid collaborateurGuid, DateTime debutMin, DateTime debutMax, CancellationToken cancellationToken = default) => throw new NotSupportedException(); /// /// Surchargeable : les tests qui simulent l'agenda d'une équipe retournent /// leurs rendez-vous ici (défaut : non supporté). /// public virtual Task> GetRendezVousByCollaborateursAsync( IReadOnlyList collaborateurGuids, DateTime debutMin, DateTime debutMax, CancellationToken cancellationToken = default) => throw new NotSupportedException(); }