diff options
author | mukesh.paliwal1@huawei.com <mukesh.paliwal1@huawei.com> | 2020-03-10 09:52:09 +0530 |
---|---|---|
committer | Tao Shen <shentao@chinamobile.com> | 2020-03-10 12:34:28 +0000 |
commit | 5320457860b81d6e655cf5877fc0873f71dbfa82 (patch) | |
tree | abc166c6c59a7741c39f407138947fd84178d527 | |
parent | db60fa79d6789931a3f3d4d3b601de7a19a84d48 (diff) |
UT for SOTN Eline in USECASEUI
Issue-ID: USECASEUI-378
Signed-off-by: mukesh.paliwal1@huawei.com <mukesh.paliwal1@huawei.com>
Change-Id: Icd0ddd9aac2c1a53d4fde71ed81172e83fae6b97
5 files changed, 232 insertions, 0 deletions
diff --git a/server/src/test/java/org/onap/usecaseui/server/bean/lcm/sotne2eservice/E2EServiceInstanceRequestTest.java b/server/src/test/java/org/onap/usecaseui/server/bean/lcm/sotne2eservice/E2EServiceInstanceRequestTest.java new file mode 100644 index 00000000..b3963330 --- /dev/null +++ b/server/src/test/java/org/onap/usecaseui/server/bean/lcm/sotne2eservice/E2EServiceInstanceRequestTest.java @@ -0,0 +1,47 @@ +/** + * Copyright (C) 2020 Huawei, Inc. and others. 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. + */ +package org.onap.usecaseui.server.bean.lcm.sotne2eservice; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import static org.mockito.Matchers.any; +import static org.mockito.Matchers.anyObject; + +public class E2EServiceInstanceRequestTest { + @Before + public void before() throws Exception { + } + + @After + public void after() throws Exception { + } + @Test + public void testGetE2EServiceInstanceRequest() throws Exception{ + E2EServiceInstanceRequest e2esir = new E2EServiceInstanceRequest(); + e2esir.getAdditionalProperties(); + e2esir.getService(); + + } + @Test + public void testSetE2EServiceInstanceRequest() throws Exception{ + E2EServiceInstanceRequest e2esir = new E2EServiceInstanceRequest(); + e2esir.setAdditionalProperty("",anyObject()); + e2esir.setAdditionalProperties(null); + e2esir.setService(any()); + } +} diff --git a/server/src/test/java/org/onap/usecaseui/server/bean/lcm/sotne2eservice/EdgeTest.java b/server/src/test/java/org/onap/usecaseui/server/bean/lcm/sotne2eservice/EdgeTest.java new file mode 100644 index 00000000..ca9b4c47 --- /dev/null +++ b/server/src/test/java/org/onap/usecaseui/server/bean/lcm/sotne2eservice/EdgeTest.java @@ -0,0 +1,42 @@ +/** + * Copyright (C) 2020 Huawei, Inc. and others. 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. + */ +package org.onap.usecaseui.server.bean.lcm.sotne2eservice; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class EdgeTest { + @Before + public void before() throws Exception { + } + + @After + public void after() throws Exception { + } + @Test + public void testGetEdge() throws Exception{ + Edge edge = new Edge(); + edge.getFrom(); + edge.getTo(); + } + @Test + public void testSetEdge() throws Exception{ + Edge edge = new Edge(); + edge.setFrom(""); + edge.setTo(""); + } +} diff --git a/server/src/test/java/org/onap/usecaseui/server/bean/lcm/sotne2eservice/FileBeanTest.java b/server/src/test/java/org/onap/usecaseui/server/bean/lcm/sotne2eservice/FileBeanTest.java new file mode 100644 index 00000000..0672558b --- /dev/null +++ b/server/src/test/java/org/onap/usecaseui/server/bean/lcm/sotne2eservice/FileBeanTest.java @@ -0,0 +1,42 @@ +/** + * Copyright (C) 2020 Huawei, Inc. and others. 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. + */ + +package org.onap.usecaseui.server.bean.lcm.sotne2eservice; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class FileBeanTest { + @Before + public void before() throws Exception { + } + + @After + public void after() throws Exception { + } + @Test + public void testGetFileBean() throws Exception{ + FileBean fb = new FileBean(); + fb.getFileName(); + } + @Test + public void testSetFileBean() throws Exception{ + FileBean fb = new FileBean(); + fb.setFileName(""); + } + +} diff --git a/server/src/test/java/org/onap/usecaseui/server/bean/lcm/sotne2eservice/FileWrapperTest.java b/server/src/test/java/org/onap/usecaseui/server/bean/lcm/sotne2eservice/FileWrapperTest.java new file mode 100644 index 00000000..25da479f --- /dev/null +++ b/server/src/test/java/org/onap/usecaseui/server/bean/lcm/sotne2eservice/FileWrapperTest.java @@ -0,0 +1,44 @@ +/** + * Copyright (C) 2020 Huawei, Inc. and others. 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. + */ + +package org.onap.usecaseui.server.bean.lcm.sotne2eservice; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import static org.mockito.Matchers.any; + +public class FileWrapperTest { + @Before + public void before() throws Exception { + } + + @After + public void after() throws Exception { + } + @Test + public void testGetFileWrapper() throws Exception{ + FileWrapper fw = new FileWrapper(); + fw.getFile(); + } + @Test + public void testSetFileWrapper() throws Exception{ + FileWrapper fw = new FileWrapper(); + fw.setFile(any()); + } + +} diff --git a/server/src/test/java/org/onap/usecaseui/server/bean/lcm/sotne2eservice/LogicalLinkTest.java b/server/src/test/java/org/onap/usecaseui/server/bean/lcm/sotne2eservice/LogicalLinkTest.java new file mode 100644 index 00000000..2861ff2c --- /dev/null +++ b/server/src/test/java/org/onap/usecaseui/server/bean/lcm/sotne2eservice/LogicalLinkTest.java @@ -0,0 +1,57 @@ +/** + * Copyright (C) 2020 Huawei, Inc. and others. 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. + */ + +package org.onap.usecaseui.server.bean.lcm.sotne2eservice; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import static org.mockito.Matchers.any; +import static org.mockito.Matchers.anyObject; + +public class LogicalLinkTest { + @Before + public void before() throws Exception { + } + + @After + public void after() throws Exception { + } + @Test + public void testGetlogicalLink() throws Exception{ + LogicalLink Ll = new LogicalLink(); + Ll.getAdditionalProperties(); + Ll.getInMaint(); + Ll.getLinkName(); + Ll.getLinkType(); + Ll.getOperationalStatus(); + Ll.getRelationshipList(); + Ll.getResourceVersion(); + } + @Test + public void testSetlogicalLink() throws Exception{ + LogicalLink Ll = new LogicalLink(); + Ll.setAdditionalProperty("", anyObject()); + Ll.setInMaint(true); + Ll.setLinkName(""); + Ll.setLinkType(""); + Ll.setOperationalStatus(""); + Ll.setResourceVersion(""); + Ll.setRelationshipList(any()); + } + +} |