Exemple #1
0
        public async Task TestClearCacheFailed()
        {
            Assert.True(_settingsViewModel.CanClearCache);
            var exception = new Exception("Boom");

            _coverService.When(x => x.ClearCache()).Do(info => { throw exception; });

            await _settingsViewModel.ClearCache();

            _logger.Received(1).WarnException("Failed to clear cover cache", exception);

            Assert.True(_settingsViewModel.CanClearCache);
        }