2 * Copyright (c) 2016 Cisco Systems, Inc. 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.stmt;
10 import static org.hamcrest.CoreMatchers.startsWith;
12 import org.junit.jupiter.api.Test;
14 class ImportRevisionsTest extends AbstractYangTest {
16 void equalRevisionDatesTest() {
18 "/import-revision-date-test/root-with-equal-revision-date.yang",
19 "/import-revision-date-test/imported-module-with-equal-revision-date.yang");
23 void unequalRevisionDatesTest() {
24 assertInferenceException(
25 startsWith("Imported module [imported-module-with-unequal-revision-date] was not found. [at "),
26 "/import-revision-date-test/root-with-unequal-revision-date.yang",
27 "/import-revision-date-test/imported-module-with-unequal-revision-date.yang");
31 void revisionDatesInRootOnlyTest() {
32 assertInferenceException(
33 startsWith("Imported module [imported-module-without-revision-date] was not found. [at "),
34 "/import-revision-date-test/root-with-revision-date.yang",
35 "/import-revision-date-test/imported-module-without-revision-date.yang");
39 void revisionDatesInImportedOnlyTest() {
41 "/import-revision-date-test/root-without-revision-date.yang",
42 "/import-revision-date-test/imported-module-with-revision-date.yang");
46 void noRevisionInRootAndImportedTest() {
48 "/import-revision-date-test/root-with-no-revision-date.yang",
49 "/import-revision-date-test/imported-module-with-no-revision-date.yang");