Пример #1
0
        public async Task CanGetBackbendFoldersDefault()
        {
            var errorsAndInfos        = new ErrorsAndInfos();
            var backbendFoldersSecret = new BackbendFoldersSecret();
            var backbendFolders       = backbendFoldersSecret.DefaultValue;
            await backbendFolders.ResolveAsync(vContainer.Resolve <IFolderResolver>(), errorsAndInfos);

            Assert.IsFalse(errorsAndInfos.Errors.Any(), string.Join("\r\n", errorsAndInfos.Errors));
            Assert.AreEqual(1, backbendFolders.Count);
        }
Пример #2
0
        public async Task CanGetBackbendFolders()
        {
            var secretRepository      = vContainer.Resolve <ISecretRepository>();
            var backbendFoldersSecret = new BackbendFoldersSecret();
            var errorsAndInfos        = new ErrorsAndInfos();
            var backbendFolders       = await secretRepository.GetAsync(backbendFoldersSecret, errorsAndInfos);

            Assert.IsFalse(errorsAndInfos.Errors.Any(), string.Join("\r\n", errorsAndInfos.Errors));
            Assert.IsNotNull(backbendFolders);
            Assert.IsTrue(backbendFolders.Count >= 3);
            var clone = backbendFolders.Clone();

            Assert.AreEqual(backbendFolders.Count, clone.Count);
            for (var i = 0; i < backbendFolders.Count; i++)
            {
                Assert.AreEqual(backbendFolders[i].Name, clone[i].Name);
            }
            await backbendFolders.ResolveAsync(vContainer.Resolve <IFolderResolver>(), errorsAndInfos);

            Assert.IsFalse(errorsAndInfos.Errors.Any(), string.Join("\r\n", errorsAndInfos.Errors));
        }