Remove RevisionSourceIdentifier
[yangtools.git] / parser / yang-parser-impl / src / test / java / org / opendaylight / yangtools / yang / parser / repo / YT1428Test.java
1 /*
2  * Copyright (c) 2022 PANTHEON.tech, s.r.o. 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 package org.opendaylight.yangtools.yang.parser.repo;
9
10 import static org.hamcrest.CoreMatchers.instanceOf;
11 import static org.hamcrest.MatcherAssert.assertThat;
12 import static org.junit.Assert.assertEquals;
13
14 import org.junit.Test;
15 import org.opendaylight.yangtools.yang.model.repo.api.SchemaResolutionException;
16 import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
17
18 public class YT1428Test extends AbstractSchemaRepositoryTest {
19     @Test
20     public void testDeviateSourceReported() {
21         final var cause = assertExecutionException(null, "/yt1428/orig.yang", "/yt1428/deviate.yang").getCause();
22         assertThat(cause, instanceOf(SchemaResolutionException.class));
23         assertEquals(new SourceIdentifier("deviate"), ((SchemaResolutionException) cause).getFailedSource());
24     }
25 }