public void Execute_Always_QueuesCallToUpdate()
        {
            // Arrange
            IEnumerable <ProgressItem> items = new List <ProgressItem> {
                CreateProgressItem()
            };

            _metadataProvider.Update()
            .Returns(items.ToTask());

            // Act
            _command.Execute(null);

            // Assert
            _progressManager.Received()
            .AddItem(Arg.Any <ProgressItem>());
            _progressManager.Received()
            .Start().Async();
        }
Ejemplo n.º 2
0
        public void Execute_WithTvShows_QueuesUpdates()
        {
            // Arrange
            IMovieViewModel viewModel1 = Substitute.For <IMovieViewModel>();

            _movies.Add(viewModel1);
            IEnumerable <ProgressItem> items = new List <ProgressItem> {
                CreateProgressItem()
            };

            viewModel1.Update()
            .Returns(items.ToTask());

            // Act
            _command.Execute(null);

            // Assert
            _progressManager.Received()
            .AddItem(Arg.Any <ProgressItem>());
            _progressManager.Received()
            .Start().Async();
        }