2 * Copyright (c) 2017 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.Test;
14 public class Bug7424Test extends AbstractYangTest {
16 public void testRpc()throws Exception {
17 assertSourceException(startsWith("Error in module 'foo': cannot add '(foo)name'. Node name collision:"
18 + " '(foo)name' already declared"), "/bugs/bug7424/foo-rpc.yang");
22 public void testNotification() {
23 assertSourceException(startsWith("Error in module 'foo': cannot add '(foo)name'. Node name collision:"
24 + " '(foo)name' already declared"), "/bugs/bug7424/foo-notification.yang");
28 public void testData() {
29 assertSourceException(startsWith("Error in module 'foo': cannot add '(foo)name'. Node name collision:"
30 + " '(foo)name' already declared"), "/bugs/bug7424/foo-data.yang");
34 public void testRpcUses() {
35 assertSourceException(startsWith("Error in module 'foo': cannot add '(foo)name'. Node name collision:"
36 + " '(foo)name' already declared"), "/bugs/bug7424/foo-rpc-uses.yang");