From fc104aafbf572572e210ab01016be25bde07d2ec Mon Sep 17 00:00:00 2001 From: ZMai <zmai@slb.com> Date: Tue, 22 Aug 2023 14:21:43 -0500 Subject: [PATCH] Refactor the test method names --- .../indexer/util/BooleanFeatureFlagClientTest.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/indexer-core/src/test/java/org/opengroup/osdu/indexer/util/BooleanFeatureFlagClientTest.java b/indexer-core/src/test/java/org/opengroup/osdu/indexer/util/BooleanFeatureFlagClientTest.java index 21db5a5d8..5e0c2ede2 100644 --- a/indexer-core/src/test/java/org/opengroup/osdu/indexer/util/BooleanFeatureFlagClientTest.java +++ b/indexer-core/src/test/java/org/opengroup/osdu/indexer/util/BooleanFeatureFlagClientTest.java @@ -38,7 +38,7 @@ import static org.mockito.Mockito.when; @RunWith(SpringRunner.class) public class BooleanFeatureFlagClientTest { - private static final String PROPERTY_NAME = "indexer-decimation-enabled"; + private static final String PROPERTY_NAME = "any-feature-enabled"; @InjectMocks private BooleanFeatureFlagClient sut; @@ -71,7 +71,7 @@ public class BooleanFeatureFlagClientTest { } @Test - public void isDecimationEnabled_return_true() throws PartitionException { + public void isEnabled_return_true() throws PartitionException { PartitionInfo partitionInfo = new PartitionInfo(); Property property = new Property(); property.setSensitive(false); @@ -89,7 +89,7 @@ public class BooleanFeatureFlagClientTest { } @Test - public void isDecimationEnabled_return_false_when_property_set_to_false() throws PartitionException { + public void isEnabled_return_false_when_property_set_to_false() throws PartitionException { PartitionInfo partitionInfo = new PartitionInfo(); Property property = new Property(); property.setSensitive(false); @@ -107,7 +107,7 @@ public class BooleanFeatureFlagClientTest { } @Test - public void isDecimationEnabled_return_default_value_when_property_does_not_exist() throws PartitionException { + public void isEnabled_return_default_value_when_property_does_not_exist() throws PartitionException { // The feature flag is enabled by default PartitionInfo partitionInfo = new PartitionInfo(); when(this.partitionProvider.get(anyString())).thenReturn(partitionInfo); @@ -120,7 +120,7 @@ public class BooleanFeatureFlagClientTest { } @Test - public void isDecimationEnabled_return_default_value_when_partitionProvider_throws_exception() throws PartitionException { + public void isEnabled_return_default_value_when_partitionProvider_throws_exception() throws PartitionException { // The feature flag is enabled by default when(this.partitionProvider.get(anyString())).thenThrow(PartitionException.class); when(this.cache.get(anyString())).thenReturn(null); @@ -132,7 +132,7 @@ public class BooleanFeatureFlagClientTest { } @Test - public void isDecimationEnabled_return_true_from_cache() throws PartitionException { + public void isEnabled_return_true_from_cache() throws PartitionException { when(this.cache.get(anyString())).thenReturn(true); boolean enabled = sut.isEnabled(PROPERTY_NAME, false);; Assert.assertTrue(enabled); @@ -141,7 +141,7 @@ public class BooleanFeatureFlagClientTest { } @Test - public void isDecimationEnabled_return_false_from_cache() throws PartitionException { + public void isEnabled_return_false_from_cache() throws PartitionException { when(this.cache.get(anyString())).thenReturn(false); boolean enabled = sut.isEnabled(PROPERTY_NAME, false);; Assert.assertFalse(enabled); -- GitLab