diff options
author | Ashlee Young <ashlee@wildernessvoice.com> | 2015-12-06 07:15:03 -0800 |
---|---|---|
committer | Ashlee Young <ashlee@wildernessvoice.com> | 2015-12-08 10:55:21 -0800 |
commit | 76dc892491948adae5e5e62cf94448967e8d865b (patch) | |
tree | 7a33ef05cc583946db21edad627060f280a53549 /framework/src/onos/core/api/src/test/java/org/onosproject/net/newresource | |
parent | d333c63fdec8b064184b0a26f8d777f267577fde (diff) |
Fixes bad POM file with ONOS commit 8c68536972f63069c263635c9d9f4f31d7f3e9a2
Change-Id: I7adb5a2d3738d53dbc41db7577768b0e7ced5450
Signed-off-by: Ashlee Young <ashlee@wildernessvoice.com>
Diffstat (limited to 'framework/src/onos/core/api/src/test/java/org/onosproject/net/newresource')
2 files changed, 14 insertions, 32 deletions
diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/net/newresource/ResourceAllocationTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/net/newresource/ResourceAllocationTest.java index 5f448221..d21c4b1b 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/net/newresource/ResourceAllocationTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/net/newresource/ResourceAllocationTest.java @@ -18,9 +18,7 @@ package org.onosproject.net.newresource; import com.google.common.testing.EqualsTester; import org.junit.Test; import org.onlab.packet.VlanId; -import org.onosproject.net.ConnectPoint; import org.onosproject.net.DeviceId; -import org.onosproject.net.LinkKey; import org.onosproject.net.PortNumber; import org.onosproject.net.intent.IntentId; @@ -29,18 +27,14 @@ public class ResourceAllocationTest { private static final DeviceId D1 = DeviceId.deviceId("of:001"); private static final DeviceId D2 = DeviceId.deviceId("of:002"); private static final PortNumber P1 = PortNumber.portNumber(1); - private static final ConnectPoint CP1_1 = new ConnectPoint(D1, P1); - private static final ConnectPoint CP2_1 = new ConnectPoint(D2, P1); private static final VlanId VLAN1 = VlanId.vlanId((short) 100); private static final IntentId IID1 = IntentId.valueOf(30); - private static final LinkKey LK1 = LinkKey.linkKey(CP1_1, CP2_1); - private static final LinkKey LK2 = LinkKey.linkKey(CP2_1, CP1_1); @Test public void testEquals() { - ResourceAllocation alloc1 = new ResourceAllocation(ResourcePath.discrete(LK1, VLAN1), IID1); - ResourceAllocation sameAsAlloc1 = new ResourceAllocation(ResourcePath.discrete(LK1, VLAN1), IID1); - ResourceAllocation alloc2 = new ResourceAllocation(ResourcePath.discrete(LK2, VLAN1), IID1); + ResourceAllocation alloc1 = new ResourceAllocation(ResourcePath.discrete(D1, P1, VLAN1), IID1); + ResourceAllocation sameAsAlloc1 = new ResourceAllocation(ResourcePath.discrete(D1, P1, VLAN1), IID1); + ResourceAllocation alloc2 = new ResourceAllocation(ResourcePath.discrete(D2, P1, VLAN1), IID1); new EqualsTester() .addEqualityGroup(alloc1, sameAsAlloc1) diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/net/newresource/ResourcePathTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/net/newresource/ResourcePathTest.java index 35dcf1ec..4bbb458c 100644 --- a/framework/src/onos/core/api/src/test/java/org/onosproject/net/newresource/ResourcePathTest.java +++ b/framework/src/onos/core/api/src/test/java/org/onosproject/net/newresource/ResourcePathTest.java @@ -19,9 +19,7 @@ import com.google.common.testing.EqualsTester; import org.junit.Test; import org.onlab.packet.VlanId; import org.onlab.util.Bandwidth; -import org.onosproject.net.ConnectPoint; import org.onosproject.net.DeviceId; -import org.onosproject.net.LinkKey; import org.onosproject.net.PortNumber; import java.util.Optional; @@ -35,19 +33,17 @@ public class ResourcePathTest { private static final DeviceId D1 = DeviceId.deviceId("of:001"); private static final DeviceId D2 = DeviceId.deviceId("of:002"); private static final PortNumber P1 = PortNumber.portNumber(1); - private static final ConnectPoint CP1_1 = new ConnectPoint(D1, P1); - private static final ConnectPoint CP2_1 = new ConnectPoint(D2, P1); private static final VlanId VLAN1 = VlanId.vlanId((short) 100); private static final Bandwidth BW1 = Bandwidth.gbps(2); private static final Bandwidth BW2 = Bandwidth.gbps(1); @Test public void testEquals() { - ResourcePath resource1 = ResourcePath.discrete(LinkKey.linkKey(CP1_1, CP2_1), VLAN1); - ResourcePath sameAsResource1 = ResourcePath.discrete(LinkKey.linkKey(CP1_1, CP2_1), VLAN1); - ResourcePath resource2 = ResourcePath.discrete(LinkKey.linkKey(CP2_1, CP1_1), VLAN1); - ResourcePath resource3 = ResourcePath.continuous(BW1.bps(), LinkKey.linkKey(CP1_1, CP2_1), BW1); - ResourcePath sameAsResource3 = ResourcePath.continuous(BW2.bps(), LinkKey.linkKey(CP1_1, CP2_1), BW1); + ResourcePath resource1 = ResourcePath.discrete(D1, P1, VLAN1); + ResourcePath sameAsResource1 = ResourcePath.discrete(D1, P1, VLAN1); + ResourcePath resource2 = ResourcePath.discrete(D2, P1, VLAN1); + ResourcePath resource3 = ResourcePath.continuous(BW1.bps(), D1, P1, BW1); + ResourcePath sameAsResource3 = ResourcePath.continuous(BW2.bps(), D1, P1, BW1); new EqualsTester() .addEqualityGroup(resource1, sameAsResource1) @@ -57,13 +53,6 @@ public class ResourcePathTest { } @Test - public void testCreateWithZeroComponent() { - ResourcePath path = ResourcePath.discrete(); - - assertThat(path, is(ResourcePath.ROOT)); - } - - @Test public void testComponents() { ResourcePath port = ResourcePath.discrete(D1, P1); @@ -72,25 +61,24 @@ public class ResourcePathTest { @Test public void testThereIsParent() { - ResourcePath path = ResourcePath.discrete(LinkKey.linkKey(CP1_1, CP2_1), VLAN1); - ResourcePath parent = ResourcePath.discrete(LinkKey.linkKey(CP1_1, CP2_1)); + ResourcePath path = ResourcePath.discrete(D1, P1, VLAN1); + ResourcePath parent = ResourcePath.discrete(D1, P1); assertThat(path.parent(), is(Optional.of(parent))); } @Test public void testNoParent() { - ResourcePath path = ResourcePath.discrete(LinkKey.linkKey(CP1_1, CP2_1)); + ResourcePath path = ResourcePath.discrete(D1); assertThat(path.parent(), is(Optional.of(ResourcePath.ROOT))); } @Test public void testBase() { - LinkKey linkKey = LinkKey.linkKey(CP1_1, CP2_1); - ResourcePath path = ResourcePath.discrete(linkKey); + ResourcePath path = ResourcePath.discrete(D1); - LinkKey child = (LinkKey) path.last(); - assertThat(child, is(linkKey)); + DeviceId child = (DeviceId) path.last(); + assertThat(child, is(D1)); } } |