public async Task TestDefaultAppSettings() { // set up var service = new SqliteDatabaseDataService(); // run var appSettings = await service.GetAppSettingsAsync(CancellationToken.None); // check Assert.IsNotNull(appSettings, "app settings object must be available"); await service.CloseAsync(); }
public async Task TestStoreAndGetAppSettings() { // set up var service = new SqliteDatabaseDataService(); var appSettings = GetTestAppSettings(); // run await service.StoreAppSettingsAsync(appSettings); var appSettings2 = await service.GetAppSettingsAsync(CancellationToken.None); // check Assert.IsNotNull(appSettings2, "loaded app settings object must be non-null"); Assert.AreEqual(appSettings, appSettings2, "stored app settings object must match initial one"); await service.CloseAsync(); }