コード例 #1
0
        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"));
        }
コード例 #2
0
 public DirectApiBuilder(Metadata metadata)
 {
     _metadata = metadata;
 }
コード例 #3
0
 public static void SetMetadata(Metadata metadata)
 {
     _metadata = metadata;
 }
コード例 #4
0
 internal DirectHandler(ObjectFactory objectFactory, Metadata metadata, ParametersParser parametersParser)
 {
     _objectFactory = objectFactory;
     _metadata = metadata;
     _parametersParser = parametersParser;
 }
コード例 #5
0
 public DirectHandler(ObjectFactory objectFactory, Metadata metadata)
     : this(objectFactory, metadata, new ParametersParser())
 {
 }
コード例 #6
0
 public void SetUp()
 {
     _metadata = MockRepository.GenerateStub<Metadata>();
     _target = new DirectApiBuilder(_metadata);
 }