From f4b576c34d503ff9540d63873082615120264853 Mon Sep 17 00:00:00 2001 From: Marco Ziccardi Date: Fri, 17 Jun 2016 16:44:17 +0200 Subject: [PATCH] Add constants for updated values in MetricInfoTest --- .../com/google/cloud/logging/MetricInfoTest.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/gcloud-java-logging/src/test/java/com/google/cloud/logging/MetricInfoTest.java b/gcloud-java-logging/src/test/java/com/google/cloud/logging/MetricInfoTest.java index b0e1a64a6a94..5b4be469cbbb 100644 --- a/gcloud-java-logging/src/test/java/com/google/cloud/logging/MetricInfoTest.java +++ b/gcloud-java-logging/src/test/java/com/google/cloud/logging/MetricInfoTest.java @@ -26,6 +26,9 @@ public class MetricInfoTest { private static final String NAME = "name"; private static final String FILTER = "logName=projects/my-projectid/logs/syslog"; private static final String DESCRIPTION = "description"; + private static final String NEW_NAME = "newName"; + private static final String NEW_FILTER = "logName=projects/my-projectid/logs/newSyslog"; + private static final String NEW_DESCRIPTION = "newDescription"; private static final MetricInfo METRIC_INFO = MetricInfo.builder(NAME, FILTER) .description(DESCRIPTION) .build(); @@ -49,13 +52,13 @@ public void testBuilder() { public void testToBuilder() { compareMetricInfo(METRIC_INFO, METRIC_INFO.toBuilder().build()); MetricInfo metricInfo = METRIC_INFO.toBuilder() - .name("newName") - .description("newDescription") - .filter("logName=projects/my-projectid/logs/syslog") + .name(NEW_NAME) + .description(NEW_DESCRIPTION) + .filter(NEW_FILTER) .build(); - assertEquals("newName", metricInfo.name()); - assertEquals("logName=projects/my-projectid/logs/syslog", metricInfo.filter()); - assertEquals("newDescription", metricInfo.description()); + assertEquals(NEW_NAME, metricInfo.name()); + assertEquals(NEW_FILTER, metricInfo.filter()); + assertEquals(NEW_DESCRIPTION, metricInfo.description()); metricInfo = metricInfo.toBuilder() .name(NAME) .description(DESCRIPTION)