Skip to content

Commit 00bdc1b

Browse files
committed
---
yaml --- r: 877 b: refs/heads/master c: ccc0230 h: refs/heads/master i: 875: 011730a v: v3
1 parent d0794b5 commit 00bdc1b

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
2-
refs/heads/master: a10b74b73c5f5d5a2ed337503ddd4351f95d2a64
2+
refs/heads/master: ccc023045b446ac8d5e4b6e921171e09e3eac37e
33
refs/heads/travis: 0fa997e2fc9c6b61b2d91e6d163655aae67d44b6
44
refs/heads/gh-pages: 5a10432ecc75f29812e33a8236c900379509fe99

trunk/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Bucket.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
import com.google.gcloud.storage.Storage.BlobTargetOption;
2424
import com.google.gcloud.storage.Storage.BucketSourceOption;
2525
import com.google.gcloud.storage.Storage.BucketTargetOption;
26-
import java.util.LinkedList;
2726

27+
import java.util.LinkedList;
2828
import java.util.List;
2929
import java.util.Objects;
3030

trunk/gcloud-java-storage/src/test/java/com/google/gcloud/storage/BucketTest.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,19 @@
4040

4141
public class BucketTest {
4242

43+
private static final BucketInfo BUCKET_INFO = BucketInfo.of("b");
4344
private static final Iterable<BlobInfo> BLOB_INFO_RESULTS = ImmutableList.of(
4445
BlobInfo.of("b", "n1"),
4546
BlobInfo.of("b", "n2"),
4647
BlobInfo.of("b", "n3"));
4748

4849
private Storage storage;
4950
private Bucket bucket;
50-
private final BucketInfo bucketInfo = BucketInfo.of("b");
5151

5252
@Before
5353
public void setUp() throws Exception {
5454
storage = createStrictMock(Storage.class);
55-
bucket = new Bucket(storage, bucketInfo);
55+
bucket = new Bucket(storage, BUCKET_INFO);
5656
}
5757

5858
@After
@@ -62,27 +62,27 @@ public void tearDown() throws Exception {
6262

6363
@Test
6464
public void testInfo() throws Exception {
65-
assertEquals(bucketInfo, bucket.info());
65+
assertEquals(BUCKET_INFO, bucket.info());
6666
replay(storage);
6767
}
6868

6969
@Test
7070
public void testExists_True() throws Exception {
71-
expect(storage.get(bucketInfo.name())).andReturn(bucketInfo);
71+
expect(storage.get(BUCKET_INFO.name())).andReturn(BUCKET_INFO);
7272
replay(storage);
7373
assertTrue(bucket.exists());
7474
}
7575

7676
@Test
7777
public void testExists_False() throws Exception {
78-
expect(storage.get(bucketInfo.name())).andReturn(null);
78+
expect(storage.get(BUCKET_INFO.name())).andReturn(null);
7979
replay(storage);
8080
assertFalse(bucket.exists());
8181
}
8282

8383
@Test
8484
public void testUpdate() throws Exception {
85-
BucketInfo updatedInfo = bucketInfo.toBuilder().notFoundPage("p").build();
85+
BucketInfo updatedInfo = BUCKET_INFO.toBuilder().notFoundPage("p").build();
8686
expect(storage.update(updatedInfo)).andReturn(updatedInfo);
8787
replay(storage);
8888
bucket.update(updatedInfo);
@@ -92,15 +92,15 @@ public void testUpdate() throws Exception {
9292

9393
@Test
9494
public void testDelete() throws Exception {
95-
expect(storage.delete(bucketInfo.name())).andReturn(true);
95+
expect(storage.delete(BUCKET_INFO.name())).andReturn(true);
9696
replay(storage);
9797
assertTrue(bucket.delete());
9898
}
9999

100100
@Test
101101
public void testList() throws Exception {
102102
BaseListResult<BlobInfo> blobInfoResult = new BaseListResult<>(null, "c", BLOB_INFO_RESULTS);
103-
expect(storage.list(bucketInfo.name())).andReturn(blobInfoResult);
103+
expect(storage.list(BUCKET_INFO.name())).andReturn(blobInfoResult);
104104
replay(storage);
105105
ListResult<Blob> blobResult = bucket.list();
106106
Iterator<BlobInfo> blobInfoIterator = blobInfoResult.iterator();
@@ -116,7 +116,7 @@ public void testList() throws Exception {
116116
@Test
117117
public void testGet() throws Exception {
118118
BlobInfo info = BlobInfo.of("b", "n");
119-
expect(storage.get(bucketInfo.name(), "n")).andReturn(info);
119+
expect(storage.get(BUCKET_INFO.name(), "n")).andReturn(info);
120120
replay(storage);
121121
Blob blob = bucket.get("n");
122122
assertEquals(info, blob.info());

0 commit comments

Comments
 (0)