public void Synchronize(IRealObjectEndPoint endPoint, IVirtualEndPoint oppositeEndPoint) { ArgumentUtility.CheckNotNull("endPoint", endPoint); ArgumentUtility.CheckNotNull("oppositeEndPoint", oppositeEndPoint); // nothing to do here - the end-point is already syncrhonized }
public void Synchronize(IRealObjectEndPoint endPoint, IVirtualEndPoint oppositeEndPoint) { ArgumentUtility.CheckNotNull("endPoint", endPoint); ArgumentUtility.CheckNotNull("oppositeEndPoint", oppositeEndPoint); oppositeEndPoint.SynchronizeOppositeEndPoint(endPoint); }
public void SetUp() { _mockRepository = new MockRepository(); _endPointMock1 = _mockRepository.StrictMock <IVirtualEndPoint> (); _endPointMock2 = _mockRepository.StrictMock <IVirtualEndPoint> (); _registrationAgentMock = _mockRepository.StrictMock <IRelationEndPointRegistrationAgent>(); _relationEndPointMap = new RelationEndPointMap(MockRepository.GenerateStub <IClientTransactionEventSink>()); _command = new UnloadVirtualEndPointsCommand(new[] { _endPointMock1, _endPointMock2 }, _registrationAgentMock, _relationEndPointMap); }
public RealObjectEndPointRegistrationCommandDecorator( IDataManagementCommand decoratedCommand, IRealObjectEndPoint realObjectEndPoint, IVirtualEndPoint oldRelatedEndPoint, IVirtualEndPoint newRelatedEndPoint) : base(decoratedCommand) { ArgumentUtility.CheckNotNull("realObjectEndPoint", realObjectEndPoint); ArgumentUtility.CheckNotNull("oldRelatedEndPoint", oldRelatedEndPoint); ArgumentUtility.CheckNotNull("newRelatedEndPoint", newRelatedEndPoint); _realObjectEndPoint = realObjectEndPoint; _oldRelatedEndPoint = oldRelatedEndPoint; _newRelatedEndPoint = newRelatedEndPoint; }
public override void SetUp() { base.SetUp(); _mockRepository = new MockRepository(); _virtualEndPointProviderMock = _mockRepository.StrictMock <IVirtualEndPointProvider> (); _state = new UnknownRealObjectEndPointSyncState(_virtualEndPointProviderMock); _endPointID = RelationEndPointID.Create(DomainObjectIDs.Order1, typeof(Order), "Customer"); _endPointMock = _mockRepository.StrictMock <IRealObjectEndPoint> (); _endPointMock.Stub(stub => stub.ID).Return(_endPointID); _endPointMock.Stub(stub => stub.Definition).Return(_endPointID.Definition); _endPointMock.Stub(stub => stub.OppositeObjectID).Return(DomainObjectIDs.Customer1); _oppositeEndPointMock = _mockRepository.StrictMock <IVirtualEndPoint>(); }
public override void SetUp() { base.SetUp(); _virtualEndPointMock = MockRepository.GenerateStrictMock <IVirtualEndPoint <object> >(); _endPointLoaderMock = MockRepository.GenerateStrictMock <TestableIncompleteVirtualEndPointLoadState.IEndPointLoader> (); _loadState = new TestableIncompleteVirtualEndPointLoadState(_endPointLoaderMock); _relatedEndPointStub1 = MockRepository.GenerateStub <IRealObjectEndPoint>(); _relatedEndPointStub1.Stub(stub => stub.ObjectID).Return(DomainObjectIDs.Order1); _relatedEndPointStub1.Stub(stub => stub.ID).Return(RelationEndPointID.Create(DomainObjectIDs.Order1, typeof(Order), "Customer")); _relatedEndPointStub2 = MockRepository.GenerateStub <IRealObjectEndPoint> (); _relatedEndPointStub2.Stub(stub => stub.ObjectID).Return(DomainObjectIDs.Order3); _relatedEndPointStub2.Stub(stub => stub.ID).Return(RelationEndPointID.Create(DomainObjectIDs.Order3, typeof(Order), "Customer")); }
public void SetUp() { _mockRepository = new MockRepository(); _decoratedCommandMock = _mockRepository.StrictMock <IDataManagementCommand> (); _realObjectEndPointStub = _mockRepository.Stub <IRealObjectEndPoint> (); _oldRelatedEndPointMock = _mockRepository.StrictMock <IVirtualEndPoint> (); _newRelatedEndPointMock = _mockRepository.StrictMock <IVirtualEndPoint> (); _decorator = new RealObjectEndPointRegistrationCommandDecorator( _decoratedCommandMock, _realObjectEndPointStub, _oldRelatedEndPointMock, _newRelatedEndPointMock); _exception1 = new Exception("1"); _exception2 = new Exception("2"); }
public override void SetUp() { base.SetUp(); _definition = Configuration.GetTypeDefinition(typeof(Customer)).GetRelationEndPointDefinition(typeof(Customer).FullName + ".Orders"); _virtualEndPointMock = MockRepository.GenerateStrictMock <IVirtualEndPoint <object> > (); _dataManagerMock = MockRepository.GenerateStrictMock <IVirtualEndPointDataManager>(); _dataManagerMock.Stub(stub => stub.EndPointID).Return(RelationEndPointID.Create(DomainObjectIDs.Customer1, _definition)); _endPointProviderStub = MockRepository.GenerateStub <IRelationEndPointProvider>(); _transactionEventSinkWithMock = MockRepository.GenerateStrictMock <IClientTransactionEventSink>(); _loadState = new TestableCompleteVirtualEndPointLoadState(_dataManagerMock, _endPointProviderStub, _transactionEventSinkWithMock); _relatedObject = DomainObjectMother.CreateFakeObject <Order> (DomainObjectIDs.Order1); _relatedEndPointStub = MockRepository.GenerateStub <IRealObjectEndPoint>(); _relatedEndPointStub.Stub(stub => stub.GetDomainObjectReference()).Return(_relatedObject); _relatedEndPointStub.Stub(stub => stub.ObjectID).Return(_relatedObject.ID); }
public override void SetDataFromSubTransaction( IVirtualEndPoint <object> endPoint, IVirtualEndPointLoadState <IVirtualEndPoint <object>, object, IVirtualEndPointDataManager> sourceLoadState) { throw new NotImplementedException(); }
public override object GetOriginalData(IVirtualEndPoint <object> endPoint) { throw new NotImplementedException(); }
protected override IVirtualEndPointDataManager CreateEndPointDataManager(IVirtualEndPoint <object> endPoint) { throw new NotImplementedException(); }