public void SetUp() { _objectFactory = MockRepository.GenerateStub<ObjectFactory>(); _metadata = MockRepository.GenerateStub<Metadata>(); _parametersParser = MockRepository.GenerateStub<ParametersParser>(); _target = new DirectHandler(_objectFactory, _metadata, _parametersParser); _metadata.Stub(x => x.GetActionType("Action")).Return(typeof(Action)); _metadata.Stub(x => x.GetMethodInfo("Action", "method")).Return(typeof(Action).GetMethod("Method")); _metadata.Stub(x => x.GetMethodInfo("Action", "methodWithParams")).Return(typeof(Action).GetMethod("MethodWithParams")); _metadata.Stub(x => x.GetMethodInfo("Action", "methodThatThrowException")).Return(typeof(Action).GetMethod("MethodThatThrowException")); _metadata.Stub(x => x.GetMethodInfo("Action", "methodWithRawParameters")).Return(typeof(Action).GetMethod("MethodWithRawParameters")); }
public DirectApiBuilder(Metadata metadata) { _metadata = metadata; }
public static void SetMetadata(Metadata metadata) { _metadata = metadata; }
internal DirectHandler(ObjectFactory objectFactory, Metadata metadata, ParametersParser parametersParser) { _objectFactory = objectFactory; _metadata = metadata; _parametersParser = parametersParser; }
public DirectHandler(ObjectFactory objectFactory, Metadata metadata) : this(objectFactory, metadata, new ParametersParser()) { }
public void SetUp() { _metadata = MockRepository.GenerateStub<Metadata>(); _target = new DirectApiBuilder(_metadata); }