2 * Copyright (c) 2014 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.mdsal.binding.spec.reflect;
10 import static org.junit.Assert.assertFalse;
11 import static org.junit.Assert.assertTrue;
13 import com.google.common.util.concurrent.ListenableFuture;
14 import java.util.List;
15 import org.junit.Test;
16 import org.opendaylight.yangtools.yang.binding.Augmentation;
17 import org.opendaylight.yangtools.yang.binding.DataObject;
18 import org.opendaylight.yangtools.yang.binding.RpcService;
19 import org.opendaylight.yangtools.yang.common.QName;
21 public class BindingReflectionsTest {
24 public void testBindingWithDummyObject() throws Exception {
25 assertFalse("Should not be RpcType", BindingReflections.isRpcType(DataObject.class));
26 assertTrue("Should be BindingClass", BindingReflections.isBindingClass(DataObject.class));
29 static final class TestImplementation implements Augmentation<TestImplementation>, RpcService {
30 public static final QName QNAME = QName.create("test", "test");
32 @SuppressWarnings("static-method")
33 ListenableFuture<List<Object>> rpcMethodTest() {
38 public Class<TestImplementation> implementedInterface() {
39 return TestImplementation.class;