Пример #1
0
        public async Task Initialize_event_position_to_event_store_current_global_stream_position_when_first_time()
        {
            const long currentPosition = 1500000L;

            _eventPositionRepository.GetLastProcessedPosition().Returns((long?)null);
            _eventStore.GetCurrentGlobalStreamPosition().Returns(currentPosition);

            await _aggregator.StartAggregation(new CancellationToken(false));

            await _eventPositionRepository.Received(1).Save(currentPosition);
        }