1 package org.onap.ccsdk.sli.core.sli.provider.base;
\r
3 import static org.junit.Assert.assertNotNull;
\r
4 import static org.junit.Assert.assertNull;
\r
5 import static org.junit.Assert.assertTrue;
\r
6 import java.util.Properties;
\r
7 import org.junit.Test;
\r
8 import org.onap.ccsdk.sli.core.sli.SvcLogicGraph;
\r
10 public class InMemorySvcLogicStoreTest {
\r
12 public void simpleTest() throws Exception {
\r
13 InMemorySvcLogicStore store = new InMemorySvcLogicStore();
\r
14 store.init(new Properties());
\r
15 SvcLogicGraph graph = new SvcLogicGraph();
\r
16 String module = "TEST";
\r
17 String rpc = "NOTIFICATION";
\r
18 String mode = "sync";
\r
19 String version = "1";
\r
21 graph.setModule(module);
\r
23 graph.setMode(mode);
\r
24 graph.setVersion(version);
\r
27 assertTrue(store.hasGraph(module, rpc, version, mode));
\r
28 assertNotNull(store.fetch(module, rpc, version, mode));
\r
29 store.activate(graph);
\r
30 store.activate(module, rpc, version, mode);
\r
32 store.delete(module, rpc, version, mode);
\r
33 assertNull(store.fetch(module, rpc, version, mode));
\r