예제 #1
0
        public void Reset_RemovesEndPoints()
        {
            var endPointID   = RelationEndPointObjectMother.CreateRelationEndPointID(DomainObjectIDs.Customer1, "Orders");
            var endPointMock = MockRepository.GenerateStrictMock <IRelationEndPoint> ();

            endPointMock.Stub(stub => stub.ID).Return(endPointID);
            endPointMock.Expect(mock => mock.Rollback());
            endPointMock.Replay();
            RelationEndPointManagerTestHelper.AddEndPoint(_relationEndPointManager, endPointMock);
            Assert.That(_relationEndPointManager.RelationEndPoints, Is.Not.Empty.And.Member(endPointMock));

            _relationEndPointManager.Reset();

            endPointMock.VerifyAllExpectations();
            Assert.That(_relationEndPointManager.RelationEndPoints, Is.Empty);
        }