diff options
author | 2017-09-20 18:53:54 +0800 | |
---|---|---|
committer | 2017-09-20 18:53:54 +0800 | |
commit | 844425b4c47843e8c02bfad4d45a7dae85b999cd (patch) | |
tree | b12a353ac7327d21bdd278ba7d5c6494d31972e6 /esr-mgr | |
parent | f61e2edaba4ddee366ee949e20ddfc552860860e (diff) |
Add unit test case for vnfm register info.
Change-Id: I000ff295286350a1a6cb4b031fdb8d2cde622a0d
Issue-ID: AAI-352
Signed-off-by: lizi00164331 <li.zi30@zte.com.cn>
Diffstat (limited to 'esr-mgr')
-rw-r--r-- | esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VnfmRegisterInfoTest.java | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VnfmRegisterInfoTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VnfmRegisterInfoTest.java new file mode 100644 index 0000000..84d171d --- /dev/null +++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VnfmRegisterInfoTest.java @@ -0,0 +1,103 @@ +/** + * Copyright 2017 ZTE Corporation. + * + * 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.aai.esr.entity.rest; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; + +public class VnfmRegisterInfoTest { + + @Test + public void getterAndSetter4vnfmId(){ + final String vnfmId = "dafadf"; + VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo(); + vnfmRegisterInfo.setVnfmId(vnfmId); + assertEquals(vnfmRegisterInfo.getVnfmId(), vnfmId); + } + + @Test + public void getterAndSetter4name(){ + final String name = "name-test"; + VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo(); + vnfmRegisterInfo.setName(name); + assertEquals(vnfmRegisterInfo.getName(), name); + } + + @Test + public void getterAndSetter4type(){ + final String type = "vnfm-type"; + VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo(); + vnfmRegisterInfo.setType(type); + assertEquals(vnfmRegisterInfo.getType(), type); + } + + @Test + public void getterAndSetter4vimId(){ + final String vimId = "dafadf"; + VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo(); + vnfmRegisterInfo.setVimId(vimId); + assertEquals(vnfmRegisterInfo.getVimId(), vimId); + } + + @Test + public void getterAndSetter4vendor(){ + final String vendor = "zte"; + VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo(); + vnfmRegisterInfo.setVendor(vendor); + assertEquals(vnfmRegisterInfo.getVendor(), vendor); + } + + @Test + public void getterAndSetter4version(){ + final String version = "v1.0"; + VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo(); + vnfmRegisterInfo.setVersion(version); + assertEquals(vnfmRegisterInfo.getVersion(), version); + } + + @Test + public void getterAndSetter4certificateUrl(){ + final String certificateUrl = "/test"; + VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo(); + vnfmRegisterInfo.setCertificateUrl(certificateUrl); + assertEquals(vnfmRegisterInfo.getCertificateUrl(), certificateUrl); + } + + @Test + public void getterAndSetter4url(){ + final String url = "/home"; + VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo(); + vnfmRegisterInfo.setUrl(url); + assertEquals(vnfmRegisterInfo.getUrl(), url); + } + + @Test + public void getterAndSetter4userName(){ + final String userName = "li"; + VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo(); + vnfmRegisterInfo.setUserName(userName); + assertEquals(vnfmRegisterInfo.getUserName(), userName); + } + + @Test + public void getterAndSetter4password(){ + final String password = "dfaaf"; + VnfmRegisterInfo vnfmRegisterInfo = new VnfmRegisterInfo(); + vnfmRegisterInfo.setPassword(password); + assertEquals(vnfmRegisterInfo.getPassword(), password); + } +} |