Skip to content

Commit bb34177

Browse files
committed
Temporarily hide FakeStorageRpc and LocalStorageHelper (googleapis#1079)
1 parent 3b55bfb commit bb34177

File tree

8 files changed

+9
-17
lines changed

8 files changed

+9
-17
lines changed

gcloud-java-contrib/gcloud-java-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageFileAttributeViewTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import static com.google.common.truth.Truth.assertThat;
2020
import static java.nio.charset.StandardCharsets.UTF_8;
2121

22-
import com.google.cloud.storage.testing.LocalStorageHelper;
2322
import com.google.common.testing.EqualsTester;
2423
import com.google.common.testing.NullPointerTester;
2524

gcloud-java-contrib/gcloud-java-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageFileAttributesTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import static java.nio.charset.StandardCharsets.UTF_8;
2121

2222
import com.google.cloud.storage.Acl;
23-
import com.google.cloud.storage.testing.LocalStorageHelper;
2423
import com.google.common.testing.EqualsTester;
2524
import com.google.common.testing.NullPointerTester;
2625

gcloud-java-contrib/gcloud-java-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemProviderTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import static java.nio.file.StandardOpenOption.TRUNCATE_EXISTING;
2727
import static java.nio.file.StandardOpenOption.WRITE;
2828

29-
import com.google.cloud.storage.testing.LocalStorageHelper;
3029
import com.google.common.collect.ImmutableList;
3130
import com.google.common.testing.NullPointerTester;
3231

gcloud-java-contrib/gcloud-java-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import static java.nio.charset.StandardCharsets.UTF_8;
2121

2222
import com.google.cloud.storage.StorageOptions;
23-
import com.google.cloud.storage.testing.LocalStorageHelper;
2423
import com.google.common.testing.EqualsTester;
2524
import com.google.common.testing.NullPointerTester;
2625

gcloud-java-contrib/gcloud-java-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageOptionsTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import static java.nio.charset.StandardCharsets.UTF_8;
2121

2222
import com.google.cloud.storage.Acl;
23-
import com.google.cloud.storage.testing.LocalStorageHelper;
2423
import com.google.common.testing.NullPointerTester;
2524

2625
import org.junit.Before;

gcloud-java-contrib/gcloud-java-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStoragePathTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import static com.google.common.truth.Truth.assertThat;
2020

21-
import com.google.cloud.storage.testing.LocalStorageHelper;
2221
import com.google.common.collect.Iterables;
2322
import com.google.common.testing.EqualsTester;
2423
import com.google.common.testing.NullPointerTester;

gcloud-java-storage/src/main/java/com/google/cloud/storage/testing/FakeStorageRpc.java renamed to gcloud-java-contrib/gcloud-java-nio/src/test/java/com/google/cloud/storage/contrib/nio/FakeStorageRpc.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.google.cloud.storage.testing;
17+
package com.google.cloud.storage.contrib.nio;
1818

1919
import com.google.api.services.storage.model.Bucket;
2020
import com.google.api.services.storage.model.StorageObject;
@@ -63,7 +63,7 @@
6363
* </ul>
6464
*/
6565
@NotThreadSafe
66-
public class FakeStorageRpc implements StorageRpc {
66+
class FakeStorageRpc implements StorageRpc {
6767

6868
// fullname -> metadata
6969
Map<String, StorageObject> metadata = new HashMap<>();

gcloud-java-storage/src/main/java/com/google/cloud/storage/testing/LocalStorageHelper.java renamed to gcloud-java-contrib/gcloud-java-nio/src/test/java/com/google/cloud/storage/contrib/nio/LocalStorageHelper.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015 Google Inc. All Rights Reserved.
2+
* Copyright 2016 Google Inc. All Rights Reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.google.cloud.storage.testing;
17+
package com.google.cloud.storage.contrib.nio;
1818

1919
import com.google.cloud.spi.ServiceRpcFactory;
2020
import com.google.cloud.storage.spi.StorageRpc;
@@ -24,15 +24,14 @@
2424
* Utility to create an in-memory storage configuration for testing. Storage options can be
2525
* obtained via the {@link #options()} method. Returned options will point to FakeStorageRpc.
2626
*/
27-
public class LocalStorageHelper {
27+
class LocalStorageHelper {
2828

2929
// used for testing. Will throw if you pass it an option.
3030
private static final FakeStorageRpc instance = new FakeStorageRpc(true);
3131

3232
/**
33-
* Returns a {@link StorageOptions} that use the static FakeStorageRpc instance,
34-
* and resets it first so you start from a clean slate.
35-
* That instance will throw if you pass it any option. *
33+
* Returns a {@link StorageOptions} that use the static FakeStorageRpc instance, and resets it
34+
* first so you start from a clean slate. That instance will throw if you pass it any option.
3635
*/
3736
public static StorageOptions options() {
3837
instance.reset();
@@ -49,8 +48,8 @@ public StorageRpc create(StorageOptions options) {
4948
}
5049

5150
/**
52-
* Returns a {@link StorageOptions} that creates a new FakeStorageRpc instance
53-
* with the given option.
51+
* Returns a {@link StorageOptions} that creates a new FakeStorageRpc instance with the given
52+
* option.
5453
*/
5554
public static StorageOptions customOptions(final boolean throwIfOptions) {
5655
return StorageOptions.builder()
@@ -64,5 +63,4 @@ public StorageRpc create(StorageOptions options) {
6463
})
6564
.build();
6665
}
67-
6866
}

0 commit comments

Comments
 (0)