BAEL-4871 Spring Conditional Annotations

This commit is contained in:
majewsk6 2021-05-21 15:55:43 +02:00
parent 93c3b2bf35
commit 90780c982e
1 changed files with 3 additions and 1 deletions

View File

@ -21,7 +21,9 @@ public class IsDevEnvConditionUnitTest {
@Test @Test
public void whenDevEnvNotEnabled_thenDevEnvConditionShouldNotPass() { public void whenDevEnvNotEnabled_thenDevEnvConditionShouldNotPass() {
Assertions.assertTrue( System.setProperty("env", "not-dev");
Assertions.assertFalse(
new IsDevEnvCondition().matches( new IsDevEnvCondition().matches(
Mockito.mock(ConditionContext.class), Mockito.mock(AnnotatedTypeMetadata.class) Mockito.mock(ConditionContext.class), Mockito.mock(AnnotatedTypeMetadata.class)
) )