예제 #1
0
        public void When_ErrorCode_Is_Not_Null_And_RetryStrategy_Is_None_CanRetry_Returns_False()
        {
            var get = new GetT <dynamic>("thekey", null, new DefaultTranscoder(), 0);

            get.GetType().GetField("ErrorCode", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(get, new ErrorCode());
            Assert.False(get.CanRetry());
        }
예제 #2
0
        public void When_ErrorCode_Is_Null_And_Has_Cas_CanRetry_Returns_True()
        {
            var get = new GetT <dynamic>("thekey", null, new DefaultTranscoder(), 0)
            {
                Cas = 1010100010
            };

            Assert.True(get.CanRetry());
        }
예제 #3
0
        public void When_ErrorCode_Is_Null_CanRetry_Returns_False()
        {
            var get = new GetT <dynamic>("thekey", null, new DefaultTranscoder(), 0);

            Assert.False(get.CanRetry());
        }