public void SetDataFromSubTransaction()
        {
            var sourceOppositeEndPointStub = MockRepository.GenerateStub <IRealObjectEndPoint>();

            sourceOppositeEndPointStub.Stub(stub => stub.ID).Return(_oppositeEndPointStub.ID);

            var sourceDataManager = new VirtualObjectEndPointDataManager(_endPointID);

            sourceDataManager.CurrentOppositeObject = _oppositeObject;
            sourceDataManager.RegisterCurrentOppositeEndPoint(sourceOppositeEndPointStub);

            var endPointProviderStub = MockRepository.GenerateStub <IRelationEndPointProvider>();

            endPointProviderStub
            .Stub(stub => stub.GetRelationEndPointWithoutLoading(sourceOppositeEndPointStub.ID))
            .Return(_oppositeEndPointStub);

            _dataManager.SetDataFromSubTransaction(sourceDataManager, endPointProviderStub);

            Assert.That(_dataManager.CurrentOppositeObject, Is.SameAs(_oppositeObject));
            Assert.That(_dataManager.CurrentOppositeEndPoint, Is.SameAs(_oppositeEndPointStub));
        }
        public void RegisterOriginalOppositeEndPoint_CurrentValueAlreadySet()
        {
            _dataManager.CurrentOppositeObject = _oppositeObject2;
            _dataManager.RegisterCurrentOppositeEndPoint(_oppositeEndPointStub2);

            _dataManager.RegisterOriginalOppositeEndPoint(_oppositeEndPointStub);

            Assert.That(_dataManager.OriginalOppositeEndPoint, Is.SameAs(_oppositeEndPointStub));
            Assert.That(_dataManager.OriginalOppositeObject, Is.EqualTo(_oppositeObject));

            Assert.That(_dataManager.CurrentOppositeEndPoint, Is.SameAs(_oppositeEndPointStub2));
            Assert.That(_dataManager.CurrentOppositeObject, Is.SameAs(_oppositeObject2));
        }