aboutsummaryrefslogtreecommitdiffstats
path: root/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestConfigResource.java
blob: a8f4d9483ea3b720abf81241d5b50325b78577f1 (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
package org.onap.ccsdk.sli.adaptors.resource.mdsal;

import junit.framework.TestCase;

import static org.mockito.Mockito.mock;

import org.onap.ccsdk.sli.core.sli.SvcLogicContext;

public class TestConfigResource extends TestCase {

	public void test() throws Exception {

		RestService restService = mock(RestService.class);
		SvcLogicContext ctx = new SvcLogicContext();

		ConfigResource res = new ConfigResource(restService);

		res.delete("my-resource", null, ctx);
		res.notify("my-resource", "action", "key", ctx);
		res.query("my-resource", false, "my-select", "mykey", "pfx", null, ctx);
		res.release("my-resource", "mykey", ctx);
		res.reserve("my-resource", "my-select", "mykey", "pfx", ctx);
		res.exists("my-resource", "mykey", "pfx", ctx);
		res.isAvailable("my-resource", "mykey", "pfx", ctx);
		res.save("resource", false, false, null, null, null, ctx);
		res.update("my-resource", "mykey", null, "pfx", ctx);
	}

}