X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=esr-mgr%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Faai%2Fesr%2Fentity%2Frest%2FVimAuthInfoTest.java;fp=esr-mgr%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Faai%2Fesr%2Fentity%2Frest%2FVimAuthInfoTest.java;h=5e8aa4fa93f270122b3ff5000b7af5fb1060dfdc;hb=aed0d0c540665963a719dd42ccb0e974294df0b7;hp=0000000000000000000000000000000000000000;hpb=844425b4c47843e8c02bfad4d45a7dae85b999cd;p=aai%2Fesr-server.git diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VimAuthInfoTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VimAuthInfoTest.java new file mode 100644 index 0000000..5e8aa4f --- /dev/null +++ b/esr-mgr/src/test/java/org/onap/aai/esr/entity/rest/VimAuthInfoTest.java @@ -0,0 +1,71 @@ +/** + * 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 VimAuthInfoTest { + + @Test + public void getterAndSetter4cloudDomain(){ + final String cloudDomain = "chengdu"; + VimAuthInfo vimAuthInfo = new VimAuthInfo(); + vimAuthInfo.setCloudDomain(cloudDomain); + assertEquals(vimAuthInfo.getCloudDomain(), cloudDomain); + } + + @Test + public void getterAndSetter4userName(){ + final String userName = "nancy"; + VimAuthInfo vimAuthInfo = new VimAuthInfo(); + vimAuthInfo.setUserName(userName); + assertEquals(vimAuthInfo.getUserName(), userName); + } + + @Test + public void getterAndSetter4password(){ + final String password = "dasffa"; + VimAuthInfo vimAuthInfo = new VimAuthInfo(); + vimAuthInfo.setPassword(password); + assertEquals(vimAuthInfo.getPassword(), password); + } + + @Test + public void getterAndSetter4authUrl(){ + final String authUrl = "http://127.0.0.1:5000/auth/"; + VimAuthInfo vimAuthInfo = new VimAuthInfo(); + vimAuthInfo.setAuthUrl(authUrl); + assertEquals(vimAuthInfo.getAuthUrl(), authUrl); + } + + @Test + public void getterAndSetter4sslCacert(){ + final String sslCacert = "fdfafda"; + VimAuthInfo vimAuthInfo = new VimAuthInfo(); + vimAuthInfo.setSslCacert(sslCacert); + assertEquals(vimAuthInfo.getSslCacert(), sslCacert); + } + + @Test + public void getterAndSetter4sslInsecure(){ + final Boolean sslInsecure = true; + VimAuthInfo vimAuthInfo = new VimAuthInfo(); + vimAuthInfo.setSslInsecure(sslInsecure); + assertEquals(vimAuthInfo.getSslInsecure(), sslInsecure); + } +}