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;
11 import static org.junit.jupiter.api.Assertions.assertEquals;
13 import java.util.Collection;
14 import org.junit.jupiter.api.Test;
15 import org.opendaylight.yangtools.yang.model.api.Deviation;
16 import org.opendaylight.yangtools.yang.model.api.Module;
18 class Bug4933Test extends AbstractYangTest {
21 final var context = assertEffectiveModelDir("/bugs/bug4933/correct");
23 final Module foo = context.findModules("foo").iterator().next();
24 Collection<? extends Deviation> deviations = foo.getDeviations();
25 assertEquals(4, deviations.size());
29 void incorrectKeywordTest() {
30 assertSourceExceptionDir("/bugs/bug4933/incorrect",
31 startsWith("String 'not_supported' is not valid deviate argument"));