public void CreateFolderAndFileListFiles() { var controller = CreateController(); var jObj = new JObject { ["folder"] = "foo" }; controller.Create(jObj); var file = FileTests.CreateMoqFile("foo content", "foo.txt"); var filesControllers = CreateFilesController(); filesControllers.Upload(file.Object, "foo"); var files = controller.ListFiles("foo"); Assert.Single(files); Assert.Equal("/foo/foo.txt", files.First()); }
public void CreateFolderAndFileDeleteFileListFiles() { var controller = CreateController(); var jObj = new JObject { ["folder"] = "foo" }; controller.Create(jObj); var result = controller.ListFolders("/"); var file = FileTests.CreateMoqFile("foo content", "foo.txt"); var filesControllers = CreateFilesController(); filesControllers.Upload(file.Object, "foo"); filesControllers.Delete("foo/foo.txt"); var files = controller.ListFiles("foo"); Assert.Empty(files); }