2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
22 * ============LICENSE_START========================================== ONAP - SO
23 * =================================================================== Copyright (c) 2019 IBM.
24 * =================================================================== Licensed under the Apache License, Version 2.0
25 * (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the
28 * http://www.apache.org/licenses/LICENSE-2.0
30 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
31 * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
32 * specific language governing permissions and limitations under the License.
34 * ============LICENSE_END=============================================
35 * ====================================================================
37 package org.onap.so.cloud.authentication;
39 import static org.junit.Assert.assertEquals;
40 import java.util.Calendar;
41 import org.junit.Before;
42 import org.junit.Test;
44 public class KeystoneAuthHolderTest {
46 private KeystoneAuthHolder keystoneAuthHolder;
47 private Calendar calendar = Calendar.getInstance();
51 keystoneAuthHolder = new KeystoneAuthHolder();
55 public void testGetId() {
56 keystoneAuthHolder.setId("001");
57 assertEquals("001", keystoneAuthHolder.getId());
61 public void testGetexpiration() {
62 keystoneAuthHolder.setexpiration(calendar);
63 assertEquals(calendar, keystoneAuthHolder.getexpiration());
67 public void testGetServiceUrl() {
68 keystoneAuthHolder.setHeatUrl("testURL");
69 assertEquals("testURL", keystoneAuthHolder.getServiceUrl());