2 * Copyright (c) 2022 PANTHEON.tech, s.r.o. and others. All rights reserved.
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
8 package org.opendaylight.controller.sal.rest.doc.impl;
10 import static org.mockito.Mockito.mock;
11 import static org.mockito.Mockito.when;
13 import org.junit.BeforeClass;
14 import org.opendaylight.mdsal.dom.api.DOMSchemaService;
15 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
16 import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
18 public abstract class AbstractApiDocTest {
19 static EffectiveModelContext CONTEXT;
20 static DOMSchemaService SCHEMA_SERVICE;
23 public static void beforeClass() {
24 CONTEXT = YangParserTestUtils.parseYangResourceDirectory("/yang");
25 SCHEMA_SERVICE = mock(DOMSchemaService.class);
26 when(SCHEMA_SERVICE.getGlobalContext()).thenReturn(CONTEXT);