blob: dc0761c2032fdf057230b057be4965a024c56204 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
package jtest.org.onap.ccsdk.sli.adaptors.ra;
import java.util.HashMap;
import java.util.Map;
import org.junit.Assert;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters;
import org.onap.ccsdk.sli.adaptors.ra.ResourceLockNode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath:test-context.xml" })
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestResourceLockNode {
@SuppressWarnings("unused")
private static final Logger log = LoggerFactory.getLogger(TestResourceLockNode.class);
@Autowired
private ResourceLockNode resourceLockNode;
@Test
public void test1() throws Exception {
Map<String, String> paramMap = new HashMap<>();
paramMap.put("resource-name", "test-resource-1");
paramMap.put("lock-requester", "SDNA");
resourceLockNode.lockResource(paramMap, null);
resourceLockNode.unlockResource(paramMap, null);
Assert.assertNotNull(paramMap);
}
}
|