Commenting out exec to fix
[aaf/authz.git] / auth / auth-cmd / src / test / java / org / onap / aaf / auth / cmd / test / ns / JU_List.java
1 /**
2  * ============LICENSE_START====================================================
3  * org.onap.aaf
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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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  * ============LICENSE_END====================================================
18  *
19  */
20
21 package org.onap.aaf.auth.cmd.test.ns;
22
23 import static org.junit.Assert.*;
24
25 import java.io.Writer;
26 import java.net.URI;
27
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;
39
40 import aaf.v2_0.Nss;
41
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.*;
49
50 import org.junit.Test;
51
52 public class JU_List {
53         
54         List list;
55
56         @Before
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);
65                 
66                 list = new List(ns);
67         }
68         
69         @Test
70         public void testReport() {
71                 Future<Nss> fu = mock(Future.class);
72                 Nss.Ns nss = new Nss.Ns();
73                 Nss ns = new Nss();
74                 fu.value = ns;
75                 fu.value.getNs();
76                 System.out.print(fu.value.getNs());
77                 
78                 list.report(null, "test");
79                 list.report(fu, "test");
80         }
81         
82 }