2 * ============LICENSE_START====================================================
4 * ===========================================================================
5 * Copyright (c) 2018 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====================================================
21 package org.onap.aaf.auth.cmd.test.ns;
23 import static org.junit.Assert.*;
25 import java.io.Writer;
28 import org.onap.aaf.auth.cmd.ns.List;
29 import org.onap.aaf.auth.cmd.ns.NS;
30 import org.onap.aaf.auth.env.AuthzEnv;
31 import org.onap.aaf.cadi.Locator;
32 import org.onap.aaf.cadi.LocatorException;
33 import org.onap.aaf.cadi.PropAccess;
34 import org.onap.aaf.cadi.SecuritySetter;
35 import org.onap.aaf.cadi.client.Future;
36 import org.onap.aaf.cadi.config.SecurityInfoC;
37 import org.onap.aaf.cadi.http.HMangr;
38 import org.onap.aaf.misc.env.APIException;
42 import org.onap.aaf.auth.cmd.AAFcli;
43 import org.junit.After;
44 import org.junit.Before;
45 import org.junit.Test;
46 import org.mockito.Mock;
47 import org.mockito.Mockito;
48 import static org.mockito.Mockito.*;
50 import org.junit.Test;
52 public class JU_List {
57 public void setUp() throws APIException, LocatorException {
58 PropAccess prop = new PropAccess();
59 AuthzEnv aEnv = new AuthzEnv();
60 Writer wtr = mock(Writer.class);
61 Locator loc = mock(Locator.class);
62 HMangr hman = new HMangr(aEnv, loc);
63 AAFcli aafcli = new AAFcli(prop, aEnv, wtr, hman, null, null);
64 NS ns = new NS(aafcli);
70 public void testReport() {
71 Future<Nss> fu = mock(Future.class);
72 Nss.Ns nss = new Nss.Ns();
76 System.out.print(fu.value.getNs());
78 list.report(null, "test");
79 list.report(fu, "test");