public void Initialize() { _interlocutor = new CordInterlocutorMock(); _contract = new CallBackContract(); OriginContractLinker.Link <ICallBackContract>(_contract, _interlocutor); }
public void ContractWithNonDelegateProperty_CreateT_throwsException() { var stub = new CordInterlocutorMock(); Assert.Throws <InvalidContractMemeberException>( () => ProxyContractFactory.CreateProxyContract <IContractWithNonDelegateProperty>(stub)); }
public void DelegateDoesNotContainAttribute_CreateT_throwsException() { var stub = new CordInterlocutorMock(); Assert.Throws <ContractMemberAttributeMissingException>( () => ProxyContractFactory.CreateProxyContract <IContractWithDelegateWithoutAttribute>(stub)); }
public void AskAndEventCordIdDuplicated_CreateT_throwsException() { var stub = new CordInterlocutorMock(); Assert.Throws <ContractMessageIdDuplicateException>( () => ProxyContractFactory.CreateProxyContract <IContractWithSameAskAndEventId>(stub)); }
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); }