Ejemplo n.º 1
0
        public async Task CreateNewDirectory()
        {
            var name = Guid.NewGuid().ToString();
            await Hosting.MakeDirectoryAsync(name);

            (await Hosting.IsExistAsync(name)).Should().BeTrue();
        }
Ejemplo n.º 2
0
        public async Task CorrectWork_WhenFileExist()
        {
            if (!await Hosting.IsExistAsync(name))
            {
                Assert.Ignore($"Not prepared file '{name}'");
            }
            await Hosting.RemoveFileAsync(name);

            (await Hosting.IsExistAsync(name)).Should().BeFalse();
        }
        public async Task CorrectWork_WhenNonEmptyDirectoryExist()
        {
            if (!(await Hosting.GetDirectoryListAsync(name)).Any())
            {
                Assert.Ignore($"Put file and dir to '{name}'");
            }
            await Hosting.RemoveDirectoryAsync(name, true);

            (await Hosting.IsExistAsync(name)).Should().BeFalse();
        }
        public async Task CorrectWork_WhenEmptyDirectoryExist()
        {
            await Hosting.RemoveDirectoryAsync(name, false);

            (await Hosting.IsExistAsync(name)).Should().BeFalse();
        }