tests for OFDeviceProvider
Change-Id: If9f2c1f78a940a5485e5390d6d098d74eb00ddc2
Showing
2 changed files
with
2 additions
and
7 deletions
This diff is collapsed. Click to expand it.
... | @@ -80,7 +80,7 @@ public class OpenFlowPacketProviderTest { | ... | @@ -80,7 +80,7 @@ public class OpenFlowPacketProviderTest { |
80 | private final TestPacketRegistry registry = new TestPacketRegistry(); | 80 | private final TestPacketRegistry registry = new TestPacketRegistry(); |
81 | private final TestController controller = new TestController(); | 81 | private final TestController controller = new TestController(); |
82 | 82 | ||
83 | - private final TestOpenFlowSwitch sw = new TestOpenFlowSwitch(PLIST); | 83 | + private final TestOpenFlowSwitch sw = new TestOpenFlowSwitch(); |
84 | 84 | ||
85 | @Before | 85 | @Before |
86 | public void startUp() { | 86 | public void startUp() { |
... | @@ -317,15 +317,10 @@ public class OpenFlowPacketProviderTest { | ... | @@ -317,15 +317,10 @@ public class OpenFlowPacketProviderTest { |
317 | 317 | ||
318 | private class TestOpenFlowSwitch implements OpenFlowSwitch { | 318 | private class TestOpenFlowSwitch implements OpenFlowSwitch { |
319 | 319 | ||
320 | - List<OFPortDesc> ports; | ||
321 | RoleState state; | 320 | RoleState state; |
322 | List<OFMessage> sent = new ArrayList<OFMessage>(); | 321 | List<OFMessage> sent = new ArrayList<OFMessage>(); |
323 | OFFactory factory = OFFactoryVer10.INSTANCE; | 322 | OFFactory factory = OFFactoryVer10.INSTANCE; |
324 | 323 | ||
325 | - TestOpenFlowSwitch(List<OFPortDesc> p) { | ||
326 | - ports = p; | ||
327 | - } | ||
328 | - | ||
329 | @Override | 324 | @Override |
330 | public void sendMsg(OFMessage msg) { | 325 | public void sendMsg(OFMessage msg) { |
331 | sent.add(msg); | 326 | sent.add(msg); |
... | @@ -351,7 +346,7 @@ public class OpenFlowPacketProviderTest { | ... | @@ -351,7 +346,7 @@ public class OpenFlowPacketProviderTest { |
351 | 346 | ||
352 | @Override | 347 | @Override |
353 | public List<OFPortDesc> getPorts() { | 348 | public List<OFPortDesc> getPorts() { |
354 | - return ports; | 349 | + return PLIST; |
355 | } | 350 | } |
356 | 351 | ||
357 | @Override | 352 | @Override | ... | ... |
-
Please register or login to post a comment