示例#1
0
        public async Task GetProducesCorrectResultsForIgnoreKeyTypes(string key, JToken expected)
        {
            // Arrange
            var options = new GetRequestOptions {
                IgnoreKeyTypes = true
            };
            IDictionary <string, string> context = null;

            // Act
            var result = await mTweek.Get(key, context, options);

            // Assert
            AssertJTokenEqual(expected, result);
        }
示例#2
0
        public async Task GetProducesCorrectResultsForInclude(string key, ICollection <string> includes, JToken expected)
        {
            // Arrange
            var options = new GetRequestOptions {
                Include = includes
            };
            IDictionary <string, string> context = null;

            // Act
            var result = await mTweek.Get(key, context, options);

            // Assert
            AssertJTokenEqual(expected, result);
        }
 public async Task <JToken> Get(string keyPath, IDictionary <string, string> context, GetRequestOptions options)
 {
     return(await mPolicy.ExecuteAsync(async() => await mClient.Get(keyPath, context, options)));
 }
示例#4
0
 public async Task <JToken> Get(string keyPath, IDictionary <string, string> context, GetRequestOptions options = null)
 {
     return(await ExecuteWithFallback(async client => await client.Get(keyPath, context, options)));
 }