aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/core/api/src/test/java/org/onosproject/net/newresource/ResourceAllocationTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/onos/core/api/src/test/java/org/onosproject/net/newresource/ResourceAllocationTest.java')
-rw-r--r--framework/src/onos/core/api/src/test/java/org/onosproject/net/newresource/ResourceAllocationTest.java12
1 files changed, 3 insertions, 9 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)