public void Setup() { // mock YouTubeDataService var youTubeDataServiceMock = new Mock <IYouTubeDataService>(); youTubeDataServiceMock.Setup(foo => foo.GetChannelIdFromUsername("xyz")).Returns(Task.FromResult("abc")); _useCase = new ExtractYouTubeChannelIDUseCase(youTubeDataServiceMock.Object); }
public IdentifySailingChannelUseCase( IExtractYouTubeChannelIDUseCase extractYouTubeChannelIdUseCase, IYouTubeChannelDetailUseCase youTubeChannelDetailUseCase, ISuggestionRepository suggestionRepository ) { _extractYouTubeChannelIdUseCase = extractYouTubeChannelIdUseCase ?? throw new ArgumentNullException(nameof(extractYouTubeChannelIdUseCase)); _youTubeChannelDetailUseCase = youTubeChannelDetailUseCase ?? throw new ArgumentNullException(nameof(youTubeChannelDetailUseCase)); _suggestionRepository = suggestionRepository ?? throw new ArgumentNullException(nameof(suggestionRepository)); }