public async Task BackupAsync(BackupContext context, CancellationToken ct) { var json = await appUISettings.GetAsync(context.AppId, null); await context.Writer.WriteJsonAsync(SettingsFile, json, ct); }
public async Task Should_writer_user_settings() { var settings = JsonValue.Object(); var context = CreateBackupContext(); A.CallTo(() => appUISettings.GetAsync(appId, null)) .Returns(settings); await sut.BackupAsync(context, ct); A.CallTo(() => context.Writer.WriteJsonAsync(A <string> ._, settings, ct)) .MustHaveHappened(); }
public async Task <IActionResult> GetSettings(string app) { var result = await appUISettings.GetAsync(AppId, null); return(Ok(result)); }
public async Task BackupAsync(BackupContext context) { var json = await appUISettings.GetAsync(context.AppId, null); await context.Writer.WriteJsonAsync(SettingsFile, json); }
private async Task WriteSettingsAsync(BackupWriter writer, Guid appId) { var json = await appUISettings.GetAsync(appId, null); await writer.WriteJsonAsync(SettingsFile, json); }