public async Task GivenValidMediaProcessorParameters_WhenAllOperationsSucceed_ThenUrlOfUploadedVideoIsReturned() { // Arrange A.CallTo(() => _fakeGfyCatVideoUploader.UploadAsync()).Returns(UploadUrl); // Act var uploadUrl = await _mediaProcessor.DownloadAndRotateAndUploadVideo(GetValidMediaProcessorParameters()); // Assert A.CallTo(() => _fakeAudioDownloader.DownloadFromUrl(AudioUrlString)).MustHaveHappenedOnceExactly(); A.CallTo(() => _fakeVideoDownloader.DownloadFromUrl(VideoUrlString)).MustHaveHappenedOnceExactly(); A.CallTo(() => _fakeMediaMuxer.CombineVideoAndAudio()).MustHaveHappenedOnceExactly(); A.CallTo(() => _fakeVideoRotator.Rotate(RotationArgumentString)).MustHaveHappenedOnceExactly(); A.CallTo(() => _fakeGfyCatVideoUploader.UploadAsync()).MustHaveHappenedOnceExactly(); Assert.Equal(UploadUrl, uploadUrl); }
private void DownloadAudioFromUrl(string url) { _audioDownloader.DownloadFromUrl(url); }