Beispiel #1
0
        public void Initialize()
        {
            _interlocutor = new CordInterlocutorMock();
            _contract     = new CallContract();

            OriginContractLinker.Link <ICallContract>(_contract, _interlocutor);
        }
Beispiel #2
0
        public void ContractWithNonDelegateProperty_CreateT_throwsException()
        {
            var stub = new CordInterlocutorMock();

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

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

            Assert.Throws <ContractMessageIdDuplicateException>(
                () => ProxyContractFactory.CreateProxyContract <IContractWithSameAskAndEventId>(stub));
        }
Beispiel #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 <ISayAskContract>(_cordMock);
 }