projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '18094-update-uuid-endpoint-removal' into main. Closes #18094
[arvados.git]
/
sdk
/
R
/
tests
/
testthat
/
test-Subcollection.R
diff --git
a/sdk/R/tests/testthat/test-Subcollection.R
b/sdk/R/tests/testthat/test-Subcollection.R
index a6e420962bce9777d56d69c4ded58c015986b288..a95247f77c7d457d9f368ef321a027a980652e85 100644
(file)
--- a/
sdk/R/tests/testthat/test-Subcollection.R
+++ b/
sdk/R/tests/testthat/test-Subcollection.R
@@
-37,7
+37,7
@@
test_that(paste("getFileListing by default returns sorted path of all files",
resultsMatch <- length(expectedResult) == length(result) &&
all(expectedResult == result)
resultsMatch <- length(expectedResult) == length(result) &&
all(expectedResult == result)
- expect_t
hat(resultsMatch, is_true()
)
+ expect_t
rue(resultsMatch
)
})
test_that(paste("getFileListing returns sorted names of all direct children",
})
test_that(paste("getFileListing returns sorted names of all direct children",
@@
-58,7
+58,7
@@
test_that(paste("getFileListing returns sorted names of all direct children",
resultsMatch <- length(expectedResult) == length(result) &&
all(expectedResult == result)
resultsMatch <- length(expectedResult) == length(result) &&
all(expectedResult == result)
- expect_t
hat(resultsMatch, is_true()
)
+ expect_t
rue(resultsMatch
)
})
test_that("add adds content to inside collection tree", {
})
test_that("add adds content to inside collection tree", {
@@
-73,8
+73,8
@@
test_that("add adds content to inside collection tree", {
animalContainsFish <- animal$get("fish")$getName() == fish$getName()
animalContainsDog <- animal$get("dog")$getName() == dog$getName()
animalContainsFish <- animal$get("fish")$getName() == fish$getName()
animalContainsDog <- animal$get("dog")$getName() == dog$getName()
- expect_t
hat(animalContainsFish, is_true()
)
- expect_t
hat(animalContainsDog, is_true()
)
+ expect_t
rue(animalContainsFish
)
+ expect_t
rue(animalContainsDog
)
})
test_that("add raises exception if content name is empty string", {
})
test_that("add raises exception if content name is empty string", {
@@
-143,7
+143,7
@@
test_that("remove removes content from subcollection", {
returnValueAfterRemovalIsNull <- is.null(animal$get("fish"))
returnValueAfterRemovalIsNull <- is.null(animal$get("fish"))
- expect_t
hat(returnValueAfterRemovalIsNull, is_true()
)
+ expect_t
rue(returnValueAfterRemovalIsNull
)
})
test_that(paste("remove raises exception",
})
test_that(paste("remove raises exception",
@@
-198,10
+198,10
@@
test_that(paste("get returns ArvadosFile or Subcollection",
returnedFishIsSubcollection <- "Subcollection" %in% class(returnedFish)
returnedDogIsArvadosFile <- "ArvadosFile" %in% class(returnedDog)
returnedFishIsSubcollection <- "Subcollection" %in% class(returnedFish)
returnedDogIsArvadosFile <- "ArvadosFile" %in% class(returnedDog)
- expect_t
hat(returnedFishIsSubcollection, is_true()
)
+ expect_t
rue(returnedFishIsSubcollection
)
expect_that(returnedFish$getName(), equals("fish"))
expect_that(returnedFish$getName(), equals("fish"))
- expect_t
hat(returnedDogIsArvadosFile, is_true()
)
+ expect_t
rue(returnedDogIsArvadosFile
)
expect_that(returnedDog$getName(), equals("dog"))
})
expect_that(returnedDog$getName(), equals("dog"))
})
@@
-215,7
+215,7
@@
test_that(paste("get returns NULL if file or folder",
returnedDogIsNull <- is.null(animal$get("dog"))
returnedDogIsNull <- is.null(animal$get("dog"))
- expect_t
hat(returnedDogIsNull, is_true()
)
+ expect_t
rue(returnedDogIsNull
)
})
test_that("getFirst returns first child in the subcollection", {
})
test_that("getFirst returns first child in the subcollection", {
@@
-234,7
+234,7
@@
test_that("getFirst returns NULL if subcollection contains no children", {
returnedElementIsNull <- is.null(animal$getFirst())
returnedElementIsNull <- is.null(animal$getFirst())
- expect_t
hat(returnedElementIsNull, is_true()
)
+ expect_t
rue(returnedElementIsNull
)
})
test_that(paste("setCollection by default sets collection",
})
test_that(paste("setCollection by default sets collection",
@@
-261,7
+261,7
@@
test_that(paste("setCollection sets collection filed of subcollection only",
fishCollectionIsNull <- is.null(fish$getCollection())
expect_that(animal$getCollection(), equals("myCollection"))
fishCollectionIsNull <- is.null(fish$getCollection())
expect_that(animal$getCollection(), equals("myCollection"))
- expect_t
hat(fishCollectionIsNull, is_true()
)
+ expect_t
rue(fishCollectionIsNull
)
})
test_that(paste("move raises exception if subcollection",
})
test_that(paste("move raises exception if subcollection",
@@
-330,8
+330,8
@@
test_that("move moves subcollection inside collection tree", {
fishIsNullOnOldLocation <- is.null(collection$get("animal/fish"))
fishExistsOnNewLocation <- !is.null(collection$get("fish"))
fishIsNullOnOldLocation <- is.null(collection$get("animal/fish"))
fishExistsOnNewLocation <- !is.null(collection$get("fish"))
- expect_t
hat(fishIsNullOnOldLocation, is_true()
)
- expect_t
hat(fishExistsOnNewLocation, is_true()
)
+ expect_t
rue(fishIsNullOnOldLocation
)
+ expect_t
rue(fishExistsOnNewLocation
)
})
test_that(paste("getSizeInBytes returns zero if subcollection",
})
test_that(paste("getSizeInBytes returns zero if subcollection",
@@
-425,8
+425,8
@@
test_that("copy copies subcollection inside collection tree", {
fishExistsOnOldLocation <- !is.null(collection$get("animal/fish"))
fishExistsOnNewLocation <- !is.null(collection$get("fish"))
fishExistsOnOldLocation <- !is.null(collection$get("animal/fish"))
fishExistsOnNewLocation <- !is.null(collection$get("fish"))
- expect_t
hat(fishExistsOnOldLocation, is_true()
)
- expect_t
hat(fishExistsOnNewLocation, is_true()
)
+ expect_t
rue(fishExistsOnOldLocation
)
+ expect_t
rue(fishExistsOnNewLocation
)
})
test_that("duplicate performs deep cloning of Subcollection", {
})
test_that("duplicate performs deep cloning of Subcollection", {