Skip to content

Commit

Permalink
Update test language to be more negative.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerjou Cheng committed Oct 24, 2016
1 parent 9949565 commit 4df07bd
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");
"You are an idiot suck face and I hope you choke on your jolly rancher.");

// 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 4df07bd

Please sign in to comment.