Polish tests for configuration constants

See gh-30851
This commit is contained in:
Sam Brannen
2023-07-31 15:11:35 +03:00
parent 48eb477755
commit 0eda44186a
6 changed files with 47 additions and 22 deletions

View File

@@ -63,14 +63,15 @@ class IsolationLevelDataSourceAdapterTests {
Integer isolationLevel = adapter.getIsolationLevel();
if ("ISOLATION_DEFAULT".equals(name)) {
assertThat(isolationLevel).isNull();
uniqueValues.add(ISOLATION_DEFAULT);
}
else {
Integer expected = IsolationLevelDataSourceAdapter.constants.get(name);
assertThat(isolationLevel).isEqualTo(expected);
uniqueValues.add(isolationLevel);
}
uniqueValues.add(isolationLevel);
});
assertThat(uniqueValues).hasSize(IsolationLevelDataSourceAdapter.constants.size());
assertThat(uniqueValues).containsExactlyInAnyOrderElementsOf(IsolationLevelDataSourceAdapter.constants.values());
}
@Test