diff options
author | 2020-12-01 11:26:31 -0800 | |
---|---|---|
committer | 2020-12-01 11:27:11 -0800 | |
commit | 11510b43c277b8e1dd7e58d79785544810118c8e (patch) | |
tree | b88a497c999d24b5f357ea9b26bc93e0990fd5e7 /mdsal-resource/provider/src/test/java | |
parent | 5d2eab72fc4442f14108b41800cec88126913823 (diff) |
Migrate sli-adaptor files
Migrate sli-adaptor repo files into
a new "adaptors" directory.
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
Diffstat (limited to 'mdsal-resource/provider/src/test/java')
4 files changed, 0 insertions, 169 deletions
diff --git a/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/ConfigResourceTest.java b/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/ConfigResourceTest.java deleted file mode 100644 index f5b0bcf0c..000000000 --- a/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/ConfigResourceTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights - * reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.ccsdk.sli.adaptors.resource.mdsal; - -import org.junit.Test; -import org.onap.ccsdk.sli.core.sli.SvcLogicContext; -import org.onap.ccsdk.sli.core.sli.SvcLogicException; -import org.onap.ccsdk.sli.core.sli.SvcLogicResource.QueryStatus; - -import static org.junit.Assert.assertEquals; - -public class ConfigResourceTest { - ConfigResource configResource = new ConfigResource("http", "local", - "10001", "admin", - "password"); - - @Test - public void isAvailableNegativeTest() throws SvcLogicException { - SvcLogicContext ctx = new SvcLogicContext(); - assertEquals(QueryStatus.NOT_FOUND, configResource.isAvailable - ("xyz", "key", "prefix", ctx)); - } -} - diff --git a/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestConfigResource.java b/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestConfigResource.java deleted file mode 100644 index 80563b96b..000000000 --- a/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestConfigResource.java +++ /dev/null @@ -1,31 +0,0 @@ -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; -import static org.junit.Assert.assertNotNull; - -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); - assertNotNull(res); - } - -} diff --git a/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestMdsalResourcePropertiesProviderImpl.java b/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestMdsalResourcePropertiesProviderImpl.java deleted file mode 100644 index 7f05d1e5f..000000000 --- a/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestMdsalResourcePropertiesProviderImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2018 Samsung. All rights - * reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.ccsdk.sli.adaptors.resource.mdsal; - -import org.junit.Before; -import org.junit.Test; - -import java.util.Properties; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -public class TestMdsalResourcePropertiesProviderImpl { - - MdsalResourcePropertiesProviderImpl mdsal; - - @Before - public void setup() { - mdsal = new MdsalResourcePropertiesProviderImpl(); - } - - - @Test - public void testGetProperties() { - Properties prop = mdsal.getProperties(); - - System.out.println("All Default Properties : " + prop); - - assertEquals("localhost",prop.getProperty("org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-host")); - assertEquals("Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U",prop.getProperty("org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-passwd")); - assertEquals("http",prop.getProperty("org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-protocol")); - assertEquals("8181",prop.getProperty("org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-port")); - assertEquals("admin",prop.getProperty("org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-user")); - } - - - @Test - public void testGetPropertie() throws IllegalStateException, IllegalArgumentException { - MdsalResourcePropertiesProviderImpl test = new MdsalResourcePropertiesProviderImpl(); - - mdsal.determinePropertiesFile(test); - assertNotNull(test); - - } -} diff --git a/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestOperationalResource.java b/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestOperationalResource.java deleted file mode 100644 index 2e9798df1..000000000 --- a/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestOperationalResource.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.onap.ccsdk.sli.adaptors.resource.mdsal; - -import static org.mockito.Mockito.mock; - -import org.onap.ccsdk.sli.core.sli.SvcLogicContext; - -import junit.framework.TestCase; -import static org.junit.Assert.assertNotNull; - -public class TestOperationalResource extends TestCase { - - - public void test() throws Exception { - - RestService restService = mock(RestService.class); - SvcLogicContext ctx = new SvcLogicContext(); - - OperationalResource res = new OperationalResource(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); - assertNotNull(restService); - } -} |