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); }
public void can_create_a_not_found_result() { var result = RemoveResult <object> .WasNotFound(); result .Match( success: value => Assert.False(true), notFound: () => Assert.True(true) ); }
public void then_will_ignore_the_transformation_if_it_is_not_found() { var result = RemoveResult <object> .WasNotFound(); result.Then <object>(v => { throw new Exception(); }); }