예제 #1
0
        public void Should_be_able_to_retrieve_stored_Policy_by_interface_using_TryGet()
        {
            ISyncPolicy <ResultPrimitive> policy = Policy <ResultPrimitive> .HandleResult(ResultPrimitive.Fault).Retry();

            string key = Guid.NewGuid().ToString();
            ISyncPolicy <ResultPrimitive> outPolicy = null;

            _registry.Add(key, policy);
            _registry.TryGet(key, out outPolicy).Should().BeTrue();
            outPolicy.Should().BeSameAs(policy);
        }