X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-broker%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fbinding%2Fimpl%2FContextExtractorTest.java;fp=opendaylight%2Fmd-sal%2Fsal-binding-broker%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fbinding%2Fimpl%2FContextExtractorTest.java;h=0000000000000000000000000000000000000000;hp=616c33423db6f0d5d6bc0aea957518ca7d9f4d10;hb=2611e6a728e586ea34dd891f30a473bf54d6cbd8;hpb=aaea3e9a92ae9d6fac04c4a065db4b35cbca9ed0 diff --git a/opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/ContextExtractorTest.java b/opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/ContextExtractorTest.java deleted file mode 100644 index 616c33423d..0000000000 --- a/opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/ContextExtractorTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.md.sal.binding.impl; - -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; - -import org.junit.Test; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.bi.ba.rpcservice.rev140701.RockTheHouseInput; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.bi.ba.rpcservice.rev140701.RockTheHouseInputBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.Top; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.rpc.routing.rev140701.EncapsulatedRoute; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.rpc.routing.rev140701.EncapsulatedRouteInGrouping; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.rpc.routing.rev140701.RoutedSimpleRouteInput; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.rpc.routing.rev140701.RoutedSimpleRouteInputBuilder; -import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; - -@Deprecated -public final class ContextExtractorTest { - - public interface Transitive extends EncapsulatedRouteInGrouping { - - } - - private static final InstanceIdentifier TEST_ROUTE = InstanceIdentifier.create(Top.class); - private static final Transitive TEST_GROUPING = new Transitive() { - - @Override - public Class implementedInterface() { - return Transitive.class; - } - - @Override - public EncapsulatedRoute getRoute() { - return new EncapsulatedRoute(TEST_ROUTE); - } - }; - - @Test - public void testNonRoutedExtraction() { - final ContextReferenceExtractor extractor = ContextReferenceExtractor.from(RockTheHouseInput.class); - final RockTheHouseInput input = new RockTheHouseInputBuilder().build(); - final InstanceIdentifier extractedValue = extractor.extract(input); - assertNull(extractedValue); - } - - @Test - public void testRoutedSimpleExtraction() { - final ContextReferenceExtractor extractor = ContextReferenceExtractor.from(RoutedSimpleRouteInput.class); - final RoutedSimpleRouteInput input = new RoutedSimpleRouteInputBuilder().setRoute(TEST_ROUTE).build(); - final InstanceIdentifier extractedValue = extractor.extract(input); - assertSame(TEST_ROUTE,extractedValue); - } - - @Test - public void testRoutedEncapsulatedExtraction() { - final ContextReferenceExtractor extractor = ContextReferenceExtractor.from(EncapsulatedRouteInGrouping.class); - final InstanceIdentifier extractedValue = extractor.extract(TEST_GROUPING); - assertSame(TEST_ROUTE,extractedValue); - - } - - @Test - public void testRoutedEncapsulatedTransitiveExtraction() { - final ContextReferenceExtractor extractor = ContextReferenceExtractor.from(Transitive.class); - final InstanceIdentifier extractedValue = extractor.extract(TEST_GROUPING); - assertSame(TEST_ROUTE,extractedValue); - } -}