Committed by
Gerrit Code Review
ONOS-4107: ISIS Provider - Junit
Change-Id: Ieeb157e9be6f1ca54c9129713b7eaef26341244e
Showing
3 changed files
with
10 additions
and
6 deletions
| ... | @@ -21,20 +21,19 @@ import org.onlab.packet.Ip4Address; | ... | @@ -21,20 +21,19 @@ import org.onlab.packet.Ip4Address; |
| 21 | import org.onlab.util.Bandwidth; | 21 | import org.onlab.util.Bandwidth; |
| 22 | import org.onosproject.isis.controller.topology.IsisLinkTed; | 22 | import org.onosproject.isis.controller.topology.IsisLinkTed; |
| 23 | 23 | ||
| 24 | +import java.util.ArrayList; | ||
| 24 | import java.util.List; | 25 | import java.util.List; |
| 25 | 26 | ||
| 26 | /** | 27 | /** |
| 27 | * Representation of an ISIS device information. | 28 | * Representation of an ISIS device information. |
| 28 | */ | 29 | */ |
| 29 | public class DefaultIsisLinkTed implements IsisLinkTed { | 30 | public class DefaultIsisLinkTed implements IsisLinkTed { |
| 30 | - | ||
| 31 | - | ||
| 32 | private int administrativeGroup; | 31 | private int administrativeGroup; |
| 33 | private Ip4Address ipv4InterfaceAddress; | 32 | private Ip4Address ipv4InterfaceAddress; |
| 34 | private Ip4Address ipv4NeighborAddress; | 33 | private Ip4Address ipv4NeighborAddress; |
| 35 | private Bandwidth maximumLinkBandwidth; | 34 | private Bandwidth maximumLinkBandwidth; |
| 36 | private Bandwidth maximumReservableLinkBandwidth; | 35 | private Bandwidth maximumReservableLinkBandwidth; |
| 37 | - private List<Bandwidth> unreservedBandwidth; | 36 | + private List<Bandwidth> unreservedBandwidth = new ArrayList<>(); |
| 38 | private long teDefaultMetric; | 37 | private long teDefaultMetric; |
| 39 | 38 | ||
| 40 | @Override | 39 | @Override |
| ... | @@ -134,13 +133,13 @@ public class DefaultIsisLinkTed implements IsisLinkTed { | ... | @@ -134,13 +133,13 @@ public class DefaultIsisLinkTed implements IsisLinkTed { |
| 134 | Objects.equal(ipv4NeighborAddress, that.ipv4NeighborAddress) && | 133 | Objects.equal(ipv4NeighborAddress, that.ipv4NeighborAddress) && |
| 135 | Objects.equal(maximumLinkBandwidth, that.maximumLinkBandwidth) && | 134 | Objects.equal(maximumLinkBandwidth, that.maximumLinkBandwidth) && |
| 136 | Objects.equal(maximumReservableLinkBandwidth, | 135 | Objects.equal(maximumReservableLinkBandwidth, |
| 137 | - that.maximumReservableLinkBandwidth) && | 136 | + that.maximumReservableLinkBandwidth) && |
| 138 | Objects.equal(teDefaultMetric, that.teDefaultMetric); | 137 | Objects.equal(teDefaultMetric, that.teDefaultMetric); |
| 139 | } | 138 | } |
| 140 | 139 | ||
| 141 | @Override | 140 | @Override |
| 142 | public int hashCode() { | 141 | public int hashCode() { |
| 143 | return Objects.hashCode(administrativeGroup, ipv4InterfaceAddress, | 142 | return Objects.hashCode(administrativeGroup, ipv4InterfaceAddress, |
| 144 | - ipv4NeighborAddress, maximumLinkBandwidth, teDefaultMetric); | 143 | + ipv4NeighborAddress, maximumLinkBandwidth, teDefaultMetric); |
| 145 | } | 144 | } |
| 146 | } | 145 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| 1 | COMPILE_DEPS = [ | 1 | COMPILE_DEPS = [ |
| 2 | '//lib:CORE_DEPS', | 2 | '//lib:CORE_DEPS', |
| 3 | '//protocols/isis/api:onos-protocols-isis-api', | 3 | '//protocols/isis/api:onos-protocols-isis-api', |
| 4 | + '//protocols/isis/ctl:onos-protocols-isis-ctl', | ||
| 5 | +] | ||
| 6 | + | ||
| 7 | +TEST_DEPS = [ | ||
| 8 | + '//lib:TEST_ADAPTERS', | ||
| 4 | ] | 9 | ] |
| 5 | 10 | ||
| 6 | osgi_jar_with_tests ( | 11 | osgi_jar_with_tests ( |
| 7 | deps = COMPILE_DEPS, | 12 | deps = COMPILE_DEPS, |
| 13 | + test_deps = TEST_DEPS, | ||
| 8 | ) | 14 | ) |
| 9 | - | ... | ... |
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment