コード例 #1
0
        public void then_with_an_action_that_accepts_no_arguments_will_ignore_the_action_if_it_is_not_a_success()
        {
            var action_applied = false;
            var result         = RemoveResult <object> .WasNotFound();

            result.Then(() => action_applied = true);


            Assert.False(action_applied);
        }
コード例 #2
0
        public void can_create_a_not_found_result()
        {
            var result = RemoveResult <object> .WasNotFound();

            result
            .Match(
                success: value => Assert.False(true),
                notFound: () => Assert.True(true)

                );
        }
コード例 #3
0
        public void then_will_ignore_the_transformation_if_it_is_not_found()
        {
            var result = RemoveResult <object> .WasNotFound();

            result.Then <object>(v => { throw new Exception(); });
        }