7b8eebb4d987c158ca6ba175cc75a53b453318ac
[moon.git] /
1 /*
2  * Copyright (c) 2016 Inocybe Technologies and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.aaa.idm.rest.test;
10
11 import com.sun.jersey.spi.container.servlet.WebComponent;
12 import com.sun.jersey.test.framework.AppDescriptor;
13 import com.sun.jersey.test.framework.JerseyTest;
14 import com.sun.jersey.test.framework.WebAppDescriptor;
15 import org.junit.Before;
16 import org.opendaylight.aaa.idm.IdmLightApplication;
17 import org.opendaylight.aaa.idm.StoreBuilder;
18 import org.opendaylight.yang.gen.v1.config.aaa.authn.idmlight.rev151204.AAAIDMLightModule;
19
20
21 public abstract class HandlerTest extends JerseyTest {
22
23     protected IDMTestStore testStore = new IDMTestStore();
24
25     @Override
26     protected AppDescriptor configure() {
27         return new WebAppDescriptor.Builder()
28                                    .initParam(WebComponent.RESOURCE_CONFIG_CLASS, IdmLightApplication.class.getName())
29                                    .build();
30     }
31
32     @Before
33     public void setUp() throws Exception {
34         super.setUp();
35         StoreBuilder.init(testStore);
36         AAAIDMLightModule.setStore(testStore);
37     }
38 }