Skip to content

Commit

Permalink
Add more validation (#28536)
Browse files Browse the repository at this point in the history
  • Loading branch information
JessikaFujimura committed Oct 21, 2023
1 parent 43e29f3 commit a835345
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@
import java.util.Optional;

import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.equalToObject;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.mock;
Expand Down Expand Up @@ -67,6 +69,7 @@ void assertReviseIsPresentIsFalse() {

Assertions.assertNotNull(actual);
assertThat(actual.size(), is(1));
assertThat(actual, equalToObject(indexMetaDataCollection));
}

@Test
Expand All @@ -80,10 +83,10 @@ void assertReviseIsPresentIsTrue() {

Collection<IndexMetaData> indexMetaDataCollection = Arrays.asList(new IndexMetaData("index1"), new IndexMetaData("index2"));

Collection<IndexMetaData> response = indexReviseEngine.revise("tableName", indexMetaDataCollection);
Collection<IndexMetaData> actual = indexReviseEngine.revise("tableName", indexMetaDataCollection);

assertThat(response.size(), equalTo(1));
assertThat(response.contains(indexMetaData), equalTo(Boolean.TRUE));
assertThat(actual.size(), equalTo(1));
assertTrue(actual.contains(indexMetaData));
}

}

0 comments on commit a835345

Please sign in to comment.