コード例 #1
0
        public void Runner_InstantiatesAndRuns()
        {
            _trackerFactoryMock.Expect(mock => mock.CreateTracker()).Return(_trackerMock);
            _transformationFactoryMock.Expect(mock => mock.CreateTransformation(_infoBroker)).Return(_transformerMock);
            _transformerMock.Expect(mock => mock.Transform(_trackerMock));
            _signerFactoryMock.Expect(mock => mock.CreateSigner()).Return(_signerMock);
            _signerMock.Expect(mock => mock.SignAndSave(_trackerMock));

            _trackerFactoryMock.Replay();
            _trackerMock.Replay();
            _transformationFactoryMock.Replay();
            _transformerMock.Replay();
            _signerFactoryMock.Replay();
            _signerMock.Replay();
            _runner.Run(_trackerFactoryMock, new[] { _transformationFactoryMock }, _signerFactoryMock, _infoBroker);

            _trackerFactoryMock.VerifyAllExpectations();
            _trackerMock.VerifyAllExpectations();

            _transformationFactoryMock.VerifyAllExpectations();
            _transformerMock.VerifyAllExpectations();

            _signerFactoryMock.VerifyAllExpectations();
            _signerMock.VerifyAllExpectations();
        }