+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
source("fakes/FakeRESTService.R")
context("ArvadosFile")
+test_that("constructor raises error if file name is empty string", {
+
+ expect_that(ArvadosFile$new(""), throws_error("Invalid name."))
+})
+
test_that("getFileListing always returns file name", {
dog <- ArvadosFile$new("dog")
"animal/dog",
"animal/fish/shark",
"ball")
+
fakeREST <- FakeRESTService$new(collectionContent)
api <- Arvados$new("myToken", "myHostName")
"animal/dog",
"animal/fish/shark",
"dog")
+
fakeREST <- FakeRESTService$new(collectionContent)
api <- Arvados$new("myToken", "myHostName")
"animal/dog",
"animal/fish/shark",
"ball")
+
fakeREST <- FakeRESTService$new(collectionContent)
api <- Arvados$new("myToken", "myHostName")
expect_that(dogIsNullOnOldLocation, is_true())
expect_that(dogExistsOnNewLocation, is_true())
-})
+})