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.yangtools.yang.parser.repo;
10 import static org.junit.jupiter.api.Assertions.assertEquals;
11 import static org.junit.jupiter.api.Assertions.assertInstanceOf;
13 import org.junit.jupiter.api.Test;
14 import org.opendaylight.yangtools.yang.model.api.source.SourceIdentifier;
15 import org.opendaylight.yangtools.yang.model.repo.api.SchemaResolutionException;
17 public class YT1428Test extends AbstractSchemaRepositoryTest {
19 void testDeviateSourceReported() {
20 final var ex = assertExecutionException(null, "/yt1428/orig.yang", "/yt1428/deviate.yang");
21 assertEquals(new SourceIdentifier("deviate"),
22 assertInstanceOf(SchemaResolutionException.class, ex.getCause()).getFailedSource());