public void on_found_handler_arg_is_the_file_found_instance_passed_to_the_on_found_method() { FileFound handlerArg = null; ClassUnderTest.AddHandler(x => handlerArg = x); ClassUnderTest.OnFound(_ff); handlerArg.ShouldEqual(_ff); }
public void add_handler_puts_the_handler_into_the_onfound_list_and_is_called_from_on_found_method() { bool flag1 = false, flag2 = false; ClassUnderTest.AddHandler(x => flag1 = true); ClassUnderTest.AddHandler(x => flag2 = true); ClassUnderTest.OnFound(_ff); flag1.ShouldEqual(flag2).ShouldEqual(true); }