public void activate_method_runs_the_action()
        {
            var action = MockRepository.GenerateMock<Action>();

            var activator = new LambdaActivator("something", action);
            activator.Activate(null, null);

            action.AssertWasCalled(x => x.Invoke());
        }
示例#2
0
        public void activate_method_runs_the_action()
        {
            var action = MockRepository.GenerateMock <Action>();

            var activator = new LambdaActivator("something", action);

            activator.Activate(null, null);

            action.AssertWasCalled(x => x.Invoke());
        }
        public void activate_generic_lambda()
        {
            string name = "Jeremy";
            var action = MockRepository.GenerateMock<Action<string>>();

            var activator = new LambdaActivator<string>(name, "some description", action);
            activator.Activate(null, null);

            action.AssertWasCalled(x => x.Invoke(name));
        }
示例#4
0
        public void activate_generic_lambda()
        {
            string name   = "Jeremy";
            var    action = MockRepository.GenerateMock <Action <string> >();

            var activator = new LambdaActivator <string>(name, "some description", action);

            activator.Activate(null, null);

            action.AssertWasCalled(x => x.Invoke(name));
        }