public void CreatesCorrectPolicy()
        {
            var basePolicy = new CacheLookupPolicy(new Dictionary <string, string>());
            var xml        = basePolicy.GetXml().ToString();

            xml.Should().Be("<cache-lookup />");
        }
示例#2
0
        /// <inheritdoc />
        public IInboundSectionPolicyBuilder CacheLookup(Func <ICacheLookupAttributesBuilder, IDictionary <string, string> > cachingAttributesBuilder)
        {
            var attributesBuilder = new CacheLookupAttributesBuilder();
            var attributes        = cachingAttributesBuilder.Invoke(attributesBuilder);
            var policy            = new CacheLookupPolicy(attributes);

            return(AddPolicyDefinition(policy));
        }