Skip to content

Commit

Permalink
code style fixes ShardingSphereMetaDataTest (#28564)
Browse files Browse the repository at this point in the history
  • Loading branch information
sayyidhussain committed Sep 25, 2023
1 parent 4ec5dbd commit 60fe72f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ private ShardingSphereDatabase mockDatabase(final ResourceMetaData resourceMetaD
when(result.getRuleMetaData()).thenReturn(new RuleMetaData(Collections.singleton(databaseResourceHeldRule)));
return result;
}

@Test
void assertContainsDatabase() {
ResourceHeldRule<?> globalResourceHeldRule = mock(ResourceHeldRule.class);
Expand All @@ -102,7 +102,7 @@ void assertContainsDatabase() {
new RuleMetaData(Collections.singleton(globalResourceHeldRule)), configProps);
assertTrue(metaData.containsDatabase("foo_db"));
}

@Test
void assertGetDatabase() {
ResourceHeldRule<?> globalResourceHeldRule = mock(ResourceHeldRule.class);
Expand All @@ -111,6 +111,6 @@ void assertGetDatabase() {
ConfigurationProperties configProps = new ConfigurationProperties(new Properties());
ShardingSphereMetaData metaData = new ShardingSphereMetaData(databases, mock(ResourceMetaData.class),
new RuleMetaData(Collections.singleton(globalResourceHeldRule)), configProps);
assertThat(metaData.getDatabase("foo_db"),is(database));
assertThat(metaData.getDatabase("foo_db"), is(database));
}
}

0 comments on commit 60fe72f

Please sign in to comment.