Skip to content

Commit 4605479

Browse files
committed
assert uri
1 parent cecea6c commit 4605479

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

speech/grpc/src/test/java/com/google/cloud/speech/grpc/demos/AudioRequestFactoryTest.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,17 @@ public void verifyBytesInSizeFromLocalFile() throws IOException {
4747

4848
@Test
4949
public void verifyBytesInSizeFromGoogleStorageFile() throws IOException {
50-
URI uri = URI.create("gs://cloud-samples-tests/speech/audio.raw");
50+
String audioUri = "gs://cloud-samples-tests/speech/audio.raw";
51+
52+
URI uri = URI.create(audioUri);
5153
AudioRequest audio = AudioRequestFactory.createRequest(uri);
5254

5355
int numBytes = audio.getContent().toByteArray().length;
5456

5557
//assert the number of bytes in the audio as 57958
56-
assertEquals(57958, numBytes);
58+
assertEquals(0, numBytes);
59+
60+
//assert the uri
61+
assertEquals(audioUri, audio.getUri());
5762
}
5863
}

0 commit comments

Comments
 (0)