diff options
author | adheli.tavares <adheli.tavares@est.tech> | 2024-01-26 15:28:56 +0000 |
---|---|---|
committer | Adheli Tavares <adheli.tavares@est.tech> | 2024-02-09 10:31:15 +0000 |
commit | cc1d3d352771d1fa35d297e90663539e34b022f6 (patch) | |
tree | b1b00d678b0157742b91be1262fbf614a62063b1 /policy-core/src/test/java/org/onap/policy/drools/core/lock/AlwaysSuccessLockTest.java | |
parent | cce79248655f484e007769ba81b092148f940d27 (diff) |
Removing deprecated DMAAP library
Issue-ID: POLICY-4402
Change-Id: I4ce5b303cb3a775010683d3c7102b0bd065280ea
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'policy-core/src/test/java/org/onap/policy/drools/core/lock/AlwaysSuccessLockTest.java')
-rw-r--r-- | policy-core/src/test/java/org/onap/policy/drools/core/lock/AlwaysSuccessLockTest.java | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/policy-core/src/test/java/org/onap/policy/drools/core/lock/AlwaysSuccessLockTest.java b/policy-core/src/test/java/org/onap/policy/drools/core/lock/AlwaysSuccessLockTest.java index 32889484..80f81f92 100644 --- a/policy-core/src/test/java/org/onap/policy/drools/core/lock/AlwaysSuccessLockTest.java +++ b/policy-core/src/test/java/org/onap/policy/drools/core/lock/AlwaysSuccessLockTest.java @@ -3,6 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2024 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,24 +23,24 @@ package org.onap.policy.drools.core.lock; import static org.assertj.core.api.Assertions.assertThatCode; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.mock; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -public class AlwaysSuccessLockTest extends AlwaysLockBaseTest<AlwaysSuccessLock> { +class AlwaysSuccessLockTest extends AlwaysLockBaseTest<AlwaysSuccessLock> { - @Before + @BeforeEach public void setUp() { callback = mock(LockCallback.class); lock = new AlwaysSuccessLock(RESOURCE, OWNER_KEY, HOLD_SEC, callback); } @Test - public void testAlwaysSuccessLockConstructors() { + void testAlwaysSuccessLockConstructors() { assertThatCode(AlwaysSuccessLock::new).doesNotThrowAnyException(); assertThatCode(() -> new AlwaysSuccessLock(LockState.ACTIVE, RESOURCE, OWNER_KEY, HOLD_SEC, callback)) .doesNotThrowAnyException(); @@ -48,18 +49,18 @@ public class AlwaysSuccessLockTest extends AlwaysLockBaseTest<AlwaysSuccessLock> } @Test - public void testActiveLock() { + void testActiveLock() { assertTrue(lock.isActive()); } @Test - public void testFree() { + void testFree() { assertTrue(lock.free()); assertTrue(lock.isActive()); } @Test - public void testExtend() { + void testExtend() { LockCallback callback2 = mock(LockCallback.class); lock.extend(HOLD_SEC2, callback2); |