From a6e09d680a2173d4c25fd1832e1fbd782595b85f Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Thu, 1 Sep 2016 13:57:41 -0700 Subject: [PATCH] The .isEqualTo method is deprecated for doubles. --- .../java/com/google/cloud/language/samples/AnalyzeIT.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/language/analysis/src/test/java/com/google/cloud/language/samples/AnalyzeIT.java b/language/analysis/src/test/java/com/google/cloud/language/samples/AnalyzeIT.java index adc97efe112..63b2663c790 100644 --- a/language/analysis/src/test/java/com/google/cloud/language/samples/AnalyzeIT.java +++ b/language/analysis/src/test/java/com/google/cloud/language/samples/AnalyzeIT.java @@ -65,7 +65,7 @@ public class AnalyzeIT { // Assert assertThat((double)sentiment.getMagnitude()).isGreaterThan(0.0); - assertThat((double)sentiment.getPolarity()).isEqualTo(1.0); + assertThat((double)sentiment.getPolarity()).isGreaterThan(0.0); } @Test public void analyzeSentiment_returnNegative() throws Exception { @@ -76,7 +76,7 @@ public class AnalyzeIT { // Assert assertThat((double)sentiment.getMagnitude()).isGreaterThan(0.0); - assertThat((double)sentiment.getPolarity()).isEqualTo(-1.0); + assertThat((double)sentiment.getPolarity()).isLessThan(0.0); } @Test public void analyzeSyntax_partOfSpeech() throws Exception {