Ejemplo n.º 1
0
        public override void SetUp()
        {
            base.SetUp();

            _eventSinkWithDynamicMock = MockRepository.GenerateMock <IClientTransactionEventSink>();
            _map = new DataContainerMap(_eventSinkWithDynamicMock);
        }
Ejemplo n.º 2
0
        public UnregisterDataContainerCommand(ObjectID objectID, DataContainerMap map)
        {
            ArgumentUtility.CheckNotNull("objectID", objectID);
            ArgumentUtility.CheckNotNull("map", map);

            _objectID = objectID;
            _map      = map;
        }
Ejemplo n.º 3
0
        public void DataContainerMapIsFlattenedSerializable()
        {
            DataContainerMap map = DataManagerTestHelper.GetDataContainerMap(TestableClientTransaction.DataManager);

            DataContainerMap deserializedMap = FlattenedSerializer.SerializeAndDeserialize(map);

            Assert.That(deserializedMap, Is.Not.Null);
        }
Ejemplo n.º 4
0
        public override void SetUp()
        {
            base.SetUp();

            _map            = new DataContainerMap(MockRepository.GenerateStub <IClientTransactionEventSink>());
            _dataContainer1 = DataContainer.CreateNew(DomainObjectIDs.Order1);
            _map.Register(_dataContainer1);

            _command = new UnregisterDataContainerCommand(DomainObjectIDs.Order1, _map);
        }
Ejemplo n.º 5
0
        public void DataContainerMap_Content()
        {
            DataContainerMap map = DataManagerTestHelper.GetDataContainerMap(TestableClientTransaction.DataManager);

            DomainObjectIDs.Order1.GetObject <Order> ();
            Assert.That(map.Count, Is.EqualTo(1));

            DataContainerMap deserializedMap = FlattenedSerializer.SerializeAndDeserialize(map);

            Assert.That(deserializedMap.TransactionEventSink, Is.Not.Null);
            Assert.That(deserializedMap.Count, Is.EqualTo(1));
        }
        public UnloadAllCommand(
            IRelationEndPointManager relationEndPointManager,
            DataContainerMap dataContainerMap,
            IInvalidDomainObjectManager invalidDomainObjectManager,
            IClientTransactionEventSink transactionEventSink)
        {
            ArgumentUtility.CheckNotNull("relationEndPointManager", relationEndPointManager);
            ArgumentUtility.CheckNotNull("dataContainerMap", dataContainerMap);
            ArgumentUtility.CheckNotNull("invalidDomainObjectManager", invalidDomainObjectManager);
            ArgumentUtility.CheckNotNull("transactionEventSink", transactionEventSink);

            _relationEndPointManager    = relationEndPointManager;
            _dataContainerMap           = dataContainerMap;
            _invalidDomainObjectManager = invalidDomainObjectManager;
            _transactionEventSink       = transactionEventSink;
        }
        public override void SetUp()
        {
            base.SetUp();
            _endPointManagerMock            = MockRepository.GenerateStrictMock <IRelationEndPointManager>();
            _transactionEventSinkWithMock   = MockRepository.GenerateMock <IClientTransactionEventSink>();
            _dataContainerMap               = new DataContainerMap(_transactionEventSinkWithMock);
            _invalidDomainObjectManagerMock = MockRepository.GenerateStrictMock <IInvalidDomainObjectManager>();

            _existingDataContainer = CreateExistingDataContainer();
            _existingDomainObject  = (TestDomainBase)_existingDataContainer.DomainObject;

            _newDataContainer = CreateNewDataContainer();
            _newDomainObject  = (TestDomainBase)_newDataContainer.DomainObject;

            _unloadCommand = new UnloadAllCommand(_endPointManagerMock, _dataContainerMap, _invalidDomainObjectManagerMock, _transactionEventSinkWithMock);
        }