public void Perform() { _registrationAgentMock.Expect(mock => mock.UnregisterEndPoint(_endPoint1, _map)); _registrationAgentMock.Expect(mock => mock.UnregisterEndPoint(_endPoint2, _map)); _registrationAgentMock.Replay(); _command.Perform(); _registrationAgentMock.VerifyAllExpectations(); }
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(); }
public void Perform_Collectible() { _endPointMock1.Expect(mock => mock.MarkDataIncomplete()); _endPointMock1.Stub(stub => stub.CanBeCollected).Return(true); _registrationAgentMock.Expect(mock => mock.UnregisterEndPoint(_endPointMock1, _relationEndPointMap)); _endPointMock2.Expect(mock => mock.MarkDataIncomplete()); _endPointMock2.Stub(stub => stub.CanBeCollected).Return(false); _mockRepository.ReplayAll(); _command.Perform(); _mockRepository.VerifyAll(); }