Skip to content

Commit

Permalink
Merge pull request #380 from GoogleCloudPlatform/negative-language
Browse files Browse the repository at this point in the history
Update test language to be more negative.
  • Loading branch information
jerjou committed Oct 24, 2016
2 parents 9949565 + 3892805 commit 14dbfe0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion language/analysis/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<groupId>com.google.cloud.language.samples</groupId>
<artifactId>entities</artifactId>
<artifactId>language-entities</artifactId>

<dependencies>
<!-- [START dependencies] -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ public class AnalyzeIT {

@Test public void analyzeSentiment_returnPositive() throws Exception {
// Act
Sentiment sentiment =
Sentiment sentiment =
analyzeApp.analyzeSentiment(
"Tom Cruise is one of the finest actors in hollywood and a great star!");

// Assert
assertThat((double)sentiment.getMagnitude()).isGreaterThan(0.0);
assertThat((double)sentiment.getPolarity()).isGreaterThan(0.0);
Expand All @@ -72,7 +72,7 @@ public class AnalyzeIT {
// Act
Sentiment sentiment =
analyzeApp.analyzeSentiment(
"John was seriously injured in an accident");
"That was the worst performance I've seen in awhile.");

// Assert
assertThat((double)sentiment.getMagnitude()).isGreaterThan(0.0);
Expand All @@ -89,7 +89,7 @@ public class AnalyzeIT {
.collect(Collectors.toList());

// Assert
assertThat(got).containsExactly("NOUN", "NOUN", "VERB",
assertThat(got).containsExactly("NOUN", "NOUN", "VERB",
"VERB", "ADP", "DET", "ADJ", "NOUN").inOrder();
}
}

0 comments on commit 14dbfe0

Please sign in to comment.