Exemplo n.º 1
0
        public void Participate_NonDomainObject_Nop()
        {
            var context = ProxyTypeAssemblyContextObjectMother.Create(requestedType: typeof(object));

            _participant.Participate(null, context);

            Assert.That(_proxyType.AddedInterfaces, Has.No.Member(typeof(IInterceptedDomainObject)));
            _typeDefinitionProviderMock.AssertWasNotCalled(mock => mock.GetTypeDefinition(Arg <Type> .Is.Anything));
        }
Exemplo n.º 2
0
        public override void SetUp()
        {
            base.SetUp();

            _typeDefinitionProviderMock    = MockRepository.GenerateStrictMock <ITypeDefinitionProvider>();
            _interceptedPropertyFinderMock = MockRepository.GenerateStrictMock <IInterceptedPropertyFinder>();

            _participant = new DomainObjectParticipant();
            PrivateInvoke.SetNonPublicField(_participant, "_typeDefinitionProvider", _typeDefinitionProviderMock);
            PrivateInvoke.SetNonPublicField(_participant, "_interceptedPropertyFinder", _interceptedPropertyFinderMock);

            _proxyTypeAssemblyContext = ProxyTypeAssemblyContextObjectMother.Create(requestedType: typeof(Order));
            _proxyType = _proxyTypeAssemblyContext.ProxyType;
        }