remove trailing white space from all files
[arvados.git] / sdk / R / tests / testthat / test-ArvadosFile.R
index fb14888aab91b982d88dbdddca0be9589f757fb8..1f559e999c52be207317b1f9f6f17332ab287ac0 100644 (file)
@@ -9,30 +9,30 @@ 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")
 
     expect_that(dog$getFileListing(), equals("dog"))
-}) 
+})
 
 test_that("get always returns NULL", {
 
     dog <- ArvadosFile$new("dog")
-    
+
     responseIsNull <- is.null(dog$get("something"))
     expect_that(responseIsNull, is_true())
-}) 
+})
 
 test_that("getFirst always returns NULL", {
 
     dog <- ArvadosFile$new("dog")
-    
+
     responseIsNull <- is.null(dog$getFirst())
     expect_that(responseIsNull, is_true())
-}) 
+})
 
 test_that(paste("getSizeInBytes returns zero if arvadosFile",
                 "is not part of a collection"), {
@@ -40,7 +40,7 @@ test_that(paste("getSizeInBytes returns zero if arvadosFile",
     dog <- ArvadosFile$new("dog")
 
     expect_that(dog$getSizeInBytes(), equals(0))
-}) 
+})
 
 test_that(paste("getSizeInBytes delegates size calculation",
                 "to REST service class"), {
@@ -57,7 +57,7 @@ test_that(paste("getSizeInBytes delegates size calculation",
     resourceSize <- fish$getSizeInBytes()
 
     expect_that(resourceSize, equals(100))
-}) 
+})
 
 test_that("getRelativePath returns path relative to the tree root", {
 
@@ -69,7 +69,7 @@ test_that("getRelativePath returns path relative to the tree root", {
     fish$add(shark)
 
     expect_that(shark$getRelativePath(), equals("animal/fish/shark"))
-}) 
+})
 
 test_that("read raises exception if file doesn't belong to a collection", {
 
@@ -77,7 +77,7 @@ test_that("read raises exception if file doesn't belong to a collection", {
 
     expect_that(dog$read(),
                 throws_error("ArvadosFile doesn't belong to any collection."))
-}) 
+})
 
 test_that("read raises exception offset or length is negative number", {
 
@@ -96,7 +96,7 @@ test_that("read raises exception offset or length is negative number", {
                 throws_error("Offset and length must be positive values."))
     expect_that(fish$read(contentType = "text", offset = -1, length = -1),
                 throws_error("Offset and length must be positive values."))
-}) 
+})
 
 test_that("read delegates reading operation to REST service class", {
 
@@ -108,15 +108,15 @@ test_that("read delegates reading operation to REST service class", {
     api$setRESTService(fakeREST)
     collection <- Collection$new(api, "myUUID")
     fish <- collection$get("animal/fish")
-    
+
     fileContent <- fish$read("text")
 
     expect_that(fileContent, equals("my file"))
     expect_that(fakeREST$readCallCount, equals(1))
-}) 
+})
 
 test_that(paste("connection delegates connection creation ro RESTService class",
-                "which returns curl connection opened in read mode when", 
+                "which returns curl connection opened in read mode when",
                 "'r' of 'rb' is passed as argument"), {
 
     collectionContent <- c("animal", "animal/fish")
@@ -130,7 +130,7 @@ test_that(paste("connection delegates connection creation ro RESTService class",
     connection <- fish$connection("r")
 
     expect_that(fakeREST$getConnectionCallCount, equals(1))
-}) 
+})
 
 test_that(paste("connection returns textConnection opened",
                 "in write mode when 'w' is passed as argument"), {
@@ -152,7 +152,7 @@ test_that(paste("connection returns textConnection opened",
 
     expect_that(writeResult[1], equals("file"))
     expect_that(writeResult[2], equals("content"))
-}) 
+})
 
 test_that("flush sends data stored in a connection to a REST server", {
 
@@ -172,7 +172,7 @@ test_that("flush sends data stored in a connection to a REST server", {
     fish$flush()
 
     expect_that(fakeREST$writeBuffer, equals("file content"))
-}) 
+})
 
 test_that("write raises exception if file doesn't belong to a collection", {
 
@@ -180,7 +180,7 @@ test_that("write raises exception if file doesn't belong to a collection", {
 
     expect_that(dog$write(),
                 throws_error("ArvadosFile doesn't belong to any collection."))
-}) 
+})
 
 test_that("write delegates writing operation to REST service class", {
 
@@ -192,11 +192,11 @@ test_that("write delegates writing operation to REST service class", {
     api$setRESTService(fakeREST)
     collection <- Collection$new(api, "myUUID")
     fish <- collection$get("animal/fish")
-    
+
     fileContent <- fish$write("new file content")
 
     expect_that(fakeREST$writeBuffer, equals("new file content"))
-}) 
+})
 
 test_that(paste("move raises exception if arvados file",
                 "doesn't belong to any collection"), {
@@ -205,7 +205,7 @@ test_that(paste("move raises exception if arvados file",
 
     expect_that(animal$move("new/location"),
                 throws_error("ArvadosFile doesn't belong to any collection"))
-}) 
+})
 
 test_that(paste("move raises exception if newLocationInCollection",
                 "parameter is invalid"), {
@@ -227,7 +227,7 @@ test_that(paste("move raises exception if newLocationInCollection",
 
     expect_that(dog$move("objects/dog"),
                 throws_error("Unable to get destination subcollection"))
-}) 
+})
 
 test_that("move raises exception if new location contains content with the same name", {
 
@@ -248,7 +248,7 @@ test_that("move raises exception if new location contains content with the same
     expect_that(dog$move("dog"),
                 throws_error("Destination already contains content with same name."))
 
-}) 
+})
 
 test_that("move moves arvados file inside collection tree", {