public async Task WrongKeyAsync() { var manager = KeyValueManagerTests.BuildCase1(); manager.TTL = TimeSpan.FromSeconds(2); manager.Path = "path"; var resolver = new KeyValueResolver(manager) { Key = "B" }; var result = await resolver.GetConfigurationAsync(); Assert.Null(result); }
public async Task DefaultAsync() { var manager = KeyValueManagerTests.BuildCase1(); manager.TTL = TimeSpan.FromSeconds(2); manager.Path = "path"; var resolver = new KeyValueResolver(manager) { Key = "A" }; Assert.Equal("A", resolver.Key); var result = await resolver.GetConfigurationAsync(); Assert.Equal("default-value", result); }