Exemple #1
0
        private static CustomResultInterceptor CreateFailInterceptor()
        {
            var interceptorResult = InterceptorResult.Fail(Message);
            var interceptor       = new CustomResultInterceptor(interceptorResult);

            return(interceptor);
        }
Exemple #2
0
        public async Task Send_WithFailInterceptor_ThrowsInterceptorFailException()
        {
            var client = new MockRequester(new ApiConfig
            {
                SendInterceptors = new [] { new CustomResultSendInterceptor(InterceptorResult.Fail("fail!")) }
            }, "send", null).CreateClient();

            await Assert.ThrowsAsync <InterceptorFailException>(() => client.Send(6789, "address", FaucetPayClient.Bitcoin));
        }
Exemple #3
0
        public void Fail_HasMessage()
        {
            var result = InterceptorResult.Fail(Message);

            Assert.Equal(Message, result.Message);
        }
Exemple #4
0
        public void Fail_HasSuccessFalse()
        {
            var result = InterceptorResult.Fail(Message);

            Assert.False(result.IsSuccess);
        }