Ejemplo n.º 1
0
        public void assert_folder_is_empty_does_not_blow_for_empty_target()
        {
            new FileSystem().DeleteDirectory("target");
            new FileSystem().CreateDirectory("target");

            NewCommand.AssertEmpty("target");
        }
Ejemplo n.º 2
0
        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"); });
        }
Ejemplo n.º 3
0
 public void assert_folder_is_empty_is_fine_when_directory_does_not_exist()
 {
     new FileSystem().DeleteDirectory("nonexistent");
     NewCommand.AssertEmpty("nonexistent");
 }