Exemplo n.º 1
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();
        }
Exemplo n.º 2
0
 public async Task Delete(string path)
 {
     if (await Hosting.IsDirectoryAsync(path))
     {
         await Hosting.RemoveDirectoryAsync(path, true);
     }
     else
     {
         await Hosting.RemoveFileAsync(path);
     }
 }
Exemplo n.º 3
0
 public void ThrowsException_WhenHostUnavailable()
 {
     DisableInternet();
     AssertThrows <HostUnavailable>(Hosting.RemoveFileAsync("any file"));
 }
Exemplo n.º 4
0
 public void ThrowsException_WhenPathToDirectory()
 {
     AssertThrows <UnexpectedItemType>(Hosting.RemoveFileAsync("Empty dir"));
 }
Exemplo n.º 5
0
 public async Task CorrectWork_WhenPathUnexist()
 {
     await Hosting.RemoveFileAsync("BAD DIR/BAD FILE");
 }
Exemplo n.º 6
0
 public async Task CorrectWork_WhenFileUnexist()
 {
     await Hosting.RemoveFileAsync("BAD NAME");
 }