Example #1
0
        public async Task Should_resolve_folder_path_from_root()
        {
            var folderId1 = Guid.NewGuid();
            var folder1   = CreateFolder(folderId1);

            A.CallTo(() => assetFolderRepository.FindAssetFolderAsync(folderId1))
            .Returns(folder1);

            var result = await sut.FindAssetFolderAsync(folderId1);

            Assert.Equal(result, new[] { folder1 });
        }
Example #2
0
        public async Task Should_find_asset_folder_with_path()
        {
            var folderId1 = DomainId.NewGuid();
            var folder1   = CreateFolder(folderId1);

            A.CallTo(() => assetFolderRepository.FindAssetFolderAsync(appId.Id, folderId1, A <CancellationToken> ._))
            .Returns(folder1);

            var result = await sut.FindAssetFolderAsync(appId.Id, folderId1);

            Assert.Equal(result, new[] { folder1 });
        }