public void EnsureDataAvailable()
        {
            ClientTransaction.EnsureDataAvailable(DomainObject.ID);

            DataContainer dataContainer;

            Assertion.DebugAssert(
                (dataContainer = ClientTransaction.DataManager.DataContainers[DomainObject.ID]) != null &&
                dataContainer.DomainObject == DomainObject,
                "Guaranteed because CheckIfRightTransaction ensures that DomainObject is enlisted.");
        }
Beispiel #2
0
        public void GetState_Invalidated_AfterReload()
        {
            UnloadService.UnloadData(_transaction, _existingOrder.ID);
            var stateBeforeChange = _cachingListener.GetState(_existingOrder.ID);

            _transaction.EnsureDataAvailable(_existingOrder.ID);
            var stateAfterChange = _cachingListener.GetState(_existingOrder.ID);

            Assert.That(stateBeforeChange, Is.EqualTo(StateType.NotLoadedYet));
            Assert.That(stateAfterChange, Is.EqualTo(StateType.Unchanged));
        }