public void When_path_points_to_a_file_Then_an_exception_is_thrown()
{
var drive = Path.GetPathRoot(Environment.CurrentDirectory);
var filename = Path.Combine(drive, String.Format("{0}.txt", Guid.NewGuid()));
File.Delete(filename);
File.WriteAllText(filename, "Hello, World.");
Action fn = () => new Settings
{
ScreenCapturePath = filename
};
fn.ShouldThrow<ArgumentException>();
File.Delete(filename);
}
}