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.allOf;
11 import static org.hamcrest.CoreMatchers.containsString;
12 import static org.hamcrest.CoreMatchers.startsWith;
13 import static org.hamcrest.MatcherAssert.assertThat;
14 import static org.junit.jupiter.api.Assertions.assertInstanceOf;
16 import org.junit.jupiter.api.Test;
17 import org.opendaylight.yangtools.yang.parser.spi.meta.InferenceException;
19 class Bug4410Test extends AbstractYangTest {
22 final var cause = assertInferenceExceptionDir("/bugs/bug4410",
23 startsWith("Yang model processing phase EFFECTIVE_MODEL failed [at ")).getCause();
24 assertInstanceOf(InferenceException.class, cause);
25 assertThat(cause.getMessage(), allOf(startsWith("Type [(foo)"), containsString("was not found")));