ae76de0f8446e1654749238171a2125e30fff714
[aaf/authz.git] / auth / auth-core / src / test / java / org / onap / aaf / auth / server / test / JU_JettyServiceStarter.java
1 /*******************************************************************************
2  * ============LICENSE_START====================================================
3  * * org.onap.aaf
4  * * ===========================================================================
5  * * Copyright © 2017 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  * * limitations under the License.
18  * * ============LICENSE_END====================================================
19  * *
20  * *
21  ******************************************************************************/
22
23 package org.onap.aaf.auth.server.test;
24
25 import static org.junit.Assert.*;
26
27 import org.onap.aaf.auth.env.AuthzEnv;
28 import org.onap.aaf.auth.env.AuthzTrans;
29 import org.onap.aaf.auth.org.OrganizationException;
30 import org.onap.aaf.auth.server.AbsService;
31 import org.onap.aaf.auth.server.JettyServiceStarter;
32 import org.onap.aaf.cadi.Access;
33 import org.onap.aaf.cadi.CadiException;
34 import org.onap.aaf.cadi.LocatorException;
35 import org.onap.aaf.cadi.PropAccess;
36 import org.onap.aaf.cadi.register.Registrant;
37 import org.onap.aaf.misc.env.Trans;
38 import org.onap.aaf.misc.env.impl.BasicEnv;
39 import org.onap.aaf.misc.rosetta.env.RosettaEnv;
40 import org.junit.Test;
41
42 import static org.mockito.Mockito.mock;
43 import static org.mockito.Mockito.when;
44
45 import javax.servlet.Filter;
46
47 import org.junit.Before;
48 import org.junit.Test;
49 import org.junit.runner.RunWith;
50 import org.mockito.Mock;
51
52 public class JU_JettyServiceStarter {
53     private PropAccess propAccess = new PropAccess();
54     private JettyServiceStarter<AuthzEnv,AuthzTrans> jss;
55     class TestService extends AbsService<AuthzEnv,AuthzTrans>{
56
57         public TestService(Access access, AuthzEnv env) throws CadiException {
58             super(access, env);
59             // TODO Auto-generated constructor stub
60         }
61
62         @Override
63         public Filter[] _filters(Object ... additionalTafLurs) throws CadiException, LocatorException {
64             // TODO Auto-generated method stub
65             return null;
66         }
67
68         @Override
69         public Registrant<AuthzEnv>[] registrants(int port) throws CadiException, LocatorException {
70             // TODO Auto-generated method stub
71             return null;
72         }
73
74     }
75     @SuppressWarnings("unchecked")
76     @Before
77     public void setUp() throws OrganizationException, CadiException {
78         Access access = mock(Access.class);
79         
80         BasicEnv bEnv = mock(BasicEnv.class);
81         Trans trans = mock(Trans.class);  //TODO: Fix this once Gabe has services running to see correct output without mock
82         //TestService testService = new TestService(access, bEnv);
83         //jss = new JettyServiceStarter<AuthzEnv,AuthzTrans>(testService);
84     }
85     
86 //    @Test
87 //    public void netYetTested() {
88 //        fail("Tests not yet implemented");
89 //    }
90     
91     @Test
92     public void testPropertyAdjustment() {
93         //jss._propertyAdjustment();
94     }
95
96 }