public StateUpdateRaisingCollectionEndPointDecorator (ICollectionEndPoint innerEndPoint, IVirtualEndPointStateUpdateListener listener)
    {
      ArgumentUtility.CheckNotNull ("innerEndPoint", innerEndPoint);
      ArgumentUtility.CheckNotNull ("listener", listener);

      _innerEndPoint = innerEndPoint;
      _listener = listener;
    }
Exemple #2
0
        public StateUpdateRaisingRelationEndPointFactoryDecorator(IRelationEndPointFactory innerFactory, IVirtualEndPointStateUpdateListener listener)
        {
            ArgumentUtility.CheckNotNull("innerFactory", innerFactory);
            ArgumentUtility.CheckNotNull("listener", listener);

            _innerFactory = innerFactory;
            _listener     = listener;
        }
Exemple #3
0
        public override void SetUp()
        {
            base.SetUp();

            _innerFactoryMock = MockRepository.GenerateStrictMock <IRelationEndPointFactory>();
            _listenerStub     = MockRepository.GenerateStub <IVirtualEndPointStateUpdateListener>();

            _decorator           = new StateUpdateRaisingRelationEndPointFactoryDecorator(_innerFactoryMock, _listenerStub);
            _decoratorTestHelper = new DecoratorTestHelper <IRelationEndPointFactory> (_decorator, _innerFactoryMock);
        }
        public override void SetUp()
        {
            base.SetUp();

            _endPointID        = RelationEndPointID.Create(DomainObjectIDs.Order1, typeof(Order), "OrderItems");
            _listenerMock      = MockRepository.GenerateStrictMock <IVirtualEndPointStateUpdateListener> ();
            _innerEndPointMock = MockRepository.GenerateStrictMock <ICollectionEndPoint>();
            _innerEndPointMock.Stub(stub => stub.HasChangedFast).Return(false);
            _innerEndPointMock.Stub(stub => stub.ID).Return(_endPointID);

            _decorator           = new StateUpdateRaisingCollectionEndPointDecorator(_innerEndPointMock, _listenerMock);
            _decoratorTestHelper = new DecoratorTestHelper <ICollectionEndPoint> (_decorator, _innerEndPointMock);
        }
        public VirtualEndPointStateUpdatedRaisingCommandDecorator(
            IDataManagementCommand decoratedCommand,
            RelationEndPointID modifiedEndPointID,
            IVirtualEndPointStateUpdateListener listener,
            Func <bool?> changeStateProvider)
            : base(decoratedCommand)
        {
            ArgumentUtility.CheckNotNull("modifiedEndPointID", modifiedEndPointID);
            ArgumentUtility.CheckNotNull("listener", listener);
            ArgumentUtility.CheckNotNull("changeStateProvider", changeStateProvider);

            _modifiedEndPointID  = modifiedEndPointID;
            _listener            = listener;
            _changeStateProvider = changeStateProvider;
        }
        public override void SetUp()
        {
            base.SetUp();

            _mockRepository          = new MockRepository();
            _decoratedCommandMock    = _mockRepository.StrictMock <IDataManagementCommand> ();
            _modifiedEndPointID      = RelationEndPointID.Create(DomainObjectIDs.Order1, typeof(Order), "OrderItems");
            _stateUpdateListenerMock = _mockRepository.StrictMock <IVirtualEndPointStateUpdateListener> ();
            _fakeChangeState         = null;

            _commandDecorator = new VirtualEndPointStateUpdatedRaisingCommandDecorator(
                _decoratedCommandMock,
                _modifiedEndPointID,
                _stateUpdateListenerMock,
                () => _fakeChangeState);
            _decoratorTestHelper = new DecoratorTestHelper <IDataManagementCommand> (_commandDecorator, _decoratedCommandMock);
        }
 public StateUpdateRaisingCollectionEndPointDecorator (FlattenedDeserializationInfo info)
 {
   _innerEndPoint = info.GetValue<ICollectionEndPoint>();
   _listener = info.GetValueForHandle<IVirtualEndPointStateUpdateListener>();
 }