| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| | using Google.Apis.Util.Store; |
| | using System.Threading.Tasks; |
| | using Xunit; |
| |
|
| | namespace IntegrationTests |
| | { |
| | public class FileDataStoreTests |
| | { |
| | [Fact] |
| | public async Task DefaultLocation() |
| | { |
| | const string key1 = "testkey1"; |
| | const string key2 = "testkey2"; |
| | var store = new FileDataStore("IntegrationTesting"); |
| | |
| | await store.ClearAsync(); |
| | |
| | Assert.Null(await store.GetAsync<string>(key1)); |
| | Assert.Equal(0, await store.GetAsync<int>(key2)); |
| | |
| | await store.StoreAsync(key1, "1"); |
| | await store.StoreAsync(key2, 2); |
| | |
| | Assert.Equal("1", await store.GetAsync<string>(key1)); |
| | Assert.Equal(2, await store.GetAsync<int>(key2)); |
| | |
| | await store.DeleteAsync<string>(key1); |
| | |
| | Assert.Null(await store.GetAsync<string>(key1)); |
| | Assert.Equal(2, await store.GetAsync<int>(key2)); |
| | |
| | await store.ClearAsync(); |
| | |
| | Assert.Null(await store.GetAsync<string>(key1)); |
| | Assert.Equal(0, await store.GetAsync<int>(key2)); |
| | } |
| | } |
| | } |
| |
|