public void assert_folder_is_empty_does_not_blow_for_empty_target() { new FileSystem().DeleteDirectory("target"); new FileSystem().CreateDirectory("target"); NewCommand.AssertEmpty("target"); }
public void assert_folder_blows_up_when_directory_is_not_empty() { new FileSystem().CreateDirectory("not-empty"); new FileSystem().WriteStringToFile("not-empty".AppendPath("foo.txt"), "anything"); Exception <InvalidOperationException> .ShouldBeThrownBy(() => { NewCommand.AssertEmpty("not-empty"); }); }
public void assert_folder_is_empty_is_fine_when_directory_does_not_exist() { new FileSystem().DeleteDirectory("nonexistent"); NewCommand.AssertEmpty("nonexistent"); }