Further cleanup of tests
[yangtools.git] / parser / yang-parser-rfc7950 / src / test / java / org / opendaylight / yangtools / yang / stmt / Bug4410Test.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. 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.stmt;
9
10 import static org.hamcrest.CoreMatchers.allOf;
11 import static org.hamcrest.CoreMatchers.containsString;
12 import static org.hamcrest.CoreMatchers.instanceOf;
13 import static org.hamcrest.CoreMatchers.startsWith;
14 import static org.hamcrest.MatcherAssert.assertThat;
15
16 import org.junit.Test;
17 import org.opendaylight.yangtools.yang.parser.spi.meta.InferenceException;
18
19 public class Bug4410Test extends AbstractYangTest {
20     @Test
21     public void test() {
22         final var cause = assertInferenceExceptionDir("/bugs/bug4410",
23             startsWith("Yang model processing phase EFFECTIVE_MODEL failed [at ")).getCause();
24         assertThat(cause, instanceOf(InferenceException.class));
25         assertThat(cause.getMessage(), allOf(startsWith("Type [(foo)"), containsString("was not found")));
26     }
27 }