public void Send_a_export_to_vivo_response_on_message_of_export_to_vivo_message()
        {
            var handler = new ExportToVivoHandler(_vivoDataCollectionRepository, _dataCollectionRepository);
            _dataCollectionRepository.Get(Arg.Is(1));

            Test.Handler(handler)
                .ExpectReply<ExportToVivoResponse>(m => m.DataCollectionId == 1)
                .OnMessage<ExportToVivo>(m =>
                                             {
                                                 m.DataCollectionId = 1;
                                             });

            _dataCollectionRepository.Received().Get(Arg.Is(1));
            _vivoDataCollectionRepository.Received().Save(Arg.Any<DataCollection>());
        }
Пример #2
0
        public void Send_a_export_to_vivo_response_on_message_of_export_to_vivo_message()
        {
            var handler = new ExportToVivoHandler(_vivoDataCollectionRepository, _dataCollectionRepository);

            _dataCollectionRepository.Get(Arg.Is(1));

            Test.Handler(handler)
            .ExpectReply <ExportToVivoResponse>(m => m.DataCollectionId == 1)
            .OnMessage <ExportToVivo>(m =>
            {
                m.DataCollectionId = 1;
            });

            _dataCollectionRepository.Received().Get(Arg.Is(1));
            _vivoDataCollectionRepository.Received().Save(Arg.Any <DataCollection>());
        }