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