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

            _virtualEndPointProviderMock = MockRepository.GenerateStrictMock <IVirtualEndPointProvider> ();
            _map = new RelationEndPointMap(MockRepository.GenerateStub <IClientTransactionEventSink> ());

            _agent = new RootRelationEndPointRegistrationAgent(_virtualEndPointProviderMock);
        }
Exemplo n.º 2
0
        public override void SetUp()
        {
            base.SetUp();

            _endPointFactoryStub   = MockRepository.GenerateStub <IRelationEndPointFactory> ();
            _registrationAgentStub = MockRepository.GenerateStub <IRelationEndPointRegistrationAgent> ();
            _map = new RelationEndPointMap(MockRepository.GenerateStub <IClientTransactionEventSink> ());

            _agent = new ExistingDataContainerEndPointsRegistrationAgent(_endPointFactoryStub, _registrationAgentStub);
        }
Exemplo n.º 3
0
        public void SetUp()
        {
            _mockRepository = new MockRepository();
            _endPointMock1  = _mockRepository.StrictMock <IVirtualEndPoint> ();
            _endPointMock2  = _mockRepository.StrictMock <IVirtualEndPoint> ();

            _registrationAgentMock = _mockRepository.StrictMock <IRelationEndPointRegistrationAgent>();
            _relationEndPointMap   = new RelationEndPointMap(MockRepository.GenerateStub <IClientTransactionEventSink>());

            _command = new UnloadVirtualEndPointsCommand(new[] { _endPointMock1, _endPointMock2 }, _registrationAgentMock, _relationEndPointMap);
        }
        public override void SetUp()
        {
            base.SetUp();

            _endPoint1 = MockRepository.GenerateStub <IRelationEndPoint> ();
            _endPoint2 = MockRepository.GenerateStub <IRelationEndPoint> ();

            _registrationAgentMock = MockRepository.GenerateStrictMock <IRelationEndPointRegistrationAgent>();
            _map = new RelationEndPointMap(MockRepository.GenerateStub <IClientTransactionEventSink> ());

            _command = new UnregisterEndPointsCommand(new[] { _endPoint1, _endPoint2 }, _registrationAgentMock, _map);
        }
Exemplo n.º 5
0
        public UnloadVirtualEndPointsCommand(
            IEnumerable <IVirtualEndPoint> virtualEndPoints,
            IRelationEndPointRegistrationAgent registrationAgent,
            RelationEndPointMap relationEndPointMap)
        {
            ArgumentUtility.CheckNotNull("virtualEndPoints", virtualEndPoints);
            ArgumentUtility.CheckNotNull("registrationAgent", registrationAgent);
            ArgumentUtility.CheckNotNull("relationEndPointMap", relationEndPointMap);

            _virtualEndPoints    = virtualEndPoints.ToArray();
            _registrationAgent   = registrationAgent;
            _relationEndPointMap = relationEndPointMap;
        }
        public override void SetUp()
        {
            base.SetUp();

            _endPointProviderMock = MockRepository.GenerateStrictMock <IVirtualEndPointProvider> ();
            _map = new RelationEndPointMap(MockRepository.GenerateStub <IClientTransactionEventSink> ());

            _realOneManyEndPointID    = RelationEndPointID.Create(DomainObjectIDs.OrderItem1, typeof(OrderItem), "Order");
            _virtualEndPointID        = RelationEndPointID.Create(DomainObjectIDs.Order1, typeof(Order), "OrderItems");
            _unidirectionalEndPointID = RelationEndPointID.Create(DomainObjectIDs.Location1, typeof(Location), "Client");

            _agent = new RelationEndPointRegistrationAgent(_endPointProviderMock);
        }
Exemplo n.º 7
0
        public UnregisterEndPointsCommand(
            IEnumerable <IRelationEndPoint> endPoints,
            IRelationEndPointRegistrationAgent registrationAgent,
            RelationEndPointMap map)
        {
            ArgumentUtility.CheckNotNull("endPoints", endPoints);
            ArgumentUtility.CheckNotNull("registrationAgent", registrationAgent);
            ArgumentUtility.CheckNotNull("map", map);

            _endPoints         = endPoints.ToArray();
            _registrationAgent = registrationAgent;
            _map = map;
        }
Exemplo n.º 8
0
        public override void SetUp()
        {
            base.SetUp();

            _endPointFactoryMock   = MockRepository.GenerateStrictMock <IRelationEndPointFactory>();
            _registrationAgentMock = MockRepository.GenerateStrictMock <IRelationEndPointRegistrationAgent>();

            _agentPartialMock = MockRepository.GeneratePartialMock <TestableDataContainerEndPointsRegistrationAgentBase> (
                _endPointFactoryMock, _registrationAgentMock);

            _map = new RelationEndPointMap(MockRepository.GenerateStub <IClientTransactionEventSink> ());

            _orderTicketEndPointID = RelationEndPointID.Create(DomainObjectIDs.Order1, typeof(Order), "OrderTicket");
            _customerEndPointID    = RelationEndPointID.Create(DomainObjectIDs.Order1, typeof(Order), "Customer");

            _orderTicketEndPointMock = MockRepository.GenerateStrictMock <IVirtualObjectEndPoint>();
            _orderTicketEndPointMock.Stub(stub => stub.ID).Return(_orderTicketEndPointID);

            _customerEndPointStub = MockRepository.GenerateStrictMock <IRealObjectEndPoint>();
            _customerEndPointStub.Stub(stub => stub.ID).Return(_customerEndPointID);

            _orderDataContainer = DataContainer.CreateNew(DomainObjectIDs.Order1);
        }
Exemplo n.º 9
0
 public virtual string MockableGetUnregisterProblem(IRelationEndPoint endPoint, RelationEndPointMap relationEndPointMap)
 {
     return(null);
 }
Exemplo n.º 10
0
 protected override string GetUnregisterProblem(IRelationEndPoint endPoint, RelationEndPointMap relationEndPointMap)
 {
     return(MockableGetUnregisterProblem(endPoint, relationEndPointMap));
 }
 public void UnregisterEndPoint(IRelationEndPoint endPoint, RelationEndPointMap map)
 {
     throw new NotImplementedException();
 }