public void Perform()
        {
            _registrationAgentMock.Expect(mock => mock.UnregisterEndPoint(_endPoint1, _map));
            _registrationAgentMock.Expect(mock => mock.UnregisterEndPoint(_endPoint2, _map));
            _registrationAgentMock.Replay();

            _command.Perform();

            _registrationAgentMock.VerifyAllExpectations();
        }
Example #2
0
        public void RegisterEndPoints()
        {
            _agentPartialMock
            .Stub(stub => stub.MockableGetOwnedEndPointIDs(_orderDataContainer))
            .Return(new[] { _orderTicketEndPointID, _customerEndPointID });
            _agentPartialMock.Replay();

            _endPointFactoryMock.Expect(mock => mock.CreateVirtualObjectEndPoint(_orderTicketEndPointID)).Return(_orderTicketEndPointMock);
            _endPointFactoryMock.Expect(mock => mock.CreateRealObjectEndPoint(_customerEndPointID, _orderDataContainer)).Return(_customerEndPointStub);
            _endPointFactoryMock.Replay();

            _orderTicketEndPointMock.Expect(mock => mock.MarkDataComplete(null));
            _orderTicketEndPointMock.Replay();

            _registrationAgentMock.Expect(mock => mock.RegisterEndPoint(_orderTicketEndPointMock, _map));
            _registrationAgentMock.Expect(mock => mock.RegisterEndPoint(_customerEndPointStub, _map));
            _registrationAgentMock.Replay();

            _agentPartialMock.RegisterEndPoints(_orderDataContainer, _map);

            _endPointFactoryMock.VerifyAllExpectations();
            _registrationAgentMock.VerifyAllExpectations();
            _orderTicketEndPointMock.VerifyAllExpectations();
        }