Пример #1
0
        public async Task GetFileDetailsByTagAsync_GivenTagExist_ShouldReturnFileDetailsForTag(int tagIndex)
        {
            //Arrange
            _fileDetailsRepository.GetFileDetailsByTagAsync(Arg.Any <string>()).Returns(args => _fileDetailsList.Where(a => a.Tags.Contains(args[0].ToString())));
            var tag = _fileDetails.Tags.ElementAt(tagIndex);
            //Act

            var results = await _storageService.GetFileDetailsByTagAsync(tag);

            //Assert
            Assert.IsTrue(results.Any(a => a.Tags.Contains(tag)));
        }
Пример #2
0
 public async Task <IEnumerable <FileDetails> > GetFileDetailsByTagAsync(string tag)
 {
     return(await _fileDetailsRepository.GetFileDetailsByTagAsync(tag));
 }