aboutsummaryrefslogtreecommitdiffstats
path: root/api/src/test
diff options
context:
space:
mode:
authorKristen Kozak <sebright@google.com>2017-10-31 19:00:32 -0700
committerKristen Kozak <sebright@google.com>2017-10-31 19:15:33 -0700
commit28f8581d5a6947250fc86e00dfe4cb538d01fa85 (patch)
treed135e8ac77d74667b84986b0fd101a0752bc0ca2 /api/src/test
parentd1e5e9f0919d9a922fc38fe27e9a9996ddfa5c85 (diff)
downloadplatform_external_opencensus-java-28f8581d5a6947250fc86e00dfe4cb538d01fa85.tar.gz
platform_external_opencensus-java-28f8581d5a6947250fc86e00dfe4cb538d01fa85.tar.bz2
platform_external_opencensus-java-28f8581d5a6947250fc86e00dfe4cb538d01fa85.zip
Rename TagContextParseException to TagContextDeserializationException.
The new name is more consistent with TagContextSerializationException.
Diffstat (limited to 'api/src/test')
-rw-r--r--api/src/test/java/io/opencensus/tags/NoopTagsTest.java6
-rw-r--r--api/src/test/java/io/opencensus/tags/propagation/TagContextDeserializationExceptionTest.java (renamed from api/src/test/java/io/opencensus/tags/propagation/TagContextParseExceptionTest.java)14
2 files changed, 11 insertions, 9 deletions
diff --git a/api/src/test/java/io/opencensus/tags/NoopTagsTest.java b/api/src/test/java/io/opencensus/tags/NoopTagsTest.java
index 551229a7..8434bd83 100644
--- a/api/src/test/java/io/opencensus/tags/NoopTagsTest.java
+++ b/api/src/test/java/io/opencensus/tags/NoopTagsTest.java
@@ -21,7 +21,7 @@ import static com.google.common.truth.Truth.assertThat;
import com.google.common.collect.Lists;
import io.opencensus.internal.NoopScope;
import io.opencensus.tags.propagation.TagContextBinarySerializer;
-import io.opencensus.tags.propagation.TagContextParseException;
+import io.opencensus.tags.propagation.TagContextDeserializationException;
import io.opencensus.tags.propagation.TagContextSerializationException;
import java.util.Arrays;
import java.util.Iterator;
@@ -131,7 +131,7 @@ public final class NoopTagsTest {
@Test
public void noopTagContextBinarySerializer()
- throws TagContextParseException, TagContextSerializationException {
+ throws TagContextDeserializationException, TagContextSerializationException {
assertThat(NoopTags.getNoopTagContextBinarySerializer().toByteArray(TAG_CONTEXT))
.isEqualTo(new byte[0]);
assertThat(NoopTags.getNoopTagContextBinarySerializer().fromByteArray(new byte[5]))
@@ -148,7 +148,7 @@ public final class NoopTagsTest {
@Test
public void noopTagContextBinarySerializer_FromByteArray_DisallowsNull()
- throws TagContextParseException {
+ throws TagContextDeserializationException {
TagContextBinarySerializer noopSerializer = NoopTags.getNoopTagContextBinarySerializer();
thrown.expect(NullPointerException.class);
noopSerializer.fromByteArray(null);
diff --git a/api/src/test/java/io/opencensus/tags/propagation/TagContextParseExceptionTest.java b/api/src/test/java/io/opencensus/tags/propagation/TagContextDeserializationExceptionTest.java
index 0c2afadc..750d5d45 100644
--- a/api/src/test/java/io/opencensus/tags/propagation/TagContextParseExceptionTest.java
+++ b/api/src/test/java/io/opencensus/tags/propagation/TagContextDeserializationExceptionTest.java
@@ -23,20 +23,22 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-/** Unit tests for {@link TagContextParseException}. */
+/** Unit tests for {@link TagContextDeserializationException}. */
@RunWith(JUnit4.class)
-public final class TagContextParseExceptionTest {
+public final class TagContextDeserializationExceptionTest {
@Test
public void createWithMessage() {
- assertThat(new TagContextParseException("my message").getMessage()).isEqualTo("my message");
+ assertThat(new TagContextDeserializationException("my message").getMessage())
+ .isEqualTo("my message");
}
@Test
public void createWithMessageAndCause() {
IOException cause = new IOException();
- TagContextParseException parseException = new TagContextParseException("my message", cause);
- assertThat(parseException.getMessage()).isEqualTo("my message");
- assertThat(parseException.getCause()).isEqualTo(cause);
+ TagContextDeserializationException exception =
+ new TagContextDeserializationException("my message", cause);
+ assertThat(exception.getMessage()).isEqualTo("my message");
+ assertThat(exception.getCause()).isEqualTo(cause);
}
}