Skip to content

Commit

Permalink
#28518 Add unit tests for SingleIndexReviser
Browse files Browse the repository at this point in the history
  • Loading branch information
anogueiraFlywire committed Nov 28, 2023
1 parent 14f37f6 commit 5b2bd19
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,16 @@ class SingleIndexReviserTest {

@Test
void assertReviserReturnsRevisedIndex() {
SingleIndexReviser reviser = new SingleIndexReviser();
IndexMetaData originalMetaData = new IndexMetaData("test_idx_tableName");
originalMetaData.getColumns().add("column1");
originalMetaData.getColumns().add("column2");
originalMetaData.setUnique(true);

SingleIndexReviser reviser = new SingleIndexReviser();
Optional<IndexMetaData> optionalRevised = reviser.revise("tableName", originalMetaData, null);

assertTrue(optionalRevised.isPresent());
IndexMetaData actual = optionalRevised.get();
assertThat(originalMetaData.isUnique(), is(actual.isUnique()));
assertThat(originalMetaData.getColumns(), is(actual.getColumns()));
assertThat("test_idx", is(actual.getName()));
}

}

0 comments on commit 5b2bd19

Please sign in to comment.