Bumblebee.IntegrationTests.Setup.SessionTests.Given_default_implementation_of_ISettings.When_path_points_to_a_file_Then_an_exception_is_thrown C# (CSharp) Method

When_path_points_to_a_file_Then_an_exception_is_thrown() private method

		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);
		}
	}