2e9798df12b4b7bbb386e38eaff6136792d19d97
[ccsdk/sli.git] /
1 package org.onap.ccsdk.sli.adaptors.resource.mdsal;
2
3 import static org.mockito.Mockito.mock;
4
5 import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
6
7 import junit.framework.TestCase;
8 import static org.junit.Assert.assertNotNull;
9
10 public class TestOperationalResource extends TestCase {
11
12
13         public void test() throws Exception {
14
15                 RestService restService = mock(RestService.class);
16                 SvcLogicContext ctx = new SvcLogicContext();
17
18                 OperationalResource res = new OperationalResource(restService);
19
20                 res.delete("my-resource", null, ctx);
21                 res.notify("my-resource", "action", "key", ctx);
22                 res.query("my-resource", false, "my-select", "mykey", "pfx", null, ctx);
23                 res.release("my-resource", "mykey", ctx);
24                 res.reserve("my-resource", "my-select", "mykey", "pfx", ctx);
25                 res.exists("my-resource", "mykey", "pfx", ctx);
26                 res.isAvailable("my-resource", "mykey", "pfx", ctx);
27                 res.save("resource", false, false, null, null, null, ctx);
28                 res.update("my-resource", "mykey", null, "pfx", ctx);
29                 assertNotNull(restService);
30         }
31 }