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 ******************************************************************************/
22 package org.onap.aaf.auth.server.test;
24 import static org.junit.Assert.*;
26 import org.onap.aaf.auth.env.AuthzEnv;
27 import org.onap.aaf.auth.env.AuthzTrans;
28 import org.onap.aaf.auth.org.OrganizationException;
29 import org.onap.aaf.auth.server.AbsService;
30 import org.onap.aaf.auth.server.JettyServiceStarter;
31 import org.onap.aaf.cadi.Access;
32 import org.onap.aaf.cadi.CadiException;
33 import org.onap.aaf.cadi.LocatorException;
34 import org.onap.aaf.cadi.PropAccess;
35 import org.onap.aaf.cadi.register.Registrant;
36 import org.onap.aaf.misc.env.Trans;
37 import org.onap.aaf.misc.env.impl.BasicEnv;
38 import org.onap.aaf.misc.rosetta.env.RosettaEnv;
39 import org.junit.Test;
41 import static org.mockito.Mockito.mock;
42 import static org.mockito.Mockito.when;
44 import javax.servlet.Filter;
46 import org.junit.Before;
47 import org.junit.Test;
48 import org.junit.runner.RunWith;
49 import org.mockito.Mock;
51 public class JU_JettyServiceStarter {
52 private PropAccess propAccess = new PropAccess();
53 private JettyServiceStarter<AuthzEnv,AuthzTrans> jss;
54 class TestService extends AbsService<AuthzEnv,AuthzTrans>{
56 public TestService(Access access, AuthzEnv env) throws CadiException {
58 // TODO Auto-generated constructor stub
62 public Filter[] _filters(Object ... additionalTafLurs) throws CadiException, LocatorException {
63 // TODO Auto-generated method stub
68 public Registrant<AuthzEnv>[] registrants(int port) throws CadiException, LocatorException {
69 // TODO Auto-generated method stub
74 @SuppressWarnings("unchecked")
76 public void setUp() throws OrganizationException, CadiException {
77 Access access = mock(Access.class);
79 BasicEnv bEnv = mock(BasicEnv.class);
80 Trans trans = mock(Trans.class); //TODO: Fix this once Gabe has services running to see correct output without mock
81 //TestService testService = new TestService(access, bEnv);
82 //jss = new JettyServiceStarter<AuthzEnv,AuthzTrans>(testService);
86 // public void netYetTested() {
87 // fail("Tests not yet implemented");
91 public void testPropertyAdjustment() {
92 //jss._propertyAdjustment();