Skip to content

Commit

Permalink
Add more test cases on MaskRule (#33446)
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu authored Oct 28, 2024
1 parent 9a6e570 commit ec3138d
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@
import java.util.Collections;
import java.util.Properties;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.Mockito.mock;

class MaskRuleTest {

Expand All @@ -55,4 +58,11 @@ void assertFindMaskTableWhenTableNameExists() {
void assertFindMaskTableWhenTableNameDoesNotExist() {
assertFalse(maskRule.findMaskTable("non_existent_table").isPresent());
}

@Test
void assertUpdateConfiguration() {
MaskRuleConfiguration toBeUpdatedRuleConfig = mock(MaskRuleConfiguration.class);
maskRule.updateConfiguration(toBeUpdatedRuleConfig);
assertThat(maskRule.getConfiguration(), is(toBeUpdatedRuleConfig));
}
}

0 comments on commit ec3138d

Please sign in to comment.