-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
45 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
|
||
package com.google.gcloud.storage; | ||
|
||
import static com.google.common.base.Preconditions.checkNotNull; | ||
import static org.easymock.EasyMock.capture; | ||
import static org.easymock.EasyMock.createMock; | ||
import static org.easymock.EasyMock.createStrictMock; | ||
|
@@ -272,13 +273,13 @@ public void testDeleteNone() throws Exception { | |
|
||
@Test | ||
public void testDeleteSome() throws Exception { | ||
List<Boolean> deleleResultList = Arrays.asList(true, true, true); | ||
expect(storage.delete(BLOB_ID_ARRAY)).andReturn(deleleResultList); | ||
List<Boolean> deleteResult = Arrays.asList(true, true, true); | ||
expect(storage.delete(BLOB_ID_ARRAY)).andReturn(deleteResult); | ||
replay(storage); | ||
List<Boolean> result = Blob.delete(storage, BLOB_ID_ARRAY); | ||
assertEquals(deleleResultList.size(), result.size()); | ||
for (int i = 0; i < deleleResultList.size(); i++) { | ||
assertEquals(deleleResultList.get(i), result.get(i)); | ||
assertEquals(deleteResult.size(), result.size()); | ||
for (int i = 0; i < deleteResult.size(); i++) { | ||
assertEquals(deleteResult.get(i), result.get(i)); | ||
} | ||
} | ||
|
||
|
@@ -295,6 +296,6 @@ public void testLoadFromId() throws Exception { | |
expect(storage.get(BLOB_INFO.blobId())).andReturn(BLOB_INFO); | ||
replay(storage); | ||
Blob loadedBlob = Blob.load(storage, BLOB_INFO.blobId()); | ||
assertEquals(BLOB_INFO, loadedBlob.info()); | ||
assertEquals(BLOB_INFO, checkNotNull(loadedBlob).info()); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
mziccard
Author
Contributor
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nit, because that is a test I was expecting an
assertNotNull(loadedBlob);
before the other assert (so report will look like an expectation violation rather than unexpected NPE.