public void GetInvalidObjectReference()
        {
            _transactionEventSinkWithMock.Stub(mock => mock.RaiseObjectMarkedInvalidEvent(_order1));
            _manager.MarkInvalid(_order1);

            var result = _manager.GetInvalidObjectReference(_order1.ID);

            Assert.That(result, Is.SameAs(_order1));
        }
        public void Initialization_WithInvalidObjects()
        {
            var manager = new InvalidDomainObjectManager(_transactionEventSinkWithMock, new[] { _order1 });

            Assert.That(manager.InvalidObjectCount, Is.EqualTo(1));
            Assert.That(manager.IsInvalid(_order1.ID), Is.True);
            Assert.That(manager.GetInvalidObjectReference(_order1.ID), Is.SameAs(_order1));

            _transactionEventSinkWithMock.AssertWasNotCalled(mock => mock.RaiseObjectMarkedInvalidEvent(Arg <DomainObject> .Is.Anything));
        }