diff options
author | Jan Srnicek <jsrnicek@cisco.com> | 2017-02-07 13:50:59 +0100 |
---|---|---|
committer | Jan Srnicek <jsrnicek@cisco.com> | 2017-02-08 08:29:29 +0000 |
commit | 3cecf2cd177bbcb87ad0d5eb19e8e0c80a016a5d (patch) | |
tree | 54c7c6df14bf0013a7a8ac7de259388b60a3a9f6 /v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/ip/v4/Ipv4CustomizerTest.java | |
parent | 1e562c89ed44a33ffafd310a9e58a45bad65339e (diff) |
HC2VPP-11/HC2VPP-12 - refactored ipv4/6 logic/tests
- all dumping logic moved under common abstract classes
- added tests
Change-Id: Ifdee84795bd8cf6f0d29349dd2cfcf9b2bbec1c9
Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/ip/v4/Ipv4CustomizerTest.java')
-rw-r--r-- | v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/ip/v4/Ipv4CustomizerTest.java | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/ip/v4/Ipv4CustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/ip/v4/Ipv4CustomizerTest.java new file mode 100644 index 000000000..da2213027 --- /dev/null +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/ip/v4/Ipv4CustomizerTest.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2016 Cisco and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.fd.hc2vpp.v3po.interfacesstate.ip.v4; + +import io.fd.hc2vpp.common.test.read.ReaderCustomizerTest; +import io.fd.honeycomb.translate.spi.read.ReaderCustomizer; +import org.junit.Test; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.Interface2Builder; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.Ipv4; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.Ipv4Builder; + +import static org.mockito.Mockito.verifyZeroInteractions; + +public class Ipv4CustomizerTest extends ReaderCustomizerTest<Ipv4, Ipv4Builder> { + + public Ipv4CustomizerTest() { + super(Ipv4.class, Interface2Builder.class); + } + + @Test + public void testReadCurrentAttributes() throws Exception { + customizer.readCurrentAttributes(null, null, ctx); + verifyZeroInteractions(api); + } + + @Override + protected ReaderCustomizer<Ipv4, Ipv4Builder> initCustomizer() { + return new Ipv4Customizer(api); + } +}
\ No newline at end of file |