Exemplo n.º 1
0
        public Task <Unit> Handle(StopPlayingSoundEffect request, CancellationToken cancellationToken)
        {
            _buzzer.StopPlaying();

            _logger.LogInformation("Sent stop playing request.");

            return(Unit.Task);
        }
Exemplo n.º 2
0
        public async Task Handle_StopPlayingSoundEffect_stops_playing_sound_effect()
        {
            // Arrange
            var command = new StopPlayingSoundEffect();

            // Act
            await _sut.Handle(command, _defaultCancellationToken);

            // Assert
            A.CallTo(() => _buzzer.StopPlaying())
            .MustHaveHappenedOnceExactly();
        }