Esempio n. 1
0
        public void Participate_UsesDomainObjectTypeToGetInterceptedProperties()
        {
            var fakeClassDefinition = ClassDefinitionObjectMother.CreateClassDefinition();
            var fakeInterceptors    = new IAccessorInterceptor[0];

            _typeDefinitionProviderMock.Expect(mock => mock.GetTypeDefinition(_proxyType.BaseType)).Return(fakeClassDefinition);
            _interceptedPropertyFinderMock.Expect(mock => mock.GetPropertyInterceptors(fakeClassDefinition, _proxyType.BaseType)).Return(fakeInterceptors);

            _participant.Participate(null, _proxyTypeAssemblyContext);

            _typeDefinitionProviderMock.VerifyAllExpectations();
            _interceptedPropertyFinderMock.VerifyAllExpectations();
        }
 private MethodInfo GetInterceptedAccessorMethod(IAccessorInterceptor accessorInterceptor)
 {
     return((MethodInfo)PrivateInvoke.GetNonPublicField(accessorInterceptor, "_interceptedAccessorMethod"));
 }