1 /*******************************************************************************
2 * ============LICENSE_START====================================================
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
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 ******************************************************************************/
23 package org.onap.aaf.auth.server.test;
25 import static org.junit.Assert.*;
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;
42 import static org.mockito.Mockito.mock;
43 import static org.mockito.Mockito.when;
45 import javax.servlet.Filter;
47 import org.junit.Before;
48 import org.junit.Test;
49 import org.junit.runner.RunWith;
50 import org.mockito.Mock;
52 public class JU_JettyServiceStarter {
53 private PropAccess propAccess = new PropAccess();
54 private JettyServiceStarter<AuthzEnv,AuthzTrans> jss;
55 class TestService extends AbsService<AuthzEnv,AuthzTrans>{
57 public TestService(Access access, AuthzEnv env) throws CadiException {
59 // TODO Auto-generated constructor stub
63 public Filter[] _filters(Object ... additionalTafLurs) throws CadiException, LocatorException {
64 // TODO Auto-generated method stub
69 public Registrant<AuthzEnv>[] registrants(int port) throws CadiException, LocatorException {
70 // TODO Auto-generated method stub
75 @SuppressWarnings("unchecked")
77 public void setUp() throws OrganizationException, CadiException {
78 Access access = mock(Access.class);
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);
87 // public void netYetTested() {
88 // fail("Tests not yet implemented");
92 public void testPropertyAdjustment() {
93 //jss._propertyAdjustment();