public void can_move_folder() { var fs = new InMemoryFileSystem(); var source = fs.GetDirectory("C:\\source"); source.GetFile("mordor.txt").MustExist(); var destination = fs.GetDirectory("C:\\destination"); source.MoveTo(destination); source.GetFile("mordor.txt").Exists.ShouldBeFalse(); source.Exists.ShouldBeFalse(); destination.Exists.ShouldBeTrue(); destination.GetFile("mordor.txt").Exists.ShouldBeTrue(); }
public void can_add_sub_folders() { var fs = new InMemoryFileSystem().CreateChildDir(@"C:\mordor\nurn"); var mordor = fs.GetDirectory(@"C:\mordor"); mordor.Exists.ShouldBeTrue(); var nurn = mordor.GetDirectory("nurn"); nurn.Path.FullPath.ShouldBe(@"C:\mordor\nurn\"); nurn.Exists.ShouldBeTrue(); }