Exemple #1
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();
        }