public void Initialize()
        {
            _interlocutor = new CordInterlocutorMock();
            _contract     = new CallBackContract();

            OriginContractLinker.Link <ICallBackContract>(_contract, _interlocutor);
        }
Пример #2
0
        public void ContractWithNonDelegateProperty_CreateT_throwsException()
        {
            var stub = new CordInterlocutorMock();

            Assert.Throws <InvalidContractMemeberException>(
                () => ProxyContractFactory.CreateProxyContract <IContractWithNonDelegateProperty>(stub));
        }
Пример #3
0
        public void DelegateDoesNotContainAttribute_CreateT_throwsException()
        {
            var stub = new CordInterlocutorMock();

            Assert.Throws <ContractMemberAttributeMissingException>(
                () => ProxyContractFactory.CreateProxyContract <IContractWithDelegateWithoutAttribute>(stub));
        }
Пример #4
0
        public void AskAndEventCordIdDuplicated_CreateT_throwsException()
        {
            var stub = new CordInterlocutorMock();

            Assert.Throws <ContractMessageIdDuplicateException>(
                () => ProxyContractFactory.CreateProxyContract <IContractWithSameAskAndEventId>(stub));
        }
Пример #5
0
        public void EmptyContract_Creates()
        {
            var stub  = new CordInterlocutorMock();
            var proxy = ProxyContractFactory.CreateProxyContract <IEmptyContract>(stub);

            Assert.IsNotNull(proxy);
        }
 public void InitializeProxyContractFactory()
 {
     _cordMock = new CordInterlocutorMock();
     _contract = ProxyContractFactory.CreateProxyContract <ICallContract2>(_cordMock);
 }