summaryrefslogtreecommitdiffstats
path: root/framework/src/onos/incubator/net
diff options
context:
space:
mode:
authorAshlee Young <ashlee@wildernessvoice.com>2015-11-05 14:00:42 -0800
committerAshlee Young <ashlee@wildernessvoice.com>2015-11-05 14:00:42 -0800
commitb34f82bf11934fc6b938ef997d536a7ccea76c36 (patch)
tree10559ebf65962abb741883ca9d23aec241ced504 /framework/src/onos/incubator/net
parent2cdecb8c41956d7dd8ab5d59591ebc21f3c64a9e (diff)
Updates ONOS tree to checkin id ca9cc8e28eba18da77f4fa021fb7c3a3f76e5d44
upstream. Change-Id: I49f8e41733afea8101ec50c0102213c8d18949ae Signed-off-by: Ashlee Young <ashlee@wildernessvoice.com>
Diffstat (limited to 'framework/src/onos/incubator/net')
-rw-r--r--framework/src/onos/incubator/net/src/test/java/org/onosproject/incubator/net/mcast/impl/MulticastRouteManagerTest.java53
1 files changed, 12 insertions, 41 deletions
diff --git a/framework/src/onos/incubator/net/src/test/java/org/onosproject/incubator/net/mcast/impl/MulticastRouteManagerTest.java b/framework/src/onos/incubator/net/src/test/java/org/onosproject/incubator/net/mcast/impl/MulticastRouteManagerTest.java
index 545e21d0..bec9cded 100644
--- a/framework/src/onos/incubator/net/src/test/java/org/onosproject/incubator/net/mcast/impl/MulticastRouteManagerTest.java
+++ b/framework/src/onos/incubator/net/src/test/java/org/onosproject/incubator/net/mcast/impl/MulticastRouteManagerTest.java
@@ -23,10 +23,8 @@ import org.onlab.junit.TestUtils;
import org.onlab.packet.IpPrefix;
import org.onosproject.common.event.impl.TestEventDispatcher;
import org.onosproject.core.ApplicationId;
-import org.onosproject.core.CoreService;
+import org.onosproject.core.CoreServiceAdapter;
import org.onosproject.core.DefaultApplicationId;
-import org.onosproject.core.IdGenerator;
-import org.onosproject.core.Version;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.PortNumber;
import org.onosproject.net.mcast.McastEvent;
@@ -35,7 +33,6 @@ import org.onosproject.net.mcast.McastRoute;
import org.onosproject.store.service.TestStorageService;
import java.util.List;
-import java.util.Set;
import static junit.framework.Assert.fail;
import static junit.framework.TestCase.assertEquals;
@@ -48,16 +45,16 @@ import static org.onosproject.net.NetTestTools.injectEventDispatcher;
public class MulticastRouteManagerTest {
McastRoute r1 = new McastRoute(IpPrefix.valueOf("1.1.1.1/8"),
- IpPrefix.valueOf("1.1.1.2/8"),
- McastRoute.Type.IGMP);
+ IpPrefix.valueOf("1.1.1.2/8"),
+ McastRoute.Type.IGMP);
McastRoute r11 = new McastRoute(IpPrefix.valueOf("1.1.1.1/8"),
- IpPrefix.valueOf("1.1.1.2/8"),
- McastRoute.Type.STATIC);
+ IpPrefix.valueOf("1.1.1.2/8"),
+ McastRoute.Type.STATIC);
McastRoute r2 = new McastRoute(IpPrefix.valueOf("2.2.2.1/8"),
- IpPrefix.valueOf("2.2.2.2/8"),
- McastRoute.Type.PIM);
+ IpPrefix.valueOf("2.2.2.2/8"),
+ McastRoute.Type.PIM);
ConnectPoint cp1 = new ConnectPoint(did("1"), PortNumber.portNumber(1));
@@ -75,7 +72,7 @@ public class MulticastRouteManagerTest {
injectEventDispatcher(manager, new TestEventDispatcher());
TestUtils.setField(manager, "storageService", new TestStorageService());
TestUtils.setField(manager, "coreService", new TestCoreService());
- events = Lists.newArrayList();
+ events = Lists.newArrayList();
manager.activate();
manager.addListener(listener);
}
@@ -152,49 +149,23 @@ public class MulticastRouteManagerTest {
for (int i = 0; i < evs.length; i++) {
if (evs[i] != events.get(i).type()) {
- fail(String.format("Mismtached events# obtained -> %s : expected %s",
+ fail(String.format("Mismatched events# obtained -> %s : expected %s",
events, evs));
}
}
}
class TestMulticastListener implements McastListener {
-
@Override
public void event(McastEvent event) {
events.add(event);
}
}
- private class TestCoreService implements CoreService {
- @Override
- public Version version() {
- return null;
- }
-
- @Override
- public Set<ApplicationId> getAppIds() {
- return null;
- }
-
- @Override
- public ApplicationId getAppId(Short id) {
- return null;
- }
-
- @Override
- public ApplicationId getAppId(String name) {
- return null;
- }
-
- @Override
- public ApplicationId registerApplication(String identifier) {
- return new DefaultApplicationId(0, identifier);
- }
-
+ private class TestCoreService extends CoreServiceAdapter {
@Override
- public IdGenerator getIdGenerator(String topic) {
- return null;
+ public ApplicationId registerApplication(String name) {
+ return new DefaultApplicationId(0, name);
}
}
}