diff options
Diffstat (limited to 'policy-core/src/test/java/org/onap/policy/drools/core/lock/AlwaysFailLockTest.java')
-rw-r--r-- | policy-core/src/test/java/org/onap/policy/drools/core/lock/AlwaysFailLockTest.java | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/policy-core/src/test/java/org/onap/policy/drools/core/lock/AlwaysFailLockTest.java b/policy-core/src/test/java/org/onap/policy/drools/core/lock/AlwaysFailLockTest.java index 178ef0af..51273d7d 100644 --- a/policy-core/src/test/java/org/onap/policy/drools/core/lock/AlwaysFailLockTest.java +++ b/policy-core/src/test/java/org/onap/policy/drools/core/lock/AlwaysFailLockTest.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. @@ -21,33 +22,33 @@ package org.onap.policy.drools.core.lock; import static org.assertj.core.api.Assertions.assertThatCode; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertFalse; +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 AlwaysFailLockTest extends AlwaysLockBaseTest<AlwaysFailLock> { +class AlwaysFailLockTest extends AlwaysLockBaseTest<AlwaysFailLock> { - @Before + @BeforeEach public void setUp() { callback = mock(LockCallback.class); lock = new AlwaysFailLock(RESOURCE, OWNER_KEY, HOLD_SEC, callback); } @Test - public void testAlwaysFailLockNoArgs() { + void testAlwaysFailLockNoArgs() { assertThatCode(AlwaysFailLock::new).doesNotThrowAnyException(); } @Test - public void testUnavailableLock() { + void testUnavailableLock() { assertTrue(lock.isUnavailable()); } @Test - public void testFree() { + void testFree() { assertFalse(lock.free()); assertTrue(lock.isUnavailable()); } |