Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ private static void executeSelect1(Spanner spanner) {
try (ResultSet resultSet = client.singleUse().executeQuery(SELECT1)) {
assertThat(resultSet.next()).isTrue();
assertThat(resultSet.getLong(0)).isEqualTo(1L);
assertThat(resultSet.next()).isFalse();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.google.cloud.spanner;

import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
Expand Down Expand Up @@ -79,6 +80,7 @@ private static void executeSelect1(Spanner spanner) {
try (ResultSet resultSet = client.singleUse().executeQuery(SELECT1)) {
assertTrue(resultSet.next());
assertThat(resultSet.getLong(0)).isEqualTo(1L);
assertFalse(resultSet.next());
Comment on lines 81 to +83

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To maintain consistency with the rest of the assertions in this codebase and avoid mixing different assertion frameworks within the same block, please use Google Truth assertions (assertThat(...).isTrue() and assertThat(...).isFalse()) instead of JUnit's assertTrue and assertFalse. If you apply this change, you can also remove the unused import of org.junit.Assert.assertFalse at line 20.

Suggested change
assertTrue(resultSet.next());
assertThat(resultSet.getLong(0)).isEqualTo(1L);
assertFalse(resultSet.next());
assertThat(resultSet.next()).isTrue();
assertThat(resultSet.getLong(0)).isEqualTo(1L);
assertThat(resultSet.next()).isFalse();

}
}

Expand Down
Loading